From e73fca5f5279155cd583d965f4599debae60a5f8 Mon Sep 17 00:00:00 2001 From: pkempenaers Date: Tue, 25 Apr 2017 22:30:51 +0200 Subject: [PATCH] Release 2.0.0-beta.10 --- bower.json | 2 +- dist/angularjs-dropdown-multiselect.min.js | 2 +- .../angularjs-dropdown-multiselect.min.js.map | 2 +- dist/src/angularjs-dropdown-multiselect.js | 662 ++++++++++++++++++ dist/src/index.css | 0 docs/maps/scripts/app.js.map | 2 +- docs/scripts/app.js | 2 +- package.json | 2 +- 8 files changed, 668 insertions(+), 6 deletions(-) create mode 100644 dist/src/angularjs-dropdown-multiselect.js create mode 100644 dist/src/index.css diff --git a/bower.json b/bower.json index 0f52592e..54b6bc62 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angularjs-dropdown-multiselect", - "version": "2.0.0-beta.9", + "version": "2.0.0-beta.10", "authors": [ "Dotan Simha ", "Pieter Kempenaers " diff --git a/dist/angularjs-dropdown-multiselect.min.js b/dist/angularjs-dropdown-multiselect.min.js index 5888918a..cb5eaeba 100644 --- a/dist/angularjs-dropdown-multiselect.min.js +++ b/dist/angularjs-dropdown-multiselect.min.js @@ -1,4 +1,4 @@ /******/!function(e){function t(l){if(n[l])return n[l].exports;var o=n[l]={exports:{},id:l,loaded:!1};return e[l].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}// webpackBootstrap /******/ -var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}var o=n(1),s=l(o);angular.module("angularjs-dropdown-multiselect",[]).directive("dmDropdownStaticInclude",["$compile",function(e){"ngInject";return function(t,n,l){var o=l.dmDropdownStaticInclude,s=n.html(o).contents();e(s)(t)}}]).directive("ngDropdownMultiselect",s["default"])},function(e,t,n){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}function o(){return{restrict:"AE",scope:{selectedModel:"=",options:"=",extraSettings:"=",events:"=",searchFilter:"=?",translationTexts:"=",disabled:"="},transclude:{toggleDropdown:"?toggleDropdown"},controller:i["default"],templateUrl:"app/component/angularjs-dropdown-multiselect.html"}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o;var s=n(2),i=l(s)},function(e,t){"use strict";function n(e,t){var n=!1;return e.some(function(e){return e===t?(n=!0,!0):!1}),n}function l(e,t,n){var l=-1;return e.some(function(e,o){return e[n]===t[n]?(l=o,!0):!1}),l}function o(e,t,o,s){"ngInject";function i(){setTimeout(function(){var e=angular.element(t)[0].querySelector(".option");angular.isDefined(e)&&null!=e&&e.focus()},0)}function r(){e.open?e.close():e.open=!0,e.settings.keyboardControls&&e.open&&(1===e.settings.selectionLimit&&e.settings.enableSearch?setTimeout(function(){angular.element(t)[0].querySelector(".searchField").focus()},0):i()),e.settings.enableSearch&&e.open&&setTimeout(function(){angular.element(t)[0].querySelector(".searchField").focus()},0)}function c(t,n){e.setSelectedItem(n,!1,!0),t.stopImmediatePropagation()}function a(){e.open=!1,e.input.searchFilter=e.settings.clearSearchOnClose?"":e.input.searchFilter,e.externalEvents.onClose()}function d(t){e.selectedModel.splice(0,e.selectedModel.length),e.options.forEach(function(n){n[e.settings.groupBy]===t&&e.setSelectedItem(n,!1,!1)}),e.externalEvents.onSelectionChanged()}function u(t){return null!==e.settings.groupByTextProvider?e.settings.groupByTextProvider(t):t}function g(e){var n=t.find("button"),l=document.createElement("canvas"),o=l.getContext("2d");return o.font=n.css("font-size")+n.css("font-family"),o.originalFont=n.css("font-size")+n.css("font-family"),o.fillStyle="#000000",o.measureText(e).width}function p(){if(e.settings.dynamicTitle&&e.selectedModel&&e.selectedModel.length>0){if(e.settings.smartButtonMaxItems>0){var n=24,l=2,o=8,s=t[0].offsetWidth-n-l-o,i=[];angular.forEach(e.options,function(t){if(e.isChecked(t)){var n=e.getPropertyForObject(t,e.settings.displayProp),l=e.settings.smartButtonTextConverter(n,t);i.push(l||n)}}),e.selectedModel.length>e.settings.smartButtonMaxItems&&(i=i.slice(0,e.settings.smartButtonMaxItems),i.push("..."));var r=i.join(", "),c=r.length-4;if(0===t[0].offsetWidth)return r;if(s<=g("..."))return"...";for(;g(r)>s;)"..."!==i[i.length-1]&&(i.push("..."),r+="...",c=r.length-4),r=r.slice(0,c)+r.slice(c+1),c-=1;return r}var a=angular.isDefined(e.selectedModel)?e.selectedModel.length:0;return 0===a?e.texts.buttonDefaultText:e.settings.showAllSelectedText&&a===e.options.length?e.texts.allSelectedText:a+" "+e.texts.dynamicButtonTextSuffix}return e.texts.buttonDefaultText}function h(e,t){return angular.isDefined(e)&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function f(){e.deselectAll(!0),e.externalEvents.onSelectAll();var t=o("filter")(e.options,e.getFilter(e.input.searchFilter));angular.forEach(t,function(t){e.setSelectedItem(t,!0,!1)}),e.externalEvents.onSelectionChanged(),e.selectedGroup=null}function m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!1;t||e.externalEvents.onDeselectAll(),e.selectedModel.splice(0,e.selectedModel.length),t||e.externalEvents.onSelectionChanged(),e.selectedGroup=null}function y(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!1,o=arguments[2],s=void 0,i=void 0;angular.isDefined(A.idProperty)?(s=-1!==l(e.selectedModel,t,A.idProperty),i=l(e.selectedModel,t,A.idProperty)):(s=-1!==e.selectedModel.indexOf(t),i=e.selectedModel.indexOf(t)),!n&&s?(e.selectedModel.splice(i,1),e.externalEvents.onItemDeselect(t),e.settings.closeOnDeselect&&e.close()):!s&&(0===e.settings.selectionLimit||e.selectedModel.length0&&e.selectedModel.length===e.settings.selectionLimit&&e.externalEvents.onMaxSelectionReached()):1!==e.settings.selectionLimit||s||e.selectedModel.length!==e.settings.selectionLimit||(e.selectedModel.splice(0,1),e.selectedModel.push(t),o&&e.externalEvents.onItemSelect(t),e.settings.closeOnSelect&&e.close()),o&&e.externalEvents.onSelectionChanged(),e.selectedGroup=null}function k(t){return angular.isDefined(A.idProperty)?-1!==l(e.selectedModel,t,A.idProperty):-1!==e.selectedModel.indexOf(t)}function v(t){var n=angular.element(t.target).scope(),l=void 0,o=t.target.parentNode;if(e.settings.keyboardControls)if(13===t.keyCode||32===t.keyCode)t.preventDefault(),n.option?e.setSelectedItem(n.option,!1,!0):"deselectAll"===t.target.id?e.deselectAll():"selectAll"===t.target.id&&e.selectAll();else if(38===t.keyCode){for(t.preventDefault(),o.previousElementSibling&&(l=o.previousElementSibling.querySelector("a")||o.previousElementSibling.querySelector("input"));!l&&o;)o=o.previousElementSibling,o&&(l=o.querySelector("a")||o.querySelector("input"));l&&l.focus()}else if(40===t.keyCode){for(t.preventDefault(),o.nextElementSibling&&(l=o.nextElementSibling.querySelector("a")||o.nextElementSibling.querySelector("input"));!l&&o;)o=o.nextElementSibling,o&&(l=o.querySelector("a")||o.querySelector("input"));l&&l.focus()}else 27===t.keyCode&&(t.preventDefault(),e.toggleDropdown())}function b(t){var n=t.target.parentNode.parentNode,l=void 0;if(e.settings.keyboardControls)if(9===t.keyCode||40===t.keyCode)t.preventDefault(),i();else if(38===t.keyCode){for(t.preventDefault(),n.previousElementSibling&&(l=n.previousElementSibling.querySelector("a")||n.previousElementSibling.querySelector("input"));!l&&n;)n=n.previousElementSibling,n&&(l=n.querySelector("a")||n.querySelector("input"));l&&l.focus()}else 27===t.keyCode&&(t.preventDefault(),e.toggleDropdown())}function x(t,n){var l=void 0;e.settings.keyboardControls&&13===t.keyCode&&(1===e.settings.selectionLimit&&e.settings.enableSearch?(l=o("filter")(e.options,e.getFilter(n)),1===l.length&&e.setSelectedItem(l[0],!1,!0)):e.settings.enableSearch&&e.selectAll())}function S(t){var n={};return n[e.settings.searchField]=t,n}function w(t){t&&t.stopPropagation(),e.settings.enableSearch=!e.settings.enableSearch,e.settings.enableSearch||(e.input.searchFilter="")}function C(){e.settings.keyboardControls&&13===event.keyCode&&(e.toggleSearch(),e.settings.enableSearch?setTimeout(function(){angular.element(t)[0].querySelector(".searchField").focus()},0):i())}function D(t,n){if(angular.isUndefined(n))return-1;if(angular.isUndefined(t))return 1;if("object"!==t.type||"object"!==n.type)return t.index
')}]); +var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}var o=n(1),s=l(o);angular.module("angularjs-dropdown-multiselect",[]).directive("dmDropdownStaticInclude",["$compile",function(e){"ngInject";return function(t,n,l){var o=l.dmDropdownStaticInclude,s=n.html(o).contents();e(s)(t)}}]).directive("ngDropdownMultiselect",s["default"])},function(e,t,n){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}function o(){return{restrict:"AE",scope:{selectedModel:"=",options:"=",extraSettings:"=",events:"=",searchFilter:"=?",translationTexts:"=",disabled:"="},transclude:{toggleDropdown:"?toggleDropdown"},controller:i["default"],templateUrl:"app/component/angularjs-dropdown-multiselect.html"}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o;var s=n(2),i=l(s)},function(e,t){"use strict";function n(e,t){var n=!1;return e.some(function(e){return e===t?(n=!0,!0):!1}),n}function l(e,t,n){var l=-1;return e.some(function(e,o){return e[n]===t[n]?(l=o,!0):!1}),l}function o(e,t,o,s){"ngInject";function i(){setTimeout(function(){var e=angular.element(t)[0].querySelector(".option");angular.isDefined(e)&&null!=e&&e.focus()},0)}function r(){e.open?e.close():e.open=!0,e.settings.keyboardControls&&e.open&&(1===e.settings.selectionLimit&&e.settings.enableSearch?setTimeout(function(){angular.element(t)[0].querySelector(".searchField").focus()},0):i()),e.settings.enableSearch&&e.open&&setTimeout(function(){angular.element(t)[0].querySelector(".searchField").focus()},0)}function c(t,n){e.setSelectedItem(n,!1,!0),t.stopImmediatePropagation()}function a(){e.open=!1,e.input.searchFilter=e.settings.clearSearchOnClose?"":e.input.searchFilter,e.externalEvents.onClose()}function d(t){e.selectedModel.splice(0,e.selectedModel.length),e.options.forEach(function(n){n[e.settings.groupBy]===t&&e.setSelectedItem(n,!1,!1)}),e.externalEvents.onSelectionChanged()}function u(t){return null!==e.settings.groupByTextProvider?e.settings.groupByTextProvider(t):t}function g(e){var n=t.find("button"),l=document.createElement("canvas"),o=l.getContext("2d");return o.font=n.css("font-size")+n.css("font-family"),o.originalFont=n.css("font-size")+n.css("font-family"),o.fillStyle="#000000",o.measureText(e).width}function p(){if(e.settings.dynamicTitle&&e.selectedModel&&e.selectedModel.length>0){if(angular.isFunction(e.settings.smartButtonTextProvider))return e.settings.smartButtonTextProvider(e.selectedModel);if(e.settings.smartButtonMaxItems>0){var n=24,l=2,o=8,s=t[0].offsetWidth-n-l-o,i=[];angular.forEach(e.options,function(t){if(e.isChecked(t)){var n=e.getPropertyForObject(t,e.settings.displayProp),l=e.settings.smartButtonTextConverter(n,t);i.push(l||n)}}),e.selectedModel.length>e.settings.smartButtonMaxItems&&(i=i.slice(0,e.settings.smartButtonMaxItems),i.push("..."));var r=i.join(", "),c=r.length-4;if(0===t[0].offsetWidth)return r;if(s<=g("..."))return"...";for(;g(r)>s;)"..."!==i[i.length-1]&&(i.push("..."),r+="...",c=r.length-4),r=r.slice(0,c)+r.slice(c+1),c-=1;return r}var a=angular.isDefined(e.selectedModel)?e.selectedModel.length:0;return 0===a?e.texts.buttonDefaultText:e.settings.showAllSelectedText&&a===e.options.length?e.texts.allSelectedText:a+" "+e.texts.dynamicButtonTextSuffix}return e.texts.buttonDefaultText}function h(e,t){return angular.isDefined(e)&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function f(){e.deselectAll(!0),e.externalEvents.onSelectAll();var t=o("filter")(e.options,e.getFilter(e.input.searchFilter));angular.forEach(t,function(t){e.setSelectedItem(t,!0,!1)}),e.externalEvents.onSelectionChanged(),e.selectedGroup=null}function m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!1;t||e.externalEvents.onDeselectAll(),e.selectedModel.splice(0,e.selectedModel.length),t||e.externalEvents.onSelectionChanged(),e.selectedGroup=null}function y(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!1,o=arguments[2],s=void 0,i=void 0;angular.isDefined(A.idProperty)?(s=-1!==l(e.selectedModel,t,A.idProperty),i=l(e.selectedModel,t,A.idProperty)):(s=-1!==e.selectedModel.indexOf(t),i=e.selectedModel.indexOf(t)),!n&&s?(e.selectedModel.splice(i,1),e.externalEvents.onItemDeselect(t),e.settings.closeOnDeselect&&e.close()):!s&&(0===e.settings.selectionLimit||e.selectedModel.length0&&e.selectedModel.length===e.settings.selectionLimit&&e.externalEvents.onMaxSelectionReached()):1!==e.settings.selectionLimit||s||e.selectedModel.length!==e.settings.selectionLimit||(e.selectedModel.splice(0,1),e.selectedModel.push(t),o&&e.externalEvents.onItemSelect(t),e.settings.closeOnSelect&&e.close()),o&&e.externalEvents.onSelectionChanged(),e.selectedGroup=null}function v(t){return angular.isDefined(A.idProperty)?-1!==l(e.selectedModel,t,A.idProperty):-1!==e.selectedModel.indexOf(t)}function k(t){var n=angular.element(t.target).scope(),l=void 0,o=t.target.parentNode;if(e.settings.keyboardControls)if(13===t.keyCode||32===t.keyCode)t.preventDefault(),n.option?e.setSelectedItem(n.option,!1,!0):"deselectAll"===t.target.id?e.deselectAll():"selectAll"===t.target.id&&e.selectAll();else if(38===t.keyCode){for(t.preventDefault(),o.previousElementSibling&&(l=o.previousElementSibling.querySelector("a")||o.previousElementSibling.querySelector("input"));!l&&o;)o=o.previousElementSibling,o&&(l=o.querySelector("a")||o.querySelector("input"));l&&l.focus()}else if(40===t.keyCode){for(t.preventDefault(),o.nextElementSibling&&(l=o.nextElementSibling.querySelector("a")||o.nextElementSibling.querySelector("input"));!l&&o;)o=o.nextElementSibling,o&&(l=o.querySelector("a")||o.querySelector("input"));l&&l.focus()}else 27===t.keyCode&&(t.preventDefault(),e.toggleDropdown())}function b(t){var n=t.target.parentNode.parentNode,l=void 0;if(e.settings.keyboardControls)if(9===t.keyCode||40===t.keyCode)t.preventDefault(),i();else if(38===t.keyCode){for(t.preventDefault(),n.previousElementSibling&&(l=n.previousElementSibling.querySelector("a")||n.previousElementSibling.querySelector("input"));!l&&n;)n=n.previousElementSibling,n&&(l=n.querySelector("a")||n.querySelector("input"));l&&l.focus()}else 27===t.keyCode&&(t.preventDefault(),e.toggleDropdown())}function x(t,n){var l=void 0;e.settings.keyboardControls&&13===t.keyCode&&(1===e.settings.selectionLimit&&e.settings.enableSearch?(l=o("filter")(e.options,e.getFilter(n)),1===l.length&&e.setSelectedItem(l[0],!1,!0)):e.settings.enableSearch&&e.selectAll())}function S(t){var n={};return n[e.settings.searchField]=t,n}function w(t){t&&t.stopPropagation(),e.settings.enableSearch=!e.settings.enableSearch,e.settings.enableSearch||(e.input.searchFilter="")}function C(){e.settings.keyboardControls&&13===event.keyCode&&(e.toggleSearch(),e.settings.enableSearch?setTimeout(function(){angular.element(t)[0].querySelector(".searchField").focus()},0):i())}function D(t,n){if(angular.isUndefined(n))return-1;if(angular.isUndefined(t))return 1;if("object"!==t.type||"object"!==n.type)return t.index
')}]); //# sourceMappingURL=maps/angularjs-dropdown-multiselect.min.js.map diff --git a/dist/maps/angularjs-dropdown-multiselect.min.js.map b/dist/maps/angularjs-dropdown-multiselect.min.js.map index 6232d411..ce77236e 100644 --- a/dist/maps/angularjs-dropdown-multiselect.min.js.map +++ b/dist/maps/angularjs-dropdown-multiselect.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["angularjs-dropdown-multiselect.min.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","_angularjsDropdownMultiselect","_angularjsDropdownMultiselect2","angular","directive","$compile","scope","element","attrs","template","dmDropdownStaticInclude","contents","html","dropdownMultiselectDirective","restrict","selectedModel","options","extraSettings","events","searchFilter","translationTexts","disabled","transclude","toggleDropdown","controller","templateUrl","Object","defineProperty","value","contains","collection","target","containsTarget","some","object","getIndexByProperty","objectToFind","property","index","option","ind","dropdownMultiselectController","$scope","$element","$filter","$document","focusFirstOption","setTimeout","elementToFocus","querySelector","isDefined","focus","open","close","settings","keyboardControls","selectionLimit","enableSearch","checkboxClick","$event","setSelectedItem","stopImmediatePropagation","input","clearSearchOnClose","externalEvents","onClose","selectCurrentGroup","currentGroup","splice","length","forEach","item","groupBy","onSelectionChanged","getGroupLabel","groupValue","groupByTextProvider","textWidth","text","$btn","find","canvas","document","createElement","ctx","getContext","font","css","originalFont","fillStyle","measureText","width","getButtonText","dynamicTitle","smartButtonMaxItems","paddingWidth","borderWidth","dropdownIconWidth","widthLimit","offsetWidth","itemsText","optionItem","isChecked","displayText","getPropertyForObject","displayProp","converterResponse","smartButtonTextConverter","push","slice","result","join","totalSelected","texts","buttonDefaultText","showAllSelectedText","allSelectedText","dynamicButtonTextSuffix","prototype","hasOwnProperty","undefined","selectAll","deselectAll","onSelectAll","searchResult","getFilter","selectedGroup","dontSendEvent","arguments","onDeselectAll","dontRemove","fireSelectionChange","exists","indexOfOption","idProperty","indexOf","onItemDeselect","closeOnDeselect","onItemSelect","closeOnSelect","onMaxSelectionReached","keyDownLink","event","sourceScope","nextOption","parent","parentNode","keyCode","preventDefault","previousElementSibling","nextElementSibling","keyDownSearchDefault","keyDownSearch","filter","searchField","toggleSearch","stopPropagation","keyDownToggleSearch","orderFunction","object1","object2","isUndefined","type","v1","v2","selectedToTop","$dropdownTrigger","children","noop","onInitDone","scrollable","scrollableHeight","closeOnBlur","showCheckAll","showUncheckAll","showEnableSearchButton","buttonClasses","checkBoxes","styleActive","checkAll","uncheckAll","selectionCount","selectionOf","searchPlaceholder","disableSearch","selectGroup","extend","on","e","parentElement","parentFound","className","split","$apply","$inject","run","$templateCache","put"],"mappings":"SAAS,SAAUA,GAKT,QAASC,GAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUE,OAGnC,IAAIC,GAASF,EAAiBD,IAC7BE,WACAE,GAAIJ,EACJK,QAAQ,EAUT,OANAP,GAAQE,GAAUM,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASH,GAG/DI,EAAOE,QAAS,EAGTF,EAAOD;;AAvBf,GAAID,KAq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OAAXA,IAAoB+J,GACjD/J,EAAOgK,UAAUC,OAASnK,EAASE,EAAOgK,UAAUC,MAAM,KAAM,wBAA0BF,GAC3F/J,IAAWuI,IACdwB,GAAc,GAGhB/J,EAASA,EAAO8J,aAGZC,IACJpJ,EAAOuJ,OAAO,WACbvJ,EAAOW,aAOZlD,QAAQuL,OAAOhJ,GACdnB,eAAgBA,EAChBmC,cAAeA,EACfM,eAAgBA,EAChBV,SAAUA,EACV2D,MAAOA,EACPnD,MAAOA,EACPT,MAAOA,EACPa,mBAAoBA,EACpBQ,cAAeA,EACfkB,cAAeA,EACfY,qBAAsBA,EACtBiB,UAAWA,EACXC,YAAaA,EACb9D,gBAAiBA,EACjB0C,UAAWA,EACXuC,YAAaA,EACbU,qBAAsBA,EACtBC,cAAeA,EACf3B,UAAWA,EACX8B,aAAcA,EACdE,oBAAqBA,EACrBC,cAAeA,IAGhBpH,EAAOsB,eAAeyG,aA3JvBhI,EAA8ByJ,SAAW,SAAU,WAAY,UAAW,aAC1ExK,OAAOC,eAAetC,EAAS,cAC9BuC,OAAO,IAERvC,EAAAA,WAAkBoD,KAkiBnBtC,QAAQb,OAAO,kCAAkC6M,KAAK,iBAAkB,SAASC,GAAiBA,EAAeC,IAAI,oDAAoD","file":"angularjs-dropdown-multiselect.min.js","sourceRoot":"/source/","sourcesContent":[]} \ No newline at end of file +{"version":3,"sources":["angularjs-dropdown-multiselect.min.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","_angularjsDropdownMultiselect","_angularjsDropdownMultiselect2","angular","directive","$compile","scope","element","attrs","template","dmDropdownStaticInclude","contents","html","dropdownMultiselectDirective","restrict","selectedModel","options","extraSettings","events","searchFilter","translationTexts","disabled","transclude","toggleDropdown","controller","templateUrl","Object","defineProperty","value","contains","collection","target","containsTarget","some","object","getIndexByProperty","objectToFind","property","index","option","ind","dropdownMultiselectController","$scope","$element","$filter","$document","focusFirstOption","setTimeout","elementToFocus","querySelector","isDefined","focus","open","close","settings","keyboardControls","selectionLimit","enableSearch","checkboxClick","$event","setSelectedItem","stopImmediatePropagation","input","clearSearchOnClose","externalEvents","onClose","selectCurrentGroup","currentGroup","splice","length","forEach","item","groupBy","onSelectionChanged","getGroupLabel","groupValue","groupByTextProvider","textWidth","text","$btn","find","canvas","document","createElement","ctx","getContext","font","css","originalFont","fillStyle","measureText","width","getButtonText","dynamicTitle","isFunction","smartButtonTextProvider","smartButtonMaxItems","paddingWidth","borderWidth","dropdownIconWidth","widthLimit","offsetWidth","itemsText","optionItem","isChecked","displayText","getPropertyForObject","displayProp","converterResponse","smartButtonTextConverter","push","slice","result","join","totalSelected","texts","buttonDefaultText","showAllSelectedText","allSelectedText","dynamicButtonTextSuffix","prototype","hasOwnProperty","undefined","selectAll","deselectAll","onSelectAll","searchResult","getFilter","selectedGroup","dontSendEvent","arguments","onDeselectAll","dontRemove","fireSelectionChange","exists","indexOfOption","idProperty","indexOf","onItemDeselect","closeOnDeselect","onItemSelect","closeOnSelect","onMaxSelectionReached","keyDownLink","event","sourceScope","nextOption","parent","parentNode","keyCode","preventDefault","previousElementSibling","nextElementSibling","keyDownSearchDefault","keyDownSearch","filter","searchField","toggleSearch","stopPropagation","keyDownToggleSearch","orderFunction","object1","object2","isUndefined","type","v1","v2","selectedToTop","$dropdownTrigger","children","noop","onInitDone","scrollable","scrollableHeight","closeOnBlur","showCheckAll","showUncheckAll","showEnableSearchButton","buttonClasses","checkBoxes","styleActive","checkAll","uncheckAll","selectionCount","selectionOf","searchPlaceholder","disableSearch","selectGroup","extend","on","e","parentElement","parentFound","className","split","$apply","$inject","run","$templateCache","put"],"mappings":"SAAS,SAAUA,GAKT,QAASC,GAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUE,OAGnC,IAAIC,GAASF,EAAiBD,IAC7BE,WACAE,GAAIJ,EACJK,QAAQ,EAUT,OANAP,GAAQE,GAAUM,KAAKH,EAAOD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tB,kBAEzBkC,EAASwH,aACZjI,EAAUgJ,GAAG,QAAS,SAAUC,GAC/B,GAAIpJ,EAAOU,KAAM,CAIhB,IAHA,GAAIrB,GAAS+J,EAAE/J,OAAOgK,cAClBC,GAAc,EAEX7L,QAAQ+C,UAAUnB,IAAsB,OAAXA,IAAoBiK,GACjDjK,EAAOkK,UAAUC,OAASrK,EAASE,EAAOkK,UAAUC,MAAM,KAAM,wBAA0BF,GAC3FjK,IAAWyI,IACdwB,GAAc,GAGhBjK,EAASA,EAAOgK,aAGZC,IACJtJ,EAAOyJ,OAAO,WACbzJ,EAAOW,aAOZlD,QAAQyL,OAAOlJ,GACdnB,eAAgBA,EAChBmC,cAAeA,EACfM,eAAgBA,EAChBV,SAAUA,EACV6D,MAAOA,EACPrD,MAAOA,EACPT,MAAOA,EACPa,mBAAoBA,EACpBQ,cAAeA,EACfkB,cAAeA,EACfc,qBAAsBA,EACtBiB,UAAWA,EACXC,YAAaA,EACbhE,gBAAiBA,EACjB4C,UAAWA,EACXuC,YAAaA,EACbU,qBAAsBA,EACtBC,cAAeA,EACf3B,UAAWA,EACX8B,aAAcA,EACdE,oBAAqBA,EACrBC,cAAeA,IAGhBtH,EAAOsB,eAAe2G,aA3JvBlI,EAA8B2J,SAAW,SAAU,WAAY,UAAW,aAC1E1K,OAAOC,eAAetC,EAAS,cAC9BuC,OAAO,IAERvC,EAAAA,WAAkBoD,KAsiBnBtC,QAAQb,OAAO,kCAAkC+M,KAAK,iBAAkB,SAASC,GAAiBA,EAAeC,IAAI,oDAAoD","file":"angularjs-dropdown-multiselect.min.js","sourceRoot":"/source/","sourcesContent":[]} \ No newline at end of file diff --git a/dist/src/angularjs-dropdown-multiselect.js b/dist/src/angularjs-dropdown-multiselect.js new file mode 100644 index 00000000..0c2029a2 --- /dev/null +++ b/dist/src/angularjs-dropdown-multiselect.js @@ -0,0 +1,662 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _angularjsDropdownMultiselect = __webpack_require__(1); + + var _angularjsDropdownMultiselect2 = _interopRequireDefault(_angularjsDropdownMultiselect); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + angular.module('angularjs-dropdown-multiselect', []).directive('dmDropdownStaticInclude', ["$compile", function ($compile) { + 'ngInject'; + + return function directive(scope, element, attrs) { + var template = attrs.dmDropdownStaticInclude; + var contents = element.html(template).contents(); + $compile(contents)(scope); + }; + }]).directive('ngDropdownMultiselect', _angularjsDropdownMultiselect2.default); + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = dropdownMultiselectDirective; + + var _angularjsDropdownMultiselect = __webpack_require__(2); + + var _angularjsDropdownMultiselect2 = _interopRequireDefault(_angularjsDropdownMultiselect); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function dropdownMultiselectDirective() { + return { + restrict: 'AE', + scope: { + selectedModel: '=', + options: '=', + extraSettings: '=', + events: '=', + searchFilter: '=?', + translationTexts: '=', + disabled: '=' + }, + transclude: { + toggleDropdown: '?toggleDropdown' + }, + controller: _angularjsDropdownMultiselect2.default, + templateUrl: 'app/component/angularjs-dropdown-multiselect.html' + }; + } + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + 'use strict'; + + dropdownMultiselectController.$inject = ["$scope", "$element", "$filter", "$document"]; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = dropdownMultiselectController; + /* + eslint no-param-reassign: [ + "error", + { + "props": true, + "ignorePropertyModificationsFor": [ + "$scope" + ] + } + ] + */ + + function contains(collection, target) { + var containsTarget = false; + collection.some(function (object) { + if (object === target) { + containsTarget = true; + return true; + } + return false; + }); + return containsTarget; + } + + function getIndexByProperty(collection, objectToFind, property) { + var index = -1; + collection.some(function (option, ind) { + if (option[property] === objectToFind[property]) { + index = ind; + return true; + } + return false; + }); + return index; + } + + function dropdownMultiselectController($scope, $element, $filter, $document) { + 'ngInject'; + + var $dropdownTrigger = $element.children()[0]; + var externalEvents = { + onItemSelect: angular.noop, + onItemDeselect: angular.noop, + onSelectAll: angular.noop, + onDeselectAll: angular.noop, + onInitDone: angular.noop, + onMaxSelectionReached: angular.noop, + onSelectionChanged: angular.noop, + onClose: angular.noop + }; + + var settings = { + dynamicTitle: true, + scrollable: false, + scrollableHeight: '300px', + closeOnBlur: true, + displayProp: 'label', + enableSearch: false, + clearSearchOnClose: false, + selectionLimit: 0, + showCheckAll: true, + showUncheckAll: true, + showEnableSearchButton: false, + closeOnSelect: false, + buttonClasses: 'btn btn-default', + closeOnDeselect: false, + groupBy: undefined, + checkBoxes: false, + groupByTextProvider: null, + smartButtonMaxItems: 0, + smartButtonTextConverter: angular.noop, + styleActive: false, + selectedToTop: false, + keyboardControls: false, + template: '{{getPropertyForObject(option, settings.displayProp)}}', + searchField: '$', + showAllSelectedText: false + }; + + var texts = { + checkAll: 'Check All', + uncheckAll: 'Uncheck All', + selectionCount: 'checked', + selectionOf: '/', + searchPlaceholder: 'Search...', + buttonDefaultText: 'Select', + dynamicButtonTextSuffix: 'checked', + disableSearch: 'Disable search', + enableSearch: 'Enable search', + selectGroup: 'Select all:', + allSelectedText: 'All' + }; + + var input = { + searchFilter: $scope.searchFilter || '' + }; + + angular.extend(settings, $scope.extraSettings || []); + angular.extend(externalEvents, $scope.events || []); + angular.extend(texts, $scope.translationTexts); + + if (settings.closeOnBlur) { + $document.on('click', function (e) { + if ($scope.open) { + var target = e.target.parentElement; + var parentFound = false; + + while (angular.isDefined(target) && target !== null && !parentFound) { + if (!!target.className.split && contains(target.className.split(' '), 'multiselect-parent') && !parentFound) { + if (target === $dropdownTrigger) { + parentFound = true; + } + } + target = target.parentElement; + } + + if (!parentFound) { + $scope.$apply(function () { + $scope.close(); + }); + } + } + }); + } + + angular.extend($scope, { + toggleDropdown: toggleDropdown, + checkboxClick: checkboxClick, + externalEvents: externalEvents, + settings: settings, + texts: texts, + input: input, + close: close, + selectCurrentGroup: selectCurrentGroup, + getGroupLabel: getGroupLabel, + getButtonText: getButtonText, + getPropertyForObject: getPropertyForObject, + selectAll: selectAll, + deselectAll: deselectAll, + setSelectedItem: setSelectedItem, + isChecked: isChecked, + keyDownLink: keyDownLink, + keyDownSearchDefault: keyDownSearchDefault, + keyDownSearch: keyDownSearch, + getFilter: getFilter, + toggleSearch: toggleSearch, + keyDownToggleSearch: keyDownToggleSearch, + orderFunction: orderFunction + }); + + $scope.externalEvents.onInitDone(); + + function focusFirstOption() { + setTimeout(function () { + var elementToFocus = angular.element($element)[0].querySelector('.option'); + if (angular.isDefined(elementToFocus) && elementToFocus != null) { + elementToFocus.focus(); + } + }, 0); + } + + function toggleDropdown() { + if ($scope.open) { + $scope.close(); + } else { + $scope.open = true; + } + if ($scope.settings.keyboardControls) { + if ($scope.open) { + if ($scope.settings.selectionLimit === 1 && $scope.settings.enableSearch) { + setTimeout(function () { + angular.element($element)[0].querySelector('.searchField').focus(); + }, 0); + } else { + focusFirstOption(); + } + } + } + if ($scope.settings.enableSearch) { + if ($scope.open) { + setTimeout(function () { + angular.element($element)[0].querySelector('.searchField').focus(); + }, 0); + } + } + } + + function checkboxClick($event, option) { + $scope.setSelectedItem(option, false, true); + $event.stopImmediatePropagation(); + } + + function close() { + $scope.open = false; + $scope.input.searchFilter = $scope.settings.clearSearchOnClose ? '' : $scope.input.searchFilter; + $scope.externalEvents.onClose(); + } + + function selectCurrentGroup(currentGroup) { + $scope.selectedModel.splice(0, $scope.selectedModel.length); + $scope.options.forEach(function (item) { + if (item[$scope.settings.groupBy] === currentGroup) { + $scope.setSelectedItem(item, false, false); + } + }); + $scope.externalEvents.onSelectionChanged(); + } + + function getGroupLabel(groupValue) { + if ($scope.settings.groupByTextProvider !== null) { + return $scope.settings.groupByTextProvider(groupValue); + } + + return groupValue; + } + + function textWidth(text) { + var $btn = $element.find('button'); + var canvas = document.createElement('canvas'); + var ctx = canvas.getContext('2d'); + ctx.font = $btn.css('font-size') + $btn.css('font-family'); + // http://stackoverflow.com/questions/38823353/chrome-canvas-2d-context-measuretext-giving-me-weird-results + ctx.originalFont = $btn.css('font-size') + $btn.css('font-family'); + ctx.fillStyle = '#000000'; + return ctx.measureText(text).width; + } + + function getButtonText() { + if ($scope.settings.dynamicTitle && $scope.selectedModel && $scope.selectedModel.length > 0) { + if (angular.isFunction($scope.settings.smartButtonTextProvider)) { + return $scope.settings.smartButtonTextProvider($scope.selectedModel); + } + + if ($scope.settings.smartButtonMaxItems > 0) { + var paddingWidth = 12 * 2; + var borderWidth = 1 * 2; + var dropdownIconWidth = 8; + var widthLimit = $element[0].offsetWidth - paddingWidth - borderWidth - dropdownIconWidth; + + var itemsText = []; + + angular.forEach($scope.options, function (optionItem) { + if ($scope.isChecked(optionItem)) { + var displayText = $scope.getPropertyForObject(optionItem, $scope.settings.displayProp); + var converterResponse = $scope.settings.smartButtonTextConverter(displayText, optionItem); + + itemsText.push(converterResponse || displayText); + } + }); + + if ($scope.selectedModel.length > $scope.settings.smartButtonMaxItems) { + itemsText = itemsText.slice(0, $scope.settings.smartButtonMaxItems); + itemsText.push('...'); + } + + var result = itemsText.join(', '); + var index = result.length - 4; + if ($element[0].offsetWidth === 0) { + return result; + } + if (widthLimit <= textWidth('...')) { + return '...'; + } + while (textWidth(result) > widthLimit) { + if (itemsText[itemsText.length - 1] !== '...') { + itemsText.push('...'); + result = result + '...'; + index = result.length - 4; + } + result = result.slice(0, index) + result.slice(index + 1); + index -= 1; + } + + return result; + } + var totalSelected = angular.isDefined($scope.selectedModel) ? $scope.selectedModel.length : 0; + + if (totalSelected === 0) { + return $scope.texts.buttonDefaultText; + } + + if ($scope.settings.showAllSelectedText && totalSelected === $scope.options.length) { + return $scope.texts.allSelectedText; + } + + return totalSelected + ' ' + $scope.texts.dynamicButtonTextSuffix; + } + return $scope.texts.buttonDefaultText; + } + + function getPropertyForObject(object, property) { + if (angular.isDefined(object) && Object.prototype.hasOwnProperty.call(object, property)) { + return object[property]; + } + + return undefined; + } + + function selectAll() { + $scope.deselectAll(true); + $scope.externalEvents.onSelectAll(); + + var searchResult = $filter('filter')($scope.options, $scope.getFilter($scope.input.searchFilter)); + angular.forEach(searchResult, function (value) { + $scope.setSelectedItem(value, true, false); + }); + $scope.externalEvents.onSelectionChanged(); + $scope.selectedGroup = null; + } + + function deselectAll() { + var dontSendEvent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (!dontSendEvent) { + $scope.externalEvents.onDeselectAll(); + } + + $scope.selectedModel.splice(0, $scope.selectedModel.length); + if (!dontSendEvent) { + $scope.externalEvents.onSelectionChanged(); + } + $scope.selectedGroup = null; + } + + function setSelectedItem(option) { + var dontRemove = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var fireSelectionChange = arguments[2]; + + var exists = void 0; + var indexOfOption = void 0; + if (angular.isDefined(settings.idProperty)) { + exists = getIndexByProperty($scope.selectedModel, option, settings.idProperty) !== -1; + indexOfOption = getIndexByProperty($scope.selectedModel, option, settings.idProperty); + } else { + exists = $scope.selectedModel.indexOf(option) !== -1; + indexOfOption = $scope.selectedModel.indexOf(option); + } + + if (!dontRemove && exists) { + $scope.selectedModel.splice(indexOfOption, 1); + $scope.externalEvents.onItemDeselect(option); + if ($scope.settings.closeOnDeselect) { + $scope.close(); + } + } else if (!exists && ($scope.settings.selectionLimit === 0 || $scope.selectedModel.length < $scope.settings.selectionLimit)) { + $scope.selectedModel.push(option); + if (fireSelectionChange) { + $scope.externalEvents.onItemSelect(option); + } + if ($scope.settings.closeOnSelect) { + $scope.close(); + } + if ($scope.settings.selectionLimit > 0 && $scope.selectedModel.length === $scope.settings.selectionLimit) { + $scope.externalEvents.onMaxSelectionReached(); + } + } else if ($scope.settings.selectionLimit === 1 && !exists && $scope.selectedModel.length === $scope.settings.selectionLimit) { + $scope.selectedModel.splice(0, 1); + $scope.selectedModel.push(option); + if (fireSelectionChange) { + $scope.externalEvents.onItemSelect(option); + } + if ($scope.settings.closeOnSelect) { + $scope.close(); + } + } + if (fireSelectionChange) { + $scope.externalEvents.onSelectionChanged(); + } + $scope.selectedGroup = null; + } + + function isChecked(option) { + if (angular.isDefined(settings.idProperty)) { + return getIndexByProperty($scope.selectedModel, option, settings.idProperty) !== -1; + } + return $scope.selectedModel.indexOf(option) !== -1; + } + + function keyDownLink(event) { + var sourceScope = angular.element(event.target).scope(); + var nextOption = void 0; + var parent = event.target.parentNode; + if (!$scope.settings.keyboardControls) { + return; + } + if (event.keyCode === 13 || event.keyCode === 32) { + // enter + event.preventDefault(); + if (sourceScope.option) { + $scope.setSelectedItem(sourceScope.option, false, true); + } else if (event.target.id === 'deselectAll') { + $scope.deselectAll(); + } else if (event.target.id === 'selectAll') { + $scope.selectAll(); + } + } else if (event.keyCode === 38) { + // up arrow + event.preventDefault(); + if (parent.previousElementSibling) { + nextOption = parent.previousElementSibling.querySelector('a') || parent.previousElementSibling.querySelector('input'); + } + while (!nextOption && !!parent) { + parent = parent.previousElementSibling; + if (parent) { + nextOption = parent.querySelector('a') || parent.querySelector('input'); + } + } + if (nextOption) { + nextOption.focus(); + } + } else if (event.keyCode === 40) { + // down arrow + event.preventDefault(); + if (parent.nextElementSibling) { + nextOption = parent.nextElementSibling.querySelector('a') || parent.nextElementSibling.querySelector('input'); + } + while (!nextOption && !!parent) { + parent = parent.nextElementSibling; + if (parent) { + nextOption = parent.querySelector('a') || parent.querySelector('input'); + } + } + if (nextOption) { + nextOption.focus(); + } + } else if (event.keyCode === 27) { + event.preventDefault(); + + $scope.toggleDropdown(); + } + } + + function keyDownSearchDefault(event) { + var parent = event.target.parentNode.parentNode; + var nextOption = void 0; + if (!$scope.settings.keyboardControls) { + return; + } + if (event.keyCode === 9 || event.keyCode === 40) { + // tab + event.preventDefault(); + focusFirstOption(); + } else if (event.keyCode === 38) { + event.preventDefault(); + if (parent.previousElementSibling) { + nextOption = parent.previousElementSibling.querySelector('a') || parent.previousElementSibling.querySelector('input'); + } + while (!nextOption && !!parent) { + parent = parent.previousElementSibling; + if (parent) { + nextOption = parent.querySelector('a') || parent.querySelector('input'); + } + } + if (nextOption) { + nextOption.focus(); + } + } else if (event.keyCode === 27) { + event.preventDefault(); + + $scope.toggleDropdown(); + } + } + + function keyDownSearch(event, searchFilter) { + var searchResult = void 0; + if (!$scope.settings.keyboardControls) { + return; + } + if (event.keyCode === 13) { + if ($scope.settings.selectionLimit === 1 && $scope.settings.enableSearch) { + searchResult = $filter('filter')($scope.options, $scope.getFilter(searchFilter)); + if (searchResult.length === 1) { + $scope.setSelectedItem(searchResult[0], false, true); + } + } else if ($scope.settings.enableSearch) { + $scope.selectAll(); + } + } + } + + function getFilter(searchFilter) { + var filter = {}; + filter[$scope.settings.searchField] = searchFilter; + return filter; + } + + function toggleSearch($event) { + if ($event) { + $event.stopPropagation(); + } + $scope.settings.enableSearch = !$scope.settings.enableSearch; + if (!$scope.settings.enableSearch) { + $scope.input.searchFilter = ''; + } + } + + function keyDownToggleSearch() { + if (!$scope.settings.keyboardControls) { + return; + } + if (event.keyCode === 13) { + $scope.toggleSearch(); + if ($scope.settings.enableSearch) { + setTimeout(function () { + angular.element($element)[0].querySelector('.searchField').focus(); + }, 0); + } else { + focusFirstOption(); + } + } + } + + function orderFunction(object1, object2) { + if (angular.isUndefined(object2)) { + return -1; + } + if (angular.isUndefined(object1)) { + return 1; + } + if (object1.type !== 'object' || object2.type !== 'object') { + return object1.index < object2.index ? -1 : 1; + } + var v1 = object1.value; + var v2 = object2.value; + // first order by group + if ($scope.settings.groupBy) { + if (v1[$scope.settings.groupBy] !== v2[$scope.settings.groupBy]) { + if (v1[$scope.settings.groupBy] < v2[$scope.settings.groupBy]) { + return 1; + } + return -1; + } + } + if (!$scope.settings.selectedToTop) { + return $scope.options.indexOf(v1) < $scope.options.indexOf(v2) ? -1 : 1; + } + // then order selected to top + if (!$scope.isChecked(v1) && !$scope.isChecked(v2) || $scope.isChecked(v1) && $scope.isChecked(v2)) { + return $scope.options.indexOf(v1) < $scope.options.indexOf(v2) ? -1 : 1; + } + if ($scope.isChecked(v1)) { + return -1; + } + return 1; + } + } + +/***/ } +/******/ ]); +angular.module("angularjs-dropdown-multiselect").run(["$templateCache", function($templateCache) {$templateCache.put("app/component/angularjs-dropdown-multiselect.html","
");}]); \ No newline at end of file diff --git a/dist/src/index.css b/dist/src/index.css new file mode 100644 index 00000000..e69de29b diff --git a/docs/maps/scripts/app.js.map b/docs/maps/scripts/app.js.map index 3f2efe75..6f0f1e23 100644 --- a/docs/maps/scripts/app.js.map +++ b/docs/maps/scripts/app.js.map @@ -1 +1 @@ -{"version":3,"sources":["scripts/app.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","_main","_main2","_v1docs","_v1docs2","angular","component","config","$stateProvider","$urlRouterProvider","state","name","url","template","otherwise","_angularjsDropdownMultiselect","_angularjsDropdownMultiselect2","directive","$compile","scope","element","attrs","dmDropdownStaticInclude","contents","html","dropdownMultiselectDirective","restrict","selectedModel","options","extraSettings","events","searchFilter","translationTexts","disabled","transclude","toggleDropdown","controller","templateUrl","Object","defineProperty","value","contains","collection","target","containsTarget","some","object","getIndexByProperty","objectToFind","property","index","option","ind","dropdownMultiselectController","$scope","$element","$filter","$document","focusFirstOption","setTimeout","elementToFocus","querySelector","isDefined","focus","open","close","settings","keyboardControls","selectionLimit","enableSearch","checkboxClick","$event","setSelectedItem","stopImmediatePropagation","input","clearSearchOnClose","externalEvents","onClose","selectCurrentGroup","currentGroup","splice","length","forEach","item","groupBy","onSelectionChanged","getGroupLabel","groupValue","groupByTextProvider","textWidth","text","$btn","find","canvas","document","createElement","ctx","getContext","font","css","originalFont","fillStyle","measureText","width","getButtonText","dynamicTitle","smartButtonMaxItems","paddingWidth","borderWidth","dropdownIconWidth","widthLimit","offsetWidth","itemsText","optionItem","isChecked","displayText","getPropertyForObject","displayProp","converterResponse","smartButtonTextConverter","push","slice","result","join","totalSelected","texts","buttonDefaultText","showAllSelectedText","allSelectedText","dynamicButtonTextSuffix","prototype","hasOwnProperty","undefined","selectAll","deselectAll","onSelectAll","searchResult","getFilter","selectedGroup","dontSendEvent","arguments","onDeselectAll","dontRemove","fireSelectionChange","exists","indexOfOption","idProperty","indexOf","onItemDeselect","closeOnDeselect","onItemSelect","closeOnSelect","onMaxSelectionReached","keyDownLink","event","sourceScope","nextOption","parent","parentNode","keyCode","preventDefault","previousElementSibling","nextElementSibling","keyDownSearchDefault","keyDownSearch","filter","searchField","toggleSearch","stopPropagation","keyDownToggleSearch","orderFunction","object1","object2","isUndefined","type","v1","v2","selectedToTop","$dropdownTrigger","children","noop","onInitDone","scrollable","scrollableHeight","closeOnBlur","showCheckAll","showUncheckAll","showEnableSearchButton","buttonClasses","checkBoxes","styleActive","checkAll","uncheckAll","selectionCount","selectionOf","searchPlaceholder","disableSearch","selectGroup","extend","on","e","parentElement","parentFound","className","split","$apply","$inject","mainComponent","_classCallCheck","instance","Constructor","TypeError","MainController","$log","this","testing","testmodel","testdata","label","testsettings","testevents","debug","example1model","example1data","example2model","example2data","example2settings","example5model","example5data","example5settings","example5customTexts","example6data","example6model","example6settings","example7model","example7data","example7settings","externalIdProp","customFilter","example8model","example8data","example8settings","example9model","example9data","example9settings","example10model","example10data","example10settings","example12model","example12data","example12settings","example11model","example11data","gender","example11settings","selectByGroupModel","selectByGroupData","selectByGroupSettings","selectByGroups","example13model","example13data","example13settings","itemText","example14model","example14data","example14settings","example15model","example15data","example15settings","example16model","example16data","example16settings","example17model","example17data","example17settings","example18model","example18data","example18settings","example19model","example19data","example19settings","example20model","example20data","age","example20settings","example21model","example21data","example21settings","searchSelectAllModel","searchSelectAllData","searchSelectAllSettings","disabledModel","disabledData","selectedToTopModel","selectedToTopData","selectedToTopSettings","stringModel","stringData","stringSettings","skip","transclusionModel","transclusionData","transclusionSettings","idPropertyModel","idPropertyData","idPropertySettings","v1Component","run","$templateCache","put"],"mappings":"SAAS,SAAUA,GAKT,QAASC,GAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUE,OAGnC,IAAIC,GAASF,EAAiBD,IAC7BE,WACAE,GAAIJ,EACJK,QAAQ,EAUT,OANAP,GAAQE,GAAUM,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASH,GAG/DI,EAAOE,QAAS,EAGTF,EAAOD;;AAvBf,GAAID,KAqCJ,OATAF,GAAoBQ,EAAIT,EAGxBC,EAAoBS,EAAIP,EAGxBF,EAAoBU,EAAI,GAGjBV,EAAoB,KAK/B,SAASI,EAAQD,EAASH,GAE/B,YAYA,SAASW,GAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,UAASF,GAVvFZ,EAAoB,EAEpB,IAAIe,GAAQf,EAAoB,GAE5BgB,EAASL,EAAuBI,GAEhCE,EAAUjB,EAAoB,GAE9BkB,EAAWP,EAAuBM,EAItCE,SAAQf,OAAO,uCAAwC,iCAAkC,OAAQ,eAAgB,cAAcgB,UAAU,QAAS,EAAGJ,EAAAA,eAAmBI,UAAU,UAAW,EAAGF,E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kB7S,GAAI,EAAGmO,MAAO,QAASzL,UAAU,IAAU1C,GAAI,EAAGmO,MAAO,SAAYnO,GAAI,EAAGmO,MAAO,UAE5GpK,EAAO+O,sBACP/O,EAAOgP,oBAAuB/S,GAAI,EAAGmO,MAAO,UAAanO,GAAI,EAAGmO,MAAO,SAAYnO,GAAI,EAAGmO,MAAO,UACjGpK,EAAOiP,uBACNtH,eAAe,GAGhB3H,EAAOkP,eACPlP,EAAOmP,YAAc,QAAS,OAAQ,SACtCnP,EAAOoP,gBACN7R,SAAU,aACV0G,yBAA0B,SAAkCoL,EAAMxP,GACjE,MAAOA,KAITG,EAAOsP,qBACPtP,EAAOuP,mBAAsBtT,GAAI,EAAGmO,MAAO,UAAanO,GAAI,EAAGmO,MAAO,SAAYnO,GAAI,EAAGmO,MAAO,UAChGpK,EAAOwP,wBAEPxP,EAAOyP,kBAAqBxT,GAAI,IAChC+D,EAAO0P,iBAAoBzT,GAAI,EAAGmO,MAAO,UAAanO,GAAI,EAAGmO,MAAO,SAAYnO,GAAI,EAAGmO,MAAO,UAC9FpK,EAAO2P,oBACN/J,WAAY,MAGdkE,GAAeN,SAAW,SAAU,QAEpCzN,EAAAA,WAAkB+N,GAIb,SAAS9N,EAAQD,GAEtB,YAMA,SAAS6T,KACR,GAAI5S,IACH+B,YAAa,kCAGd,OAAO/B,GATRgC,OAAOC,eAAelD,EAAS,cAC9BmD,OAAO,IAERnD,EAAAA,WAAkB6T,KAWnB7S,QAAQf,OAAO,uCAAuC6T,KAAK,iBAAkB,SAASC,GAAiBA,EAAeC,IAAI,oDAAoD,+9IAC9KD,EAAeC,IAAI,8BAA8B;AACjDD,EAAeC,IAAI,kCAAkC","file":"scripts/app.js","sourceRoot":"/source/","sourcesContent":[]} \ No newline at end of file +{"version":3,"sources":["scripts/app.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","_main","_main2","_v1docs","_v1docs2","angular","component","config","$stateProvider","$urlRouterProvider","state","name","url","template","otherwise","_angularjsDropdownMultiselect","_angularjsDropdownMultiselect2","directive","$compile","scope","element","attrs","dmDropdownStaticInclude","contents","html","dropdownMultiselectDirective","restrict","selectedModel","options","extraSettings","events","searchFilter","translationTexts","disabled","transclude","toggleDropdown","controller","templateUrl","Object","defineProperty","value","contains","collection","target","containsTarget","some","object","getIndexByProperty","objectToFind","property","index","option","ind","dropdownMultiselectController","$scope","$element","$filter","$document","focusFirstOption","setTimeout","elementToFocus","querySelector","isDefined","focus","open","close","settings","keyboardControls","selectionLimit","enableSearch","checkboxClick","$event","setSelectedItem","stopImmediatePropagation","input","clearSearchOnClose","externalEvents","onClose","selectCurrentGroup","currentGroup","splice","length","forEach","item","groupBy","onSelectionChanged","getGroupLabel","groupValue","groupByTextProvider","textWidth","text","$btn","find","canvas","document","createElement","ctx","getContext","font","css","originalFont","fillStyle","measureText","width","getButtonText","dynamicTitle","isFunction","smartButtonTextProvider","smartButtonMaxItems","paddingWidth","borderWidth","dropdownIconWidth","widthLimit","offsetWidth","itemsText","optionItem","isChecked","displayText","getPropertyForObject","displayProp","converterResponse","smartButtonTextConverter","push","slice","result","join","totalSelected","texts","buttonDefaultText","showAllSelectedText","allSelectedText","dynamicButtonTextSuffix","prototype","hasOwnProperty","undefined","selectAll","deselectAll","onSelectAll","searchResult","getFilter","selectedGroup","dontSendEvent","arguments","onDeselectAll","dontRemove","fireSelectionChange","exists","indexOfOption","idProperty","indexOf","onItemDeselect","closeOnDeselect","onItemSelect","closeOnSelect","onMaxSelectionReached","keyDownLink","event","sourceScope","nextOption","parent","parentNode","keyCode","preventDefault","previousElementSibling","nextElementSibling","keyDownSearchDefault","keyDownSearch","filter","searchField","toggleSearch","stopPropagation","keyDownToggleSearch","orderFunction","object1","object2","isUndefined","type","v1","v2","selectedToTop","$dropdownTrigger","children","noop","onInitDone","scrollable","scrollableHeight","closeOnBlur","showCheckAll","showUncheckAll","showEnableSearchButton","buttonClasses","checkBoxes","styleActive","checkAll","uncheckAll","selectionCount","selectionOf","searchPlaceholder","disableSearch","selectGroup","extend","on","e","parentElement","parentFound","className","split","$apply","$inject","mainComponent","_classCallCheck","instance","Constructor","TypeError","MainController","$log","this","testing","testmodel","testdata","label","testsettings","testevents","debug","example1model","example1data","example2model","example2data","example2settings","example5model","example5data","example5settings","example5customTexts","example6data","example6model","example6settings","example7model","example7data","example7settings","externalIdProp","customFilter","example8model","example8data","example8settings","example9model","example9data","example9settings","example10model","example10data","example10settings","example12model","example12data","example12settings","example11model","example11data","gender","example11settings","selectByGroupModel","selectByGroupData","selectByGroupSettings","selectByGroups","example13model","example13data","example13settings","itemText","example14model","example14data","example14settings","example15model","example15data","example15settings","example16model","example16data","example16settings","example17model","example17data","example17settings","example18model","example18data","example18settings","example19model","example19data","example19settings","example20model","example20data","age","example20settings","example21model","example21data","example21settings","searchSelectAllModel","searchSelectAllData","searchSelectAllSettings","disabledModel","disabledData","selectedToTopModel","selectedToTopData","selectedToTopSettings","stringModel","stringData","stringSettings","skip","transclusionModel","transclusionData","transclusionSettings","idPropertyModel","idPropertyData","idPropertySettings","smartButtonTextProviderModel","smartButtonTextProviderData","smartButtonTextProviderSettings","selectionArray","v1Component","run","$templateCache","put"],"mappings":"SAAS,SAAUA,GAKT,QAASC,GAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUE,OAGnC,IAAIC,GAASF,EAAiBD,IAC7BE,WACAE,GAAIJ,EACJK,QAAQ,EAUT,OANAP,GAAQE,GAAUM,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASH,GAG/DI,EAAOE,QAAS,EAGTF,EAAOD;;AAvBf,GAAID,KAqCJ,OATAF,GAAoBQ,EAAIT,EAGxBC,EAAoBS,EAAIP,EAGxBF,EAAoBU,EAAI,GAGjBV,EAAoB,KAK/B,SAASI,EAAQD,EAASH,GAE/B,YAYA,SAASW,GAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,UAASF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eN,SAAW,SAAU,QAEpC3N,EAAAA,WAAkBiO,GAIb,SAAShO,EAAQD,GAEtB,YAMA,SAASmU,KACR,GAAIlT,IACH+B,YAAa,kCAGd,OAAO/B,GATRgC,OAAOC,eAAelD,EAAS,cAC9BmD,OAAO,IAERnD,EAAAA,WAAkBmU,KAWnBnT,QAAQf,OAAO,uCAAuCmU,KAAK,iBAAkB,SAASC,GAAiBA,EAAeC,IAAI,oDAAoD,+9IAC9KD,EAAeC,IAAI,8BAA8B;AACjDD,EAAeC,IAAI,kCAAkC","file":"scripts/app.js","sourceRoot":"/source/","sourcesContent":[]} \ No newline at end of file diff --git a/docs/scripts/app.js b/docs/scripts/app.js index d8d7a4b7..71b639c7 100644 --- a/docs/scripts/app.js +++ b/docs/scripts/app.js @@ -1,5 +1,5 @@ /******/!function(e){function t(l){if(d[l])return d[l].exports;var i=d[l]={exports:{},id:l,loaded:!1};return e[l].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}// webpackBootstrap /******/ -var d={};return t.m=e,t.c=d,t.p="",t(0)}([function(e,t,d){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}d(1);var i=d(4),o=l(i),s=d(6),a=l(s);angular.module("AngularjsDropdownMultiselectExample",["angularjs-dropdown-multiselect","hljs","ui.bootstrap","ui.router"]).component("main",(0,o["default"])()).component("v1Docs",(0,a["default"])()).config(["$stateProvider","$urlRouterProvider",function(e,t){e.state({name:"main",url:"/main",template:"
"}),e.state({name:"v1",url:"/v1",template:""}),t.otherwise("/main")}])},function(e,t,d){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}var i=d(2),o=l(i);angular.module("angularjs-dropdown-multiselect",[]).directive("dmDropdownStaticInclude",["$compile",function(e){"ngInject";return function(t,d,l){var i=l.dmDropdownStaticInclude,o=d.html(i).contents();e(o)(t)}}]).directive("ngDropdownMultiselect",o["default"])},function(e,t,d){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}function i(){return{restrict:"AE",scope:{selectedModel:"=",options:"=",extraSettings:"=",events:"=",searchFilter:"=?",translationTexts:"=",disabled:"="},transclude:{toggleDropdown:"?toggleDropdown"},controller:s["default"],templateUrl:"app/component/angularjs-dropdown-multiselect.html"}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=i;var o=d(3),s=l(o)},function(e,t){"use strict";function d(e,t){var d=!1;return e.some(function(e){return e===t?(d=!0,!0):!1}),d}function l(e,t,d){var l=-1;return e.some(function(e,i){return e[d]===t[d]?(l=i,!0):!1}),l}function i(e,t,i,o){"ngInject";function s(){setTimeout(function(){var e=angular.element(t)[0].querySelector(".option");angular.isDefined(e)&&null!=e&&e.focus()},0)}function a(){e.open?e.close():e.open=!0,e.settings.keyboardControls&&e.open&&(1===e.settings.selectionLimit&&e.settings.enableSearch?setTimeout(function(){angular.element(t)[0].querySelector(".searchField").focus()},0):s()),e.settings.enableSearch&&e.open&&setTimeout(function(){angular.element(t)[0].querySelector(".searchField").focus()},0)}function n(t,d){e.setSelectedItem(d,!1,!0),t.stopImmediatePropagation()}function r(){e.open=!1,e.input.searchFilter=e.settings.clearSearchOnClose?"":e.input.searchFilter,e.externalEvents.onClose()}function c(t){e.selectedModel.splice(0,e.selectedModel.length),e.options.forEach(function(d){d[e.settings.groupBy]===t&&e.setSelectedItem(d,!1,!1)}),e.externalEvents.onSelectionChanged()}function p(t){return null!==e.settings.groupByTextProvider?e.settings.groupByTextProvider(t):t}function h(e){var d=t.find("button"),l=document.createElement("canvas"),i=l.getContext("2d");return i.font=d.css("font-size")+d.css("font-family"),i.originalFont=d.css("font-size")+d.css("font-family"),i.fillStyle="#000000",i.measureText(e).width}function m(){if(e.settings.dynamicTitle&&e.selectedModel&&e.selectedModel.length>0){if(e.settings.smartButtonMaxItems>0){var d=24,l=2,i=8,o=t[0].offsetWidth-d-l-i,s=[];angular.forEach(e.options,function(t){if(e.isChecked(t)){var d=e.getPropertyForObject(t,e.settings.displayProp),l=e.settings.smartButtonTextConverter(d,t);s.push(l||d)}}),e.selectedModel.length>e.settings.smartButtonMaxItems&&(s=s.slice(0,e.settings.smartButtonMaxItems),s.push("..."));var a=s.join(", "),n=a.length-4;if(0===t[0].offsetWidth)return a;if(o<=h("..."))return"...";for(;h(a)>o;)"..."!==s[s.length-1]&&(s.push("..."),a+="...",n=a.length-4),a=a.slice(0,n)+a.slice(n+1),n-=1;return a}var r=angular.isDefined(e.selectedModel)?e.selectedModel.length:0;return 0===r?e.texts.buttonDefaultText:e.settings.showAllSelectedText&&r===e.options.length?e.texts.allSelectedText:r+" "+e.texts.dynamicButtonTextSuffix}return e.texts.buttonDefaultText}function v(e,t){return angular.isDefined(e)&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function u(){e.deselectAll(!0),e.externalEvents.onSelectAll();var t=i("filter")(e.options,e.getFilter(e.input.searchFilter));angular.forEach(t,function(t){e.setSelectedItem(t,!0,!1)}),e.externalEvents.onSelectionChanged(),e.selectedGroup=null}function g(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!1;t||e.externalEvents.onDeselectAll(),e.selectedModel.splice(0,e.selectedModel.length),t||e.externalEvents.onSelectionChanged(),e.selectedGroup=null}function b(t){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!1,i=arguments[2],o=void 0,s=void 0;angular.isDefined(C.idProperty)?(o=-1!==l(e.selectedModel,t,C.idProperty),s=l(e.selectedModel,t,C.idProperty)):(o=-1!==e.selectedModel.indexOf(t),s=e.selectedModel.indexOf(t)),!d&&o?(e.selectedModel.splice(s,1),e.externalEvents.onItemDeselect(t),e.settings.closeOnDeselect&&e.close()):!o&&(0===e.settings.selectionLimit||e.selectedModel.length0&&e.selectedModel.length===e.settings.selectionLimit&&e.externalEvents.onMaxSelectionReached()):1!==e.settings.selectionLimit||o||e.selectedModel.length!==e.settings.selectionLimit||(e.selectedModel.splice(0,1),e.selectedModel.push(t),i&&e.externalEvents.onItemSelect(t),e.settings.closeOnSelect&&e.close()),i&&e.externalEvents.onSelectionChanged(),e.selectedGroup=null}function x(t){return angular.isDefined(C.idProperty)?-1!==l(e.selectedModel,t,C.idProperty):-1!==e.selectedModel.indexOf(t)}function f(t){var d=angular.element(t.target).scope(),l=void 0,i=t.target.parentNode;if(e.settings.keyboardControls)if(13===t.keyCode||32===t.keyCode)t.preventDefault(),d.option?e.setSelectedItem(d.option,!1,!0):"deselectAll"===t.target.id?e.deselectAll():"selectAll"===t.target.id&&e.selectAll();else if(38===t.keyCode){for(t.preventDefault(),i.previousElementSibling&&(l=i.previousElementSibling.querySelector("a")||i.previousElementSibling.querySelector("input"));!l&&i;)i=i.previousElementSibling,i&&(l=i.querySelector("a")||i.querySelector("input"));l&&l.focus()}else if(40===t.keyCode){for(t.preventDefault(),i.nextElementSibling&&(l=i.nextElementSibling.querySelector("a")||i.nextElementSibling.querySelector("input"));!l&&i;)i=i.nextElementSibling,i&&(l=i.querySelector("a")||i.querySelector("input"));l&&l.focus()}else 27===t.keyCode&&(t.preventDefault(),e.toggleDropdown())}function y(t){var d=t.target.parentNode.parentNode,l=void 0;if(e.settings.keyboardControls)if(9===t.keyCode||40===t.keyCode)t.preventDefault(),s();else if(38===t.keyCode){for(t.preventDefault(),d.previousElementSibling&&(l=d.previousElementSibling.querySelector("a")||d.previousElementSibling.querySelector("input"));!l&&d;)d=d.previousElementSibling,d&&(l=d.querySelector("a")||d.querySelector("input"));l&&l.focus()}else 27===t.keyCode&&(t.preventDefault(),e.toggleDropdown())}function w(t,d){var l=void 0;e.settings.keyboardControls&&13===t.keyCode&&(1===e.settings.selectionLimit&&e.settings.enableSearch?(l=i("filter")(e.options,e.getFilter(d)),1===l.length&&e.setSelectedItem(l[0],!1,!0)):e.settings.enableSearch&&e.selectAll())}function S(t){var d={};return d[e.settings.searchField]=t,d}function D(t){t&&t.stopPropagation(),e.settings.enableSearch=!e.settings.enableSearch,e.settings.enableSearch||(e.input.searchFilter="")}function T(){e.settings.keyboardControls&&13===event.keyCode&&(e.toggleSearch(),e.settings.enableSearch?setTimeout(function(){angular.element(t)[0].querySelector(".searchField").focus()},0):s())}function k(t,d){if(angular.isUndefined(d))return-1;if(angular.isUndefined(t))return 1;if("object"!==t.type||"object"!==d.type)return t.index{{option.name}}"},e.example20model=[],e.example20data=[{id:1,label:"David",age:23},{id:2,label:"Jhon",age:24},{id:3,label:"Danny",age:26}],e.example20settings={searchField:"age",enableSearch:!0},e.example21model=[],e.example21data=[{id:1,label:"David"},{id:2,label:"Jhon"},{id:3,label:"Danny"}],e.example21settings={showEnableSearchButton:!0},e.searchSelectAllModel=[],e.searchSelectAllData=[{id:1,label:"David"},{id:2,label:"Jhon"},{id:3,label:"Danny"}],e.searchSelectAllSettings={enableSearch:!0,keyboardControls:!0},e.disabledModel=[],e.disabledData=[{id:1,label:"David",disabled:!0},{id:2,label:"Jhon"},{id:3,label:"Danny"}],e.selectedToTopModel=[],e.selectedToTopData=[{id:1,label:"David"},{id:2,label:"Jhon"},{id:3,label:"Danny"}],e.selectedToTopSettings={selectedToTop:!0},e.stringModel=[],e.stringData=["David","Jhon","Danny"],e.stringSettings={template:"{{option}}",smartButtonTextConverter:function(e,t){return t}},e.transclusionModel=[],e.transclusionData=[{id:1,label:"David"},{id:2,label:"Jhon"},{id:3,label:"Danny"}],e.transclusionSettings={},e.idPropertyModel=[{id:1}],e.idPropertyData=[{id:1,label:"David"},{id:2,label:"Jhon"},{id:3,label:"Danny"}],e.idPropertySettings={idProperty:"id"}};l.$inject=["$scope","$log"],t["default"]=l},function(e,t){"use strict";function d(){var e={templateUrl:"app/v1docs/v1docs.template.html"};return e}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=d}]),angular.module("AngularjsDropdownMultiselectExample").run(["$templateCache",function(e){e.put("app/component/angularjs-dropdown-multiselect.html",''),e.put("app/main/main.template.html",'

