All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
3.2.0 (2020-04-07)
3.1.2 (2019-11-17)
- bin: always compile provided paths for ES5 (7784caa)
3.1.1 (2019-06-19)
- styles: emulated encapsulation not working for IncludeStyles (50e5a3c)
- styles: remove unused id from styleToEmulatedEncapsulation (3b278cd)
- styles: use polymer stylesFromModule to retrieve styles from dom-modules #90 (f585ccd)
- add support for Angular 8 (b72cae9)
3.1.0 (2019-02-03)
- styles: document @angular/router requirement with alternative IncludeStylesNoRouterModule #87 (7bb2886)
3.0.2 (2018-09-11)
- bin: error thrown when tsconfig does not have a target #85 (334089b)
- bin: read compilerOptions target from extended tsconfig.json #85 (489a3bd)
3.0.1 (2018-09-10)
- styles: AoT issue with IncludeStyles decorator (277de3e)
3.0.0 (2018-09-05)
This release adds support for Polymer 3 and introduces several breaking changes. Use the upgrade guide to migrate from v2 to v3.
- bin: output CLI error stack traces (d60d256)
- bin: shadowed error_1 variable (4e892d0)
- bin: use adapter script directly, div wrapper no longer needed (cc6dadf)
- forms: do not use validate() when element does not mutate invalid (eed58dc)
- forms: incorrect value set with vaadin-combo-box when using itemValuePath (4f738a7)
- forms: re-calculate control validity when out of sync with element (d09533a)
- templates: aot decorator issue with polymerHost (788db98)
- templates: property bindings fail when there is no hostProps (ex: vaadin-grid) (f9f9250)
- templates: wait for template shim before initializing app (7822368)
- util: allow multiple calls to whenSet on same target/property (70ab9d0)
- util: search entire prototype chain for existing descriptors when wrapping (7428650)
- add Angular 5 support (da18ef3)
- add CLI to transpile dependencies to ES5 (9b5d70b)
- added polyfill module and updated docs (0548b26)
- v3 rewrite with Polymer 3 support (a43bdb0)
- styles: rename shadycss path to styles, add Polymer style module support (96f15a2), closes #70
- styles: support external stylesheets #32 (13b4cad)
- util: add optional synchronous callback to whenSet (85c99d4)
- Dropped Angular 4 support
- Dropped Polymer 2 support
PolymerModule
has been renamed toOrigamiModule
and no longer requires.forRoot()
[ironControl]
directive has been renamed to[origami]
- Control validation errors are reported as
{ "validate": true }
instead of{ "polymer": true }
, and may be configured by setting[validationErrorsKey]
<template [polymer]="this">
is no longer supported, instead addpolymerHost(AppComponent)
to the component providerswebcomponentsReady()
has been moved to@codebakery/origami/polyfills
and will no longer throw an error if the polyfill is not detectedgetCustomElementClass()
has been removedgetTagName()
has been removedunwrapPolymerEvent()
has been removed
2.0.4 (2018-07-18)
2.0.3 (2018-05-18)
- style: ensure CSS mixins end with semicolon (d5c488b)
2.0.2 (2018-03-12)
2.0.1 (2018-03-12)
Re-publish package with updated readme, no code changes.
2.0.0 (2018-03-09)
Origami v2 brings a lot of exciting changes! The library features a new build system architecture using polymer-webpack-loader. It patches the Angular CLI to inject this loader using the patch-cli.js
script.
Check out the README.md for more details on the new and improved build process.
- util: remove getter functions for Polymer/ShadyCSS/customElements (c479759)
- The
emitChanges
directive has been removed. It was slow and not all that useful for two-way binding. It's much better to either useironControl
and[(ngModel)]
or manually hook into the(property-changed)
event.
Before
<paper-checkbox [(checked)]="isChecked" emitChanges></paper-checkbox>
After
<paper-checkbox
[checked]="isChecked"
(checked-changed)="isChecked = $event.detail.value"
></paper-checkbox>
<!-- or -->
<paper-checkbox [(ngModel)]="isChecked" ironControl></paper-checkbox>
- Collections have been removed. The
ironControl
directive will no longer be automatically applied to elements. If you want to use Angular forms ([(ngModel)]
orformControlName
), you will need to add theironControl
directive manually.
Before
<paper-input [(ngModel)]="value"></paper-input>
After
<paper-input [(ngModel)]="value" ironConrol></paper-input>
- util: The utility functions to get the Polymer/ShadyCSS/customElements properties have been removed. Instead typings are provided in the repo to access window.Polymer and window.ShadyCSS
1.3.4 (2017-11-20)
1.3.3 (2017-11-15)
2.0.0-alpha.5 (2018-01-08)
- patch: support Angular CLI 1.6 (ec0e26d)
2.0.0-alpha.4 (2017-11-15)
This release fixes an NPM tag error.
2.0.0-alpha.3 (2017-11-15)
- forms: guard against ngOnDestroy called before ngOnInit (46e53f0)
- style: stop adding ShadyCSS scoped styles as document-level styles (":not(.style-scope)" fix) (d742059)
2.0.0-alpha.2 (2017-11-03)
- compile with Angular 5 (2634091)
2.0.0-alpha.1 (2017-11-03)
- patch: update patch-cli for Angular CLI 1.5.0 (34d370b)
1.3.4 (2017-11-20)
Fix metadata version mismatch.
1.3.3 (2017-11-15)
This release is to correct an NPM tag error.
1.3.2 (2017-08-17)
- templates: uncaught Promise error when shimming HTMLTemplateElement (b7a6851)
1.3.1 (2017-08-09)
- collections: add paper-toast to PaperElementsModule (e04d8ef)
1.3.0 (2017-08-09)
- util: export internal utility functions for developers to use (64e6923)
1.3.0-beta.1 (2017-07-25)
Re-release incorrect build.
1.3.0-beta.0 (2017-07-24)
With this release, the SystemJS loader is now supported by Origami!
- templates: check for templateInfo before listening for templateInfo changes (46a2973)
- follow Angular package format v4.0 (f69956d), closes #30
- templates: add host property binding (71fcf4c)
Polymer templates now support both event and data binding.
@Component({
selector: 'paper-grid',
template: `
<vaadin-grid [items]="items">
<vaadin-grid-selection-column [(selectAll)]="selectAll">
<template class="header" ngNonBindable [polymer]="this">
<!-- Polymer will bind "selectAll" to the host, which is set to "this" -->
<paper-checkbox checked="{{selectAll}}"></paper-checkbox>
</template>
<template ngNonBindable>
<paper-checkbox checked="{{selected}}></paper-checkbox>
</template>
</vaadin-grid-selection-column>
<vaadin-grid-column>
<template class="header" ngNonBindable>
<div>Number</div>
</template>
<template ngNonBindable>
<!-- Normal event bindings will continue to call the Angular host method -->
<div class="cell" on-click="onClick">[[item]]</div>
</template>
</vaadin-grid-column>
</vaadin-grid>
`
})
export class PaperGridComponent {
@PolymerChanges()
selectAll: boolean;
items = [1, 2, 3];
onClick(e) {
alert('Clicked Number ' + e.model.item);
}
}
Origami's collection libraries should be imported from @codebakery/origami/collections
. The old @codebakery/origami/lib/collections
import path will continue to work but will be removed in the next major revision.
1.2.3 (2017-06-21)
1.2.2 (2017-06-13)
1.2.1 (2017-06-09)
- templates: add warning to use enableLegacyTemplate and shim to fix angular/angular#15557 (137807f), closes #27
1.2.0 (2017-06-08)
CustomStyleService
has been deprecated in favor of PolymerDomSharedStyles
and will be removed in 2.0.0.
A warning will be given when using CustomStyleService.updateCustomStyles()
. Remove it and import PolymerModule.forRoot()
in your application's root module to enable the new automatic custom style handling.
1.1.2 (2017-05-26)
- templates: shim Polymer.TemplateStamp on method host to allow Polymer event bindings (48319bd)
1.1.1 (2017-05-24)
- events: fix [emitChanges] not working with ES6-style Polymer elements (009fdbd)
1.1.0 (2017-05-04)
- util: add webcomponentsReady function to help bootstrap apps (aa093a1)
webcomponentsjs 1.0.0-rc.11 added window.WebComponents
to indicate whether or not polyfills are being loaded. To take advantage of this and reduce complexity, Origami provides webcomponentsReady()
. Instead of adding listeners for WebComponentsReady, just bootstrap the app when the function resolves.
Before:
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
function bootstrap() {
platformBrowserDynamic().bootstrapModule(AppModule);
}
if (window.webcomponentsReady) {
bootstrap();
} else {
window.addEventListener('WebComponentsReady', bootstrap);
}
After:
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { webcomponentsReady } from '@codebakery/origami';
webcomponentsReady().then(() => {
platformBrowserDynamic().bootstrapModule(AppModule);
});
Make sure you update webcomponentsjs! Either explicitly install it, or remove bower_components
and reinstall to get the latest version.
1.0.1 (2017-04-28)
- remove bower install as postinstall action (81a8804)
1.0.0 (2017-04-27)
- events: fix bug where value for decorator was cached across all components (507ac23)
- forms: fix ironControl not updating from selector and incorrectly marking control as dirty (6012359)
0.6.0 (2017-04-17)
- events: the [polymer] selector has changed to [emitChanges], and [polymer-template] selector has changed to [polymer] to better reflect their purposes. The @PolymerProperty decorator has also changed to @PolymerChanges
0.5.0 (2017-04-13)
- aot: AoT compile issue (a5328e3)
0.4.0 (2017-04-12)
0.3.0 (2017-04-11)
- collections: missing paper-icon selectors (05949c9)
- collections: missing paper-tab selector (2f3f6a0)
- events: remove initial polymer property event (fa69915)
- events: PolymerProperty now works automatically with getters and setters (6081552), closes #6
- templates: add input to polymer templates to call Angular methods (79004ec)
- events: This allows Angular to set intial property values, which is more natural for when the decorator is used. It does mean that undefined decorated properties may remain undefined even if their Polymer counterpart has a value. The solution is to always set an initial value in Angular for @PolymerProperty properties.
- events: PolymerProperty.unwrap() has been removed. Decorate setters with @PolymerProperty() instead of unwrapping the value.
0.2.0 (2017-04-10)
- collections: incorrect app-layout selectors (525884b)
- templates: Safari polyfilled templates not recognizing parent as element (7c857c0), closes #5
Initial release 🎉