Commit graph

25 commits

Author SHA1 Message Date
Josh Johnson e6882f3e4b
Add missing type definitions + rename sortFn (#734)
* Add wrapped element getters + fix some types

* Remove comment

* Add missing config options to types

* Add types to constants

* Rename sortFn to sorter

* Update PR template

* Add refactor to PR template

* Add passed element types to constants

* Add js doc comments to actions

* Add "returns" to js doc comments

* Add missing choice prop to type

* Add types to store.js

* Add jsdoc comments to components

* Ignore strict null checks

* Move loading action into misc.js

* Further type def additions

* Rename itemCompare to valueCompare

* Update badges

* Rename scrollToChoice to scrollToChildElement
2019-11-03 13:18:16 +00:00
Konstantin Vyatkin 5afe8b5a7f speed up getAdjacentEl (#726)
* use element accessors

* don't change params
2019-10-31 17:49:27 +00:00
Konstantin Vyatkin 034191c78a use CSS queries (#718)
* use matchMedia

* use last-of-type

* better type check

* simplify distanceFromTopWindow

* use visibility

* update JSDoc
2019-10-30 17:28:15 +00:00
Josh Johnson 0e44a916e3
Fix constructor (#693)
* breaking test

* Remove ablity to pass multiple elements + tests

* Update readme

* Update README.md

* 🔖 Version 8.0.0

* Remove type definition hack

* Update coverage command

* Add some missing list tests

* Remove .only

* Update demo page to loop over elements

* Update constructor to set initialised flag if already active

* Make templates private

* Throw type error once if element is invalid

* Fix list children bug

* Re-add generic examples to index.html

* Housekeeping

* Use typeof instead of isType where applicable

* Remove isElement

* Add test for isIE11
2019-10-29 21:19:56 +00:00
Josh Johnson 88f63faa0b
Update code styling rules (#713)
* Enforce curly braces around conditionals

* Install sort class members + update rules

* Satisfy linting changes

* Add todo

* Add tests for clearChoices

* Update eslint-plugin-prettier to latest

* Resolve conflicts

* Fix linting errors
2019-10-29 18:26:11 +00:00
Konstantin Vyatkin e3cc6eaf1b [MAJOR] Remove .ajax and allow async function for .setChoices (#701)
* WIP: remove ajax

* copy #700

* remove ajax, add fetchChoices

* extend setChoices

* update README
2019-10-29 18:12:32 +00:00
Konstantin Vyatkin 2a03d9be12 don't reemplement localeCompare (#695) 2019-10-29 17:09:49 +00:00
Konstantin Vyatkin a2485392a5 don't reimplement native closest (#696) 2019-10-28 20:26:19 +00:00
Konstantin Vyatkin dbd15d7823 don't calculate pixel width (#694) 2019-10-28 19:27:10 +00:00
Josh Johnson f597bc9aff
Remove travis (#667)
* Remove travis.yml

* Remove versioning from index file

* Resolve linting issues

* Resolve further linting issues

* Uppercase NPM_TOKEN

* Run audit fix

* Update postversion command

* Update @babel/core to latest

* Update post version command

* Housekeeping

* Revert cypress upgrade

* Enforce cypress version

* Update package.lock

* Add cypress project id
2019-10-21 20:03:57 +01:00
Alex Webb 39b6eed395 Resolve issue in utils::calcWidthOfInput() (#608) 2019-10-02 09:03:38 +01:00
Josh Johnson 879c97f64c
Resolve undefined error (#528)
* Remove run-p from test command

* Remove dropdown interaction tests

* Tidy utils

* Use merge lib

* Remove string casting

* Sanitise in constants

* Housekeeping

* Add non-string value tests
2019-02-22 22:04:55 +00:00
Josh Johnson 8540d5aabd
Api changes (#515)
* Combine regexFilter and addItemFilter + minor tweaks

* Update tests to accomodate fixed dropdown notice

* Remove broken `toggleDropdown` method

* Unskip dropdown interaction tests

* Remove reference to removed method
2019-02-12 18:35:46 +00:00
Josh Johnson 60d52a2d3b Check no unknown config keys are passed 2018-10-09 13:16:58 +01:00
Josh Johnson f286dbc653 Add util tests 2018-05-28 17:56:36 +01:00
Josh Johnson bfb6571ce9 Merge into latest 2018-05-28 16:22:22 +01:00
Josh Johnson 056ece0238 Run linter 2018-05-28 15:50:16 +01:00
Josh Johnson 179542897c
Merge branch 'develop' into develop 2018-05-28 15:47:27 +01:00
Josh Johnson 67e1940232 Avoid name conflict with stripHTML 2018-05-28 15:46:27 +01:00
Josh Johnson 9dbb2e9733 Rename stripHTML + cast values to string 2018-05-28 15:39:12 +01:00
Tőrös Egon Richárd 6e45d3f9b0
Merge branch 'develop' into develop 2018-05-28 16:19:31 +02:00
Josh Johnson a023d92b35 Resolve conflict 2018-05-28 15:17:43 +01:00
Egon Richárd Tőrös 0cbf951845 Merge branch 'develop' of https://github.com/jshjohnson/Choices into develop 2018-05-28 16:13:55 +02:00
Josh Johnson 1df8d81ae4 Refactor _canAddItem 2018-05-27 17:22:58 +01:00
Josh Johnson 257a038262 Use express for development + folder restructuring 2018-05-27 11:57:21 +01:00
Renamed from src/scripts/src/lib/utils.js (Browse further)