What is AngularJS Dropdown Multiselect?

This directive uses Bootstrap\'s Dropdown with the power of AngularJS directives and binding. Bootstrap and AngularJS are the only dependencies.

In this page you can see basic and advanced usage examples.

Download

There are several options to do that:
  1. Using bower: `bower install angularjs-dropdown-multiselect`
  2. Using npm: `npm install angularjs-dropdown-multiselect`
  3. Download the .zip file from here
This is documentation for the currently still in beta v2.0.0, the documentation for v1 can be found here: V1 docs
test

Demo

The model:

{{testmodel|json}}

Demo

The model:

{{example1model|json}}

Code

// HTML
// JavaScript $scope.example1model = []; $scope.example1data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"} ];
This example shows the ability to select the property to display as text label.
In this case, the property the used as label is "id".

Demo

The model:

{{example2model|json}}

Code

// HTML
// JavaScript $scope.example2model = []; $scope.example2data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example2settings = {displayProp: \'id\'};
You can use the feature in order to show which items are selected instead the items count.
In order to use this feature, set the "smartButtonMaxItems" settings parameter to a number bigger than 0.
You can also provide "smartButtonTextConverter" parameter in order to add smart logic and convert the text.

Demo

The model:

{{example13model|json}}

Code

//HTML
//JS $scope.example13model = []; $scope.example13data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Lisa"}, {id: 4, label: "Nicole"}, {id: 5, label: "Danny"} ]; $scope.example13settings = { smartButtonMaxItems: 3, smartButtonTextConverter: function(itemText, originalItem) { if (itemText === \'Jhon\') { return \'Jhonny!\'; } return itemText; } };
You can use the feature in order to make the list of items scrollable. Useful when you deal with a lot of items.

