luv-assets 1.1.19 → 1.1.20

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 init_share($ele){var shareUrl=$ele.data("share-url");var shareTitle=$ele.data("share-title");console.log(shareUrl);console.log(shareTitle);var elems=$("[data-sharer]");for(var i=0;i<elems.length;i++){elems[i].setAttribute("data-url",shareUrl);elems[i].setAttribute("data-title",shareTitle)}$("#product-link-url-input-js").val(shareUrl);var affiliateUrl=$ele.data("affiliate-url");$("#affiliate-link-url-input-js").val(affiliateUrl)}function removeFavorite(favorite_id){$.ajax({url:removeFavoriteUrl,type:"POST",dataType:"json",data:{favorite_id:favorite_id,[csrfName]:csrfVal},success:function(response){if(response.status==="success"){$('.favorite-item-js[data-favorite-id="'+favorite_id+'"]').fadeOut(300,function(){$(this).remove()})}else{alert(response.message||"Update failed")}},error:function(){alert("Network error")}})}$(document).ready(function(){const lazyLoadInstance=new LazyLoad({});var pendingDeleteFavoriteId=null;$("#removeDialog").on("show.bs.modal",function(event){var button=$(event.relatedTarget);pendingDeleteFavoriteId=button.data("favorite-id")});$("#removeDialog .btn-primary").on("click",function(){if(pendingDeleteFavoriteId){removeFavorite(pendingDeleteFavoriteId);$("#removeDialog").modal("hide");pendingDeleteFavoriteId=null}});$(document).on("click",".product-detail-icon-share-js",function(e){e.preventDefault();init_share($(this));var $modal=$("#shareBottomSheet");var modalInstance=new bootstrap.Modal($modal[0]);modalInstance.show()});$("#shareBottomSheet").on("hidden.bs.modal",function(){});$(document).on("click",".btn-copy-link-js",function(e){e.preventDefault();const $btn=$(this);const targetId=$btn.data("clipboard-target");const $input=$("#"+targetId);if(!$input.length){console.warn("Copy button target not found:",targetId);return}const textToCopy=$input.val().trim();console.log(textToCopy);if(!textToCopy){return}copyTextToClipboard(textToCopy).then(function(success){$btn.find(".copy-label-js").addClass("d-none");$btn.find(".copy-label-copied-js").removeClass("d-none");setTimeout(function(){$btn.find(".copy-label-js").removeClass("d-none");$btn.find(".copy-label-copied-js").addClass("d-none")},2e3);if(!success){}})});$("#product-list-more").infiniteScroll({path:function(){if(this.loadCount<maxPage-1){return UrlUtils.mergeParams(base_url,{...url_params,p:this.loadCount+2})}},append:false,history:false,responseBody:"json",fetchOptions:{method:"GET",headers:{"X-Requested-With":"XMLHttpRequest","Content-Type":"application/json",Accept:"application/json"}},checkLastPage:true,scrollThreshold:100,status:".page-load-status",prefill:false,debug:false});$("#product-list-more").on("load.infiniteScroll",function(event,body,path){if(body&&body.html&&body.html.trim()!==""){$(this).append(body.html);if(typeof lazyLoadInstance!=="undefined"){lazyLoadInstance.update()}}});$("#product-list-more").on("error.infiniteScroll",function(event,error,path){alert("Failed to load more products.")});$("#product-list-more").on("append.infiniteScroll",function(event,body,path,items){});$("#product-list-more").on("last.infiniteScroll",function(){})});
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.19",
4
+ "version": "1.1.20",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",
package/readme.txt CHANGED
@@ -30,6 +30,7 @@ terser 负责压缩js
30
30
  terser src/js/u-order.js -o dist/js/u-order.min.js
31
31
  terser src/js/u-order-detail.js -o dist/js/u-order-detail.min.js
32
32
  terser src/js/u-profile.js -o dist/js/u-profile.min.js
33
+ terser src/js/u-wishlist.js -o dist/js/u-wishlist.min.js
33
34
  -----------
34
35
  // load any GitHub release, commit, or branch
35
36
  // note: we recommend using npm for projects that support it