├── .eslintrc.js ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Gruntfile.js ├── LICENSE ├── README.md ├── docs ├── dgeni-config.js └── templates │ ├── directive.html │ ├── macros.html │ └── service.html ├── grunt ├── options │ ├── bump.js │ ├── changelog.js │ ├── clean.js │ ├── compress.js │ ├── copy.js │ ├── coveralls.js │ ├── cssmin.js │ ├── eslint.js │ ├── karma.js │ ├── ngtemplates.js │ ├── open.js │ ├── remapIstanbul.js │ ├── replace.js │ ├── rollup.js │ ├── sass.js │ ├── shell.js │ └── uglify.js └── tasks │ ├── dgeni.js │ ├── pack.js │ ├── sauce.js │ ├── update-bower-version.js │ └── update-website-version.js ├── karma.conf.js ├── npm-shrinkwrap.json ├── package.json ├── sauce.launchers.json ├── scss ├── auto-complete.scss ├── bootstrap.scss ├── bootstrap │ ├── forms.scss │ ├── input-groups.scss │ ├── main.scss │ └── variables.scss ├── main.scss ├── mixins.scss ├── tags-input.scss └── variables.scss ├── src ├── auto-complete-match.js ├── auto-complete.js ├── autosize.js ├── bind-attrs.js ├── configuration.js ├── constants.js ├── init.js ├── tag-item.js ├── tags-input.js ├── transclude-append.js └── util.js ├── templates ├── auto-complete-match.html ├── auto-complete.html ├── tag-item.html └── tags-input.html └── test ├── auto-complete.spec.js ├── autosize.spec.js ├── bind-attrs.spec.js ├── configuration.spec.js ├── helpers.js ├── init.js ├── lib ├── angular-mocks.js ├── angular.js ├── jasmine.js ├── jquery-1.10.2.min.js └── ng-stats.min.js ├── matchers.js ├── tags-input.spec.js ├── test-page.html ├── transclude-append.spec.js └── util.spec.js /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | browser: true, 4 | node: true, 5 | es6: true, 6 | mocha: true, 7 | jasmine: true, 8 | jquery: true, 9 | }, 10 | extends: 'eslint:recommended', 11 | parserOptions: { 12 | sourceType: 'module', 13 | impliedStrict: true 14 | }, 15 | rules: { 16 | 'indent': ['error', 2], 17 | 'linebreak-style': ['error', 'unix'], 18 | 'quotes': ['error', 'single'], 19 | 'semi': ['error', 'always'], 20 | 'curly': 'error', 21 | 'eqeqeq': ['error', 'always'], 22 | 'no-empty': 'error', 23 | 'no-undef': 'error', 24 | 'no-eq-null': 'error', 25 | 'no-extend-native': 'error', 26 | 'no-caller': 'error', 27 | 'new-cap': ['error', { capIsNew: false }] 28 | }, 29 | globals: { 30 | angular: true, 31 | module: true, 32 | inject: true, 33 | tagsInput: true, 34 | range: true, 35 | changeElementValue: true, 36 | customMatchers: true, 37 | KEYS: true, 38 | MAX_SAFE_INTEGER: true, 39 | SUPPORTED_INPUT_TYPES: true 40 | } 41 | }; -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .project 3 | .settings/ 4 | node_modules/ 5 | coverage/ 6 | *.log 7 | build/ 8 | sauce.json -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '6' 4 | before_install: 5 | - rvm install 2.3.0 6 | - gem install sass 7 | script: npm run travis 8 | sudo: false 9 | cache: 10 | directories: 11 | - node_modules 12 | deploy: 13 | provider: s3 14 | access_key_id: AKIAI55AELZBPQKVIAXQ 15 | secret_access_key: 16 | secure: fDp97fUYc19sXmMnnp4OZL8MQYyTXRkxTVJj9NSdFI4xFCu34igwlcJXwHt9uuzV2wVIQ3R9GsAVfSwZxD+XWz1qrzWRt3PIsR5J7I9ZiqE0DaCK9IBVepsz5BR/A/q9v3VWGW7o+wy419EKVuXGHCJMAUoHeQCGeb8gOKYpI3g= 17 | bucket: ng-tags-input 18 | local-dir: build/travis 19 | skip_cleanup: true 20 | on: 21 | repo: mbenford/ngTagsInput 22 | branch: master 23 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 3.2.0 (2017-04-15) 2 | 3 | #### Features 4 | 5 | * **tagsInput:** Add experimental support for array of strings ([8104ddc3](https://github.com/mbenford/ngTagsInput/commit/8104ddc3e4e3c439d19e0b4a271610b0f0a0a884)) 6 | 7 | ## 3.1.2 (2017-03-31) 8 | 9 | #### Bug Fixes 10 | 11 | * **util:** Fix XSS vulnerability in safeHighlight ([bbc1f584](https://github.com/mbenford/ngTagsInput/commit/bbc1f584acc8e154c04969180baddbd8f11f9c8c), [#491](https://github.com/mbenford/ngTagsInput/issues/491)) 12 | 13 | ## 3.1.1 (2016-05-27) 14 | 15 | #### Bug Fixes 16 | 17 | * **util:** Fix the order that event handlers are registered so the directive can work again with Angular 1.4-. ([0e3eff44](https://github.com/mbenford/ngTagsInput/commit/0e3eff44bc4b4903c746cce7cf3cf87c0224204f)) 18 | 19 | ## 3.1.0 (2016-05-26) 20 | 21 | #### Bug Fixes 22 | 23 | * **util:** Reverse the order that events are triggered so the directive works with Angular 1.5.x ([7bc37a62](https://github.com/mbenford/ngTagsInput/commit/7bc37a62d61c2903ec5dc091eb6fc315c0bfbc3d), [#638](https://github.com/mbenford/ngTagsInput/issues/638)) 24 | 25 | #### Features 26 | 27 | * **autocomplete:** Add support for custom CSS classes for matches ([8d177469](https://github.com/mbenford/ngTagsInput/commit/8d17746998fc35dfd9d2252ed525dd851837f0d0)) 28 | * **tagsInput:** 29 | * Add templateScope option ([8d26e3bb](https://github.com/mbenford/ngTagsInput/commit/8d26e3bbf8d24d6fc02073a888c3e51ed29123c3), [#486](https://github.com/mbenford/ngTagsInput/issues/486)) 30 | * Add support for custom CSS classes for tags ([5cc0144b](https://github.com/mbenford/ngTagsInput/commit/5cc0144b699552e5b57f2f7b86b04118c74dbfc1), [#273](https://github.com/mbenford/ngTagsInput/issues/273)) 31 | * Allow onTagAdding/onTagRemoving to return a promise ([4cc2f5c3](https://github.com/mbenford/ngTagsInput/commit/4cc2f5c3cf25c4276b82273c9d6e45b1d4553ec6), [#463](https://github.com/mbenford/ngTagsInput/issues/463)) 32 | 33 | ## 3.0.0 (2015-07-13) 34 | 35 | #### Bug Fixes 36 | 37 | * **autocomplete:** 38 | * Stop preventing keys from being propagated ([b0db7633](https://github.com/mbenford/ngTagsInput/commit/b0db763301d483960cbb72bc0c3338a196eb8ef2), [#384](https://github.com/mbenford/ngTagsInput/issues/384)) 39 | * Hide the suggestion list after a tag is removed ([731ef9eb](https://github.com/mbenford/ngTagsInput/commit/731ef9eb0874ae083cba47c942034cb9109e6cf9)) 40 | * **tagsInput:** 41 | * Fix makeObjectArray function ([b5dc57f5](https://github.com/mbenford/ngTagsInput/commit/b5dc57f542c11351ad881e45cc238f75b9adc24a)) 42 | * Remove model auto-initialization ([f9fcb12d](https://github.com/mbenford/ngTagsInput/commit/f9fcb12dc1c71a77e52ba573cd4505e663131625), [#320](https://github.com/mbenford/ngTagsInput/issues/320), [#204](https://github.com/mbenford/ngTagsInput/issues/204)) 43 | 44 | #### Features 45 | 46 | * **tagsInput:** 47 | * Add newTagText option ([215fe923](https://github.com/mbenford/ngTagsInput/commit/215fe923b68e0e6034ae34c9b06ea89dff7d1110), [#197](https://github.com/mbenford/ngTagsInput/issues/197)) 48 | * Add onTagClicked callback ([aa8d190b](https://github.com/mbenford/ngTagsInput/commit/aa8d190b6edc705f89d407cf65a8ca6266238616)) 49 | * Add support for Angular 1.3 ([3355f3fa](https://github.com/mbenford/ngTagsInput/commit/3355f3fa7451dc0b4ca183875ba183a89c543be4), [#318](https://github.com/mbenford/ngTagsInput/issues/318), [#341](https://github.com/mbenford/ngTagsInput/issues/341), [#373](https://github.com/mbenford/ngTagsInput/issues/373)) 50 | 51 | #### Breaking Changes 52 | 53 | * Code that relies on auto-initialization of the model may stop working. ([f9fcb12d](https://github.com/mbenford/ngTagsInput/commit/f9fcb12dc1c71a77e52ba573cd4505e663131625)) 54 | * This uses new API methods of Angular 1.3 and therefore the directive will no longer work with previous versions of the framework. ([3355f3fa](https://github.com/mbenford/ngTagsInput/commit/3355f3fa7451dc0b4ca183875ba183a89c543be4)) 55 | 56 | ## 2.3.0 (2015-03-23) 57 | 58 | #### Bug Fixes 59 | 60 | * **autocomplete:** 61 | * Make match highlighting case insensitive ([42ca7e46](https://github.com/mbenford/ngTagsInput/commit/42ca7e46ea37d5dd213a62bbb0706b2073f592de), [#388](https://github.com/mbenford/ngTagsInput/issues/388)) 62 | * Make a copy of the suggestion before adding ([b12f5074](https://github.com/mbenford/ngTagsInput/commit/b12f50744e0b60371c134bbec3a54d2a474bfacd)) 63 | * Fix existing tags diff algorithm ([913e95a2](https://github.com/mbenford/ngTagsInput/commit/913e95a2caf6c21736650798d6d1cb25f6619f2f), [#232](https://github.com/mbenford/ngTagsInput/issues/232)) 64 | * **tagsInput:** 65 | * Fix addOnPaste issue with jQuery ([664dfc70](https://github.com/mbenford/ngTagsInput/commit/664dfc70942ece06b0b97d85cbc52d1954398696)) 66 | * Fix add-on-paste issue in IE ([e752682d](https://github.com/mbenford/ngTagsInput/commit/e752682d067cf48a2969820fb4f383bcbf807fa9), [#325](https://github.com/mbenford/ngTagsInput/issues/325)) 67 | * Ensure autocomplete attribute is off ([8359e608](https://github.com/mbenford/ngTagsInput/commit/8359e608e2cf1c83e61828f456081f5a33f374ab), [#368](https://github.com/mbenford/ngTagsInput/issues/368)) 68 | * Fix element validity on tag removal ([0bfc7ee3](https://github.com/mbenford/ngTagsInput/commit/0bfc7ee3f40399fee5e8dfa6562dbbc3574cdbf1), [#381](https://github.com/mbenford/ngTagsInput/issues/381)) 69 | 70 | #### Features 71 | 72 | * **autocomplete:** 73 | * Add custom template support ([b550b119](https://github.com/mbenford/ngTagsInput/commit/b550b1190509e399742f32abb6299c179fe7bae1), [#99](https://github.com/mbenford/ngTagsInput/issues/99)) 74 | * Make $index available to custom templates ([8611877e](https://github.com/mbenford/ngTagsInput/commit/8611877ef43581fe493fd3195726f027af2ae3cc)) 75 | * Add autoscroll support ([13796600](https://github.com/mbenford/ngTagsInput/commit/13796600cb81d0ef111c5c55ac76d98bf0832fa9), [#216](https://github.com/mbenford/ngTagsInput/issues/216)) 76 | * **tagsInput:** 77 | * Add custom template support ([45e5d998](https://github.com/mbenford/ngTagsInput/commit/45e5d99809f66ea52e2206a476eb546867bbe4a8)) 78 | * Add ng-required support ([8f17b9f1](https://github.com/mbenford/ngTagsInput/commit/8f17b9f11bd359fe0066133af8b93914611150ea), [#157](https://github.com/mbenford/ngTagsInput/issues/157)) 79 | * Add support for tag navigation ([18760b24](https://github.com/mbenford/ngTagsInput/commit/18760b249978203bd4aaa798aa07b72199c73aed), [#350](https://github.com/mbenford/ngTagsInput/issues/350)) 80 | * Add ng-disabled support ([870caba6](https://github.com/mbenford/ngTagsInput/commit/870caba653c4874b952b65893e4de07cf605d2b8), [#102](https://github.com/mbenford/ngTagsInput/issues/102)) 81 | * Add keyProperty and displayProperty options ([2c780f9a](https://github.com/mbenford/ngTagsInput/commit/2c780f9a53711317f75a7141c6965f1568b9daae), [#265](https://github.com/mbenford/ngTagsInput/issues/265)) 82 | * Add onTagAdding/onTagRemoving callbacks ([c4ceed54](https://github.com/mbenford/ngTagsInput/commit/c4ceed546b30cb6f2052de6b5edcf0f759803ef7), [#100](https://github.com/mbenford/ngTagsInput/issues/100)) 83 | 84 | ## 2.2.0 (2015-03-02) 85 | 86 | #### Bug Fixes 87 | 88 | * **autocomplete:** 89 | * Fix loadOnEmpty behavior ([c63eb05e](https://github.com/mbenford/ngTagsInput/commit/c63eb05e2e78698299eed1537995ea149c9a5b6a), [#205](https://github.com/mbenford/ngTagsInput/issues/205)) 90 | * Correctly highlight HTML entities ([315f3a2b](https://github.com/mbenford/ngTagsInput/commit/315f3a2b0f9a34a98a203162d452a3c7520bb6f4), [#200](https://github.com/mbenford/ngTagsInput/issues/200)) 91 | * **tagsInput:** 92 | * Add spellcheck option ([166f8358](https://github.com/mbenford/ngTagsInput/commit/166f8358ce1f8c42b54390d3b52a71f5803c1e5a)) 93 | * Ignore addFromAutocompleteOnly on input-blur ([e4767c2d](https://github.com/mbenford/ngTagsInput/commit/e4767c2da75ee8d197c804f15620d107495a91a4)) 94 | 95 | #### Features 96 | 97 | * **autocomplete:** 98 | * Add autoSelectFirstSuggestion option ([0993bbdf](https://github.com/mbenford/ngTagsInput/commit/0993bbdf5ac85f0af5e62c5fa76c13a2aecfa0c7), [#136](https://github.com/mbenford/ngTagsInput/issues/136)) 99 | * Remove requirement for the source option to return a promise ([10932fbb](https://github.com/mbenford/ngTagsInput/commit/10932fbb18b0887927ae71bb1f9e1d1d0f0f4e26), [#237](https://github.com/mbenford/ngTagsInput/issues/237)) 100 | * **tagsInput:** 101 | * Add addOnPaste and pasteSplitPattern options ([9ad32fbd](https://github.com/mbenford/ngTagsInput/commit/9ad32fbd5c3f1d7237bccd73c44796c0eaa91e0d)) 102 | * Add onInvalidTag option ([e5c57b8e](https://github.com/mbenford/ngTagsInput/commit/e5c57b8ec77b4840e6f383e0bee9a0ce2f6ff0dc)) 103 | * Enable ngFocus and ngBlur native directives ([210b86f7](https://github.com/mbenford/ngTagsInput/commit/210b86f74538564adcabd0ab22522866888acad8)) 104 | 105 | ## 2.1.1 (2014-09-04) 106 | 107 | #### Bug Fixes 108 | 109 | * **tagsInput:** Fix has-success, has-warning and has-error classes ([2a098736](https://github.com/mbenford/ngTagsInput/commit/2a0987367db2d28106936fa39393964e35b61de7)) 110 | 111 | ## 2.1.0 (2014-08-22) 112 | 113 | #### Bug Fixes 114 | 115 | * **autocomplete:** Fix suggestion selection on touch devices ([ef25a555](https://github.com/mbenford/ngTagsInput/commit/ef25a5555f358e9986635826788c2475c9f417ee)) 116 | * **tagsInput:** 117 | * Prevent an empty tag from being added ([c104c2b2](https://github.com/mbenford/ngTagsInput/commit/c104c2b2cdd19fe891c76e4a2b1f20d13e27369f), [#172](https://github.com/mbenford/ngTagsInput/issues/172)) 118 | * Set element's validity when options change ([e89f2682](https://github.com/mbenford/ngTagsInput/commit/e89f268218d75f23c6c14c426b7b7c7686fd8898), [#154](https://github.com/mbenford/ngTagsInput/issues/154)) 119 | * Replace interpolation with ngBind ([cadf8327](https://github.com/mbenford/ngTagsInput/commit/cadf83279c194b0135a5b5960987028c91c04e74)) 120 | * Remove dependency on interpolation symbols ([6598b556](https://github.com/mbenford/ngTagsInput/commit/6598b5562169c506e7645acbdac360e8d20c1054), [#151](https://github.com/mbenford/ngTagsInput/issues/151)) 121 | * Fix display of non-string items ([49734921](https://github.com/mbenford/ngTagsInput/commit/497349211ff17505208268fade98ed93e13fa082), [#150](https://github.com/mbenford/ngTagsInput/issues/150)) 122 | 123 | #### Features 124 | 125 | * **autocomplete:** 126 | * Add loadOnFocus option ([fe711f56](https://github.com/mbenford/ngTagsInput/commit/fe711f56eaa3fe4293527955e653b3f6bbd235a0)) 127 | * Add loadOnEmpty option ([28c615fa](https://github.com/mbenford/ngTagsInput/commit/28c615fa543cdcfa79107e3d9bddfdb73f85c87a)) 128 | * Add loadOnDownArrow option ([c44f110a](https://github.com/mbenford/ngTagsInput/commit/c44f110a539fe44f2255d51ee7e011b3d84bc38a), [#54](https://github.com/mbenford/ngTagsInput/issues/54)) 129 | * **configuration:** 130 | * Add setTextAutosizeThreshold method ([a1702e63](https://github.com/mbenford/ngTagsInput/commit/a1702e636128c8ec7fd14c9f0e7a235157696986), [#181](https://github.com/mbenford/ngTagsInput/issues/181)) 131 | * Add support for validation ([445877a1](https://github.com/mbenford/ngTagsInput/commit/445877a1325c31708f9bf7ea6a85e51647ce6a94)) 132 | * **tagsInput:** 133 | * Add support for some Bootstrap classes ([d6360655](https://github.com/mbenford/ngTagsInput/commit/d6360655d7444e4979ccfb6092f79ba0a82edfc6), [#78](https://github.com/mbenford/ngTagsInput/issues/78)) 134 | * Add type option ([3afe564d](https://github.com/mbenford/ngTagsInput/commit/3afe564d4be4f5726638132bb6329a259c9422fd), [#140](https://github.com/mbenford/ngTagsInput/issues/140)) 135 | 136 | ## v2.0.1 (2014-04-13) 137 | 138 | #### Bug Fixes 139 | 140 | * **autocomplete:** 141 | * Escape regex metachars when highlighting ([e3c695f2](https://github.com/mbenford/ngTagsInput/commit/e3c695f26f96ab642a4a1f1129638e763b84b231), [#124](https://github.com/mbenford/ngTagsInput/issues/124)) 142 | * Fix autocomplete navigation when maxResultsToShow is set ([d95d35e8](https://github.com/mbenford/ngTagsInput/commit/d95d35e814099d74355ed431e85a957d39ec4745), [#109](https://github.com/mbenford/ngTagsInput/issues/109)) 143 | * Fix memory leak ([ba3a1a56](https://github.com/mbenford/ngTagsInput/commit/ba3a1a563d99894f381e4a29f3a1753a540ff453), [#118](https://github.com/mbenford/ngTagsInput/issues/118)) 144 | * **autosize:** Re-size input when placeholder changes ([0eacc964](https://github.com/mbenford/ngTagsInput/commit/0eacc9647ed7b12fac8db23cb711bb6c38a8c31a), [#110](https://github.com/mbenford/ngTagsInput/issues/110)) 145 | 146 | ## v2.0.0 (2014-03-26) 147 | 148 | #### Bug Fixes 149 | 150 | * **tagsInput:** 151 | * Fix blur handling ([f4fe7b87](https://github.com/mbenford/ngTagsInput/commit/f4fe7b87985e123d688595cd14aa22d549143de6), [#91](https://github.com/mbenford/ngTagsInput/issues/91)) 152 | * Fix autosize directive ([e9a723c9](https://github.com/mbenford/ngTagsInput/commit/e9a723c911a8d32964ad771c333f09fc78157172), [#84](https://github.com/mbenford/ngTagsInput/issues/84)) ([12b5beba](https://github.com/mbenford/ngTagsInput/commit/12b5beba230304fd22b6fef8eb613f6133860c0a), [#75](https://github.com/mbenford/ngTagsInput/issues/75)) 153 | 154 | #### Features 155 | 156 | * **tagsInput:** 157 | * Add addFromAutocompleteOnly option ([90f075c9](https://github.com/mbenford/ngTagsInput/commit/90f075c991866b99bd830529913483ea5e32a63f), [#60](https://github.com/mbenford/ngTagsInput/issues/60)) 158 | * Make maxLength consistent with minLength ([1458ba62](https://github.com/mbenford/ngTagsInput/commit/1458ba624a876a25ac0d8776388ecf4a16cc6aa7), [#53](https://github.com/mbenford/ngTagsInput/issues/53)) 159 | * Add visual feedback for invalid tags ([f469c274](https://github.com/mbenford/ngTagsInput/commit/f469c274b09397ca88004da78670dc090bf693e0), [#77](https://github.com/mbenford/ngTagsInput/issues/77)) 160 | * Change allowedTagsPattern's default value ([87029090](https://github.com/mbenford/ngTagsInput/commit/8702909009f998114765b6673c565dda4b038b43), [#76](https://github.com/mbenford/ngTagsInput/issues/76)) 161 | * Add support for validation CSS classes ([7f9e8bba](https://github.com/mbenford/ngTagsInput/commit/7f9e8bba7defca2c0f7c75b933b2e9c336f72b47), [#55](https://github.com/mbenford/ngTagsInput/issues/55)) 162 | * Add support for array of objects ([5c036806](https://github.com/mbenford/ngTagsInput/commit/5c036806a41d425e194d0496d9f091fb927b42c3), [#46](https://github.com/mbenford/ngTagsInput/issues/46)) 163 | * **configProvider:** Make options optionally data-bound ([390380bf](https://github.com/mbenford/ngTagsInput/commit/390380bffd4cac03ca71cb780e20898b2a6b07ad), [#73](https://github.com/mbenford/ngTagsInput/issues/73)) 164 | 165 | #### Breaking Changes 166 | 167 | * Stylesheets were changed and .ngTagsInput class selector was replaced by tags-input type selector. ([7f9e8bba](https://github.com/mbenford/ngTagsInput/commit/7f9e8bba7defca2c0f7c75b933b2e9c336f72b47)) 168 | * From now on, arrays of strings are no longer supported. In order to keep some backward compatibility a one-time conversion from an array of strings into an array of objects is available. ([5c036806](https://github.com/mbenford/ngTagsInput/commit/5c036806a41d425e194d0496d9f091fb927b42c3)) 169 | 170 | ## v1.1.1 (2014-01-23) 171 | 172 | #### Bug Fixes 173 | 174 | * **tagsInput:** Fix input-change event name ([47b40e13](http://github.com/mbenford/ngTagsInput/commit/47b40e1394bb3dfe7eabaf932a77d92539fb065e), [#57](http://github.com/mbenford/ngTagsInput/issues/57)) 175 | 176 | ## v1.1.0 (2014-01-14) 177 | 178 | #### Bug Fixes 179 | 180 | * **tagsInput:** 181 | * Change input width accordingly to its content ([8abdf79b](http://github.com/mbenford/ngTagsInput/commit/8abdf79bcd6871cd7c7064838020ea2b6c7b2fa2), [#6](http://github.com/mbenford/ngTagsInput/issues/6)) 182 | * **autocomplete:** 183 | * Fix require property ([231f275c](http://github.com/mbenford/ngTagsInput/commit/231f275c9f254370cb821648f71860a51e67a935)) 184 | * Close suggestion list when input loses focus ([d73d1567](http://github.com/mbenford/ngTagsInput/commit/d73d1567f3e01e45096ae50ca34b01424841214c), [#52](http://github.com/mbenford/ngTagsInput/issues/52)) 185 | * Hide suggestion list when there's nothing to show ([5a58a927](http://github.com/mbenford/ngTagsInput/commit/5a58a9274d38d8914a107c0108e6f2e4b1fd62e8), [#39](http://github.com/mbenford/ngTagsInput/issues/39)) 186 | 187 | #### Features 188 | 189 | * **tagsInput:** 190 | * Add support for ngModelController ([49c07608](http://github.com/mbenford/ngTagsInput/commit/49c076089b93f41decf751b662437a29fa28c7ea), [#45](http://github.com/mbenford/ngTagsInput/issues/45)) 191 | * Add min-tags option ([49c07608](http://github.com/mbenford/ngTagsInput/commit/49c076089b93f41decf751b662437a29fa28c7ea), [#47](http://github.com/mbenford/ngTagsInput/issues/47)) 192 | * Add max-tags option ([2bc02ec9](http://github.com/mbenford/ngTagsInput/commit/2bc02ec9f9c04fab5ef715efbc40914f7301fc22), [#24](http://github.com/mbenford/ngTagsInput/issues/24)) 193 | * **autocomplete:** 194 | * Add support for $http promises ([adaf6580](http://github.com/mbenford/ngTagsInput/commit/adaf6580320a47b962cb769407ae19abd8e6317c), [#38](http://github.com/mbenford/ngTagsInput/issues/38)) 195 | * **configProvider:** 196 | * Add support for global configuration ([e48be112](http://github.com/mbenford/ngTagsInput/commit/e48be112b65ca5bbf9513fdaa4618bb949ae7640), [#48](http://github.com/mbenford/ngTagsInput/issues/48)) 197 | 198 | #### Breaking Changes 199 | 200 | * Some CSS selectors must be changed, and therefore custom stylesheets based on the old selectors will conflict with this fix. They'll have to be updated to use class selectors. ([8abdf79b](http://github.com/mbenford/ngTagsInput/commit/8abdf79bcd6871cd7c7064838020ea2b6c7b2fa2), [#6](http://github.com/mbenford/ngTagsInput/issues/6)) 201 | 202 | ## v1.0.1 (2013-12-16) 203 | 204 | - **tagsInput** 205 | - Ignore modifier keys when processing keystrokes ([820014e][], [#35][]) 206 | - **autocomplete** 207 | - Encode HTML chars in suggestion list ([6e4f7c7][], [#34][]) 208 | - Prevent pending promises from executing ([710d33a][], [#36][]) 209 | 210 | [820014e]: https://github.com/mbenford/ngTagsInput/commit/820014e 211 | [710d33a]: https://github.com/mbenford/ngTagsInput/commit/710d33a 212 | [6e4f7c7]: https://github.com/mbenford/ngTagsInput/commit/6e4f7c7 213 | [#34]: https://github.com/mbenford/ngTagsInput/issues/34 214 | [#35]: https://github.com/mbenford/ngTagsInput/issues/35 215 | [#36]: https://github.com/mbenford/ngTagsInput/issues/36 216 | 217 | ## v1.0.0 (2013-12-07) 218 | 219 | - **tagsInput** 220 | - Added support for Angular 1.2 ([1a0b256][], [#17][]) 221 | - Added addOnBlur option ([69415a2][], [#29][]) 222 | - Fixed focus outline ([7d3c51a][], [#32][]) 223 | - Renamed ng-class option as custom-class ([298bf11][]) 224 | - Renamed tags-input module as ngTagsInput ([1db08aa][]) 225 | - **autocomplete** 226 | - Added debounce-delay option ([1a6527f][], [#19][]) 227 | - Added min-length option ([c17d7a4][], [#21][]) 228 | - Added match highlighting ([ce73779][], [#22][]) 229 | - Added maxResultsToShow option ([b2ae61b][], [#23][]) 230 | - Added tag filtering support ([a27363d][], [#25][]) 231 | - Changed tag addition behavior ([4f868e0][], [#30][]) 232 | - Fixed suggestions box visibility ([84bb916][], [c2b43c6][], [#26][]) 233 | - Changed source option to comply with Angular guidelines ([00b8e71][], [#18][]) 234 | - **general** 235 | - Improved minification ([5e2bf29][], [503d380][], [#27][]) 236 | 237 | [1a0b256]: https://github.com/mbenford/ngTagsInput/commit/1a0b256 238 | [7d3c51a]: https://github.com/mbenford/ngTagsInput/commit/7d3c51a 239 | [69415a2]: https://github.com/mbenford/ngTagsInput/commit/69415a2 240 | [298bf11]: https://github.com/mbenford/ngTagsInput/commit/298bf11 241 | [1a6527f]: https://github.com/mbenford/ngTagsInput/commit/1a6527f 242 | [c17d7a4]: https://github.com/mbenford/ngTagsInput/commit/c17d7a4 243 | [ce73779]: https://github.com/mbenford/ngTagsInput/commit/ce73779 244 | [b2ae61b]: https://github.com/mbenford/ngTagsInput/commit/b2ae61b 245 | [a27363d]: https://github.com/mbenford/ngTagsInput/commit/a27363d 246 | [4f868e0]: https://github.com/mbenford/ngTagsInput/commit/4f868e0 247 | [c2b43c6]: https://github.com/mbenford/ngTagsInput/commit/c2b43c6 248 | [00b8e71]: https://github.com/mbenford/ngTagsInput/commit/00b8e71 249 | [5e2bf29]: https://github.com/mbenford/ngTagsInput/commit/5e2bf29 250 | [503d380]: https://github.com/mbenford/ngTagsInput/commit/503d380 251 | [84bb916]: https://github.com/mbenford/ngTagsInput/commit/84bb916 252 | [1db08aa]: https://github.com/mbenford/ngTagsInput/commit/1db08aa 253 | [#17]: https://github.com/mbenford/ngTagsInput/issues/17 254 | [#18]: https://github.com/mbenford/ngTagsInput/issues/18 255 | [#19]: https://github.com/mbenford/ngTagsInput/issues/19 256 | [#21]: https://github.com/mbenford/ngTagsInput/issues/21 257 | [#22]: https://github.com/mbenford/ngTagsInput/issues/22 258 | [#23]: https://github.com/mbenford/ngTagsInput/issues/23 259 | [#25]: https://github.com/mbenford/ngTagsInput/issues/25 260 | [#26]: https://github.com/mbenford/ngTagsInput/issues/26 261 | [#27]: https://github.com/mbenford/ngTagsInput/issues/27 262 | [#29]: https://github.com/mbenford/ngTagsInput/issues/29 263 | [#30]: https://github.com/mbenford/ngTagsInput/issues/30 264 | [#32]: https://github.com/mbenford/ngTagsInput/issues/32 265 | 266 | ## v0.1.5 (2013-11-23) 267 | 268 | - Renamed autocomplete directive as auto-complete so it doesn't conflict with input's autocomplete attribute 269 | - Changed 'restrict' property of both tags-input and auto-complete directives to 'E' 270 | 271 | ## v0.1.4 (2013-11-21) 272 | 273 | - Added basic autocomplete support 274 | - Added onTagAdded and onTagRemoved callbacks 275 | 276 | ## v0.1.3 (2013-10-02) 277 | 278 | - Added support for one-time string interpolation to all options 279 | 280 | ## v0.1.2 (2013-09-08) 281 | 282 | - Fixed the CSS classes so the directive gets rendered consistently across different browsers 283 | 284 | ## v0.1.1 (2013-08-17) 285 | 286 | - Removed allowed-chars-pattern option since it wouldn't prevent invalid chars from being inserted by pasting data from the clipboard. The allowed-tags-pattern option is the correct way to validate input from now on 287 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to ngTagsInput 2 | 3 | So you want to contribute to ngTagsInput... that's awesome! I really appreciate the help in making this project better. Here you will find everything you need to know in order to solve problems, report bugs, request features and implement your contribution and send it as a pull request. 4 | 5 | ## Asking a question 6 | 7 | If you have any questions on how to use ngTagsInput or how to solve a problem involving the directive, please create a question on [Stackoverflow](http://www.stackoverflow.com) using the `ng-tags-input` tag. **DO NOT** post a question as an issue on GitHub. The issue tracker should be used for reporting bugs only. 8 | 9 | ## Reporting a bug 10 | 11 | If you find a bug in the code or an error in the documentation and want to report it, check whether it's already been reported by searching the issue tracker. In case it hasn't yet, create a new issue and describe the problem you've found. Please be sure to include the following information along with your message: 12 | 13 | - Version of ngTagsInput you are using. 14 | - Version of Angular you are using. 15 | - Browser (name and version) on which the bug occurs. 16 | - Plunker showing the bug. You can use [this template](plnkr.co/edit/tpl:93P2qxOjYmlcYSqDmo39). 17 | 18 | ## Setting up your environment 19 | 20 | Here's what you need to do before start working on the code: 21 | 22 | 1. Install Node.js (0.10.22 or higher) 23 | 2. Install `grunt-cli` and `karma-cli` globally 24 | 25 | npm install -g grunt-cli karma-cli 26 | 27 | 3. Install Ruby and the `sass` gem if you want to compile the SCSS files 28 | 4. Clone your repository 29 | 30 | git clone https://github.com//ngTagsInput 31 | 32 | 5. Go to the ngTagsInput directory 33 | 34 | cd ngTagsInput 35 | 36 | 6. Add the main ngTagsInput repo as an upstream remote 37 | 38 | git remote add upstream https://github.com/mbenford/ngTagsInput 39 | 40 | 7. Install the development dependencies 41 | 42 | npm install 43 | 44 | ## Building from the source code 45 | 46 | You can build ngTagsInput with a single command: 47 | 48 | grunt pack 49 | 50 | That performs all tasks needed to produce the final JavaScript and CSS files. After the build completes, a folder named `build` will be generated containing the following files: 51 | 52 | ng-tags-input.js 53 | ng-tags-input.css 54 | ng-tags-input.min.js 55 | ng-tags-input.min.css 56 | 57 | In addition to `pack` there are other useful tasks you might want to use: 58 | 59 | - `pack:js`: Generates only the Javascript files. 60 | - `test`: Runs all tests using PhantomJS (you can use `karma start` as well, of course). 61 | - `watch`: Runs all tests automatically every time the source code files change. 62 | - `coverage`: Generates the code coverage report. This may help you be sure nothing is left untested. 63 | 64 | # Guidelines 65 | 66 | Even though ngTagsInput isn't a big project, there are a few guidelines I'd like you to follow so everything remains organized and consistent. I can't stress enough how important following theses guidelines is. Failing to do so will slow down the review process of your pull request and might prevent it from being accepted. 67 | 68 | ## TL;DR 69 | 70 | The following checklist should help you be sure you have covered all the bases. You should answer *yes* to all questions 71 | before sending your pull request: 72 | 73 | - Have you written tests for all changes you made? 74 | - Have you updated the docs? (in case you have changed the directive's public API) 75 | - Have you built the directive by running `grunt pack`? 76 | - Have you squashed multiple commits into one? 77 | - Does your commit message comply with the [commit message guidelines](#commit-message-guidelines)? 78 | - Have you rebased your branch on top of the master branch? 79 | 80 | ## Coding guidelines 81 | 82 | No endless list of conventions and standards here; just three simple guidelines: 83 | 84 | - All code **must** follow the rules defined in the [.jshintrc](/jshintrc) file (Grunt gets you covered here. Just run `grunt jshint`). 85 | - All features or bug fixes **must** be covered by one or more tests. 86 | - All public API changes (e.g. new options for directives) **must** be documented with ngdoc-like tags. 87 | 88 | ## Commit message guidelines* 89 | 90 | \* Heavily inspired on AngularJS commit guidelines 91 | 92 | Good, neat commit messages are very important to keep the project history organized. In addition to that, each release changelog is generated out of the commits messages, so they should be readable and concise. 93 | 94 | ### Message Format 95 | 96 | Each commit consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**: 97 | 98 | (): 99 | 100 | 101 | 102 |