Demo

The model:

{{example14model|json}}

Code

//HTML
//JS $scope.example14model = []; $scope.example14data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Lisa"}, {id: 4, label: "Nicole"}, {id: 5, label: "Danny"}, {id: 6, label: "Dan"}, {id: 7, label: "Dean"}, {id: 8, label: "Adam"}, {id: 9, label: "Uri"}, {id: 10, label: "Phil"} ]; $scope.example14settings = { scrollableHeight: \'100px\', scrollable: true };

Demo

The model:

{{example9model|json}}

Code

// HTML
// JavaScript $scope.example9model = []; $scope.example9data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example9settings = {enableSearch: true};
By default, search is done on all items, by specifying the searchField in the settings object one can specify on which field of the objects the filtering should be done.

Demo

The model:

{{example20model|json}}

Code

// HTML
// JavaScript $scope.example20model = []; $scope.example20data = [ { id: 1, label: "David", age: 23 }, { id: 2, label: "Jhon", age: 24 }, { id: 3, label: "Danny", age: 26 } ]; $scope.example20settings = { searchField: \'age\', enableSearch: true };
Setting showEnableSearchButton to true will add the enable/disable search button under the Select all / Deselect all buttons

Demo

The model:

{{example21model|json}}

Code

// HTML
// JavaScript $scope.example21model = []; $scope.example21data = [ { id: 1, label: "David"}, { id: 2, label: "Jhon"}, { id: 3, label: "Danny"} ]; $scope.example21settings = { showEnableSearchButton: true };

