@sheerid/jslib 1.109.0 → 1.110.0

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.
Files changed (50) hide show
  1. package/README.md +36 -0
  2. package/es5/Tmetrix.bundle.js +5 -5
  3. package/es5/messages_ar.bundle.js +5 -5
  4. package/es5/messages_bg.bundle.js +5 -5
  5. package/es5/messages_cs.bundle.js +5 -5
  6. package/es5/messages_da.bundle.js +5 -5
  7. package/es5/messages_de.bundle.js +5 -5
  8. package/es5/messages_el.bundle.js +5 -5
  9. package/es5/messages_en-GB.bundle.js +5 -5
  10. package/es5/messages_es-ES.bundle.js +5 -5
  11. package/es5/messages_es.bundle.js +5 -5
  12. package/es5/messages_fi.bundle.js +5 -5
  13. package/es5/messages_fr-CA.bundle.js +5 -5
  14. package/es5/messages_fr.bundle.js +5 -5
  15. package/es5/messages_ga.bundle.js +5 -5
  16. package/es5/messages_hr.bundle.js +5 -5
  17. package/es5/messages_hu.bundle.js +5 -5
  18. package/es5/messages_id.bundle.js +5 -5
  19. package/es5/messages_it.bundle.js +5 -5
  20. package/es5/messages_iw.bundle.js +5 -5
  21. package/es5/messages_ja.bundle.js +5 -5
  22. package/es5/messages_ko.bundle.js +5 -5
  23. package/es5/messages_lo.bundle.js +5 -5
  24. package/es5/messages_lt.bundle.js +5 -5
  25. package/es5/messages_ms.bundle.js +5 -5
  26. package/es5/messages_nl.bundle.js +5 -5
  27. package/es5/messages_no.bundle.js +5 -5
  28. package/es5/messages_pl.bundle.js +5 -5
  29. package/es5/messages_pt-BR.bundle.js +5 -5
  30. package/es5/messages_pt.bundle.js +5 -5
  31. package/es5/messages_ru.bundle.js +5 -5
  32. package/es5/messages_sk.bundle.js +5 -5
  33. package/es5/messages_sl.bundle.js +5 -5
  34. package/es5/messages_sr.bundle.js +5 -5
  35. package/es5/messages_sv.bundle.js +5 -5
  36. package/es5/messages_th.bundle.js +5 -5
  37. package/es5/messages_tr.bundle.js +5 -5
  38. package/es5/messages_zh-HK.bundle.js +5 -5
  39. package/es5/messages_zh.bundle.js +5 -5
  40. package/manifest.json +44 -44
  41. package/package.json +1 -1
  42. package/sheerid-requestOrg.css +4 -4
  43. package/sheerid-requestOrg.js +5 -5
  44. package/sheerid-utils.js +5 -5
  45. package/sheerid.css +4 -4
  46. package/sheerid.js +6 -6
  47. package/sheerid.js.map +1 -1
  48. package/sheerides6.js +7 -6
  49. package/sheerides6.js.map +1 -1
  50. package/types-reference.zip +0 -0
package/README.md CHANGED
@@ -104,3 +104,39 @@ You will want to provide localized messaging for your field, which can be done w
104
104
  **Note:** placeholder and label message keys are automatically formulated based on the fieldId: `${fieldId}Placeholder` and `${fieldId}Label`
105
105
 
106
106
  See it in action: https://jsfiddle.net/AaronSheerID/n91p2sya/
