From 70d9bcfdeaedeea32bd8557cad91227c206384e6 Mon Sep 17 00:00:00 2001 From: Dejan Lukic Date: Mon, 4 Jun 2018 15:49:26 +1000 Subject: [PATCH 1/3] Run polymer modulizer to convert to 3.x --- demo/account-autocomplete.html | 175 ---- demo/account-autocomplete.js | 172 +++ demo/index.html | 472 ++++----- demo/paper-autocomplete-suggestions-demo.html | 54 +- index.html | 4 +- package.json | 48 +- paper-autocomplete-suggestions.html | 982 ----------------- paper-autocomplete-suggestions.js | 986 ++++++++++++++++++ paper-autocomplete.html | 760 -------------- paper-autocomplete.js | 724 +++++++++++++ test/index.html | 4 +- test/paper-autocomplete_test_local.html | 579 +++++----- ...-autocomplete_test_local_customsource.html | 595 +++++------ test/paper-autocomplete_test_multi.html | 73 +- 14 files changed, 2826 insertions(+), 2802 deletions(-) delete mode 100644 demo/account-autocomplete.html create mode 100644 demo/account-autocomplete.js delete mode 100644 paper-autocomplete-suggestions.html create mode 100644 paper-autocomplete-suggestions.js delete mode 100644 paper-autocomplete.html create mode 100644 paper-autocomplete.js diff --git a/demo/account-autocomplete.html b/demo/account-autocomplete.html deleted file mode 100644 index 5770a07..0000000 --- a/demo/account-autocomplete.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - - - - diff --git a/demo/account-autocomplete.js b/demo/account-autocomplete.js new file mode 100644 index 0000000..b2df7a3 --- /dev/null +++ b/demo/account-autocomplete.js @@ -0,0 +1,172 @@ +/** +@license +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +/* + This example shows how to implement your own autocomplete with custom template and search function. +*/ +/* + FIXME(polymer-modulizer): the above comments were extracted + from HTML and may be out of place here. Review them and + then delete this comment! +*/ +import '@polymer/polymer/polymer-legacy.js'; + +import '@polymer/paper-item/paper-item.js'; +import '../paper-autocomplete.js'; +import { Polymer } from '@polymer/polymer/lib/legacy/polymer-fn.js'; +import { html } from '@polymer/polymer/lib/utils/html-tag.js'; +var accounts = [ + {"companyName":"Goyette-Lebsack","accountNumber":"CZ91 5363 3967 6009 8080 9459","id":"cb515c77-6924-476d-8c52-9744cb84dc09","email":"kfranklin0@addthis.com"}, + {"companyName":"Hickle, Lesch and Bernier","accountNumber":"AL38 5705 1570 WVGB 9W0Y KIVE JDPN","id":"6404e851-85cc-4d0d-9b19-9c8932e03522","email":"ccruz1@goo.gl"}, + {"companyName":"Lemke, Marks and Ebert","accountNumber":"NO29 9240 0664 978","id":"212eb8d7-e340-43ab-a4f5-b39993cdc64a","email":"jmason2@weather.com"}, + {"companyName":"VonRueden LLC","accountNumber":"PK78 QNNT EQWN KWPI 6VE3 ZMTF","id":"1d939765-699b-4300-bd22-c8609c3daf91","email":"tpatterson3@google.de"}, + {"companyName":"Turner Group","accountNumber":"NL69 WPGC 0810 2315 77","id":"a65be6c9-f15b-47f1-84e6-4a36ba5d342c","email":"nreed4@mayoclinic.com"}, + {"companyName":"Wunsch LLC","accountNumber":"TR26 4409 4WYW Y298 USQH XFPD 6I","id":"4ba8dac8-1c86-4842-8cea-3a4b35bbab08","email":"swells5@blog.com"}, + {"companyName":"Shields LLC","accountNumber":"CR96 0129 6245 5124 3415 9","id":"326b1f1c-3da8-4ae5-aa64-53352ed06df1","email":"jgonzales6@barnesandnoble.com"}, + {"companyName":"Stokes LLC","accountNumber":"SI55 7134 3290 9404 318","id":"d96e2665-1366-4b2e-bf70-4e31a4ea32a6","email":"wfox7@sogou.com"}, + {"companyName":"D'Amore, Bartell and Kassulke","accountNumber":"KZ02 680T BASZ VX4M ZPGQ","id":"eb4a180f-48bf-460c-8900-3bb387a63ab0","email":"slittle8@networkadvertising.org"}, + {"companyName":"Mertz-Murazik","accountNumber":"FR09 5126 6343 196F 7VWK VIDA G96","id":"51959b7c-aef4-4f4c-8723-64df15711e45","email":"jchavez9@livejournal.com"}, + {"companyName":"Johnson, Brown and Yost","accountNumber":"MD45 SVBP ORA2 QT02 0TKC K2J8","id":"95c234b3-28a3-4c3d-a4f7-cc1a5484068f","email":"bhamiltona@ucsd.edu"}, + {"companyName":"Parker Group","accountNumber":"NL38 VMVJ 8279 9808 79","id":"533df586-7db5-44dd-95a1-c072ad86498b","email":"gbennettb@ebay.co.uk"}, + {"companyName":"Reichert-Dietrich","accountNumber":"GB53 UPQZ 2929 8469 2084 82","id":"ab246670-d7f6-4bfe-b6d6-c9502dd544a8","email":"mstephensc@printfriendly.com"}, + {"companyName":"Koss Inc","accountNumber":"MT65 CSOW 0933 9HJF N68S XY1U DUTS TIW","id":"c8e13922-3ee0-4a00-9097-7729d5c0bca2","email":"cwoodsd@boston.com"}, + {"companyName":"Robel-Schamberger","accountNumber":"GR42 9311 1604 CTQD RKNI 5WDY GZT","id":"46201b92-a84c-41d8-b021-ffc8e3eb7317","email":"ewoodse@google.com.br"}, + {"companyName":"McCullough-Wuckert","accountNumber":"FR28 8910 2871 58WA A8BB FIP7 W69","id":"3e25e4e7-a924-4236-8a55-41c5facc04ce","email":"maustinf@ebay.co.uk"}, + {"companyName":"Schoen Group","accountNumber":"AD83 5460 5839 DLOV HCVZ UVGN","id":"7194dc0e-6424-42fb-a4dd-07ac19e55a5a","email":"vvasquezg@moonfruit.com"}, + {"companyName":"Robel Group","accountNumber":"CR55 2138 8499 1123 9528 3","id":"bdd33891-f35e-4677-84ae-e41c84aac906","email":"lpalmerh@toplist.cz"}, + {"companyName":"Osinski Group","accountNumber":"BA40 3816 2941 7503 0366","id":"cad1e8fe-0843-43e1-a4de-498076539a2f","email":"bbrooksi@ed.gov"}, + {"companyName":"Rogahn LLC","accountNumber":"DK24 2489 6562 1456 96","id":"89f3af17-14cb-4ab3-97cb-083560340e48","email":"mrichardsonj@examiner.com"}, + {"companyName":"Schneider LLC","accountNumber":"AL50 0809 6195 TPKO WUKX LYBS WK9O","id":"714d9f4b-7d94-4dd5-a547-cc447b76572d","email":"rgrahamk@google.com.au"}, + {"companyName":"Thiel-Wolff","accountNumber":"LU46 487L PJFS EUEM DWBB","id":"91d922ac-6e5d-4d2d-bf8d-470ecde631cc","email":"amoorel@google.pl"}, + {"companyName":"Klocko-Morissette","accountNumber":"DE98 2950 1475 1384 8332 59","id":"2198ec78-6e49-4009-8476-85908f22af3b","email":"scollinsm@redcross.org"}, + {"companyName":"Lang and Sons","accountNumber":"FO92 9851 3237 4481 79","id":"921a75be-d8c9-404d-9768-6a377a8f4ae0","email":"abanksn@cdc.gov"}, + {"companyName":"Shanahan, Kuhn and Dach","accountNumber":"IS75 2784 1832 1107 2594 7887 06","id":"13f033c8-2efd-471b-8bf3-aff46fb55bbe","email":"jbello@taobao.com"}, + {"companyName":"Hoeger Inc","accountNumber":"AE58 6081 9517 8466 8326 395","id":"ccafa40c-5b79-4699-8daf-4b775a048809","email":"eryanp@github.io"}, + {"companyName":"Stamm-Berge","accountNumber":"LT97 9487 9945 5964 0855","id":"d0777bec-1a52-4943-9690-43574c445952","email":"mhenryq@independent.co.uk"}, + {"companyName":"Jacobson LLC","accountNumber":"FR96 2204 9241 245A 1KLB W5GK V84","id":"7471b59d-a930-4f49-8180-56d0686acabf","email":"rsanchezr@hud.gov"}, + {"companyName":"Cremin, Farrell and Schamberger","accountNumber":"CR75 1654 3259 1325 0162 1","id":"23b8ff26-079d-4e3a-b8e1-246e02ff12d1","email":"dblacks@nydailynews.com"}, + {"companyName":"Ratke, Russel and Rippin","accountNumber":"FR31 6006 9483 81GD BJW6 KUX2 R57","id":"10ecf3e7-e6ee-4854-aa2e-a8d603406626","email":"mmillert@topsy.com"}, + {"companyName":"Senger, Kling and Robel","accountNumber":"CY12 1871 5800 KJZC MQNK 3XSN LY2I","id":"91827148-79b5-452b-9682-14f494588720","email":"kweaveru@state.gov"}, + {"companyName":"Little, Fay and Littel","accountNumber":"BH02 MAZS TUTX SPUA CQ0Q IA","id":"b1c95a8b-6637-4a02-a03d-2d877f89e801","email":"lmarshallv@w3.org"}, + {"companyName":"Weimann LLC","accountNumber":"FR62 4140 1117 14BD KS93 Z4DY T72","id":"36ac519b-5b91-4510-a7f7-2fd86f1c84cf","email":"dwilliamsw@statcounter.com"}, + {"companyName":"Rosenbaum-Reilly","accountNumber":"FR29 9781 0626 68YE ATXL AUZX A02","id":"349623e0-c70e-4f4a-81b0-fe97493c1004","email":"dromerox@deliciousdays.com"}, + {"companyName":"Schulist, Cummerata and Stark","accountNumber":"MD35 JBJS 3B24 KMJZ EQBC P2L5","id":"442f0418-616c-468c-a675-82c48c6a85d2","email":"wmitchelly@indiatimes.com"}, + {"companyName":"Labadie, Berge and Nitzsche","accountNumber":"TN58 9199 1295 1298 8485 6860","id":"24a10110-196c-4e5a-800d-e9c2840d8f11","email":"cwillisz@posterous.com"}, + {"companyName":"Thiel, Lubowitz and Steuber","accountNumber":"PT93 7074 3585 3013 0626 2982 4","id":"757efd3c-c5b0-4354-a1c2-7b720438c40c","email":"cgarza10@paginegialle.it"}, + {"companyName":"Denesik Group","accountNumber":"FR67 3927 8003 17A8 NGLX N9IN V34","id":"0fefdb3b-623c-4ab7-b18a-1aa1d13153a2","email":"ksanders11@engadget.com"}, + {"companyName":"Quigley-Connelly","accountNumber":"DE16 7623 6589 6140 4180 73","id":"d6232f9e-8238-4fad-a9b3-d1f7b3b414cc","email":"randerson12@ca.gov"}, + {"companyName":"Bode, Powlowski and Crist","accountNumber":"EE11 7981 1234 7093 7516","id":"eecdfb64-347d-47e0-9c8c-472f2e0633ae","email":"nholmes13@clickbank.net"}, + {"companyName":"Zieme Group","accountNumber":"SI93 3362 4713 5070 208","id":"74f2a333-dc6b-49d8-9d42-621311e892b4","email":"hwilliamson14@dell.com"}, + {"companyName":"Howell, Feil and Cole","accountNumber":"LT23 2439 3445 1074 1172","id":"387287f1-1ca0-4df1-bbab-a89e1fe5589b","email":"hvasquez15@disqus.com"}, + {"companyName":"Parisian Inc","accountNumber":"GE37 SF47 9252 2109 5152 75","id":"f85935d8-9145-4490-b61f-3599f4250273","email":"khughes16@narod.ru"}, + {"companyName":"Windler, Steuber and Weimann","accountNumber":"VG81 PAAZ 6939 1423 0151 2412","id":"aee2c3fb-f5ad-4c05-94a1-53e3cf56397f","email":"tandrews17@etsy.com"}, + {"companyName":"Brakus Group","accountNumber":"AE02 4483 3368 7994 4390 087","id":"257e34a2-5fbe-4315-8140-2c385525db87","email":"khanson18@amazon.de"}, + {"companyName":"Nader and Sons","accountNumber":"AT68 1544 6823 2068 9934","id":"d4330e6d-2a40-4419-82d5-76aa466b1514","email":"lwelch19@icq.com"}, + {"companyName":"Kuhic, Brakus and Rau","accountNumber":"SE49 7126 3863 9030 4260 8125","id":"413bc218-3aa7-40af-ba37-fe25314b7620","email":"rmatthews1a@tamu.edu"}, + {"companyName":"Langworth, Dooley and Nicolas","accountNumber":"LB83 8665 LZJF YZLS W4YD X0I1 REBU","id":"078a7a5a-ac6e-40e4-891e-3375de2cc931","email":"sbennett1b@wikispaces.com"}, + {"companyName":"Kertzmann and Sons","accountNumber":"DE62 0488 3729 1890 2853 48","id":"07e79298-7530-4d03-911e-fc2e0148f57e","email":"jadams1c@telegraph.co.uk"}, + {"companyName":"Toy-Mann","accountNumber":"ES77 2884 7115 0472 3496 6063","id":"79f91d5b-51d4-4516-a6b6-6257e12a200c","email":"awillis1d@bloomberg.com"} +]; + +Polymer({ + _template: html` + + + + +`, + + is: "account-autocomplete", + + properties: { + accounts: { + type: Array, + value: accounts + } + }, + + listeners: { + 'autocomplete-selected': '_onOptionSelected' + }, + + ready: function () { + var autocomplete = this.$$('paper-autocomplete'); + autocomplete.addEventListener('autocomplete-selected', this.onSelect); + + // Override default queryFn with our custom. This is a needed requirement to implement the custom template + autocomplete.queryFn = this._queryFn; + }, + + _onOptionSelected: function (event) { + var paperToast = document.querySelector('paper-toast'); + var selected = event.detail.text; + paperToast.text = 'Selected: ' + selected; + paperToast.show(); + }, + + // This custom queryFn will filter results searching in both companyName and accountNumber, then it will return the + // whole data object so it can be accessed in the custom template + _queryFn: function (datasource, query) { + return datasource.filter(function (item) { + return ( + item.companyName.toLowerCase().indexOf(query) != -1 || item.accountNumber.toLowerCase().indexOf(query) != -1 + ); + }); + } +}); diff --git a/demo/index.html b/demo/index.html index 5c98ed4..0da27f0 100755 --- a/demo/index.html +++ b/demo/index.html @@ -5,22 +5,33 @@ paper-autocomplete demo - + - - - - - - - - + + + + + + + + - + - + + -
+ + + + + + }); + + // Mock remote users data binding + var usersData = createMockData('text', 'value'); + document.querySelector('#input-remote-users').addEventListener('autocomplete-selected', onRemoteUsersSelect); + document.querySelector('#input-remote-users').addEventListener('autocomplete-change', onRemoteUsersChange); + + function onRemoteUsersSelect(event) { + var paperToast = document.querySelector('paper-toast'); + var selected = event.detail.text; + paperToast.text = 'Selected: ' + selected; + paperToast.show(); + } + + function onRemoteUsersChange(event) { + var input = document.querySelector('#input-remote-users'); + var search = event.detail.option.text; + var delay = Math.random() * (500 - 100) + 100; + setTimeout(function () { + input.suggestions(usersData.filter(function (obj) { + return obj.text.toLowerCase().indexOf(search) !== -1; + })); + }.bind(this), delay); + } + + // Remote Data-Source Binding with Custom Text & Value properties + var dataCustomProperties = createMockData('login', 'id'); + var autocomplete = document.querySelector('#input-remote-custom-properties'); + autocomplete.addEventListener('autocomplete-selected', onCustomPropertiesSelect); + autocomplete.addEventListener('autocomplete-change', onCustomPropertiesChange); + + function onCustomPropertiesChange(event) { + var input = document.querySelector('#input-remote-custom-properties'); + var search = event.detail.option.text; + var delay = Math.random() * (500 - 100) + 100; + setTimeout(function () { + input.suggestions(dataCustomProperties.filter(function (obj) { + return obj[autocomplete.textProperty].toLowerCase().indexOf(search) !== -1; + })); + }.bind(this), delay); + } + function onCustomPropertiesSelect(event) { + var paperToast = document.querySelector('paper-toast'); + var selected = event.detail.text; + paperToast.text = 'Selected: ' + selected + ' with a value ' + event.detail.value; + paperToast.show(); + } + + // Custom template (account-autocomplete) + + // Integration with iron-form + var autocompleteFormExample = document.getElementById('ironFormExample'); + autocompleteFormExample.source = states; + + document.getElementById('form').addEventListener('iron-form-submit', function (event) { + var formContent; + formContent = this.serializeForm(); + document.getElementById('output').innerHTML = JSON.stringify(formContent, null, 3); + }); + + // preventDefault() for ENTER. See issue: https://github.com/ellipticaljs/paper-autocomplete/issues/52 + autocompleteFormExample.addEventListener('keydown', function (event) { + if (event.which === 13) { + event.preventDefault(); + } + }); +}); + diff --git a/demo/paper-autocomplete-suggestions-demo.html b/demo/paper-autocomplete-suggestions-demo.html index bad4792..520312f 100755 --- a/demo/paper-autocomplete-suggestions-demo.html +++ b/demo/paper-autocomplete-suggestions-demo.html @@ -5,19 +5,31 @@ paper-autocomplete demo - + - - - - - - - + + + + + + + - + `; + +document.head.appendChild($_documentContainer.content); + -
+ + </script> -
- - - +
`; - +document.body.appendChild($_documentContainer.content); + \ No newline at end of file diff --git a/index.html b/index.html index 0e22054..c4c9021 100755 --- a/index.html +++ b/index.html @@ -14,8 +14,8 @@ - - + + diff --git a/package.json b/package.json index 450a98c..a53682b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,16 @@ { - "name": "paper-autocomplete", "description": "Material Design autocomplete component.", + "keywords": [ + "web-component", + "polymer", + "paper-autocomplete" + ], + "repository": { + "type": "git", + "url": "https://github.com/ellipticaljs/paper-autocomplete.git" + }, + "homepage": "https://github.com/ellipticaljs/paper-autocomplete/", + "name": "paper-autocomplete", "version": "3.7.0", "author": "S. Francis ", "contributors": [ @@ -16,10 +26,6 @@ "Miguel Collado " ], "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ellipticaljs/paper-autocomplete.git" - }, "scripts": { "start": "polymer serve -o", "postinstall": "bower i", @@ -36,7 +42,35 @@ "eslint-plugin-html": "^3.0.0", "sinon": "^3.0.0", "web-component-tester": "^6.0.1", - "web-component-tester-istanbul": "^0.10.0" + "web-component-tester-istanbul": "^0.10.0", + "@polymer/iron-component-page": "^3.0.0-pre.18", + "wct-browser-legacy": "^0.0.1-pre.11", + "@polymer/iron-demo-helpers": "^3.0.0-pre.18", + "@polymer/paper-toast": "^3.0.0-pre.18", + "@polymer/iron-test-helpers": "^3.0.0-pre.18", + "@polymer/iron-form": "^3.0.0-pre.18", + "@polymer/paper-button": "^3.0.0-pre.18", + "@webcomponents/webcomponentsjs": "^2.0.0" + }, + "dependencies": { + "@polymer/polymer": "^3.0.0", + "@polymer/paper-input": "^3.0.0-pre.18", + "@polymer/iron-flex-layout": "^3.0.0-pre.18", + "@polymer/paper-icon-button": "^3.0.0-pre.18", + "@polymer/iron-icon": "^3.0.0-pre.18", + "@polymer/iron-icons": "^3.0.0-pre.18", + "@polymer/iron-iconset": "^3.0.0-pre.18", + "@polymer/iron-iconset-svg": "^3.0.0-pre.18", + "@polymer/paper-item": "^3.0.0-pre.18", + "@polymer/paper-ripple": "^3.0.0-pre.18", + "@polymer/paper-material": "^3.0.0-pre.18" + }, + "resolutions": { + "inherits": "2.0.3", + "samsam": "1.1.3", + "supports-color": "3.1.2", + "type-detect": "1.0.0", + "@webcomponents/webcomponentsjs": "2.0.0-beta.2" }, - "dependencies": {} + "main": "paper-autocomplete.js" } diff --git a/paper-autocomplete-suggestions.html b/paper-autocomplete-suggestions.html deleted file mode 100644 index 2207901..0000000 --- a/paper-autocomplete-suggestions.html +++ /dev/null @@ -1,982 +0,0 @@ - - - - - - - - - - - diff --git a/paper-autocomplete-suggestions.js b/paper-autocomplete-suggestions.js new file mode 100644 index 0000000..12315ce --- /dev/null +++ b/paper-autocomplete-suggestions.js @@ -0,0 +1,986 @@ +/** + `paper-autocomplete-suggestions` + + **From v3.x.x, this component only works with Polymer 1.7+ or 2.0+.** + + [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/ellipticaljs/paper-autocomplete) + + [![Sauce Test Status](https://saucelabs.com/browser-matrix/jhuesos.svg)](https://saucelabs.com/u/jhuesos) + + Allows to add autocomplete capabilities to any input field. This is desirable when you have an input field with custom + logic and you just want to add the feature to help users with the selection. If you want to use it in combination with + a regular ``, you can use ``. + + Example: + ``` +
+ + + +
+ ``` + + It is **important to provide both `textProperty` and `valueProperty` when working with a custom search function and + or custom templates.** They are needed to keep the component accessible and for the events (e.g. onSelect) to keep + working. + + ### About Polymer 1.x and 2.x Compatibility + From version `3.x.x`, this component work with both Polymer 1.7+ or Polymer 2.0+ Please take a look to the + [MIGRATION.md](./MIGRATION.md) file that contains more information. + + ### Custom search + This component has the public method `queryFn` that is called in each key stroke and it is responsible to query + all items in the `source` and returns only those items that matches certain filtering criteria. By default, this + component search for items that start with the recent query (case insensitive). + You can override this behavior providing your own query function, as long as these two requirements are fulfill: + + - The query function is synchronous. + - The API is respected and the method always return an Array. + + + The template use to render each suggestion depends on the structure of each object that this method returns. For the + default template, each suggestion should follow this object structure: + + ``` + { + text: objText, + value: objValue + } + ``` + + This function is only used when a local data source is used. When using a `remoteDataSource` user is responsible of + doing the search and specify suggestions manually. + + ### Custom templates + A template for each suggestion can be provided, but for now, there are limitations in the way you can customize + the template. Please read the the following sections carefully. + In order to set your own template, you need to add a ` - + element.$.paperAutocompleteSuggestions.flushDebouncer('_onSuggestionChanged'); + } + + function getClearButtonDisplayStyle() { + return element.$.clear.style.display; + } +}); + diff --git a/test/paper-autocomplete_test_multi.html b/test/paper-autocomplete_test_multi.html index caf8da0..7305355 100644 --- a/test/paper-autocomplete_test_multi.html +++ b/test/paper-autocomplete_test_multi.html @@ -6,10 +6,10 @@ Paper-autocomplete test - - - - + + + + @@ -21,45 +21,46 @@ required='true' name='state'>
- + it('uses distinct _bindedFunctions in suggestions', function () { + var suggestions1 = element1.$.paperAutocompleteSuggestions, + suggestions2 = element2.$.paperAutocompleteSuggestions; + expect(suggestions1._bindedFunctions._onKeypress).to.not.equal(suggestions2._bindedFunctions._onKeypress); + expect(suggestions1._bindedFunctions._onFocus).to.not.equal(suggestions2._bindedFunctions._onFocus); + expect(suggestions1._bindedFunctions._onBlur).to.not.equal(suggestions2._bindedFunctions._onBlur); + }); +}); + From e89369c6eab139667fdcf34825190b282c03a3d9 Mon Sep 17 00:00:00 2001 From: Dejan Lukic Date: Mon, 4 Jun 2018 16:08:49 +1000 Subject: [PATCH 2/3] Remove bower.json --- bower.json | 95 ------------------------------------------------------ 1 file changed, 95 deletions(-) delete mode 100755 bower.json diff --git a/bower.json b/bower.json deleted file mode 100755 index 1eb951b..0000000 --- a/bower.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "name": "paper-autocomplete", - "version": "3.7.0", - "authors": [ - "S. Francis", - "Rodolfo Oviedo ", - "Alfonso Aguilar ", - "Jaime Vega ", - "Antonio Barrios ", - "Miguel Collado " - ], - "description": "Paper autocomplete element.", - "keywords": [ - "web-component", - "polymer", - "paper-autocomplete" - ], - "main": "paper-autocomplete.html", - "license": "MIT", - "homepage": "https://github.com/ellipticaljs/paper-autocomplete/", - "repository": { - "type": "git", - "url": "https://github.com/ellipticaljs/paper-autocomplete.git" - }, - "ignore": [ - "/.*", - "/test/" - ], - "dependencies": { - "polymer": "Polymer/polymer#1.9 - 2", - "paper-input": "^2.0.0", - "iron-flex-layout": "PolymerElements/iron-flex-layout#^2.0.0", - "paper-icon-button": "^2.0.0", - "iron-icon": "^2.0.0", - "iron-icons": "^2.0.0", - "iron-iconset": "^2.0.0", - "iron-iconset-svg": "^2.0.0", - "paper-item": "^2.0.0", - "paper-ripple": "PolymerElements/paper-ripple#^2.0.0", - "paper-material": "^2.0.0" - }, - "devDependencies": { - "iron-component-page": "^2.0.0", - "web-component-tester": "^6.0.0", - "iron-demo-helpers": "^2.0.0", - "paper-toast": "^2.0.0", - "elliptical-sass": "^1.2.29", - "css-docs": "^1.0.3", - "iron-test-helpers": "^2.0.0", - "iron-form": "2.0-preview", - "paper-button": "^2.0.0", - "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0" - }, - "variants": { - "1.x": { - "dependencies": { - "polymer": "Polymer/polymer#^1.9", - "paper-input": "^1.1.24", - "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.3.7", - "paper-icon-button": "^1.1.6", - "iron-icon": "^1.0.13", - "iron-icons": "^1.2.1", - "iron-iconset": "^1.0.6", - "iron-iconset-svg": "^1.1.1", - "paper-item": "^1.2.2", - "paper-ripple": "PolymerElements/paper-ripple#^1.0.10", - "paper-material": "^1.0.7" - }, - "devDependencies": { - "iron-component-page": "^1.1.9", - "web-component-tester": "^6.0.0", - "iron-demo-helpers": "^1.2.6", - "paper-toast": "^1.3.1", - "elliptical-sass": "^1.2.29", - "css-docs": "^1.0.3", - "iron-test-helpers": "^1.4.1", - "iron-form": "2.0-preview", - "paper-button": "^1.0.15", - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" - }, - "resolutions": { - "webcomponentsjs": "^0.7", - "polymer": "^1.9", - "iron-ajax": "^1.4.4" - } - } - }, - "resolutions": { - "iron-ajax": "^2.0.0", - "webcomponentsjs": "^1.0", - "polymer": "^2.0", - "iron-demo-helpers": "^2.0.0", - "iron-doc-viewer": "1 - 2" - } -} From ec51e8030bd49ec4131187e62ee7530b507135f7 Mon Sep 17 00:00:00 2001 From: Dejan Lukic Date: Mon, 4 Jun 2018 16:10:30 +1000 Subject: [PATCH 3/3] Remove bower as a dev dependency and remove bower postinstall script --- package.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/package.json b/package.json index a53682b..81ad681 100644 --- a/package.json +++ b/package.json @@ -28,16 +28,13 @@ "license": "MIT", "scripts": { "start": "polymer serve -o", - "postinstall": "bower i", "test": "polymer test --plugin local", "test:remote": "polymer test --plugin sauce", "lint": "eslint --cache paper-autocomplete*.html test/paper*.html && polymer lint paper-autocomplete*.html --rules polymer-2-hybrid", "publish-docs": "./publish-docs.sh", - "variants": "polymer install --variants && polymer serve -o -H 0.0.0.0", - "clean": "rm -rf bower_components bower_components-1.x bower-1.x.json" + "variants": "polymer install --variants && polymer serve -o -H 0.0.0.0" }, "devDependencies": { - "bower": "^1.8.4", "eslint": "^4.0.0", "eslint-plugin-html": "^3.0.0", "sinon": "^3.0.0",