Demo

The model:

{{searchSelectAllModel|json}}

Code

// HTML
// JavaScript $scope.searchSelectAllModel = []; $scope.searchSelectAllData = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"} ]; $scope.searchSelectAllSettings = { enableSearch: true, showSelectAll: true, keyboardControls: true };
By default, there is no limit on the maximum selected items.
You can limit the selection by providing selectionLimit using the settings attribute.
Note 1: limit the selection to 0 is the default and won\'t limit the selection!
Note 2: When using this limit, the "Select All" button will not appear!

Note 3: When using single selection (limit to 1) the selection will change automaticlly if another item is clicked!

Demo

The model:

{{example10model|json}}

Code

// HTML
// JavaScript $scope.example10model = []; $scope.example10data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example10settings = {selectionLimit: 2};
Please read the notes in the "Selection Limit" example.
This example shows an example of using selection limit and single selection.

Demo

The model:

{{example12model|json}}

Code

// HTML
// JavaScript $scope.example12model = {}; // ! IMPORTANT ! $scope.example12data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"} ]; $scope.example12settings = { selectionLimit: 1, };
You can also group the items by propery that you want, in order to to that, provide the groupBy setting.
Also, you need to provide "groupByTextProvider" callback in the extra-settings attribute, in order to provide the header text for each group.
Note: If you won\'t specify the "groupByTextProvider" callback in order to get the header for each group, the value of the group will be displayed!

