hina-cloud-js-sdk 3.1.3 → 3.1.4
Sign up to get free protection for your applications and to get access to all the features.
- package/build/hotAnalyse.min.js +1 -1
- package/package.json +6 -4
package/build/hotAnalyse.min.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var e;e=function(){var e=document.createElement("script");e.async="async",e.src="https://
|
1
|
+
var e;e=function(){var e=document.createElement("script");e.async="async",e.src="https://s3-model.hinadt.com/files/jquery.min.js",e.type="text/javascript",e.addEventListener("load",(function(){var e,n,t,o=!1,i=315,l=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0;!function(e){var n=document.createElement("style");n.type="text/css";try{n.appendChild(document.createTextNode(e))}catch(t){n.styleSheet.cssText=e}var t=document.getElementsByTagName("head")[0],o=document.getElementsByTagName("script")[0];t?t.children.length?t.insertBefore(n,t.children[0]):t.appendChild(n):o.parentNode.insertBefore(n,o)}('\n .hina-click-area:before{\n pointer-events: none;\n cursor: pointer;\n content: "";\n width: 100%;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n background: rgba(56, 166, 251, 0.6);\n box-shadow: rgba(0, 0, 0, 0.6) 0px 2px 4px;\n cursor: pointer\n }\n .hina-click-area:after{\n pointer-events: none;\n height: 14px;\n line-height: 14px;\n margin: -7px 0 0 -28px;\n width: 56px;\n color: #fff;\n content: attr(data-click);\n font-size: 14px;\n font-weight: 700;\n left: 50%;\n line-height: 1em;\n position: absolute;\n text-align: center;\n text-indent: 0;\n text-shadow: 1px 1px 2px #000;\n top: 50%;\n z-index: 999;\n}\n'),window.addEventListener("message",(function(e){var n,t,d,a,s=null===(n=e.data)||void 0===n?void 0:n.type;if("view"===s){var r,c,p,v,u=null===(r=e.data)||void 0===r?void 0:r.lastGraph;$("body > .shadeBoxWrap").remove();for(var h=0;h<(null==u?void 0:u.length);h++){var x=u[h].H_element_selector;$(x).removeClass("hina-click-area")}o=!1,window.removeEventListener("scroll",(function(){}),!0);for(var f=null===(c=e.data)||void 0===c||null===(p=c.viewData)||void 0===p?void 0:p[0],b=null===(v=[null==f?void 0:f.view100,null==f?void 0:f.view90,null==f?void 0:f.view80,null==f?void 0:f.view70,null==f?void 0:f.view60,null==f?void 0:f.view50,null==f?void 0:f.view40,null==f?void 0:f.view30,null==f?void 0:f.view20,null==f?void 0:f.view10])||void 0===v?void 0:v.map((function(e){return e+l})),y=new Array(10).fill(1).map((function(e,n){return 10*(n+1)})).reverse(),m=function(e){return"\n <span \n style='\n font-size:12px;\n position:absolute;\n padding: 0 12px;\n top: -24px;\n height: 26px;\n line-height: 26px;\n left: 0;\n background: #E6F1FB;\n color: #0174df;\n border-radius: 2px;\n '>\n ".concat(e,"%\n </span>\n ")},g=0;g<y.length;g++){var w=document.createElement("div");w.setAttribute("style","\n border-bottom: 1px dashed #0174df;\n height: 1px;\n width: 100%;\n position: absolute;\n top: 50px;\n z-index:999;\n "),w.setAttribute("class","viewBaseLineStyle");var _=f["view".concat(y[g])];w.style.top="".concat(_+l,"px"),0!==g?f["view".concat(y[g])]-f["view".concat(y[g-1])]>26&&(w.innerHTML=m(y[g])):f["view".concat(y[g])]>26&&(w.innerHTML=m(y[g])),document.body.appendChild(w)}var k=document.createElement("div");k.setAttribute("style","\n border-bottom: 1px solid #0174df;\n height: 1px;\n width: 100%;\n position: absolute;\n z-index: 9999;\n top: 0;\n "),k.setAttribute("class","viewMoveLineStyle"),document.body.appendChild(k),$(document).on("mousemove",(t=function(e){k.style.top="".concat(e.pageY,"px");var n=function(e,n){for(var t=0;t<e.length;t++)if(e[t]>n)return t}(b,e.pageY),t=y[n];k.innerHTML="\n <span \n style='\n font-size:12px;\n height:26px;\n line-height: 26px;\n background: #E6F1FB;\n color: #0174df;\n border-radius: 2px;\n left:50%;\n margin-left:-65px;\n position: absolute;\n top:-13px;\n padding: 0 5px;\n '>\n ".concat(t||0,"%的用户浏览到这里\n </span>\n ")},d=150,a=Date.now(),function(){var e=arguments;Date.now()-a>=d&&(t.apply(this,e),a=Date.now())}))}else if("click"===s){var E,H,B;o=!0,$("body > .viewBaseLineStyle").remove(),$("body > .viewMoveLineStyle").remove();var C=null===(E=e.data)||void 0===E?void 0:E.hotData,A=null===(H=e.data)||void 0===H?void 0:H.isResize,L=null===(B=e.data)||void 0===B?void 0:B.lastGraph;if(A&&$("body > .shadeBoxWrap").remove(),null==C||!C.length){for(var z=0;z<(null==L?void 0:L.length);z++){var T=L[z].H_element_selector;$(T).removeClass("hina-click-area")}return}for(var W=function(){var e,n,t,o,l,d,a,s,r=C[M];r.H_element_content;var c=r.H_element_selector;r.button_click_prop;var p=r.button_click_rate;r.button_click_times,r.button_click_users,r.his_H_element_content;var v=document.createElement("div");v.setAttribute("style","position: relative;\n "),v.setAttribute("class","hina-click-area");var u=function(e){var n=e.H_element_content;e.H_element_selector;var t=e.button_click_prop,o=e.button_click_rate,l=e.button_click_times,d=e.button_click_users,a=e.his_H_element_content,s="\n <div style='padding: 8px;'>\n <div style='color: #CACACA'>当前内容:</div>\n <div style='white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'>".concat(n||"-","</div>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 8px;'>\n <table style='width:100%;color:#fff;font-size:13px;background:#333;border:1px solid #333;'>\n <tr>\n <td>点击次数:</td>\n <td style='text-align:right;'>").concat(l,"</td>\n </tr>\n <tr>\n <td>点击人数:</td>\n <td style='text-align:right;'>").concat(d,"</td>\n </tr>\n <tr>\n <td>点击率:</td>\n <td style='text-align:right;'>").concat(o,"</td>\n </tr>\n <tr>\n <td>点击占比:</td>\n <td style='text-align:right;'>").concat(t,"</td>\n </tr>\n </table>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 8px;'>\n <div style='color: #CACACA;'>历史内容:</div>\n <div style='white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'>").concat(a||"-","</div>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 6px 8px;' class='user-list' hina-tag-disable='true'>\n <p style='color:#2a90e2;text-decoration: none;'>查看用户列表</p>\n </div>\n "),r=document.createElement("div");return document.body.appendChild(r),r.setAttribute("class","shadeBoxWrap"),r.setAttribute("style","\n border-radius:3px;\n display: none;\n border:1px solid #000;\n cursor: pointer;\n position: absolute;\n left:0;\n top:0;\n background: #333;\n line-height:24px;\n font-size:13px;\n width:".concat(220,"px;\n height:").concat(i,"px;\n color: #fff;\n box-shadow: 0 2px 4px rgba(0,0,0,0.24);\n z-index:9999;\n ")),r.innerHTML=s,r}(C[M]),h=null===(e=$(c))||void 0===e||null===(n=e.offset())||void 0===n?void 0:n.left,x=window.scrollY,f=$(window).width(),b=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,y=null===(t=$(c))||void 0===t||null===(o=t.position())||void 0===o?void 0:o.top,m=null===(l=$(c))||void 0===l||null===(d=l.offset())||void 0===d?void 0:d.top,g=null===(a=$(c))||void 0===a?void 0:a.css("width"),w=null===(s=$(c))||void 0===s?void 0:s.css("height");$(c).addClass("hina-click-area"),$(c).css("position","relative"),$("".concat(c,":before")).css("position","absolute"),$(c).attr("data-click",p),[g,w,"undefined"].includes("0px")&&($(c).removeClass("display","inline-block"),$(c).css("width","15px"),$(c).css("height","15px")),$(c).mouseenter((function(){if($("body > .shadeBoxWrap > .user-list > p").attr("drillSelector",c),m<50?$("body > .shadeBoxWrap").css("position","fixed"):$("body > .shadeBoxWrap").css("position","absolute"),u.style.display="block",f-h<220)return u.style.left="".concat(h-220,"px"),void(u.style.top="".concat(m>i?m+parseFloat(w)-i:m,"px"));u.style.left="".concat(h,"px"),b-m>i?window.scrollY>i?u.style.top="".concat(y+parseFloat(w),"px"):u.style.top="".concat(m+parseFloat(w)-x,"px"):u.style.top="".concat(m-i,"px")})),$(c).mouseleave((function(){$("body > .shadeBoxWrap").css("display","none")})),u.addEventListener("mouseenter",(function(){u.style.display="block"})),u.addEventListener("mouseleave",(function(){$("body > .shadeBoxWrap").css("display","none")}))},M=0;M<(null==C?void 0:C.length);M++)W();$("body > .shadeBoxWrap > .user-list > p").on("click",(function(n){var t,o,i;e.stopPropagation(),window.parent.postMessage({eleSelector:null==n||null===(t=n.target)||void 0===t||null===(o=t.attributes)||void 0===o||null===(i=o.drillselector)||void 0===i?void 0:i.value},"*")}))}}),!1),window.addEventListener("scroll",(e=function(){o&&window.parent.postMessage({isRefush:!0},"*")},n=800,t=null,function(){null!==t&&clearTimeout(t),t=setTimeout(e,n)}),!0)})),document.head.appendChild(e)},"function"==typeof define&&define.amd?define(e):e();
|
package/package.json
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
{
|
2
2
|
"name": "hina-cloud-js-sdk",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.4",
|
4
4
|
"description": "hinaCloud javascript sdk",
|
5
5
|
"main": "build/hina.min.js",
|
6
6
|
"jsnext:main": "build/hina.esm.min.js",
|
7
|
-
|
8
7
|
"scripts": {
|
9
8
|
"test": "echo \"Error: no test specified\" && exit 1",
|
10
9
|
"build": "rollup -c",
|
@@ -19,8 +18,9 @@
|
|
19
18
|
},
|
20
19
|
"keywords": [
|
21
20
|
"sdk",
|
22
|
-
"
|
23
|
-
"
|
21
|
+
"hinaCloud",
|
22
|
+
"hina-cloud-js-sdk",
|
23
|
+
"hinaCloudJsSdk"
|
24
24
|
],
|
25
25
|
"devDependencies": {
|
26
26
|
"@babel/cli": "^7.23.9",
|
@@ -43,6 +43,8 @@
|
|
43
43
|
"@sentry/browser": "^7.105.0",
|
44
44
|
"axios": "^1.6.7",
|
45
45
|
"crypto": "^1.0.1",
|
46
|
+
"hina-cloud-js-sdk": "^3.1.3",
|
47
|
+
"jquery": "^3.7.1",
|
46
48
|
"mobile-detect": "^1.4.5",
|
47
49
|
"raven-js": "^3.27.2"
|
48
50
|
}
|