From 26f540fe0254d25db968178d226305bd4b85cf50 Mon Sep 17 00:00:00 2001 From: haijian Date: Tue, 21 Jan 2020 15:50:20 +0200 Subject: [PATCH] feat(typescript): add View, NavigationTrigger, lifecycle types Fixes #422 --- ...aadin-router-navigation-trigger-demos.html | 2 +- docs/vaadin-router/demo/demo-shell.html | 14 +- ...aadin-router-navigation-trigger-demos.html | 2 +- interfaces.d.ts | 266 +++++++++++------- test/typescript/compile_fixture.ts | 82 +++++- 5 files changed, 258 insertions(+), 108 deletions(-) diff --git a/demo/vaadin-router-navigation-trigger-demos.html b/demo/vaadin-router-navigation-trigger-demos.html index c2ecbecf..5856185d 100644 --- a/demo/vaadin-router-navigation-trigger-demos.html +++ b/demo/vaadin-router-navigation-trigger-demos.html @@ -28,7 +28,7 @@

Navigation Triggers

Developers can define and use additional Navigation Triggers that are specific to their application. A Navigation Trigger object must have two methods: activate() to start listening on some UI events, - and deactivate() to stop. + and inactivate() to stop.

NavigationTrigger.POPSTATE

diff --git a/docs/vaadin-router/demo/demo-shell.html b/docs/vaadin-router/demo/demo-shell.html index 12dcfa55..d6dc71c6 100644 --- a/docs/vaadin-router/demo/demo-shell.html +++ b/docs/vaadin-router/demo/demo-shell.html @@ -6624,7 +6624,18 @@ * @memberof Vaadin */Vaadin.ThemePropertyMixin=function(superClass){return(/*#__PURE__*/function(_superClass){babelHelpers.inherits(VaadinThemePropertyMixin,_superClass);function VaadinThemePropertyMixin(){babelHelpers.classCallCheck(this,VaadinThemePropertyMixin);return babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(VaadinThemePropertyMixin).apply(this,arguments))}babelHelpers.createClass(VaadinThemePropertyMixin,[{key:"attributeChangedCallback",/** @protected */value:function attributeChangedCallback(name,oldValue,newValue){babelHelpers.get(babelHelpers.getPrototypeOf(VaadinThemePropertyMixin.prototype),"attributeChangedCallback",this).call(this,name,oldValue,newValue);if("theme"===name){this._setTheme(newValue)}}}],[{key:"properties",get:function get(){return{/** * Helper property with theme attribute value facilitating propagation - * in shadow DOM. Allows using `theme$="[[theme]]"` in the template. + * in shadow DOM. + * + * Enables the component implementation to propagate the `theme` + * attribute value to the subcomponents in Shadow DOM by binding + * the subcomponent’s "theme" attribute to the `theme` property of + * the host. + * + * **NOTE:** Extending the mixin only provides the property for binding, + * and does not make the propagation alone. + * + * See [Theme Attribute and Subcomponents](https://github.com/vaadin/vaadin-themable-mixin/wiki/5.-Theme-Attribute-and-Subcomponents). + * page for more information. * * @protected */theme:{type:String,readOnly:!0}}}}]);return VaadinThemePropertyMixin}(superClass))};