Demo

The model:

{{example11model|json}}

Code

// HTML
// JavaScript $scope.example11model = []; $scope.example11data = [ {id: 1, label: "David", gender: \'M\'}, {id: 2, label: "Jhon", gender: \'M\'}, {id: 3, label: "Lisa", gender: \'F\'}, {id: 4, label: "Nicole", gender: \'F\'}, {id: 5, label: "Danny", gender: \'M\'} ]; $scope.example11settings = { groupByTextProvider: function(groupValue) { if (groupValue === \'M\') { return \'Male\'; } else { return \'Female\'; } }, groupBy: \'gender\', };
When items are grouped by property you can also specify an array of groups that you can use to select the items by. The extra-settings property selectByGroups accepts an array of the values of the groups that you want to be selectable. The naming will use the groupByTextProvider function to give them an actual label.

Demo

The model:

{{selectByGroupModel|json}}

Code

// HTML
// JavaScript $scope.selectByGroupModel = []; $scope.selectByGroupData = [ { id: 1, label: "David", gender: \'M\' }, { id: 2, label: "Jhon", gender: \'M\' }, { id: 3, label: "Lisa", gender: \'F\' }, { id: 4, label: "Nicole", gender: \'F\' }, { id: 5, label: "Danny", gender: \'M\' }, { id: 6, label: "Unknown", gender: \'O\' } ]; $scope.selectByGroupSettings = { selectByGroups: [\'F\', \'M\'], groupByTextProvider: function(groupValue) { switch (groupValue) { case \'M\': return \'Male\'; case \'F\': return \'Female\'; case \'O\': return \'Other\'; } }, groupBy: \'gender\', };
You can select your own text of the button using the "defaultText" in settings.

