@saasquatch/mint-components 1.6.3-8 → 1.6.3
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.
- package/dist/cjs/{sqm-portal-email-verification-view-bb8f5aa0.js → sqm-portal-email-verification-view-155695c8.js} +24 -3
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +29 -15
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +44 -49
- package/dist/collection/components/sqm-portal-email-verification/PortalEmailVerification.stories.js +40 -46
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification-view.js +24 -3
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +4 -4
- package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +26 -12
- package/dist/esm/{sqm-portal-email-verification-view-0170c6d1.js → sqm-portal-email-verification-view-99ca4596.js} +24 -3
- package/dist/esm/sqm-portal-email-verification.entry.js +29 -15
- package/dist/esm/sqm-stencilbook.entry.js +44 -49
- package/dist/esm-es5/sqm-portal-email-verification-view-99ca4596.js +1 -0
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-2e308c1b.system.js +1 -1
- package/dist/mint-components/p-91f457ae.js +1 -0
- package/dist/mint-components/p-a47719a1.entry.js +1 -0
- package/dist/mint-components/p-be206a97.system.js +1 -0
- package/dist/mint-components/p-c4c53efb.entry.js +9 -0
- package/dist/mint-components/p-e344d860.system.entry.js +1 -0
- package/dist/mint-components/p-ef696d05.system.entry.js +1 -0
- package/dist/types/components/sqm-portal-email-verification/PortalEmailVerification.stories.d.ts +1 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/sqm-portal-email-verification-view-0170c6d1.js +0 -1
- package/dist/mint-components/p-07c6faa1.system.js +0 -1
- package/dist/mint-components/p-084e1dc5.system.entry.js +0 -1
- package/dist/mint-components/p-5d6cef84.system.entry.js +0 -1
- package/dist/mint-components/p-62ed88a1.js +0 -1
- package/dist/mint-components/p-a2f4ff8d.entry.js +0 -9
- package/dist/mint-components/p-bd77e569.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function o(e){try{u(i.next(e))}catch(e){a(e)}}function s(e){try{u(i["throw"](e))}catch(e){a(e)}}function u(e){e.done?n(e.value):r(e.value).then(o,s)}u((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,r,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return u([e,t])}}function u(o){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(a=o[0]&2?r["return"]:o[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;if(r=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;r=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1];a=o;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(o);break}if(a[2])n.ops.pop();n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e];r=0}finally{i=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-ff17b3a4.system.js","./p-d4ee07e6.system.js","./p-1fcd03ba.system.js","./p-99397ef5.system.js","./p-7682724f.system.js","./p-4bd679a7.system.js","./p-f6934a55.system.js","./p-1a673057.system.js","./p-3ea8021b.system.js","./p-be206a97.system.js"],(function(e){"use strict";var t,n,i,r,a,o,s,u,c,l,f,v,d,m;return{setters:[function(e){t=e.r;n=e.h},function(e){i=e.i;r=e.j;a=e.f;o=e.m},function(){},function(e){s=e.u},function(e){u=e.t;c=e.B;l=e.N;f=e.f;v=e.i},function(e){d=e.c},function(){},function(){},function(){},function(e){m=e.P}],execute:function(){function h(e){var t=this;var n,o,v,d,m,h,g,y,p;var b=u(),w=b[0],_=b[1],M=_.loading,x=_.data,S=_.errors;var k=c(),E=k[0],I=k[1],P=I.data,j=I.loading;var V=l();var L=(n=V===null||V===void 0?void 0:V.managedIdentity)===null||n===void 0?void 0:n.email;var B=new URLSearchParams(f.location.search);var T=B.get("nextPage");var H=i(false),R=H[0],q=H[1];var C=i(""),A=C[0],N=C[1];var D=i(10),G=D[0],U=D[1];var z=r(undefined);var F=r(undefined);var J=function(){return __awaiter(t,void 0,void 0,(function(){var t,n,i,r,a;return __generator(this,(function(o){switch(o.label){case 0:if(!L)return[2];N("");q(false);n=T?{nextPage:T}:null;i=e.redirectPath;r={email:L,urlParams:n,redirectPath:i};return[4,w(r)];case 1:a=o.sent();if(a instanceof Error){if(a.message)N("Network request failed.");return[2]}if((t=a.requestManagedIdentityVerificationEmail)===null||t===void 0?void 0:t.success)q(true);return[2]}}))}))};function K(){return __awaiter(this,void 0,void 0,(function(){var t,n;return __generator(this,(function(i){switch(i.label){case 0:return[4,E()];case 1:n=i.sent();if((t=n===null||n===void 0?void 0:n.managedIdentitySession)===null||t===void 0?void 0:t.emailVerified){clearInterval(z.current);return[2,f.push({pathname:e.redirectPath,search:B.toString()&&"?"+B.toString()})]}W(10);return[2]}}))}))}var O=function(e){if(e===void 0){e=1e4}return setInterval(K,e)};var Q=function(e){return setInterval((function(){return U(e)}),1e3)};function W(e){clearInterval(F.current);clearInterval(z.current);if(document.visibilityState==="hidden")return;if(e)U(e);var t=G||10;F.current=Q(e-1||t-1);z.current=O(e*1e3||t*1e3)}var X=s((function(){return W()}),[G]);a((function(){if(!z.current){K();z.current=O()}return function(){clearInterval(z.current)}}),[]);a((function(){if(G>0){clearInterval(F.current);F.current=Q(G-1)}document.addEventListener("visibilitychange",X);return function(){clearInterval(F.current);document.removeEventListener("visibilitychange",X)}}),[G]);return{states:{loading:M,error:((m=(d=(v=(o=S===null||S===void 0?void 0:S.response)===null||o===void 0?void 0:o.errors)===null||v===void 0?void 0:v[0])===null||d===void 0?void 0:d.extensions)===null||m===void 0?void 0:m.message)||((y=(g=(h=S===null||S===void 0?void 0:S.response)===null||h===void 0?void 0:h.errors)===null||g===void 0?void 0:g[0])===null||y===void 0?void 0:y.message)||A,success:R,loadingVerification:j,isVerified:!!((p=P===null||P===void 0?void 0:P.managedIdentitySession)===null||p===void 0?void 0:p.emailVerified),countdown:G},callbacks:{submit:J},content:{email:L,verifyMessage:e.verifyMessage,emailVerificationHeader:e.emailVerificationHeader,resendEmailButtonText:e.resendEmailButtonText,verificationLoadingMessage:e.verificationLoadingMessage,verificationStatusMessage:e.verificationStatusMessage}}}var g=e("sqm_portal_email_verification",function(){function e(e){t(this,e);this.ignored=true;this.redirectPath="/verifyEmail";this.emailVerificationHeader="Verify your email";this.resendEmailButtonText="Re-send Email";this.verifyMessage="A verification email was sent to {email}. Please verify your email to continue to the portal. Resending an email will invalidate the previous email.";this.verificationStatusMessage="Checking verification status in {countdown}";this.verificationLoadingMessage="Checking verification status";o(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=v()?y(this):h(this),t=e.states,i=e.callbacks,r=e.content;return n(m,{states:t,callbacks:i,content:r})};return e}());function y(e){var t=this;return d({states:{error:"",loading:false,success:false,countdown:10},callbacks:{submit:function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){return[2]}))}))}},content:{email:"test@example.com",verifyMessage:"A verification email was sent to {email}. Please verify your email to continue to the portal.",emailVerificationHeader:"Verify your email",resendEmailButtonText:"Re-send Email",verificationLoadingMessage:e.verificationLoadingMessage,verificationStatusMessage:e.verificationStatusMessage}},e.demoData||{},{arrayMerge:function(e,t){return t}})}}}}));
|