Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

aurelia-templating-resources

aurelia48.7kMIT1.15.1TypeScript support: included

A standard set of behaviors, converters and other resources for use with the Aurelia templating library.

aurelia, templating, html

readme

Aurelia

License: MIT npm Version ci Discourse status Twitter Discord Chat

aurelia-templating-resources

This library is part of the Aurelia platform and contains a standard set of behaviors, converters and other resources for use with the Aurelia templating library.

To keep up to date on Aurelia, please visit and subscribe to the official blog and our email list. We also invite you to follow us on twitter. If you have questions look around our Discourse forums, chat in our community on Discord or use stack overflow. Documentation can be found in our developer hub.

Platform Support

This library can be used in the browser only.

Building The Code

To build the code, follow these steps.

  1. Ensure that NodeJS is installed. This provides the platform on which the build tooling runs.
  2. From the project folder, execute the following command:

    npm install
  3. To build the code, you can now run:

    npm run build
  4. You will find the compiled code in the dist folder, available in three module formats: AMD, CommonJS and ES6.

Running The Tests

To run the unit tests, first ensure that you have followed the steps above in order to install all dependencies and successfully build the library. Once you have done that, proceed with these additional steps:

  1. You can now run the tests with this command:

    npm run test
  2. With watch options to rerun the test (headless):

    npm run test:watch
  3. With watch options to rerun the test (with browser):

    npm run test:debugger

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

1.15.1 (2024-01-23)

Bug Fixes

  • compose: properly handle replace strategy (359c960)

1.15.0 (2023-11-20)

Features

1.14.3 (2022-04-19)

Bug Fixes

  • typings: ensure compat typings for abstract repeater (812b3fa)

1.14.2 (2022-04-19)

