Steven Orvell
40f02ea178
Remove PropertiesElement in favor of PropertiesMixin.
2017-11-29 16:33:44 -08:00
Steven Orvell
8d57a6e91d
Remove propertyNameForAttribute since it's never needed.
2017-11-29 11:01:02 -08:00
Steven Orvell
e09285dbf1
Fix subclassing and simplify.
2017-11-29 10:42:09 -08:00
Steven Orvell
603123e168
Move property<->attribute case mapping to PropertiesChanged.
2017-11-29 10:25:09 -08:00
Steven Orvell
feac932859
[PropertiesMixin] Fix mapping property names from attributes
...
* make static: propertyNameForAttribute, attributeNameForProperty, typeForProperty
* method that take classes should consistently use `constructor` as the arg name.
* when using `properties`, the property name for a given attribute is discovered using the names in `properties` and reverse mapping the `attributeNameForProperty` attribute.
2017-11-20 14:41:07 -08:00
Steven Orvell
4b9170ab24
Cleanup based on review.
2017-11-16 17:12:53 -08:00
Steven Orvell
8d24c212e2
Fix deserializing dates.
2017-11-16 14:30:00 -08:00
Steven Orvell
a7b46b156e
Factoring improvements around attribute serialize/deserialize
2017-11-16 14:25:16 -08:00
Steven Orvell
fb0f90bc6b
Remove crufty comment.
2017-11-15 16:43:37 -08:00
Steven Orvell
e8c27671da
Lint fix
2017-11-15 11:51:35 -08:00
Steven Orvell
1e903a947d
Add tests for setting custom attribute name
2017-11-15 11:35:39 -08:00
Steven Orvell
74fb51512b
Expose less protected data.
...
* Hide _own* getters since they are unnecessary
* declared properties always have accessors unless they would stomp existing accessors (or have property effects)
2017-11-15 11:09:14 -08:00
Steven Orvell
d331c673fc
Merge branch 'master' into basic-element
2017-11-10 17:04:15 -08:00
Steven Orvell
0fe9434fd7
ElementMixin uses PropertiesMixin for
...
* finalization
* creating properties
2017-11-10 16:51:13 -08:00
Steven Orvell
3c50f44aa9
PropertiesMixin
...
* automatically finalizes superclasses.
* automatically mixes superclass properties.
2017-11-10 16:45:48 -08:00
Steven Orvell
5846d5825b
PropertyAccessors
...
Update based on `PropertiesChanged` changes
2017-11-10 14:54:19 -08:00
Steven Orvell
05cb5d2cb0
PropertiesChanged
...
* Integrate serializeValue fromPropertyAccessors.
* createProperties now takes an object rather than an array.
* ready always calls `flushProperties`.
* flushProperties only does work if changes are pending.
2017-11-10 14:53:07 -08:00
Daniel Freedman
fbebc5929f
Merge pull request #4919 from Polymer/$-gives-element
...
instance.$.foo should only give Elements
2017-11-02 15:24:32 -07:00
Daniel Freedman
cda62d5fd3
Implement type change in Polymer.ElementMixin
2017-11-02 15:01:05 -07:00
Daniel Freedman
bf8b21b593
Merge pull request #4915 from Polymer/4914-kschaaf-mutable-docs
...
Clarify all elements between changes must apply mixin.
2017-11-02 14:25:55 -07:00
Alexander Marks
7308d8b62c
Annotate DomApi with @memberof Polymer
2017-11-01 17:34:12 -07:00
Kevin Schaaf
7360f42a34
Clarify all elements between changes must apply mixing.
...
Fixes #4914
2017-11-01 17:07:59 -07:00
Daniel Freedman
4265cba1f9
[ci skip] version script did not work as expected
2017-10-18 11:58:57 -07:00
Daniel Freedman
e9e2cda888
Merge pull request #4880 from Polymer/native-dir
...
:dir() support
2017-10-16 10:58:38 -07:00
Daniel Freedman
02e2f148d0
super it and put back takeRecords
2017-10-13 17:54:25 -07:00
Daniel Freedman
15cbdff522
more feedback
2017-10-13 17:40:22 -07:00
Daniel Freedman
e71b84a8b8
Address feedback
...
- Extend PropertyAccessors for greater flexibility
- Detect if `:dir` is used in order to activate runtime features
- Add to LegacyElement for 1.x compatibility
- clean up `ElementMixin._finalizeTemplate`
2017-10-12 11:17:19 -07:00
Steven Orvell
1b50194440
Force literal true` to be set as an attribute with a value of empty string.
2017-10-11 15:34:12 -07:00
Daniel Freedman
f98ad11705
add some description of the dir mixin
2017-10-11 11:04:52 -07:00
Daniel Freedman
31c0ebc7da
Always do the :dir transform
...
ShadyCSS version of the :dir transform is not good enough :(
2017-10-10 17:52:39 -07:00
Daniel Freedman
7d044b49bd
remove bogus semicolon
2017-10-09 11:02:27 -07:00
Alexander Marks
3b15517388
Declare Polymer.Templatizer directly, for Closure. ( #4870 )
...
Closure cannot follow the indirect `@polymerBehavior` annotation, so define Polymer.Templatizer directly.
2017-10-06 16:58:14 -07:00
Steven Orvell
c91b9d19db
Better attribute suppport
...
* Moves _propertyToAttribute to PropertiesChanged
* PropertiesMixin supports `attribute` in the `properties` object to define an attribute name.
2017-10-06 16:42:31 -07:00
Daniel Freedman
2ef65aa62c
First draft of a :dir aware element mixin
...
Related to #4860
2017-10-05 15:59:59 -07:00
Tim van der Lippe
f049dd91db
Prepare for release 2.1.1
2017-09-28 15:04:51 -07:00
Daniel Freedman
5ae21a08c7
fix some formatting and closure linting
2017-09-25 15:57:42 -07:00
Daniel Freedman
374d4079e2
Merge pull request #4649 from Polymer/4630-kschaaf-undefined-textarea
...
Special-case undefined textarea.value same as input. Fixes #4630
2017-09-21 17:03:55 -07:00
Steve Orvell
6af12ac1af
Merge pull request #4841 from Polymer/exclude-style-script-bindings
...
Exclude script and style tags for parsing bindings
2017-09-21 16:57:40 -07:00
Steven Orvell
946aad5caa
Lint fixes.
2017-09-21 14:49:18 -07:00
Steven Orvell
e3e128bade
Renamed basic element to properties element
...
Exposed `PropertiesMixin` also.
2017-09-21 14:35:12 -07:00
Daniel Freedman
61b2c8a544
just move the style instead
2017-09-20 17:17:57 -07:00
Daniel Freedman
155ab8a20d
Copy <custom-style> styles to main document
...
Work around deprecation of styles in HTML Imports
https://crbug.com/523952
Fixes #4679
2017-09-20 11:45:48 -07:00
Artur Parkhisenko
b19e180a45
Fix typos and jsdoc ( #4846 )
2017-09-20 11:24:29 -07:00
Daniel Freedman
64788aad50
[ci skip] bump version to 2.1.0
2017-09-19 10:57:46 -07:00
Steven Orvell
d26955b46e
Implement basic-element with properties-changed
...
Moves basic property creation and attribute deserialization into properties changed to make it suitable as a base for basic-element.
2017-09-15 19:16:23 -07:00
Tim van der Lippe
41fa90b3f6
Exclude script and style tags for parsing bindings
2017-09-15 16:32:25 -07:00
Steven Orvell
b8fd241afa
Fix lint issues
2017-09-15 15:38:24 -07:00
Steven Orvell
152f896feb
Improve docs and add test for case conversion.
2017-09-15 14:05:32 -07:00
Steven Orvell
717a4f41a4
Adds Polymer.BasicElement
...
Provides minimal element starting point using PropertyAccessors to create properties using a properties object similar to Polymer.Element. No template or binding support is provided.
2017-09-15 11:43:27 -07:00
Steven Orvell
aa4f186e57
Factor PropertiesChanged out of PropertyAccessors
...
To improve code hygiene and extensibility, factors the basic batched `_propertiesChanged` mechanism out of `PropertyAccessors` which deals with creating accessors and sync'ing with attributes.
2017-09-15 11:05:21 -07:00