Demo

The model:

{{example5model|json}}

Code

// HTML
// JavaScript $scope.example5model = []; $scope.example5data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example5settings = {}; $scope.example5customTexts = {buttonDefaultText: \'Select Users\'};
This example shows a demostration of using a pre-setted model.
Note:The model should have the same objects as in the options array.

Demo

The model:

{{example6model|json}}

Code

// HTML
// JavaScript $scope.example6data = [ { id: 1, label: \'David\' }, { id: 2, label: \'Jhon\' }, { id: 3, label: \'Danny\' } ]; $scope.example6model = [$scope.example6data[0], $scope.example6data[2]]; $scope.example6settings = {};
This example shows a demostration of access and set the search filter from outside the directive.
This can be done by settings the "search-filter" attribute.

Demo

The model:

{{example7model|json}}

Search Filter:

{{customFilter|json}}

Code

// HTML
// JavaScript $scope.example15model = []; $scope.example15data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Lisa"}, {id: 4, label: "Nicole"}, {id: 5, label: "Danny"} ]; $scope.example15settings = { enableSearch: true }; $scope.customFilter = \'a\';
You can also use a checkboxes list by setting checkBoxes setting to true!

Demo

The model:

{{example8model|json}}

Code

// HTML
// JavaScript $scope.example8model = []; $scope.example8data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"} ]; $scope.example8settings = { checkBoxes: true, };

Demo

You can also aplly the active class to the selected list items. This can be done by setting the styleActive setting to true

The model:

{{example16model|json}}

Code

// HTML
// JavaScript $scope.example16model = []; $scope.example16data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example16settings = {styleActive: true};

Demo

When activated the dropdown can be used with the keyboard instead of with the mouse. Up, down arrow change focused element, escape closes the dropdown, enter and space activate focused element.

The model:

{{example17model|json}}

Code

// HTML
// JavaScript $scope.example17model = []; $scope.example17data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example17settings = {keyboardControls: true};

Demo

When search is enabled and a single selection is active, wehn search returns a single match pressing enter in the search box will activate the matched option.

The model:

{{example18model|json}}

Code

// HTML
// JavaScript $scope.example18model = {}; $scope.example18data = [ { id: 1, label: "David" }, { id: 2, label: "Jhon" }, { id: 3, label: "Lisa" }, { id: 4, label: "Nicole" }, { id: 5, label: "Danny" } ]; $scope.example18settings = { keyboardControls: true, enableSearch: true, selectionLimit: 1 };

Demo

Instead of using the default template you can use an own custom temlpate.

The model:

{{example19model|json}}

Code

// HTML
// JavaScript $scope.example19model = {}; $scope.example19data = [ { id: 1, name: "David" }, { id: 2, name: "Jhon" }, { id: 3, name: "Lisa" }, { id: 4, name: "Nicole" }, { id: 5, name: "Danny" } ]; $scope.example19settings = { template: \'{{option.name}}\' };
Setting the field disabled of an option to true will disable that option, if the option was previously checked it will still stay checked and will not be able to be unchecked.

Demo

The model:

{{disabledModel|json}}

Code

// HTML
// JavaScript $scope.disabledModel = []; $scope.disabledData = [ { id: 1, label: "David", disabled: true}, { id: 2, label: "Jhon"}, { id: 3, label: "Danny"} ];
When setting "selectedToTop" to true, selected items will be ordered to the top. When group by is active, the selected items will be at the top of their group.

Demo

The model:

{{selectedToTopModel|json}}

Code

// HTML
// JavaScript $scope.selectedToTopModel = []; $scope.selectedToTopData = [ { id: 1, label: \'David\' }, { id: 2, label: \'Jhon\' }, { id: 3, label: \'Danny\' }, ]; $scope.selectedToTopSettings = { selectedToTop: true, };
Example to show that options no longer need to be an object with an id property

Demo

The model:

{{stringModel|json}}

Code