Bug Fixes

  • typings: ensure abstract repeater typings compat (#418) (8a234b5)

1.14.1 (2022-04-01)

Bug Fixes

1.14.0 (2022-03-24)

Bug Fixes

  • build: tweak conventional changelog release count (25b7c3f)

Features

  • sanitizer: throw instead (0ed9542)

1.13.1 (2020-09-14)

Bug Fixes

  • repeat: add failing test to vereify multiple matcher extraction (9795be6)
  • repeat: ensure matcher extraction once (0812425)

1.13.0 (2020-01-28)

Bug Fixes

  • all: change package.json module from es2015 back to native-modules (6a8f0c8)
  • repeat: use utility fns for ie11 compat (a59a2de)

1.12.0 (2019-08-06)

Bug Fixes

  • repeat: ensure backward compat, fix tests (62958e5)
  • repeat: properly find matcher binding (a579644)

Features

1.11.0 (2019-05-30)

Bug Fixes

  • typings: explicit return typings for createFullOverrideContext (abe97d3)

1.10.0 (2019-05-02)

1.9.1 (2019-03-28)

Bug Fixes

  • html-sanitizer: only warn if sanitization is attempted (82beb9b)

1.9.0 (2019-03-27)

Bug Fixes

  • improve typescript typings of SignalBindingBehavior.bind (347f125), closes #338

Features

  • html-resource-plugin, dynamic-element: Add shadow dom support (56d29e9), closes #368
  • html-resource-plugin, dynamic-element: Add shadow dom support (43e9434), closes #368
  • html-resource-plugin, dynamic-element: Add shadow dom support (ac04d3e), closes #368
  • html-resource-plugin, dynamic-element: Add shadow dom support (ddd19a1), closes #368
  • html-resource-plugin, dynamic-element: Add shadow dom support (7264c35), closes #367

Reverts

  • Revert "fix(ci): update deps, jspm deps, test deps, ci" (b89c44c)

1.8.0 (2019-01-26)

1.7.2 (2019-01-19)

1.7.1 (2018-07-05)

Bug Fixes

  • fix missing self binding behavior (85827d0)

1.7.0 (2018-07-02)

1.6.1 (2018-07-02)

Bug Fixes

  • compose: await prev lifecycle composition fix #335 (2bd4060)
  • compose: rethrow instead of logging fix #346 (7149ffd)
  • Repeat: ignore mutation while processing instance changed (a372db5)

Performance Improvements

  • all: synchronous resources registration (2551e28)

1.6.0 (2018-03-18)

Bug Fixes

  • analyze-view-factory: add else to lifecycleOptionalBehaviors (5958a65)
  • analyze-view-factory: add hide to lifecycleOptionalBehaviors (cd8df6d), closes #334
  • debounce: debounce binding call instead updatesource (e9fb62c)
  • throttle-test: remove early return (b80ecc3)
  • UpdateTrigger: sync with binding (3969dc6)

1.5.4 (2017-10-27)

Bug Fixes

1.5.3 (2017-10-24)

Bug Fixes

  • if-else: Fixed missing binding context when rendering else block (e55fdf9)
  • if-else: Fixed typo and removed obsolete error (18a4e7e)
  • if-else: Removed fit in tests (39fb831)
  • if-else: Simplified initial condition check (2103aca)

1.5.2 (2017-10-23)

Bug Fixes

  • if-core.js: child view re-binding issue (82cb331)

1.5.1 (2017-10-02)

Bug Fixes

  • if: resolve if.html error (63e8d47)

1.5.0 (2017-10-02)

Bug Fixes

  • build: build is not compatible with Node 8 (a5cbd4d)
  • compose: await composition/activation (685344e), closes #299 #240
  • css-resource: ensure only global styles get injected globally (5513a36), closes #304
  • repeat: bug when "if.bind", "repeat.for" and animations are used in (251a319)
  • set-repeat-strategy: fix negative index error with empty set (5d6a464), closes #284
  • test: failing tests after IfCustomAttribute refactoring (c3c0990), closes #307

Features

  • templating: else custom attribute (8b0131a)

1.4.0 (2017-04-05)

Features

  • templating: support popular transpilers (901cfd8)

1.3.1 (2017-02-27)

1.3.0 (2017-02-26)

Features

  • SelfBindingBehavior: add SelfBindingBehavior (6dee0cb)
  • swapOrder: add swaporder property for concurrent enter/leave transitions (68b52e5)

1.2.0 (2016-12-10)

1.1.1 (2016-10-06)

Bug Fixes

  • package: add attr-binding-behavior to the list of resources (f059b8b)

1.1.0 (2016-10-05)

Features

1.0.0 (2016-07-27)

1.0.0-rc.1.0.2 (2016-07-25)

Features

  • css-resource: enable styles for no view components (b2876a3)

1.0.0-rc.1.0.1 (2016-07-12)

Bug Fixes

Performance Improvements

  • repeat: provide skipAnimation hint to ViewSlot (48dbc02)

1.0.0-rc.1.0.0 (2016-06-22)

1.0.0-beta.3.0.4 (2016-06-17)

1.0.0-beta.3.0.3 (2016-06-16)

Bug Fixes

  • replaceable: add back for some edge cases (a935e7c)

1.0.0-beta.3.0.2 (2016-06-16)

1.0.0-beta.3.0.1 (2016-06-16)

Features

  • package.json: move default resources from skeleton (ff21a20)

1.0.0-beta.3.0.0 (2016-06-15)

Bug Fixes

  • aurelia-hide: remove /deep/ combinator (98f81ef), closes #224

1.0.0-beta.2.0.0 (2016-05-31)

Bug Fixes

  • replaceable: removed replaceable (6ac5731)
  • spies: move compile-spy and view-spy (72c4433)

BREAKING CHANGES

  • replaceable: This commit removes the replaceable custom attribute. Now that Shadow DOM v1 Slots are implemented there is no more need for this. Replaceable parts for template controllers are still supported for if, repeat, etc. via the part attribute.
  • spies: The compile-spy and view-spy custom attributes have been removed from this library. They are now part of the aurelia-testing library.

1.0.0-beta.1.2.6 (2016-05-12)

1.0.0-beta.1.2.5 (2016-05-10)

1.0.0-beta.1.2.4 (2016-05-06)

Bug Fixes

  • analyze-view-factory: prevent infinite recursion (e9797aa), closes #219

1.0.0-beta.1.2.3 (2016-05-03)

Bug Fixes

Performance Improvements

  • repeat: intelligently reuse items from previous instance (5ad659b), closes #213

1.0.0-beta.1.2.2 (2016-04-13)

1.0.0-beta.1.2.1 (2016-03-29)

Bug Fixes

  • exports: export RepeatStrategyLocator (1c3c418)
  • html-resource-plugin: handle query string and mixed casing (86afdd8), closes #203
  • index: add missing import to re-export (1f9d44b)

1.0.0-beta.1.2.0 (2016-03-22)

Bug Fixes

Features

  • abstract-repeater: add abstract repeater base class (949d009)

Performance Improvements

  • array-repeat-strategy: assign undefined instead of delete property (5ad6cab)

1.0.0-beta.1.1.3 (2016-03-04)

Bug Fixes

  • array-repeat-strategy: prevent array being manipulated during animation (6445cfb), closes #183

1.0.0-beta.1.1.2 (2016-03-01)

Bug Fixes

Features

  • all: update jspm meta; core-js; aurelia deps (f3f0ffa)
  • hide: add hide binding (38760b6)
  • signal: allow multiple names (620614e), closes #170 #172

1.0.0-beta.1.0.4 (2016-01-09)

Bug Fixes

  • compose: properly handle the created callback during dynamic composition (eddec88)
  • repeat: array sync issue when inserting during leave animation (68f7870)
  • repeat: coalesce splices delayed due to leave animation (a08a74a)
  • tests: describe does not expect a done parameter (3ed2b0f)

Features

1.0.0-beta.1.0.3 (2015-12-16)

Bug Fixes

  • plugins: remove possible duplicate file extensions (842a13e)
  • plugins: revert file extentions checking (c67adfb)

Performance Improvements

  • repeat: remove unnecessary binding refresh (a47bf7f)

1.0.0-beta.1.0.2 (2015-12-03)

Bug Fixes

Performance Improvements

  • repeat: in-place binding context update (3eb4ee0)
  • repeat: stateless strategies (480e540)

1.0.0-beta.1.0.1 (2015-11-16)

Bug Fixes

  • build: add missing requires (88d6ac7)

0.17.4 (2015-11-15)

Bug Fixes

0.17.3 (2015-11-13)

Bug Fixes

0.17.2 (2015-11-12)

Bug Fixes

  • sanitize-html: change toView to return null when untrustedMarkup is undefined (ab684b0)

0.17.1 (2015-11-12)

Bug Fixes

0.17.0 (2015-11-10)

Bug Fixes

  • all: remove the global behavior (00e6390)
  • collection-strategy-locator: correctly check for number (265509e)
  • compose: update to latest composition engine (90ce0d4)
  • map-collection-strategy: correctly locate view by index (2a16dac), closes aurelia/templating#158
  • map-collection-strategy: fix animation interaction (d97d577)
  • number-strategy: update binding context after processing items (dc50b10)
  • repeat: overrideContext should not be assigned to bindingContext (164c361)
  • repeat: remove children from the view slot on unbind (7a2bc54)
  • repeat: return from bind if items is undefined (4d89c0b)
  • repeat: various fixes (c5c7532)
  • with: use value as bindingContext (1436ad4)

Features

  • all: update to separated create/bind view pattern (42f3ff9)
  • all: update to use override context (494f1f5)
  • binding-behaviors: add throttle, debounce, signal, oneTime, oneWay and twoWay behaviors (dac5679)
  • collection-strategy-locator: add strategies (60b8067), closes #95
  • repeat: handle value converters (7c689a0), closes aurelia/binding#183
  • UpdateTriggerBindingBehavior: add behavior (3784c4f), closes #137

BREAKING CHANGES

  • all: - The global behavior that previously handled unknown binding commands has been removed. Developers can easily add it back if desired, but we don't think it's something we want out of the box.

0.16.1 (2015-10-15)

Bug Fixes

  • if: connect missing binding context during re-bind (bd075df), closes #117
  • repeat: create full bindingContext before inserting view (ba58062), closes #109

0.16.0 (2015-10-13)

Bug Fixes

  • html-santizer: extract class (59fe7a8)
  • index: export name incorrect (9893d7e)
  • repeat: check if items are instanceof Array on re-bound (e5c000e), closes #108
  • replaceable: template replacement timing (d45b408)
  • show: use animator for class manipulation (019a206)

Features

Performance Improvements

  • repeat: callables (e586de1)
  • repeat: remove unsubscribe closure (c9dd999)

BREAKING CHANGES

  • html-santizer: To change html sanitization, you now register a custom HTMLSanitizer in the DI container to override the default implementation. Also, the value converter name for the sanitizer converter has changed to sanitizeHTML. This creates a case consistency among classes.

0.15.2 (2015-09-07)

0.15.1 (2015-09-07)

Bug Fixes

  • css-resource: ensure that urls in css files are relative to the css file (f73849a), closes #105

0.15.0 (2015-09-05)

Bug Fixes

  • all: update exectionContext to bindingContext naming (4bbcf4c)
  • build: update linting, testing and tools (7959013)
  • css-resource: enable proper style scoping based on shadow dom support (b31dc4d)
  • if: fix animation interaction; enable view cache integration (64fde69)
  • plugins: fixup view engine resource plugins to match the new api (5f422cc)
  • repeat: update binding context after animations have finished (1904ea5), closes #94
  • spec: update executionContext to bindingContext (d207dd2)
  • view-spy: change behavior of value-less attr to only log created (be5b9f6)

Features

  • all: auto create elements from an html file; inject css into head or shadow dom (44693a2)
  • docs: generate api.json from .d.ts file (1ad220b)
  • if: use the view factory caching info (71ec71f)

BREAKING CHANGES

  • all: for some.

0.14.0 (2015-08-14)

Bug Fixes

  • compose: internal variable name consistency (769d03b)
  • index: update to latest configuration api (5b87410)

Features

  • debugging: add compile-spy and view-spy (dc7e273)

0.13.4 (2015-08-05)

Bug Fixes

  • if: delay call to unbind via micro task (9b62109), closes #84
  • if: standardize on using the $parent property to store parent execution context (82e6d13)

0.13.3 (2015-07-30)

Bug Fixes

  • if: only remove when previously shown (9912549)

0.13.2 (2015-07-30)

Bug Fixes

  • repeat: handle changes for numbers (e308452), closes #81

0.13.1 (2015-07-13)

Bug Fixes

  • show: enable the show attribute to work inside shadow DOM (81918c1)

0.13.0 (2015-07-02)

Bug Fixes

0.12.1 (2015-06-09)

Bug Fixes

0.12.0 (2015-06-09)

Bug Fixes

  • if: fix multiple view.bind() call (172bdfa)
  • if: fix passing context binding to the view factory (ecfa3ce), closes #56
  • repeat: handle promises returned by view-slot (2833895), closes #54
  • repeat: unbind children on property change (96a2065)

Features

  • all: add focus attached behavior (ecd300a)
  • compose: suppost syncChildren (0240d5c)
  • docs: Initial YUIDocs (745131b)
  • focus: set two-way as default binding mode (96ef5d4)
  • replaceable: add the replaceable attribute for use with replaceable parts (a5a17bc)

0.11.1 (2015-05-06)

Bug Fixes

  • compose: address multi-prop update with compose (160b4a0)

Features

  • repeat: add support for iterating numbers (9eba93d), closes #50

0.11.0 (2015-05-01)

Bug Fixes

0.10.0 (2015-04-09)

Bug Fixes

  • GlobalBehavior: throw AggregateError (e31875a)
  • repeat: correctly update execution context (e0d11cd)

Features

  • all: update to decorators (3e4a3fa)
  • all: update to work with latest decorators (1c35b50)

Performance Improvements

  • repeat: improve handle splices performance (4a3f8f3)

0.9.2 (2015-03-27)

Bug Fixes

  • compose: null/undefined components should not cause error (14d2653), closes #31

0.9.1 (2015-03-25)

Bug Fixes

  • sanitize-html: incorrect value converter name (aec6395)

0.9.0 (2015-03-25)

Bug Fixes

  • all: update plugin to use new global resource api (09d4103)
  • compose: activate not called on string vm's after initial compose (62c1921), closes #15
  • index: plugin now uses new id-base api for resources (f2cf8bf)
  • sanitize-html: use explicit metadata (8aa3a13)
  • selected-item: remove selected-item behavior (ef130a7)

0.8.10 (2015-03-01)

Bug Fixes

  • package: change jspm directories (b6d0e5c)

0.8.9 (2015-02-28)

Bug Fixes

  • package: update dependencies (3775b62)

0.8.8 (2015-02-19)

Bug Fixes

  • all: add logging dependency (3ca2373)
  • build: add missing bower bump (d7b588d)
  • repeat: provide index not key to updateExecutionContext (3f026d7)
  • repeat: regression with missing items changed handler (1b17a85)

Features

  • repeat: implement support for map (15f8b0a)
  • templating-resources: add defaultSanitizer method to inner-html (9353b47)
  • templating-resources: add innerHTML attached behavior (f6e28fe)
  • with: Add WIP with binding (b8de3ec)

Performance Improvements

  • repeat: don't allocate unnecessay arrays (ab3e6ee)

0.8.7 (2015-02-06)

Bug Fixes

  • repeat: error when items are undefined (1180971)

0.8.6 (2015-02-06)

Bug Fixes

  • compose: all properties not responding to changes (8c7cf24), closes #10

0.8.5 (2015-02-03)

Bug Fixes

  • global-behavior: unsafe method invocation (6e05bb9), closes #2
  • show: css not inside (d98e9a4)
  • show: Make sure this hide overrides everything (e7a0617)

0.8.4 (2015-01-29)

Bug Fixes

  • show: Add type to the node as well (f29153b)
  • show: append aurelia-hide style to head (0258d0d)

0.8.3 (2015-01-24)

Features

  • global-behavior: improve handler flexibility (500633f)

0.8.2 (2015-01-24)

Bug Fixes

  • package: update deps and fix bower semver ranges (5839f55)

Features

  • global-behavior: flexible handlers with jQuery built-in (298c1ae)

0.8.1 (2015-01-22)

Bug Fixes

  • compose: incorrect property name (57c40a0)

0.8.0 (2015-01-22)

Bug Fixes

  • all: update to latest metadata api (62d40db)
  • global-behavior: enforce whitelist and support standard widget destroy pattern (c1e0ddb)
  • package: update dependencies (3f77813)
  • show: switch over to using a class instead of style manipulation (f63e023)

Features

  • all: update to use new fluent metadata (90af3e5)
  • global-behavior: enable automatic jQuery plugin support (4633b7d)
  • selected-item: use default two-way binding now (f0316e3)

0.7.0 (2015-01-12)

Bug Fixes

  • package: update Aurelia dependencies (f121fbb)

0.6.0 (2015-01-07)

Bug Fixes

  • package: update dependencies to latest (dac311a)

0.5.0 (2015-01-06)

Bug Fixes

  • compose: align with new view model load api (a7c65fd)
  • compose: use templating's new built-in composition engine (9f50076)

Features

  • build: update compile, switch to register modules, switch to core-js (a7fe36c)
  • resources: enable plugin model (c78cae8)

Performance Improvements

  • all: minor loop optimization (26a6888)

0.4.0 (2014-12-22)

Bug Fixes

  • package: update templating dependency to latest version (156def6)

Features

  • compose: getViewStrategy hook added (db7e032)

0.3.2 (2014-12-18)

Bug Fixes

  • package: update templating to latest version (c754589)

Features

  • compose: view and view-model are now relative (0b54a75)

0.3.1 (2014-12-18)

Bug Fixes

  • package: update templating to latest version (f0d148c)

0.3.0 (2014-12-17)

Bug Fixes

  • package: updating dependencies to latest versions (033a97f)

0.2.1 (2014-12-12)

Bug Fixes

  • package: update dependencies to latest versions (c900f71)

0.2.0 (2014-12-12)

Bug Fixes

  • package: updating dependencies to their latest versions (173392f)

0.1.0 (2014-12-11)

Bug Fixes

  • package: add missing polyfill (c3fe9aa)

0.0.1 (2014-12-10)