107
+
108
+ ## Hooks
109
+
110
+ Hooks are a convenient way to run your own javascript function(s) when the core jslib does certain things. They are helpful because you don't need to know a lot about the system to do certain things at certain times.
111
+
112
+ To add a hook, call addHook with the HookName and a callback. The callback will be passed relevant parameter(s) that you may or may not choose to utilize.
113
+
114
+ ```javascript
115
+ sheerId.addHook({
116
+ name: "ON_VERIFICATION_SUCCESS",
117
+ callback: function (verificationResponse) {
118
+ window.location = "new.html";
119
+ },
120
+ });
121
+ ```
122
+
123
+ At the time of writing, there are 3 hooks you can use:
124
+
125
+ `ON_VERIFICATION_READY`
126
+
127
+ When the page loads, several api requests take place. Once they've all returned, and the library has initialized, ON_VERIFICATION_READY is called. After calling this hook once, your callbacks are removed/reset to ensure this happens only once per page-load (UX-346)
128
+
129
+ Your callback is given the `VerificationResponse` object
130
+
131
+ `ON_VERIFICATION_SUCCESS`
132
+
133
+ Called right after the API responds with the success step, but before the viewModel is updated in response to that API response.
134
+
135
+ Your callback is given the `VerificationResponse` object
136
+
137
+ `ON_VERIFICATION_STEP_CHANGE`
138
+
139
+ Called any time the current viewModel's step is different from the API response (just received)'s step. In other words, when the library determines we're about to display a different step.
140
+ Your callback is given the `VerificationResponse` object
141
+
142
+ See it in action [here](https://jsfiddle.net/AaronSheerID/adnj61ke/)
@@ -1,10 +1,10 @@
1
1
  /*!
2
2
  *
3
- * VERSION: 1.109.0
4
- * BUILD_TIMESTAMP: 1659985090713
5
- * BUILD_DATE: Mon Aug 08 2022 18:58:10 GMT+0000 (Coordinated Universal Time)
6
- * BUILD_COMMIT: ad2320d3b2f9cbe444c1e33fcb9bd5455909a348
3
+ * VERSION: 1.110.0
4
+ * BUILD_TIMESTAMP: 1660161598452
5
+ * BUILD_DATE: Wed Aug 10 2022 19:59:58 GMT+0000 (Coordinated Universal Time)
6
+ * BUILD_COMMIT: e019d7efee01556c21974b75ef771e1ec6013d4f
7
7
  *
8
8
  */
9
- window.sheerIdCurrentScript=document.currentScript,window.sheerIdEs5="true",window.sheerIdPubV="1.109.0",(window.webpackJsonpsheerid=window.webpackJsonpsheerid||[]).push([[0],{516:function(e,t,n){"use strict";n.r(t),n.d(t,"ThreatMetrix",(function(){return r}));const r=(()=>{let e=window.hp_frame||null,t=window.tmx_frame||null,n=window.tmx_script||null;var r=r||{};return r.version=3,r.create_url=function(e,t,n,c,o){function i(){return Math.floor(2742745743359*Math.random())}function u(){return a(i())}function a(e){return(e+78364164096).toString(36)}var s=i(),l=i(),d=885187064159;l=((l=l-l%256+r.version)+s)%2742745743359,d=(d+s)%2742745743359;var p="https://"+e+"/"+(s=u()+a(s))+t,m=[(l=a(d)+a(l))+"="+n,u()+u()+"="+c];return void 0!==o&&o.length>0&&m.push(u()+u()+"="+o),p+"?"+m.join("&")},r.beacon=function(e,t,n,r){var c="turn:aa.online-metrix.net?transport=",o="1:"+t+":"+n,i={iceServers:[{urls:c+"tcp",username:o,credential:n},{urls:c+"udp",username:o,credential:n}]};try{var u=new RTCPeerConnection(i);u.createDataChannel(Math.random().toString());var a=function(){},s=function(e){u.setLocalDescription(e,a,a)};"undefined"==typeof Promise||u.createOffer.length>0?u.createOffer(s,a):u.createOffer().then(s,a)}catch(e){}},r.load_tags=function(e,t,n,c){r.beacon(e,t,n,c);var o=document.getElementsByTagName("head").item(0),i=document.createElement("script");i.id="tmx_tags_js",i.setAttribute("type","text/javascript");var u=r.create_url(e,".js",t,n,c);i.setAttribute("src",u),r.set_csp_nonce(i),o.appendChild(i)},r.load_iframe_tags=function(e,t,n,c){r.beacon(e,t,n,c);var o=r.create_url(e,".htm",t,n,c),i=document.createElement("iframe");i.title="empty",i.setAttribute("aria-disabled","true"),i.width="0",i.height="0",i.setAttribute("style","color:rgba(0,0,0,0); float:left; position:absolute; top:-200; left:-200; border:0px"),i.setAttribute("src",o),document.body.appendChild(i)},r.csp_nonce=null,r.register_csp_nonce=function(e){if(void 0!==e.currentScript&&null!==e.currentScript){var t=e.currentScript.getAttribute("nonce");null!=t&&""!==t?r.csp_nonce=t:void 0!==e.currentScript.nonce&&null!==e.currentScript.nonce&&""!==e.currentScript.nonce&&(r.csp_nonce=e.currentScript.nonce)}},r.set_csp_nonce=function(e){null!==r.csp_nonce&&(e.setAttribute("nonce",r.csp_nonce),e.getAttribute("nonce")!==r.csp_nonce&&(e.nonce=r.csp_nonce))},r.cleanup=function(){for(;null!==(e=document.getElementById("tdz_ifrm"));)e.parentElement.removeChild(e);for(;null!==(t=document.getElementById("tmx_tags_iframe"));)t.parentElement.removeChild(t);for(;null!==(n=document.getElementById("tmx_tags_js"));)n.parentElement.removeChild(n)},r.profile=function(e,t,n,c){r.cleanup(),r.register_csp_nonce(document),r.load_tags(e,t,n,c)},r.profile_iframe=function(e,t,n,c){r.cleanup(),r.register_csp_nonce(document),r.load_iframe_tags(e,t,n,c)},r})()}}]);
9
+ window.sheerIdCurrentScript=document.currentScript,window.sheerIdEs5="true",window.sheerIdPubV="1.110.0",(window.webpackJsonpsheerid=window.webpackJsonpsheerid||[]).push([[0],{516:function(e,t,n){"use strict";n.r(t),n.d(t,"ThreatMetrix",(function(){return r}));const r=(()=>{let e=window.hp_frame||null,t=window.tmx_frame||null,n=window.tmx_script||null;var r=r||{};return r.version=3,r.create_url=function(e,t,n,c,o){function i(){return Math.floor(2742745743359*Math.random())}function u(){return a(i())}function a(e){return(e+78364164096).toString(36)}var s=i(),l=i(),d=885187064159;l=((l=l-l%256+r.version)+s)%2742745743359,d=(d+s)%2742745743359;var p="https://"+e+"/"+(s=u()+a(s))+t,m=[(l=a(d)+a(l))+"="+n,u()+u()+"="+c];return void 0!==o&&o.length>0&&m.push(u()+u()+"="+o),p+"?"+m.join("&")},r.beacon=function(e,t,n,r){var c="turn:aa.online-metrix.net?transport=",o="1:"+t+":"+n,i={iceServers:[{urls:c+"tcp",username:o,credential:n},{urls:c+"udp",username:o,credential:n}]};try{var u=new RTCPeerConnection(i);u.createDataChannel(Math.random().toString());var a=function(){},s=function(e){u.setLocalDescription(e,a,a)};"undefined"==typeof Promise||u.createOffer.length>0?u.createOffer(s,a):u.createOffer().then(s,a)}catch(e){}},r.load_tags=function(e,t,n,c){r.beacon(e,t,n,c);var o=document.getElementsByTagName("head").item(0),i=document.createElement("script");i.id="tmx_tags_js",i.setAttribute("type","text/javascript");var u=r.create_url(e,".js",t,n,c);i.setAttribute("src",u),r.set_csp_nonce(i),o.appendChild(i)},r.load_iframe_tags=function(e,t,n,c){r.beacon(e,t,n,c);var o=r.create_url(e,".htm",t,n,c),i=document.createElement("iframe");i.title="empty",i.setAttribute("aria-disabled","true"),i.width="0",i.height="0",i.setAttribute("style","color:rgba(0,0,0,0); float:left; position:absolute; top:-200; left:-200; border:0px"),i.setAttribute("src",o),document.body.appendChild(i)},r.csp_nonce=null,r.register_csp_nonce=function(e){if(void 0!==e.currentScript&&null!==e.currentScript){var t=e.currentScript.getAttribute("nonce");null!=t&&""!==t?r.csp_nonce=t:void 0!==e.currentScript.nonce&&null!==e.currentScript.nonce&&""!==e.currentScript.nonce&&(r.csp_nonce=e.currentScript.nonce)}},r.set_csp_nonce=function(e){null!==r.csp_nonce&&(e.setAttribute("nonce",r.csp_nonce),e.getAttribute("nonce")!==r.csp_nonce&&(e.nonce=r.csp_nonce))},r.cleanup=function(){for(;null!==(e=document.getElementById("tdz_ifrm"));)e.parentElement.removeChild(e);for(;null!==(t=document.getElementById("tmx_tags_iframe"));)t.parentElement.removeChild(t);for(;null!==(n=document.getElementById("tmx_tags_js"));)n.parentElement.removeChild(n)},r.profile=function(e,t,n,c){r.cleanup(),r.register_csp_nonce(document),r.load_tags(e,t,n,c)},r.profile_iframe=function(e,t,n,c){r.cleanup(),r.register_csp_nonce(document),r.load_iframe_tags(e,t,n,c)},r})()}}]);
10
10
  //# sourceMappingURL=Tmetrix.bundle.js.map