// HTML
$scope.stringModel = []; $scope.stringData = [ \'David\', \'Jhon\', \'Danny\', ]; $scope.stringSettings = { template: \'{{option}}\', smartButtonTextConverter(skip, option) { return option; }, };
Example to show that you can replace the button with a custom element.

Demo

My Custom trigger

The model:

{{transclusionModel|json}}

Code

// HTML
My Custom trigger
$scope.transclusionModel = []; $scope.transclusionData = [ { id: 1, label: \'David\' }, { id: 2, label: \'Jhon\' }, { id: 3, label: \'Danny\' }, ]; $scope.transclusionSettings = { };
When idProperty is set the objects will be compared by that property (that should be unique) instead of by reference.

Demo

The model:

{{idPropertyModel|json}}

Code

// HTML
$scope.idPropertyModel = [{ id: 1 }]; $scope.idPropertyData = [ { id: 1, label: \'David\' }, { id: 2, label: \'Jhon\' }, { id: 3, label: \'Danny\' }, ]; $scope.idPropertySettings = { idProperty: \'id\', };

Full API Documentation

Attributes

List of allowed attributes, you can find more information about them in the usage examples above.

Attribute NameTypeDescription
selected-modelObject / ArrayThe object the will contain the model for the selected items in the dropdown.
optionsObject / ArrayThe options for the dropdown.
extra-settingsObjectThe settings for the directive, more information about these settings are available below.
eventsObjectEvents callbacks, more information below.
translation-textsObjectGives the ability to modify the default texts in the directive. More information below.
search-filterStringUses for settings the search filter from outside the direcrtive.
disabledBooleanUsed for disabling the dropdown.

Settings

Available settings that effects the display or behavior of the directive.
These setting are set with the "extra-settings" attribute.

Property NameTypeDefault ValueDescription
dynamicTitleBooleantrueIndicates if the text of the button should change when selecting items from the list.
closeOnBlurBooleantrueIndicates if the dropdown should close when clicking outside of it\'s scope.
displayPropStringlabelThe name of the property that contains the text for the item.
enableSearchBooleanfalseIndicated if to show the search input or not.
clearSearchOnCloseBooleanfalseIndicated if to clear the search field when the dropdown has closed.
searchFieldString"$"Indicates on which field the search should be done
selectionLimitNumber0The max allowed selected items for the list. For more information see the examples above.
showCheckAllBooleantrueIndicates if to show the "Check All" item.
showUncheckAllBooleantrueIndicates if to show the "Uncheck All" item.
showEnableSearchButtonBooleanfalseIndicates if to show the "Enable search / Disable search" item.
closeOnSelectBooleanfalseIndicates if to close the dropdown after checking an item on the list.
closeOnDeselectBooleanfalseIndicates if to close the dropdown after unchecking an item on the list. With selectionLimit = 1 setting this to true does the same as setting closeOnSelect to true.
buttonClassesStringbtn btn-defaultThe CSS classes that used for setting the style of the button.
groupByStringundefinedThe name of the property which you like to group by your options. See grouping example.
groupByTextProviderFunctionangular.noopA callback to a function that provide that name for each group when using groupBy setting. The parameter for the function will be the value of the groupBy property.
scrollableBooleanfalseIndicates if the dropdown is scrollable, useful if you have a lot of items.
scrollableHeightNumber300pxIndicates the height of the drop down if the dropdown is scrollable.
smartButtonMaxItemsNumber0Manages the "Smart Button Text" feature, defines the maximum amount of items to on the button.
smartButtonTextConverterFunctionangular.noopRelated the "Smart Button Text" feature, if a function provided - it will called with two paramters: The item\'s text and the original item, the return value will displayed instead of the item\'s display property. This feature is useful when you want to convert the displayed text into something else.
styleActiveBooleanfalseIndicates if the list items should get a class active applied when they are selected.
keyboardControlsBooleanfalseWhen activated the dropdown can be used with the keyboard instead of with the mouse.
templateString{ {getPropertyForObject(option, settings.displayProp)} }Can be used to modify the appearance of an option in the list, each option is accessible as option.
selectByGroupsArrayundefinedValues of the groupby property that you want to be selectable as group
checkBoxesBooleanfalseIndicated if to show a normal dropdown with glyphicons or HTML checkboxes.
selectedToTopBooleanfalseWhen true will put the selected options at the top of the list
idPropertystringundefinedUsed to compare by property instead of by reference.

Events

Available event callbacks what the directive fires. These callbacks are set with "events" attribute.

Event NameParametersDescription
onItemSelectitemFired when selecting an item.
onItemDeselectitemFired when unselecting an item.
onSelectAllFired when clicking select all.
onDeselectAllFired when clicking unselect all.
onInitDoneFired when the directive done with the "link" phase.
onMaxSelectionReachedFired when the user reaches the max allowed selected items.
onSelectionChangedFired when the selection changes.

Translation Texts

Available texts that you can override if you wan\'t to make a translation for your website. These are set with the "translation-texts" attribute.

Property NameDefault ValueDescription
checkAllCheck All"Check All" item\'s text.
uncheckAllUncheck All"Uncheck All" item\'s text.
enableSearchEnable search"enable search" item\'s text.
disableSearchDisable search"disable search" item\'s text.
selectionCountcheckedThe suffix for "X/Y" that showed when using selection limit.
selectionOf/The value between the selected values and the max values when using selection limit.
searchPlaceholderSearch...The placeholder for the search input.
buttonDefaultTextSelectThe default text that used for the button when no items selected.
dynamicButtonTextSuffixcheckedThe suffix for the button that used when using "dynamicText".
selectGroupSelect All:The prefix of the group selection.
'), +var d={};return t.m=e,t.c=d,t.p="",t(0)}([function(e,t,d){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}d(1);var i=d(4),o=l(i),s=d(6),a=l(s);angular.module("AngularjsDropdownMultiselectExample",["angularjs-dropdown-multiselect","hljs","ui.bootstrap","ui.router"]).component("main",(0,o["default"])()).component("v1Docs",(0,a["default"])()).config(["$stateProvider","$urlRouterProvider",function(e,t){e.state({name:"main",url:"/main",template:"
"}),e.state({name:"v1",url:"/v1",template:""}),t.otherwise("/main")}])},function(e,t,d){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}var i=d(2),o=l(i);angular.module("angularjs-dropdown-multiselect",[]).directive("dmDropdownStaticInclude",["$compile",function(e){"ngInject";return function(t,d,l){var i=l.dmDropdownStaticInclude,o=d.html(i).contents();e(o)(t)}}]).directive("ngDropdownMultiselect",o["default"])},function(e,t,d){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}function i(){return{restrict:"AE",scope:{selectedModel:"=",options:"=",extraSettings:"=",events:"=",searchFilter:"=?",translationTexts:"=",disabled:"="},transclude:{toggleDropdown:"?toggleDropdown"},controller:s["default"],templateUrl:"app/component/angularjs-dropdown-multiselect.html"}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=i;var o=d(3),s=l(o)},function(e,t){"use strict";function d(e,t){var d=!1;return e.some(function(e){return e===t?(d=!0,!0):!1}),d}function l(e,t,d){var l=-1;return e.some(function(e,i){return e[d]===t[d]?(l=i,!0):!1}),l}function i(e,t,i,o){"ngInject";function s(){setTimeout(function(){var e=angular.element(t)[0].querySelector(".option");angular.isDefined(e)&&null!=e&&e.focus()},0)}function a(){e.open?e.close():e.open=!0,e.settings.keyboardControls&&e.open&&(1===e.settings.selectionLimit&&e.settings.enableSearch?setTimeout(function(){angular.element(t)[0].querySelector(".searchField").focus()},0):s()),e.settings.enableSearch&&e.open&&setTimeout(function(){angular.element(t)[0].querySelector(".searchField").focus()},0)}function n(t,d){e.setSelectedItem(d,!1,!0),t.stopImmediatePropagation()}function r(){e.open=!1,e.input.searchFilter=e.settings.clearSearchOnClose?"":e.input.searchFilter,e.externalEvents.onClose()}function c(t){e.selectedModel.splice(0,e.selectedModel.length),e.options.forEach(function(d){d[e.settings.groupBy]===t&&e.setSelectedItem(d,!1,!1)}),e.externalEvents.onSelectionChanged()}function h(t){return null!==e.settings.groupByTextProvider?e.settings.groupByTextProvider(t):t}function p(e){var d=t.find("button"),l=document.createElement("canvas"),i=l.getContext("2d");return i.font=d.css("font-size")+d.css("font-family"),i.originalFont=d.css("font-size")+d.css("font-family"),i.fillStyle="#000000",i.measureText(e).width}function m(){if(e.settings.dynamicTitle&&e.selectedModel&&e.selectedModel.length>0){if(angular.isFunction(e.settings.smartButtonTextProvider))return e.settings.smartButtonTextProvider(e.selectedModel);if(e.settings.smartButtonMaxItems>0){var d=24,l=2,i=8,o=t[0].offsetWidth-d-l-i,s=[];angular.forEach(e.options,function(t){if(e.isChecked(t)){var d=e.getPropertyForObject(t,e.settings.displayProp),l=e.settings.smartButtonTextConverter(d,t);s.push(l||d)}}),e.selectedModel.length>e.settings.smartButtonMaxItems&&(s=s.slice(0,e.settings.smartButtonMaxItems),s.push("..."));var a=s.join(", "),n=a.length-4;if(0===t[0].offsetWidth)return a;if(o<=p("..."))return"...";for(;p(a)>o;)"..."!==s[s.length-1]&&(s.push("..."),a+="...",n=a.length-4),a=a.slice(0,n)+a.slice(n+1),n-=1;return a}var r=angular.isDefined(e.selectedModel)?e.selectedModel.length:0;return 0===r?e.texts.buttonDefaultText:e.settings.showAllSelectedText&&r===e.options.length?e.texts.allSelectedText:r+" "+e.texts.dynamicButtonTextSuffix}return e.texts.buttonDefaultText}function v(e,t){return angular.isDefined(e)&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function u(){e.deselectAll(!0),e.externalEvents.onSelectAll();var t=i("filter")(e.options,e.getFilter(e.input.searchFilter));angular.forEach(t,function(t){e.setSelectedItem(t,!0,!1)}),e.externalEvents.onSelectionChanged(),e.selectedGroup=null}function g(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!1;t||e.externalEvents.onDeselectAll(),e.selectedModel.splice(0,e.selectedModel.length),t||e.externalEvents.onSelectionChanged(),e.selectedGroup=null}function b(t){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!1,i=arguments[2],o=void 0,s=void 0;angular.isDefined(C.idProperty)?(o=-1!==l(e.selectedModel,t,C.idProperty),s=l(e.selectedModel,t,C.idProperty)):(o=-1!==e.selectedModel.indexOf(t),s=e.selectedModel.indexOf(t)),!d&&o?(e.selectedModel.splice(s,1),e.externalEvents.onItemDeselect(t),e.settings.closeOnDeselect&&e.close()):!o&&(0===e.settings.selectionLimit||e.selectedModel.length0&&e.selectedModel.length===e.settings.selectionLimit&&e.externalEvents.onMaxSelectionReached()):1!==e.settings.selectionLimit||o||e.selectedModel.length!==e.settings.selectionLimit||(e.selectedModel.splice(0,1),e.selectedModel.push(t),i&&e.externalEvents.onItemSelect(t),e.settings.closeOnSelect&&e.close()),i&&e.externalEvents.onSelectionChanged(),e.selectedGroup=null}function x(t){return angular.isDefined(C.idProperty)?-1!==l(e.selectedModel,t,C.idProperty):-1!==e.selectedModel.indexOf(t)}function f(t){var d=angular.element(t.target).scope(),l=void 0,i=t.target.parentNode;if(e.settings.keyboardControls)if(13===t.keyCode||32===t.keyCode)t.preventDefault(),d.option?e.setSelectedItem(d.option,!1,!0):"deselectAll"===t.target.id?e.deselectAll():"selectAll"===t.target.id&&e.selectAll();else if(38===t.keyCode){for(t.preventDefault(),i.previousElementSibling&&(l=i.previousElementSibling.querySelector("a")||i.previousElementSibling.querySelector("input"));!l&&i;)i=i.previousElementSibling,i&&(l=i.querySelector("a")||i.querySelector("input"));l&&l.focus()}else if(40===t.keyCode){for(t.preventDefault(),i.nextElementSibling&&(l=i.nextElementSibling.querySelector("a")||i.nextElementSibling.querySelector("input"));!l&&i;)i=i.nextElementSibling,i&&(l=i.querySelector("a")||i.querySelector("input"));l&&l.focus()}else 27===t.keyCode&&(t.preventDefault(),e.toggleDropdown())}function y(t){var d=t.target.parentNode.parentNode,l=void 0;if(e.settings.keyboardControls)if(9===t.keyCode||40===t.keyCode)t.preventDefault(),s();else if(38===t.keyCode){for(t.preventDefault(),d.previousElementSibling&&(l=d.previousElementSibling.querySelector("a")||d.previousElementSibling.querySelector("input"));!l&&d;)d=d.previousElementSibling,d&&(l=d.querySelector("a")||d.querySelector("input"));l&&l.focus()}else 27===t.keyCode&&(t.preventDefault(),e.toggleDropdown())}function w(t,d){var l=void 0;e.settings.keyboardControls&&13===t.keyCode&&(1===e.settings.selectionLimit&&e.settings.enableSearch?(l=i("filter")(e.options,e.getFilter(d)),1===l.length&&e.setSelectedItem(l[0],!1,!0)):e.settings.enableSearch&&e.selectAll())}function D(t){var d={};return d[e.settings.searchField]=t,d}function S(t){t&&t.stopPropagation(),e.settings.enableSearch=!e.settings.enableSearch,e.settings.enableSearch||(e.input.searchFilter="")}function T(){e.settings.keyboardControls&&13===event.keyCode&&(e.toggleSearch(),e.settings.enableSearch?setTimeout(function(){angular.element(t)[0].querySelector(".searchField").focus()},0):s())}function k(t,d){if(angular.isUndefined(d))return-1;if(angular.isUndefined(t))return 1;if("object"!==t.type||"object"!==d.type)return t.index{{option.name}}"},e.example20model=[],e.example20data=[{id:1,label:"David",age:23},{id:2,label:"Jhon",age:24},{id:3,label:"Danny",age:26}],e.example20settings={searchField:"age",enableSearch:!0},e.example21model=[],e.example21data=[{id:1,label:"David"},{id:2,label:"Jhon"},{id:3,label:"Danny"}],e.example21settings={showEnableSearchButton:!0},e.searchSelectAllModel=[],e.searchSelectAllData=[{id:1,label:"David"},{id:2,label:"Jhon"},{id:3,label:"Danny"}],e.searchSelectAllSettings={enableSearch:!0,keyboardControls:!0},e.disabledModel=[],e.disabledData=[{id:1,label:"David",disabled:!0},{id:2,label:"Jhon"},{id:3,label:"Danny"}],e.selectedToTopModel=[],e.selectedToTopData=[{id:1,label:"David"},{id:2,label:"Jhon"},{id:3,label:"Danny"}],e.selectedToTopSettings={selectedToTop:!0},e.stringModel=[],e.stringData=["David","Jhon","Danny"],e.stringSettings={template:"{{option}}",smartButtonTextConverter:function(e,t){return t}},e.transclusionModel=[],e.transclusionData=[{id:1,label:"David"},{id:2,label:"Jhon"},{id:3,label:"Danny"}],e.transclusionSettings={},e.idPropertyModel=[{id:1}],e.idPropertyData=[{id:1,label:"David"},{id:2,label:"Jhon"},{id:3,label:"Danny"}],e.idPropertySettings={idProperty:"id"},e.smartButtonTextProviderModel=[],e.smartButtonTextProviderData=[{id:1,label:"David"},{id:2,label:"Jhon"},{id:3,label:"Danny"}],e.smartButtonTextProviderSettings={smartButtonTextProvider:function(e){return e.length+2}}};l.$inject=["$scope","$log"],t["default"]=l},function(e,t){"use strict";function d(){var e={templateUrl:"app/v1docs/v1docs.template.html"};return e}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=d}]),angular.module("AngularjsDropdownMultiselectExample").run(["$templateCache",function(e){e.put("app/component/angularjs-dropdown-multiselect.html",''),e.put("app/main/main.template.html",'

What is AngularJS Dropdown Multiselect?

This directive uses Bootstrap\'s Dropdown with the power of AngularJS directives and binding. Bootstrap and AngularJS are the only dependencies.

In this page you can see basic and advanced usage examples.

Download

There are several options to do that:
  1. Using bower: `bower install angularjs-dropdown-multiselect`
  2. Using npm: `npm install angularjs-dropdown-multiselect`
  3. Download the .zip file from here
This is documentation for the currently still in beta v2.0.0, the documentation for v1 can be found here: V1 docs
test

Demo

The model:

{{testmodel|json}}

Demo

The model:

{{example1model|json}}

Code

// HTML
// JavaScript $scope.example1model = []; $scope.example1data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"} ];
This example shows the ability to select the property to display as text label.
In this case, the property the used as label is "id".

Demo

The model:

{{example2model|json}}

Code

// HTML
// JavaScript $scope.example2model = []; $scope.example2data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example2settings = {displayProp: \'id\'};
You can use the feature in order to show which items are selected instead the items count.
In order to use this feature, set the "smartButtonMaxItems" settings parameter to a number bigger than 0.
You can also provide "smartButtonTextConverter" parameter in order to add smart logic and convert the text.

Demo

The model:

{{example13model|json}}

Code

//HTML
//JS $scope.example13model = []; $scope.example13data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Lisa"}, {id: 4, label: "Nicole"}, {id: 5, label: "Danny"} ]; $scope.example13settings = { smartButtonMaxItems: 3, smartButtonTextConverter: function(itemText, originalItem) { if (itemText === \'Jhon\') { return \'Jhonny!\'; } return itemText; } };
You can use the feature in order to make the list of items scrollable. Useful when you deal with a lot of items.

Demo

The model:

{{example14model|json}}

Code

//HTML
//JS $scope.example14model = []; $scope.example14data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Lisa"}, {id: 4, label: "Nicole"}, {id: 5, label: "Danny"}, {id: 6, label: "Dan"}, {id: 7, label: "Dean"}, {id: 8, label: "Adam"}, {id: 9, label: "Uri"}, {id: 10, label: "Phil"} ]; $scope.example14settings = { scrollableHeight: \'100px\', scrollable: true };

Demo

The model:

{{example9model|json}}

Code

// HTML
// JavaScript $scope.example9model = []; $scope.example9data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example9settings = {enableSearch: true};
By default, search is done on all items, by specifying the searchField in the settings object one can specify on which field of the objects the filtering should be done.

Demo

The model:

{{example20model|json}}

Code

// HTML
// JavaScript $scope.example20model = []; $scope.example20data = [ { id: 1, label: "David", age: 23 }, { id: 2, label: "Jhon", age: 24 }, { id: 3, label: "Danny", age: 26 } ]; $scope.example20settings = { searchField: \'age\', enableSearch: true };
Setting showEnableSearchButton to true will add the enable/disable search button under the Select all / Deselect all buttons

Demo

The model:

{{example21model|json}}

Code

// HTML
// JavaScript $scope.example21model = []; $scope.example21data = [ { id: 1, label: "David"}, { id: 2, label: "Jhon"}, { id: 3, label: "Danny"} ]; $scope.example21settings = { showEnableSearchButton: true };

Demo

The model:

{{searchSelectAllModel|json}}

Code

// HTML
// JavaScript $scope.searchSelectAllModel = []; $scope.searchSelectAllData = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"} ]; $scope.searchSelectAllSettings = { enableSearch: true, showSelectAll: true, keyboardControls: true };
By default, there is no limit on the maximum selected items.
You can limit the selection by providing selectionLimit using the settings attribute.
Note 1: limit the selection to 0 is the default and won\'t limit the selection!
Note 2: When using this limit, the "Select All" button will not appear!

Note 3: When using single selection (limit to 1) the selection will change automaticlly if another item is clicked!

Demo

The model:

{{example10model|json}}

Code

// HTML
// JavaScript $scope.example10model = []; $scope.example10data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example10settings = {selectionLimit: 2};
Please read the notes in the "Selection Limit" example.
This example shows an example of using selection limit and single selection.

Demo

The model:

{{example12model|json}}

Code

// HTML
// JavaScript $scope.example12model = {}; // ! IMPORTANT ! $scope.example12data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"} ]; $scope.example12settings = { selectionLimit: 1, };
You can also group the items by propery that you want, in order to to that, provide the groupBy setting.
Also, you need to provide "groupByTextProvider" callback in the extra-settings attribute, in order to provide the header text for each group.
Note: If you won\'t specify the "groupByTextProvider" callback in order to get the header for each group, the value of the group will be displayed!

Demo

The model:

{{example11model|json}}

Code

// HTML
// JavaScript $scope.example11model = []; $scope.example11data = [ {id: 1, label: "David", gender: \'M\'}, {id: 2, label: "Jhon", gender: \'M\'}, {id: 3, label: "Lisa", gender: \'F\'}, {id: 4, label: "Nicole", gender: \'F\'}, {id: 5, label: "Danny", gender: \'M\'} ]; $scope.example11settings = { groupByTextProvider: function(groupValue) { if (groupValue === \'M\') { return \'Male\'; } else { return \'Female\'; } }, groupBy: \'gender\', };
When items are grouped by property you can also specify an array of groups that you can use to select the items by. The extra-settings property selectByGroups accepts an array of the values of the groups that you want to be selectable. The naming will use the groupByTextProvider function to give them an actual label.

Demo

The model:

{{selectByGroupModel|json}}

Code

// HTML
// JavaScript $scope.selectByGroupModel = []; $scope.selectByGroupData = [ { id: 1, label: "David", gender: \'M\' }, { id: 2, label: "Jhon", gender: \'M\' }, { id: 3, label: "Lisa", gender: \'F\' }, { id: 4, label: "Nicole", gender: \'F\' }, { id: 5, label: "Danny", gender: \'M\' }, { id: 6, label: "Unknown", gender: \'O\' } ]; $scope.selectByGroupSettings = { selectByGroups: [\'F\', \'M\'], groupByTextProvider: function(groupValue) { switch (groupValue) { case \'M\': return \'Male\'; case \'F\': return \'Female\'; case \'O\': return \'Other\'; } }, groupBy: \'gender\', };
You can select your own text of the button using the "defaultText" in settings.

Demo

The model:

{{example5model|json}}

Code

// HTML
// JavaScript $scope.example5model = []; $scope.example5data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example5settings = {}; $scope.example5customTexts = {buttonDefaultText: \'Select Users\'};
This example shows a demostration of using a pre-setted model.
Note:The model should have the same objects as in the options array.

Demo

The model:

{{example6model|json}}

Code

// HTML
// JavaScript $scope.example6data = [ { id: 1, label: \'David\' }, { id: 2, label: \'Jhon\' }, { id: 3, label: \'Danny\' } ]; $scope.example6model = [$scope.example6data[0], $scope.example6data[2]]; $scope.example6settings = {};
This example shows a demostration of access and set the search filter from outside the directive.
This can be done by settings the "search-filter" attribute.

Demo

The model:

{{example7model|json}}

Search Filter:

{{customFilter|json}}

Code

// HTML
// JavaScript $scope.example15model = []; $scope.example15data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Lisa"}, {id: 4, label: "Nicole"}, {id: 5, label: "Danny"} ]; $scope.example15settings = { enableSearch: true }; $scope.customFilter = \'a\';
You can also use a checkboxes list by setting checkBoxes setting to true!

Demo

The model:

{{example8model|json}}

Code

// HTML
// JavaScript $scope.example8model = []; $scope.example8data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"} ]; $scope.example8settings = { checkBoxes: true, };

Demo

You can also aplly the active class to the selected list items. This can be done by setting the styleActive setting to true

The model:

{{example16model|json}}

Code

// HTML
// JavaScript $scope.example16model = []; $scope.example16data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example16settings = {styleActive: true};

Demo

When activated the dropdown can be used with the keyboard instead of with the mouse. Up, down arrow change focused element, escape closes the dropdown, enter and space activate focused element.

The model:

{{example17model|json}}

Code

// HTML
// JavaScript $scope.example17model = []; $scope.example17data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example17settings = {keyboardControls: true};

Demo

When search is enabled and a single selection is active, wehn search returns a single match pressing enter in the search box will activate the matched option.

The model:

{{example18model|json}}

Code

// HTML
// JavaScript $scope.example18model = {}; $scope.example18data = [ { id: 1, label: "David" }, { id: 2, label: "Jhon" }, { id: 3, label: "Lisa" }, { id: 4, label: "Nicole" }, { id: 5, label: "Danny" } ]; $scope.example18settings = { keyboardControls: true, enableSearch: true, selectionLimit: 1 };

Demo

Instead of using the default template you can use an own custom temlpate.

The model:

{{example19model|json}}

Code

// HTML
// JavaScript $scope.example19model = {}; $scope.example19data = [ { id: 1, name: "David" }, { id: 2, name: "Jhon" }, { id: 3, name: "Lisa" }, { id: 4, name: "Nicole" }, { id: 5, name: "Danny" } ]; $scope.example19settings = { template: \'{{option.name}}\' };
Setting the field disabled of an option to true will disable that option, if the option was previously checked it will still stay checked and will not be able to be unchecked.

Demo

The model:

{{disabledModel|json}}

Code

// HTML
// JavaScript $scope.disabledModel = []; $scope.disabledData = [ { id: 1, label: "David", disabled: true}, { id: 2, label: "Jhon"}, { id: 3, label: "Danny"} ];
When setting "selectedToTop" to true, selected items will be ordered to the top. When group by is active, the selected items will be at the top of their group.

Demo

The model:

{{selectedToTopModel|json}}

Code

// HTML
// JavaScript $scope.selectedToTopModel = []; $scope.selectedToTopData = [ { id: 1, label: \'David\' }, { id: 2, label: \'Jhon\' }, { id: 3, label: \'Danny\' }, ]; $scope.selectedToTopSettings = { selectedToTop: true, };
Example to show that options no longer need to be an object with an id property

Demo

The model:

{{stringModel|json}}

Code

// HTML
$scope.stringModel = []; $scope.stringData = [ \'David\', \'Jhon\', \'Danny\', ]; $scope.stringSettings = { template: \'{{option}}\', smartButtonTextConverter(skip, option) { return option; }, };
Example to show that you can replace the button with a custom element.

Demo

My Custom trigger

The model:

{{transclusionModel|json}}

Code

// HTML
My Custom trigger
$scope.transclusionModel = []; $scope.transclusionData = [ { id: 1, label: \'David\' }, { id: 2, label: \'Jhon\' }, { id: 3, label: \'Danny\' }, ]; $scope.transclusionSettings = { };
When idProperty is set the objects will be compared by that property (that should be unique) instead of by reference.

Demo

The model:

{{idPropertyModel|json}}

Code

// HTML
$scope.idPropertyModel = [{ id: 1 }]; $scope.idPropertyData = [ { id: 1, label: \'David\' }, { id: 2, label: \'Jhon\' }, { id: 3, label: \'Danny\' }, ]; $scope.idPropertySettings = { idProperty: \'id\', };
When there is a selection this method will be called with the selection as a parameter. The function is supposed to return the text that you want to display on the button.

Demo

The model:

{{smartButtonTextProviderModel|json}}

Code

// HTML
$scope.smartButtonTextProviderModel = []; $scope.smartButtonTextProviderData = [ { id: 1, label: \'David\' }, { id: 2, label: \'Jhon\' }, { id: 3, label: \'Danny\' }, ]; $scope.idPropertySettings = { smartButtonTextProvider(selectionArray) { return selectionArray.length + 2; }, };

Full API Documentation

Attributes

List of allowed attributes, you can find more information about them in the usage examples above.

Attribute NameTypeDescription
selected-modelObject / ArrayThe object the will contain the model for the selected items in the dropdown.
optionsObject / ArrayThe options for the dropdown.
extra-settingsObjectThe settings for the directive, more information about these settings are available below.
eventsObjectEvents callbacks, more information below.
translation-textsObjectGives the ability to modify the default texts in the directive. More information below.
search-filterStringUses for settings the search filter from outside the direcrtive.
disabledBooleanUsed for disabling the dropdown.

Settings

Available settings that effects the display or behavior of the directive.
These setting are set with the "extra-settings" attribute.

Property NameTypeDefault ValueDescription
dynamicTitleBooleantrueIndicates if the text of the button should change when selecting items from the list.
closeOnBlurBooleantrueIndicates if the dropdown should close when clicking outside of it\'s scope.
displayPropStringlabelThe name of the property that contains the text for the item.
enableSearchBooleanfalseIndicated if to show the search input or not.
clearSearchOnCloseBooleanfalseIndicated if to clear the search field when the dropdown has closed.
searchFieldString"$"Indicates on which field the search should be done
selectionLimitNumber0The max allowed selected items for the list. For more information see the examples above.
showCheckAllBooleantrueIndicates if to show the "Check All" item.
showUncheckAllBooleantrueIndicates if to show the "Uncheck All" item.
showEnableSearchButtonBooleanfalseIndicates if to show the "Enable search / Disable search" item.
closeOnSelectBooleanfalseIndicates if to close the dropdown after checking an item on the list.
closeOnDeselectBooleanfalseIndicates if to close the dropdown after unchecking an item on the list. With selectionLimit = 1 setting this to true does the same as setting closeOnSelect to true.
buttonClassesStringbtn btn-defaultThe CSS classes that used for setting the style of the button.
groupByStringundefinedThe name of the property which you like to group by your options. See grouping example.
groupByTextProviderFunctionangular.noopA callback to a function that provide that name for each group when using groupBy setting. The parameter for the function will be the value of the groupBy property.
scrollableBooleanfalseIndicates if the dropdown is scrollable, useful if you have a lot of items.
scrollableHeightNumber300pxIndicates the height of the drop down if the dropdown is scrollable.
smartButtonMaxItemsNumber0Manages the "Smart Button Text" feature, defines the maximum amount of items to on the button.
smartButtonTextConverterFunctionangular.noopRelated the "Smart Button Text" feature, if a function provided - it will called with two paramters: The item\'s text and the original item, the return value will displayed instead of the item\'s display property. This feature is useful when you want to convert the displayed text into something else.
styleActiveBooleanfalseIndicates if the list items should get a class active applied when they are selected.
keyboardControlsBooleanfalseWhen activated the dropdown can be used with the keyboard instead of with the mouse.
templateString{ {getPropertyForObject(option, settings.displayProp)} }Can be used to modify the appearance of an option in the list, each option is accessible as option.
selectByGroupsArrayundefinedValues of the groupby property that you want to be selectable as group
checkBoxesBooleanfalseIndicated if to show a normal dropdown with glyphicons or HTML checkboxes.
selectedToTopBooleanfalseWhen true will put the selected options at the top of the list
idPropertystringundefinedUsed to compare by property instead of by reference.

Events

Available event callbacks what the directive fires. These callbacks are set with "events" attribute.

Event NameParametersDescription
onItemSelectitemFired when selecting an item.
onItemDeselectitemFired when unselecting an item.
onSelectAllFired when clicking select all.
onDeselectAllFired when clicking unselect all.
onInitDoneFired when the directive done with the "link" phase.
onMaxSelectionReachedFired when the user reaches the max allowed selected items.
onSelectionChangedFired when the selection changes.

Translation Texts

Available texts that you can override if you wan\'t to make a translation for your website. These are set with the "translation-texts" attribute.

Property NameDefault ValueDescription
checkAllCheck All"Check All" item\'s text.
uncheckAllUncheck All"Uncheck All" item\'s text.
enableSearchEnable search"enable search" item\'s text.
disableSearchDisable search"disable search" item\'s text.
selectionCountcheckedThe suffix for "X/Y" that showed when using selection limit.
selectionOf/The value between the selected values and the max values when using selection limit.
searchPlaceholderSearch...The placeholder for the search input.
buttonDefaultTextSelectThe default text that used for the button when no items selected.
dynamicButtonTextSuffixcheckedThe suffix for the button that used when using "dynamicText".
selectGroupSelect All:The prefix of the group selection.
'), e.put("app/v1docs/v1docs.template.html",'Main docs

Full V1 API Documentation

Attributes

List of allowed attributes, you can find more information about them in the usage examples above.

Attribute NameTypeDescription
selected-modelObject / ArrayThe object the will contain the model for the selected items in the dropdown.
optionsObject / ArrayThe options for the dropdown.
extra-settingsObjectThe settings for the directive, more information about these settings are available below.
eventsObjectEvents callbacks, more information below.
translation-textsObjectGives the ability to modify the default texts in the directive. More information below.
group-byStringThe name of the property which you like to group by your options. See grouping example.
checkboxesBooleanIndicated if to show a normal dropdown with glyphicons or HTML checkboxes.
search-filterStringUses for settings the search filter from outside the direcrtive.
disabledBooleanUsed for disabling the dropdown.

Settings

Available settings that effects the display or behavior of the directive.
These setting are set with the "extra-settings" attribute.

Property NameTypeDefault ValueDescription
dynamicTitleBooleantrueIndicates if the text of the button should change when selecting items from the list.
closeOnBlurBooleantrueIndicates if the dropdown should close when clicking outside of it\'s scope.
displayPropStringlabelThe name of the property that contains the text for the item.
idPropStringidThe name of the property that contains the id for the elements.
externalIdPropStringidThe name of the property that will use for the selected items model.
enableSearchBooleanfalseIndicated if to show the search input or not.
clearSearchOnCloseBooleanfalseIndicated if to clear the search field when the dropdown has closed.
searchFieldString"$"Indicates on which field the search should be done
selectionLimitNumber0The max allowed selected items for the list. For more information see the examples above.
showCheckAllBooleantrueIndicates if to show the "Check All" item.
showUncheckAllBooleantrueIndicates if to show the "Uncheck All" item.
showEnableSearchButtonBooleanfalseIndicates if to show the "Enable search / Disable search" item.
closeOnSelectBooleanfalseIndicates if to close the dropdown after checking an item on the list.
closeOnDeselectBooleanfalseIndicates if to close the dropdown after unchecking an item on the list. With selectionLimit = 1 setting this to true does the same as setting closeOnSelect to true.
buttonClassesStringbtn btn-defaultThe CSS classes that used for setting the style of the button.
groupByTextProviderFunctionangular.noopA callback to a function that provide that name for each group when using group-by attribute. The parameter for the function will be the value of the group-by property.
scrollableBooleanfalseIndicates if the dropdown is scrollable, useful if you have a lot of items.
scrollableHeightNumber300pxIndicates the height of the drop down if the dropdown is scrollable.
smartButtonMaxItemsNumber0Manages the "Smart Button Text" feature, defines the maximum amount of items to on the button.
smartButtonTextConverterFunctionangular.noopRelated the "Smart Button Text" feature, if a function provided - it will called with two paramters: The item\'s text and the original item, the return value will displayed instead of the item\'s display property. This feature is useful when you want to convert the displayed text into something else.
styleActiveBooleanfalseIndicates if the list items should get a class active applied when they are selected.
keyboardControlsBooleanfalseWhen activated the dropdown can be used with the keyboard instead of with the mouse.
templateString{ {getPropertyForObject(option, settings.displayProp)} }Can be used to modify the appearance of an option in the list, each option is accessible as option.
selectByGroupsArrayundefinedValues of the groupby property that you want to be selectable as group

Events

Available event callbacks what the directive fires. These callbacks are set with "events" attribute.

Event NameParametersDescription
onItemSelectitemFired when selecting an item.
onItemDeselectitemFired when unselecting an item.
onSelectAllFired when clicking select all.
onDeselectAllFired when clicking unselect all.
onInitDoneFired when the directive done with the "link" phase.
onMaxSelectionReachedFired when the user reaches the max allowed selected items.
onSelectionChangedFired when the selection changes.

Translation Texts

Available texts that you can override if you wan\'t to make a translation for your website. These are set with the "translation-texts" attribute.

Property NameDefault ValueDescription
checkAllCheck All"Check All" item\'s text.
uncheckAllUncheck All"Uncheck All" item\'s text.
enableSearchEnable search"enable search" item\'s text.
disableSearchDisable search"disable search" item\'s text.
selectionCountcheckedThe suffix for "X/Y" that showed when using selection limit.
selectionOf/The value between the selected values and the max values when using selection limit.
searchPlaceholderSearch...The placeholder for the search input.
buttonDefaultTextSelectThe default text that used for the button when no items selected.
dynamicButtonTextSuffixcheckedThe suffix for the button that used when using "dynamicText".
selectGroupSelect All:The prefix of the group selection.
')}]); //# sourceMappingURL=../maps/scripts/app.js.map diff --git a/package.json b/package.json index 0c9de9cc..7df0f642 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "author": "pkempenaers@myforce.be", "name": "angularjs-dropdown-multiselect", - "version": "2.0.0-beta.9", + "version": "2.0.0-beta.10", "description": "This directive gives you a Bootstrap Dropdown with the power of AngularJS directives.", "homepage": "http://dotansimha.github.io/angularjs-dropdown-multiselect/#/", "dependencies": {