From 3815a98589b8974c04b72bdab64ca94181408426 Mon Sep 17 00:00:00 2001 From: nobody Date: Fri, 22 Jan 2021 06:31:10 +0100 Subject: [PATCH] Added: ajax-bootstrap-select v1.4.5 (#241) --- core/mappings.js | 1 + core/resources.js | 5 +++++ modules/internal/targets.js | 5 ++++- pages/updates/updates.html | 1 + .../1.4.5/ajax-bootstrap-select.min.jsm | 21 +++++++++++++++++++ 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 resources/ajax-bootstrap-select/1.4.5/ajax-bootstrap-select.min.jsm diff --git a/core/mappings.js b/core/mappings.js index d0a32411..039ae55a 100644 --- a/core/mappings.js +++ b/core/mappings.js @@ -88,6 +88,7 @@ mappings.cdn = { // CDNJS (Cloudflare) 'cdnjs.cloudflare.com': { '/ajax/libs/': { + 'ajax-bootstrap-select/{version}/js/ajax-bootstrap-select.': resources.ajaxBootstrapSelect, 'algoliasearch/{version}/algoliasearch.angular.': resources.algoliaSearch, 'algoliasearch/{version}/algoliasearch.': resources.algoliaSearch, 'anchor-js/{version}/anchor.': resources.anchorJS, diff --git a/core/resources.js b/core/resources.js index c19e637f..eadec11f 100644 --- a/core/resources.js +++ b/core/resources.js @@ -24,6 +24,11 @@ var resources = { + // Ajax Bootstrap Select + 'ajaxBootstrapSelect': { + 'path': 'resources/ajax-bootstrap-select/{version}/ajax-bootstrap-select.min.jsm', + 'type': 'application/javascript' + }, // AlgoliaSearch 'algoliaSearch': { 'path': 'resources/algoliasearch/{version}/algoliasearch.min.jsm', diff --git a/modules/internal/targets.js b/modules/internal/targets.js index a8779127..906f7a13 100644 --- a/modules/internal/targets.js +++ b/modules/internal/targets.js @@ -56,7 +56,9 @@ targets.setLastVersion = function (type, version) { if (version !== null && version !== undefined) { version = version.toString(); } - if (type.startsWith('/algoliasearch/3.')) { + if (type.startsWith('/ajax-bootstrap-select/1.')) { + return '1.4.5'; + } else if (type.startsWith('/algoliasearch/3.')) { return '3.35.1'; } else if (type.startsWith('/algoliasearch/4.')) { return '4.8.4'; @@ -476,6 +478,7 @@ targets.determineResourceName = function (filename) { }; const ListOfFiles = { + 'ajax-bootstrap-select.min.jsm': 'Ajax Bootstrap Select', 'bootstrap-vue.min.jsm': 'BootstrapVue (JS)', 'bootstrap-vue.min.css': 'BootstrapVue (CSS)', 'mirage2.min.jsm': 'mirage2', diff --git a/pages/updates/updates.html b/pages/updates/updates.html index c7402792..d881ba8e 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -44,6 +44,7 @@
  • Updated: instantsearch.js v4.11.0 -> v4.12.0 (#238)
  • Updated: algoliasearch v4.8.3 -> v4.8.4 (#239)
  • Added: bootstrap-vue v2.21.2 (#240)
  • +
  • Added: ajax-bootstrap-select v1.4.5 (#241)
  • diff --git a/resources/ajax-bootstrap-select/1.4.5/ajax-bootstrap-select.min.jsm b/resources/ajax-bootstrap-select/1.4.5/ajax-bootstrap-select.min.jsm new file mode 100644 index 00000000..7744006a --- /dev/null +++ b/resources/ajax-bootstrap-select/1.4.5/ajax-bootstrap-select.min.jsm @@ -0,0 +1,21 @@ +/*! + * Ajax Bootstrap Select + * + * Extends existing [Bootstrap Select] implementations by adding the ability to search via AJAX requests as you type. Originally for CROSCON. + * + * @version 1.4.5 + * @author Adam Heim - https://github.com/truckingsim + * @link https://github.com/truckingsim/Ajax-Bootstrap-Select + * @copyright 2019 Adam Heim + * @license Released under the MIT license. + * + * Contributors: + * Mark Carver - https://github.com/markcarver + * + * Last build: 2019-04-23 12:18:55 PM EDT + */ +!function(a,b){var c=function(c,d){var e,f,g=this;d=d||{},this.$element=a(c),this.options=a.extend(!0,{},a.fn.ajaxSelectPicker.defaults,d),this.LOG_ERROR=1,this.LOG_WARNING=2,this.LOG_INFO=3,this.LOG_DEBUG=4,this.lastRequest=!1,this.previousQuery="",this.query="",this.request=!1;var h=[{from:"ajaxResultsPreHook",to:"preprocessData"},{from:"ajaxSearchUrl",to:{ajax:{url:"{{{value}}}"}}},{from:"ajaxOptions",to:"ajax"},{from:"debug",to:function(b){var c={};c.log=Boolean(g.options[b.from])?g.LOG_DEBUG:0,g.options=a.extend(!0,{},g.options,c),delete g.options[b.from],g.log(g.LOG_WARNING,'Deprecated option "'+b.from+'". Update code to use:',c)}},{from:"mixWithCurrents",to:"preserveSelected"},{from:"placeHolderOption",to:{locale:{emptyTitle:"{{{value}}}"}}}];h.length&&a.map(h,function(b){if(g.options[b.from])if(a.isPlainObject(b.to))g.replaceValue(b.to,"{{{value}}}",g.options[b.from]),g.options=a.extend(!0,{},g.options,b.to),g.log(g.LOG_WARNING,'Deprecated option "'+b.from+'". Update code to use:',b.to),delete g.options[b.from];else if(a.isFunction(b.to))b.to.apply(g,[b]);else{var c={};c[b.to]=g.options[b.from],g.options=a.extend(!0,{},g.options,c),g.log(g.LOG_WARNING,'Deprecated option "'+b.from+'". Update code to use:',c),delete g.options[b.from]}});var i=this.$element.data();i.searchUrl&&(g.log(g.LOG_WARNING,'Deprecated attribute name: "data-search-url". Update markup to use: \' data-abs-ajax-url="'+i.searchUrl+"\" '"),this.options.ajax.url=i.searchUrl);var j=function(a,b){return b.toLowerCase()},k=function(a,b,c){var d=[].concat(a),e=d.length,f=c||{};if(e){var g=d.shift();f[g]=k(d,b,f[g])}return e?f:b},l=Object.keys(i).filter(/./.test.bind(new RegExp("^abs[A-Z]")));if(l.length){var m={},n=["locale"];for(e=0,f=l.length;e1&&-1!==n.indexOf(p[0])){for(var q=[p.shift()],r="",s=0;s0)&&f.replaceValue(b[g],c,d,e):h===c&&(!1!==e.limit&&"number"==typeof e.limit&&e.limit--,b[g]=d)})},c.prototype.t=function(a,b){return b=b||this.options.langCode,this.locale[b]&&this.locale[b].hasOwnProperty(a)?this.locale[b][a]:(this.log(this.LOG_WARNING,"Unknown translation key:",a),a)},b.AjaxBootstrapSelect=b.AjaxBootstrapSelect||c;var d=function(b){var c=this;this.$status=a(b.options.templates.status).hide().appendTo(b.selectpicker.$menu);var d=b.t("statusInitialized");d&&d.length&&this.setStatus(d),this.cache={},this.plugin=b,this.selected=[],this.title=null,this.selectedTextFormat=b.selectpicker.options.selectedTextFormat;var e=[];b.$element.find("option").each(function(){var c=a(this),d=c.attr("value");e.push({value:d,text:c.text(),class:c.attr("class")||"",data:c.data()||{},preserved:b.options.preserveSelected,selected:!!c.attr("selected")})}),this.cacheSet("",e),b.options.preserveSelected&&(c.selected=e,b.$element.on("change.abs.preserveSelected",function(d){var e=b.$element.find(":selected");c.selected=[],b.selectpicker.multiple||(e=e.last()),e.each(function(){var b=a(this),d=b.attr("value");c.selected.push({value:d,text:b.text(),class:b.attr("class")||"",data:b.data()||{},preserved:!0,selected:!0})}),c.replaceOptions(c.cacheGet(c.plugin.query))}))};d.prototype.build=function(b){var c,d,e=b.length,f=a("