gatanaso / multiselect-combo-box

A multi select combo box web component based on Polymer and the vaadin-combo-box
https://multiselect-combo-box.web.app
Apache License 2.0
49 stars 39 forks source link

Auto-transpile to legacy element syntax #57

Closed bpetridean closed 4 years ago

bpetridean commented 4 years ago

With respect to: https://github.com/gatanaso/multiselect-combo-box/blob/2afa8d93b89d289b3045c5b7f99a257aa844068e/src/multiselect-combo-box.html

Hi, Is there a quick/automated way that I could use to transpile multiselect-combo-box.html to legacy syntax? e.g. https://polymer-library.polymer-project.org/3.0/docs/devguide/legacy-elements

Extended context: I am planning to use polymer2 version of multiselect-combo-box from java, not vaadin. I am using a forked version of vaadin's gwt-api-generator tool to generate the wrappers given the above wc, but it only handles legacy element syntax, thus my question.

Thank you.

gatanaso commented 4 years ago

Hi @bpetridean,

Would the polymer-2 version of the component work for your use case: https://github.com/gatanaso/multiselect-combo-box/tree/polymer-2 ?

Another option is to try an use magi-cli https://github.com/vaadin/magi-cli to do the conversion, but I have not used it myself so cannot say for sure if it would work.

Hope this helps, Goran

bpetridean commented 4 years ago

@gatanaso

Thanks for the quick reply. Yes, polymer-2x branch, e.g. https://github.com/gatanaso/multiselect-combo-box/blob/polymer-2/src/multiselect-combo-box-input.html, is the one I will be using. My issue is that the component above is defined with ES6 syntax...in my case I need the legacy element syntax: MultiselectComboBox = Polymer({ is: multiselect-combo-box, .... })

Thanks for the hint, I will deff. look into the mag-cli