luv-assets 1.1.5 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ function renderSearchHistory(){let searchHistory=getCompatibleSearchHistoryFromLocalStorage();if(searchHistory.data.length===0){return}const $searchHistoryList=$("#search-history-items-js");searchHistory.data.forEach(function(keyword){const $listItem=$("<li>",{class:"q-js py-2 px-2",text:keyword});$searchHistoryList.append($listItem)});$("#search-history-js").removeClass("d-none")}$(document).ready(function(){pullSearchHistory(pullSearchHistoryUrl);renderSearchHistory();$("#removeDialog .btn-primary").click(function(){removeSearchFromLocalStorage();removeHistory(removeHistoryUrl);location.reload()});const $input=$("#q");const $btnClearContainer=$("#btn-clear-container-js");const $btnContainer=$("#btn-container-js");$input.on("input focus",function(){const q=$(this).val().trim();if(q.length>0){$btnClearContainer.removeClass("d-none");$btnContainer.addClass("d-none")}else{$btnClearContainer.addClass("d-none");$btnContainer.removeClass("d-none")}});$btnClearContainer.on("click",function(){$input.val("").focus();$(this).addClass("d-none");$btnContainer.removeClass("d-none")});$("#searchForm").on("submit",function(e){if(!$input.val().trim()){e.preventDefault();$input.focus();return false}});$(".q-js").click(function(){const search_text=$(this).text();$("#q").val(search_text);$("#searchForm").submit()})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "luv-assets",
3
3
  "description": "Include Bootstrap's source Sass and individual JavaScript plugins with Webpack.",
4
- "version": "1.1.5",
4
+ "version": "1.1.6",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",
package/readme.txt CHANGED
@@ -12,6 +12,7 @@ terser 负责压缩js
12
12
  terser src/js/product.js -o dist/js/product.min.js
13
13
  terser src/js/category.js -o dist/js/category.min.js
14
14
  terser src/js/search.js -o dist/js/search.min.js
15
+ terser src/js/search-text.js -o dist/js/search-text.min.js
15
16
  -----------
16
17
  // load any GitHub release, commit, or branch
17
18
  // note: we recommend using npm for projects that support it