From 8176e18d086cb4b1a449a924ff3df9a00630bbb4 Mon Sep 17 00:00:00 2001 From: MuseofMoose Date: Mon, 17 Oct 2016 19:52:28 -0400 Subject: [PATCH] Building dist files with new version. --- dist/search-select.css | 2 +- dist/search-select.js | 2 +- dist/search-select.min.css | 2 +- dist/search-select.min.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/search-select.css b/dist/search-select.css index 4e22179..4b00946 100644 --- a/dist/search-select.css +++ b/dist/search-select.css @@ -1,7 +1,7 @@ /*! * search-select * - * Version: 1.2.0 - 2016-10-17T17:08:39.509Z + * Version: 1.3.0 - 2016-10-17T23:51:43.860Z * License: MIT */ diff --git a/dist/search-select.js b/dist/search-select.js index 6190cb6..10cd382 100644 --- a/dist/search-select.js +++ b/dist/search-select.js @@ -1,7 +1,7 @@ /*! * search-select * - * Version: 1.2.0 - 2016-10-17T17:08:39.545Z + * Version: 1.3.0 - 2016-10-17T23:51:43.899Z * License: MIT */ diff --git a/dist/search-select.min.css b/dist/search-select.min.css index 4003b12..76905e5 100644 --- a/dist/search-select.min.css +++ b/dist/search-select.min.css @@ -1,6 +1,6 @@ /*! * search-select * - * Version: 1.2.0 - 2016-10-17T17:08:39.509Z + * Version: 1.3.0 - 2016-10-17T23:51:43.860Z * License: MIT */.search-select-container{position:relative;font-weight:300}.search-select-container.disabled{opacity:.5}.search-select-container div,.search-select-container i,.search-select-container li,.search-select-container ul{display:block}.search-select-container .ss-input-container{min-height:62px;position:relative;margin:20px 0;border:1px solid #ccc;box-shadow:0 1px 3px .5px #bbb}.search-select-container .ss-input-container.container-expanded{min-height:102px}.search-select-container .ss-input-container.container-expanded-add,.search-select-container .ss-input-container.container-expanded-remove{-webkit-transition:all cubic-bezier(.25,.46,.45,.94) .3s;-moz-transition:all cubic-bezier(.25,.46,.45,.94) .3s;-o-transition:all cubic-bezier(.25,.46,.45,.94) .3s;transition:all cubic-bezier(.25,.46,.45,.94) .3s}.search-select-container .ss-input-container .cover-base{height:0;padding:0;font-size:17px;font-weight:400;color:transparent;background-color:#e6e6e6;pointer-events:none}.search-select-container .ss-input-container .cover-expanded{padding:10px 45px 10px 16px;height:40px;min-height:40px;color:#666}.search-select-container .ss-input-container .input-base{width:100%;height:60px;position:absolute;top:0;padding:10px 45px 10px 16px;margin:0;font-size:20px;color:#777;border:none;box-shadow:none}.search-select-container .ss-input-container .input-expanded{top:40px}.search-select-container .ss-input-container .icon-base{position:absolute;z-index:3;top:calc(50% - 14px);right:15px;padding-top:0;font-size:28px;color:#ccc;pointer-events:none}.search-select-container .ss-input-container .icon-expanded{padding-top:20px}.search-select-container .ss-input-container .cover-expanded-add,.search-select-container .ss-input-container .cover-expanded-remove,.search-select-container .ss-input-container .icon-expanded-add,.search-select-container .ss-input-container .icon-expanded-remove,.search-select-container .ss-input-container .input-expanded-add,.search-select-container .ss-input-container .input-expanded-remove{-webkit-transition:all cubic-bezier(.25,.46,.45,.94) .3s;-moz-transition:all cubic-bezier(.25,.46,.45,.94) .3s;-o-transition:all cubic-bezier(.25,.46,.45,.94) .3s;transition:all cubic-bezier(.25,.46,.45,.94) .3s}.search-select-container .results-container{width:100%;position:absolute;z-index:5;top:100%}.search-select-container .results-container .option-list{height:auto;width:100%;max-height:300px;padding:0;margin:0;color:#999;background-color:#fff;border:1px solid #ccc;border-top:none;box-shadow:0 1px 3px .5px #bbb;list-style:none;overflow:auto}.search-select-container .results-container .option-list .option-list-item{padding:5px 15px 5px 15px;font-size:20px;cursor:pointer}.search-select-container .results-container .option-list .option-list-item.kb-focused,.search-select-container .results-container .option-list .option-list-item:hover{background-color:#ececec}.search-select-container .results-container .option-list .option-list-item .search-bold{font-weight:700;color:#888} \ No newline at end of file diff --git a/dist/search-select.min.js b/dist/search-select.min.js index 9e80c67..8cb924f 100644 --- a/dist/search-select.min.js +++ b/dist/search-select.min.js @@ -1,7 +1,7 @@ /*! * search-select * - * Version: 1.2.0 - 2016-10-17T17:08:39.545Z + * Version: 1.3.0 - 2016-10-17T23:51:43.899Z * License: MIT */ !function(){"use strict";function e(){function e(e,t){function n(){if(!y(S.ngModel)){s(),o();for(var e=0;e=S.filteredOptions.length-1||(S.keyboardFocusIndex+=1,i(!0)))}function s(e){null!==S.keyboardFocusIndex&&(r(S.filteredOptions[S.keyboardFocusIndex]),e.target.blur(),O=!0)}function o(e){e.target.blur(),O=!0}function i(e){var t="option-list",n="option-list-item-"+S.keyboardFocusIndex,s=e?1:-1,o="option-list-item-"+(S.keyboardFocusIndex+s),i=document.getElementById(t),a=document.getElementById(n),l=document.getElementById(o)||a;l.offsetTop>=i.offsetHeight+i.scrollTop&&(i.scrollTop=l.offsetTop-i.offsetHeight+l.offsetHeight),i.scrollTop>l.offsetTop&&(i.scrollTop=l.offsetTop)}this.run=function(i){if(O!==!1){var a=i.keyCode?i.keyCode:i.which;O=!1,38===a&&t(),40===a&&n(),13===a&&s(i),27===a&&o(i),e.$apply()}}}function g(e,n,s){var o=''+n+"";return t(e+o+s)}function f(){return 0!==Object.keys(S.ngModel).length}function b(e){O=!0}function y(e){return"undefined"==typeof e}var S=this,v=new m,x=S.labelKeys.split(" "),k=angular.copy(S.options),O=!0;S.filteredOptions={},S.keyboardFocusIndex=null,S.searching=!1,S.searchString="",S.selectedIndex=null,S.isOptionSelected=f,S.searchOptions=h,S.selectOption=r,S.ssBlur=u,S.ssFocus=d,e.$watch(function(){return S.options},function(e,t){k=angular.copy(S.options),n()},!0)}var t={require:"ngModel",restrict:"EA",templateUrl:"search-select.html",scope:{ngModel:"=",options:"=",disabled:"=?",required:"=?",idKey:"@",labelKeys:"@",placeholderText:"@",fontAwesomeIcon:"@"},controller:e,controllerAs:"searchSelect",bindToController:!0,link:function(e,t,n,s){e.triggerNgChange=function(e){s.$setViewValue(e)}}};return t}angular.module("searchSelect",["ngSanitize"]).directive("searchSelect",e)}(),angular.module("searchSelect").run(["$templateCache",function(e){e.put("search-select.html",'
{{searchSelect.placeholderText}}
'),e.put("demo_files/index.html",'AngularJS1 Search Select demo

Demo

Instructions:

* Mouse Controls

Move with the mouse, click an option to select, click away from the dropdown to close.

* Keyboard Controls

Up/Down to move, Enter to select, Escape to close.

* Searching

Type into the input to narrow down the option list.

Basic example:

\n  <search-select\n    ng-model="main.currentFruitOption"\n    options="main.fruitOptions"\n    label-keys="name"\n    placeholder-text="Select Fruit"\n    font-awesome-icon="fa-lemon-o">\n  </search-select>\n

Results in:

Selected Option: {{main.cleanOption(main.currentFruitOption)}}

Multiple label-keys and Disabling:

Controller:
\n  vm.disabled = false;\n
HTML:
\n  <button ng-click="main.disabled = !main.disabled">\n    Toggle Disable Value\n  </button>\n\n  <search-select\n    ng-model="main.currentUserOption"\n    options="main.userOptions"\n    label-keys="first_name last_name"\n    placeholder-text="Select User"\n    font-awesome-icon="fa-user"\n    disabled="main.disabled">\n  </search-select>\n

Results in:

Selected Option: {{main.cleanOption(main.currentUserOption)}}

Disabled: {{main.disabled}}

Pre-selected option and Custom idKey:

Controller:
\n  vm.currentVideoGameCharacterOption = { characterId: 6, name: \'Sonic\', weapon: \'Speed\' }\n
HTML:
\n  <search-select\n    ng-model="main.currentVideoGameCharacterOption"\n    options="main.videoGameCharacterOptions"\n    id-key="characterId"\n    label-keys="name"\n    placeholder-text="Select Character"\n    font-awesome-icon="fa-user">\n  </search-select>\n

Results in:

Selected Option: {{main.cleanOption(main.currentVideoGameCharacterOption)}}

')}]); \ No newline at end of file