@saasquatch/mint-components 1.15.0-148 → 1.15.0-149
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/{IndirectTaxDetailsView-289b985c.js → IndirectTaxDetailsView-179e1891.js} +2 -2
- package/dist/cjs/{ShadowViewAddon-2430688a.js → ShadowViewAddon-2f76675c.js} +1 -1
- package/dist/cjs/{global-11520bfd.js → global-a02b0459.js} +7 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +4 -4
- package/dist/cjs/sqm-big-stat_44.cjs.entry.js +2 -2
- package/dist/cjs/sqm-code-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-email-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +1 -1
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-email-verification-view-1a64ba3e.js → sqm-portal-email-verification-view-e819c021.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-profile-view-dc7a903a.js → sqm-portal-profile-view-284e1c10.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +6 -6
- package/dist/cjs/sqm-tax-and-cash.cjs.entry.js +2 -2
- package/dist/cjs/{utils-946925a3.js → utils-a4a91484.js} +1 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +1 -1
- package/dist/collection/global/styles.js +7 -2
- package/dist/collection/global/styles.ts +7 -2
- package/dist/esm/{IndirectTaxDetailsView-bc358cf9.js → IndirectTaxDetailsView-f85b8b8d.js} +2 -2
- package/dist/esm/{ShadowViewAddon-6b496f71.js → ShadowViewAddon-b84ca8b8.js} +1 -1
- package/dist/esm/{global-9d1a4cb0.js → global-c523803e.js} +7 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_10.entry.js +4 -4
- package/dist/esm/sqm-big-stat_44.entry.js +2 -2
- package/dist/esm/sqm-code-verification.entry.js +1 -1
- package/dist/esm/sqm-email-verification.entry.js +1 -1
- package/dist/esm/sqm-empty_4.entry.js +1 -1
- package/dist/esm/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm/sqm-pagination_3.entry.js +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-bf8a0cb6.js → sqm-portal-email-verification-view-1c128788.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
- package/dist/esm/{sqm-portal-profile-view-f90627d5.js → sqm-portal-profile-view-4ca7fecf.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +6 -6
- package/dist/esm/sqm-tax-and-cash.entry.js +2 -2
- package/dist/esm/{utils-7c51671c.js → utils-b2440ba5.js} +1 -1
- package/dist/esm-es5/{IndirectTaxDetailsView-bc358cf9.js → IndirectTaxDetailsView-f85b8b8d.js} +1 -1
- package/dist/esm-es5/{ShadowViewAddon-6b496f71.js → ShadowViewAddon-b84ca8b8.js} +1 -1
- package/dist/esm-es5/{global-9d1a4cb0.js → global-c523803e.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_44.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-bf8a0cb6.js → sqm-portal-email-verification-view-1c128788.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-f90627d5.js → sqm-portal-profile-view-4ca7fecf.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-tax-and-cash.entry.js +1 -1
- package/dist/esm-es5/{utils-7c51671c.js → utils-b2440ba5.js} +1 -1
- package/dist/mint-components/global/styles.ts +7 -2
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/p-079d7023.entry.js +33 -0
- package/dist/mint-components/{p-7cee89b4.entry.js → p-0f131ab6.entry.js} +1 -1
- package/dist/mint-components/{p-32a70666.entry.js → p-1a3d738e.entry.js} +1 -1
- package/dist/mint-components/{p-36185056.system.js → p-22df47d6.system.js} +1 -1
- package/dist/mint-components/{p-bf6a1be4.js → p-253d102d.js} +1 -1
- package/dist/mint-components/{p-5a8df89a.system.entry.js → p-291342b2.system.entry.js} +1 -1
- package/dist/mint-components/{p-84bd5055.entry.js → p-2a237eac.entry.js} +1 -1
- package/dist/mint-components/{p-5187c23f.entry.js → p-35e4461d.entry.js} +1 -1
- package/dist/mint-components/{p-ba4220e0.system.entry.js → p-38c0257c.system.entry.js} +1 -1
- package/dist/mint-components/{p-43eb34e7.system.entry.js → p-3bdb3fb6.system.entry.js} +1 -1
- package/dist/mint-components/{p-1777b905.js → p-3e12f609.js} +1 -1
- package/dist/mint-components/{p-a338c309.system.entry.js → p-3eb1ac6e.system.entry.js} +1 -1
- package/dist/mint-components/{p-3a3087d0.entry.js → p-4a746954.entry.js} +2 -2
- package/dist/mint-components/{p-fc802ddc.system.js → p-5d287c6d.system.js} +1 -1
- package/dist/mint-components/{p-32cbe466.system.entry.js → p-73332d2b.system.entry.js} +1 -1
- package/dist/mint-components/{p-7958b09e.js → p-762193bb.js} +1 -1
- package/dist/mint-components/{p-cffdd852.system.js → p-7de175a7.system.js} +1 -1
- package/dist/mint-components/{p-ef704139.js → p-7e0d1e4c.js} +33 -33
- package/dist/mint-components/{p-29ca9724.entry.js → p-8056908f.entry.js} +1 -1
- package/dist/mint-components/{p-543e09fc.system.entry.js → p-82065cc0.system.entry.js} +1 -1
- package/dist/mint-components/{p-b6ecc813.entry.js → p-842e0395.entry.js} +1 -1
- package/dist/mint-components/{p-ffcd0480.system.js → p-855e0ee8.system.js} +1 -1
- package/dist/mint-components/{p-165f2d04.system.js → p-92dd2dd8.system.js} +1 -1
- package/dist/mint-components/{p-8ca624ef.system.entry.js → p-99523d06.system.entry.js} +1 -1
- package/dist/mint-components/{p-5ab953fb.system.entry.js → p-998bb48c.system.entry.js} +1 -1
- package/dist/mint-components/{p-c97fdb5a.entry.js → p-9f3fcaaf.entry.js} +1 -1
- package/dist/mint-components/{p-e6ea1352.entry.js → p-a667bee3.entry.js} +1 -1
- package/dist/mint-components/{p-14062929.system.entry.js → p-b3c04f8e.system.entry.js} +1 -1
- package/dist/mint-components/{p-063d6117.system.entry.js → p-b4b12848.system.entry.js} +1 -1
- package/dist/mint-components/{p-cbe3c826.entry.js → p-b98203d7.entry.js} +2 -2
- package/dist/mint-components/{p-17be73e0.js → p-c41a84ab.js} +1 -1
- package/dist/mint-components/{p-a5f92a16.system.entry.js → p-c7c33044.system.entry.js} +1 -1
- package/dist/mint-components/{p-b5ff31d9.system.js → p-d42c2c19.system.js} +1 -1
- package/dist/mint-components/{p-3fdb05d0.entry.js → p-df99fec4.entry.js} +1 -1
- package/dist/mint-components/{p-d065ba7a.system.js → p-e068fcc3.system.js} +1 -1
- package/dist/mint-components/{p-e21e4bf4.system.entry.js → p-ea271cae.system.entry.js} +1 -1
- package/dist/mint-components/{p-0576746e.entry.js → p-f5bb8e1b.entry.js} +1 -1
- package/dist/mint-components/{p-aacfe5b3.system.entry.js → p-faefb1c3.system.entry.js} +1 -1
- package/dist/mint-components/{p-f72f285c.js → p-fb139454.js} +1 -1
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/mint-components/p-8d67100f.entry.js +0 -33
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as r,r as t}from"./p-c7c11325.js";import{i as a}from"./p-
|
|
1
|
+
import{h as r,r as t}from"./p-c7c11325.js";import{i as a}from"./p-7e0d1e4c.js";import{k as o,f as n,n as e}from"./p-63e29387.js";import{d as s,t as i,w as l,J as p,$ as c,i as d,p as u}from"./p-0ec54f97.js";import{c as m}from"./p-c1086930.js";import{g as b}from"./p-6951663b.js";import{c as f}from"./p-cef45012.js";import{T as v}from"./p-204861a6.js";import{S as h,V as y}from"./p-38c7775a.js";import{u as q}from"./p-c30ad421.js";const x=s.gql`
|
|
2
2
|
mutation upsertUser($userInput: UserInput!) {
|
|
3
3
|
upsertUser(userInput: $userInput) {
|
|
4
4
|
id
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __makeTemplateObject=this&&this.__makeTemplateObject||function(t,e){if(Object.defineProperty){Object.defineProperty(t,"raw",{value:e})}else{t.raw=e}return t};var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var e,n=1,a=arguments.length;n<a;n++){e=arguments[n];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}return t};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(t,e,n,a){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function i(t){try{l(a.next(t))}catch(t){o(t)}}function s(t){try{l(a["throw"](t))}catch(t){o(t)}}function l(t){t.done?n(t.value):r(t.value).then(i,s)}l((a=a.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},a,r,o,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return l([t,e])}}function l(i){if(a)throw new TypeError("Generator is already executing.");while(n)try{if(a=1,r&&(o=i[0]&2?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;if(r=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;r=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){n.label=i[1];break}if(i[0]===6&&n.label<o[1]){n.label=o[1];o=i;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(i);break}if(o[2])n.ops.pop();n.trys.pop();continue}i=e.call(t,n)}catch(t){i=[6,t];r=0}finally{a=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-59b028db.system.js","./p-ffcd0480.system.js","./p-4f5329a2.system.js","./p-171310d9.system.js","./p-4bd679a7.system.js","./p-15bfd7e2.system.js","./p-1a673057.system.js","./p-17a0f310.system.js","./p-8a6494c7.system.js","./p-c210374a.system.js"],(function(t){"use strict";var e,n,a,r,o,i,s,l,u,c,d,p,f,v,g,y,h,m,b,x,C,T;return{setters:[function(t){e=t.h;n=t.F;a=t.r},function(t){r=t.i},function(t){o=t.n;i=t.k},function(t){s=t.F;l=t.i;u=t.d;c=t.H;d=t.J;p=t.B;f=t.w;v=t.$},function(t){g=t.c},function(t){y=t.g},function(t){h=t.c},function(t){m=t.R;b=t.a;x=t.S;C=t.u},function(){},function(t){T=t.C}],execute:function(){var _={Container:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"var(--sl-spacing-small)",width:"100%"},TextContainer:{display:"flex",gap:"var(--sl-spacing-xx-small)"}};var w=h(_);var P=w.toString();function S(t){var a=t.states,r=t.callbacks,o=t.text,i=t.buttonType;var s=r.onNext,l=r.onPrev;var u=a.currentPage,c=a.totalPages,d=a.loading;if(c===1)return e(n,null);return e("span",{class:w.classes.Container,part:"sqm-base"},e("style",{type:"text/css"},P),!d&&e(n,null,e("sl-button",{exportparts:"base: "+i+"button-base",onClick:l,part:"sqm-pagination-button",circle:true,disabled:u===1},e("sl-icon",{name:"chevron-left",label:"Previous Page"})),e("div",{class:w.classes.TextContainer},o.paginationText)),e("sl-button",{exportparts:"base: "+i+"button-base",onClick:s,part:"sqm-pagination-button",circle:true,disabled:u===c},e("sl-icon",{name:"chevron-right",label:"Previous Page"})))}function j(t){var e;var n=s(m);var a=n.states.currentPage+1;var o=(e=n.states)===null||e===void 0?void 0:e.pageCount;return{states:{currentPage:a,totalPages:o,loading:n.states.loading},callbacks:{onNext:function(){var t,e;return(t=n.callbacks)===null||t===void 0?void 0:t.setCurrentPage(((e=n.states)===null||e===void 0?void 0:e.currentPage)+1)},onPrev:function(){var t,e;return(t=n.callbacks)===null||t===void 0?void 0:t.setCurrentPage(((e=n.states)===null||e===void 0?void 0:e.currentPage)-1)}},text:{paginationText:r.formatMessage({id:"paginationText",defaultMessage:t.paginationText},{currentPage:a,totalPages:o})}}}var k=t("sqm_pagination",function(){function t(t){a(this,t);this.ignored=true;this.paginationText="{currentPage} of {totalPages}";this.buttonType="secondary";o(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t=l()?I(y(this)):j(y(this));return e(S,Object.assign({},t))};return t}());function I(t){var e=i(1),n=e[0],a=e[1];return g({states:{currentPage:n,totalPages:5,loading:false},buttonType:t.buttonType,callbacks:{onNext:function(){return a(n+1)},onPrev:function(){return a(n-1)}},text:{paginationText:r.formatMessage({id:"paginationText",defaultMessage:t.paginationText||"{currentPage} of {totalPages}"},{currentPage:n,totalPages:5})}},t.demoData||{},{arrayMerge:function(t,e){return e}})}var E=u.gql(__makeTemplateObject(["\n query getReferralCode($programId: ID) {\n user: viewer {\n ... on User {\n referralCode(programId: $programId)\n }\n }\n }\n"],["\n query getReferralCode($programId: ID) {\n user: viewer {\n ... on User {\n referralCode(programId: $programId)\n }\n }\n }\n"]));var M=u.gql(__makeTemplateObject(["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"],["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"]));function q(t){var e,n;var a=t.programId,r=a===void 0?c():a;var o=d();var l=p();var u=s(b);var g=f(E,{programId:r},!(o===null||o===void 0?void 0:o.jwt)||(u===null||u===void 0?void 0:u.referralCode)!==undefined).data;var y=v(M)[0];var h=v(x)[0];var m=(n=(u===null||u===void 0?void 0:u.referralCode)||((e=g===null||g===void 0?void 0:g.user)===null||e===void 0?void 0:e.referralCode))!==null&&n!==void 0?n:"...";var C=i(false),T=C[0],_=C[1];function w(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!u)return[3,2];return[4,h({referralCode:u.referralCode})];case 1:e.sent();u.refresh();e.label=2;case 2:navigator.clipboard.writeText(m);_(true);setTimeout((function(){return _(false)}),t.tooltiplifespan);y({eventMeta:{programId:r,id:o===null||o===void 0?void 0:o.id,accountId:o===null||o===void 0?void 0:o.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:l,shareMedium:"DIRECT"}}});return[2]}}))}))}return __assign(__assign({},t),{onClick:w,open:T,copyString:m,isCopied:u===null||u===void 0?void 0:u.isCopied,showNotificationText:t.showNotificationText&&!!(u===null||u===void 0?void 0:u.singleUse)})}var R=t("sqm_referral_code",function(){function t(t){a(this,t);this.tooltiptext="Copied to Clipboard";this.showNotificationText=false;this.notificationText="You've copied this code before";this.tooltiplifespan=1e3;this.textAlign="left";this.copyButtonLabel="Copy Code";this.buttonStyle="icon";this.buttonType="primary";o(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t=y(this);var n=l()?A(t):q(t);return e(T,Object.assign({},n))};return t}());function A(t){var e=i(false),n=e[0],a=e[1];var r="REFERRALCODE001";return g({copyString:r,tooltiptext:t.tooltiptext,textAlign:t.textAlign,copyButtonLabel:t.copyButtonLabel,buttonStyle:t.buttonStyle,notificationText:t.notificationText,showNotificationText:t.showNotificationText,isCopied:t.showNotificationText,borderColor:t.borderColor,backgroundColor:t.backgroundColor,textColor:t.textColor,borderRadius:t.borderRadius,buttonType:t.buttonType,isUsed:false,rewardStatus:"AVAILABLE",open:n,onClick:function(){navigator.clipboard.writeText(r);a(true);setTimeout((function(){return a(false)}),t.tooltiplifespan)}},t.demoData||{},{arrayMerge:function(t,e){return e}})}function O(t){var n=t.slots,a=t.titleText,r=t.states,o=t.textColor,i=o===void 0?"var(--sqm-text-subdued)":o;var s={Wrapper:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column",gap:"var(--sl-spacing-large)",color:i},HeaderContainer:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},ShareCodeContainer:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column"},ShareButtonContainer:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column"},TitleText:{fontSize:"var(--sl-font-size-large)",margin:"0"}};var l="\n :host {\n display: block;\n }\n :host([hidden]): {\n display: none;\n }\n ";var u=h(s);var c=u.toString();var d=function(t){if(t.noCodes){return n.empty}if(t.loading){return n.loading}return e("div",{class:u.classes.Wrapper},e("div",{class:u.classes.ShareCodeContainer},n.shareCodes),e("div",{class:u.classes.ShareButtonContainer},n.shareButtons))};return e("div",{class:u.classes.Wrapper,part:"sqm-base"},e("style",{type:"text/css"},l,c),e("div",{class:u.classes.HeaderContainer},e("h2",{class:u.classes.TitleText},a),!r.noCodes&&!r.loading&&n.pagination),d(r))}var U=t("sqm_referral_codes",function(){function t(t){a(this,t);this.titleText="Start sharing";this.emptyStateHeaderText="Your new codes and links aren’t ready yet";this.emptyStateDescriptionText="Please contact our program support team to let them know you’re out of codes.";this.emptyStateImageUrl="https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png";o(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t=y(this);var n=l()?$(t):C(t);var a={shareButtons:e("slot",{name:"shareButtons"}),shareCodes:e("slot",{name:"shareCodes"}),pagination:e("slot",{name:"pagination"}),empty:e(D,{headerText:this.emptyStateHeaderText,descriptionText:this.emptyStateDescriptionText,imageUrl:this.emptyStateImageUrl}),loading:e(N,null)};var r=__assign(__assign({slots:a},n),{loading:n.states.loading,noCodes:n.states.noCodes});return e(O,Object.assign({},r))};return t}());function D(t){var n=t.headerText,a=t.descriptionText,r=t.imageUrl;return e("slot",{name:"empty"},e("sqm-empty",{emptyStateHeader:n,emptyStateText:a,emptyStateImage:r}))}function N(){return e("slot",{name:"loading"},e(B,null),e(B,null),e(B,null),e(B,null))}function B(){return e("sl-skeleton",{style:{width:"100%"}})}function $(t){return g({titleText:t.titleText,textColor:t.textColor,states:{noCodes:false,loading:false}},t.demoData||{},{arrayMerge:function(t,e){return e}})}}}}));
|
|
1
|
+
var __makeTemplateObject=this&&this.__makeTemplateObject||function(t,e){if(Object.defineProperty){Object.defineProperty(t,"raw",{value:e})}else{t.raw=e}return t};var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var e,n=1,a=arguments.length;n<a;n++){e=arguments[n];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}return t};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(t,e,n,a){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function i(t){try{l(a.next(t))}catch(t){o(t)}}function s(t){try{l(a["throw"](t))}catch(t){o(t)}}function l(t){t.done?n(t.value):r(t.value).then(i,s)}l((a=a.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},a,r,o,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return l([t,e])}}function l(i){if(a)throw new TypeError("Generator is already executing.");while(n)try{if(a=1,r&&(o=i[0]&2?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;if(r=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;r=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){n.label=i[1];break}if(i[0]===6&&n.label<o[1]){n.label=o[1];o=i;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(i);break}if(o[2])n.ops.pop();n.trys.pop();continue}i=e.call(t,n)}catch(t){i=[6,t];r=0}finally{a=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-59b028db.system.js","./p-855e0ee8.system.js","./p-4f5329a2.system.js","./p-171310d9.system.js","./p-4bd679a7.system.js","./p-15bfd7e2.system.js","./p-1a673057.system.js","./p-17a0f310.system.js","./p-8a6494c7.system.js","./p-c210374a.system.js"],(function(t){"use strict";var e,n,a,r,o,i,s,l,u,c,d,p,f,v,g,y,h,m,b,x,C,T;return{setters:[function(t){e=t.h;n=t.F;a=t.r},function(t){r=t.i},function(t){o=t.n;i=t.k},function(t){s=t.F;l=t.i;u=t.d;c=t.H;d=t.J;p=t.B;f=t.w;v=t.$},function(t){g=t.c},function(t){y=t.g},function(t){h=t.c},function(t){m=t.R;b=t.a;x=t.S;C=t.u},function(){},function(t){T=t.C}],execute:function(){var _={Container:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"var(--sl-spacing-small)",width:"100%"},TextContainer:{display:"flex",gap:"var(--sl-spacing-xx-small)"}};var w=h(_);var P=w.toString();function S(t){var a=t.states,r=t.callbacks,o=t.text,i=t.buttonType;var s=r.onNext,l=r.onPrev;var u=a.currentPage,c=a.totalPages,d=a.loading;if(c===1)return e(n,null);return e("span",{class:w.classes.Container,part:"sqm-base"},e("style",{type:"text/css"},P),!d&&e(n,null,e("sl-button",{exportparts:"base: "+i+"button-base",onClick:l,part:"sqm-pagination-button",circle:true,disabled:u===1},e("sl-icon",{name:"chevron-left",label:"Previous Page"})),e("div",{class:w.classes.TextContainer},o.paginationText)),e("sl-button",{exportparts:"base: "+i+"button-base",onClick:s,part:"sqm-pagination-button",circle:true,disabled:u===c},e("sl-icon",{name:"chevron-right",label:"Previous Page"})))}function j(t){var e;var n=s(m);var a=n.states.currentPage+1;var o=(e=n.states)===null||e===void 0?void 0:e.pageCount;return{states:{currentPage:a,totalPages:o,loading:n.states.loading},callbacks:{onNext:function(){var t,e;return(t=n.callbacks)===null||t===void 0?void 0:t.setCurrentPage(((e=n.states)===null||e===void 0?void 0:e.currentPage)+1)},onPrev:function(){var t,e;return(t=n.callbacks)===null||t===void 0?void 0:t.setCurrentPage(((e=n.states)===null||e===void 0?void 0:e.currentPage)-1)}},text:{paginationText:r.formatMessage({id:"paginationText",defaultMessage:t.paginationText},{currentPage:a,totalPages:o})}}}var k=t("sqm_pagination",function(){function t(t){a(this,t);this.ignored=true;this.paginationText="{currentPage} of {totalPages}";this.buttonType="secondary";o(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t=l()?I(y(this)):j(y(this));return e(S,Object.assign({},t))};return t}());function I(t){var e=i(1),n=e[0],a=e[1];return g({states:{currentPage:n,totalPages:5,loading:false},buttonType:t.buttonType,callbacks:{onNext:function(){return a(n+1)},onPrev:function(){return a(n-1)}},text:{paginationText:r.formatMessage({id:"paginationText",defaultMessage:t.paginationText||"{currentPage} of {totalPages}"},{currentPage:n,totalPages:5})}},t.demoData||{},{arrayMerge:function(t,e){return e}})}var E=u.gql(__makeTemplateObject(["\n query getReferralCode($programId: ID) {\n user: viewer {\n ... on User {\n referralCode(programId: $programId)\n }\n }\n }\n"],["\n query getReferralCode($programId: ID) {\n user: viewer {\n ... on User {\n referralCode(programId: $programId)\n }\n }\n }\n"]));var M=u.gql(__makeTemplateObject(["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"],["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"]));function q(t){var e,n;var a=t.programId,r=a===void 0?c():a;var o=d();var l=p();var u=s(b);var g=f(E,{programId:r},!(o===null||o===void 0?void 0:o.jwt)||(u===null||u===void 0?void 0:u.referralCode)!==undefined).data;var y=v(M)[0];var h=v(x)[0];var m=(n=(u===null||u===void 0?void 0:u.referralCode)||((e=g===null||g===void 0?void 0:g.user)===null||e===void 0?void 0:e.referralCode))!==null&&n!==void 0?n:"...";var C=i(false),T=C[0],_=C[1];function w(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!u)return[3,2];return[4,h({referralCode:u.referralCode})];case 1:e.sent();u.refresh();e.label=2;case 2:navigator.clipboard.writeText(m);_(true);setTimeout((function(){return _(false)}),t.tooltiplifespan);y({eventMeta:{programId:r,id:o===null||o===void 0?void 0:o.id,accountId:o===null||o===void 0?void 0:o.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:l,shareMedium:"DIRECT"}}});return[2]}}))}))}return __assign(__assign({},t),{onClick:w,open:T,copyString:m,isCopied:u===null||u===void 0?void 0:u.isCopied,showNotificationText:t.showNotificationText&&!!(u===null||u===void 0?void 0:u.singleUse)})}var R=t("sqm_referral_code",function(){function t(t){a(this,t);this.tooltiptext="Copied to Clipboard";this.showNotificationText=false;this.notificationText="You've copied this code before";this.tooltiplifespan=1e3;this.textAlign="left";this.copyButtonLabel="Copy Code";this.buttonStyle="icon";this.buttonType="primary";o(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t=y(this);var n=l()?A(t):q(t);return e(T,Object.assign({},n))};return t}());function A(t){var e=i(false),n=e[0],a=e[1];var r="REFERRALCODE001";return g({copyString:r,tooltiptext:t.tooltiptext,textAlign:t.textAlign,copyButtonLabel:t.copyButtonLabel,buttonStyle:t.buttonStyle,notificationText:t.notificationText,showNotificationText:t.showNotificationText,isCopied:t.showNotificationText,borderColor:t.borderColor,backgroundColor:t.backgroundColor,textColor:t.textColor,borderRadius:t.borderRadius,buttonType:t.buttonType,isUsed:false,rewardStatus:"AVAILABLE",open:n,onClick:function(){navigator.clipboard.writeText(r);a(true);setTimeout((function(){return a(false)}),t.tooltiplifespan)}},t.demoData||{},{arrayMerge:function(t,e){return e}})}function O(t){var n=t.slots,a=t.titleText,r=t.states,o=t.textColor,i=o===void 0?"var(--sqm-text-subdued)":o;var s={Wrapper:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column",gap:"var(--sl-spacing-large)",color:i},HeaderContainer:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},ShareCodeContainer:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column"},ShareButtonContainer:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column"},TitleText:{fontSize:"var(--sl-font-size-large)",margin:"0"}};var l="\n :host {\n display: block;\n }\n :host([hidden]): {\n display: none;\n }\n ";var u=h(s);var c=u.toString();var d=function(t){if(t.noCodes){return n.empty}if(t.loading){return n.loading}return e("div",{class:u.classes.Wrapper},e("div",{class:u.classes.ShareCodeContainer},n.shareCodes),e("div",{class:u.classes.ShareButtonContainer},n.shareButtons))};return e("div",{class:u.classes.Wrapper,part:"sqm-base"},e("style",{type:"text/css"},l,c),e("div",{class:u.classes.HeaderContainer},e("h2",{class:u.classes.TitleText},a),!r.noCodes&&!r.loading&&n.pagination),d(r))}var U=t("sqm_referral_codes",function(){function t(t){a(this,t);this.titleText="Start sharing";this.emptyStateHeaderText="Your new codes and links aren’t ready yet";this.emptyStateDescriptionText="Please contact our program support team to let them know you’re out of codes.";this.emptyStateImageUrl="https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png";o(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t=y(this);var n=l()?$(t):C(t);var a={shareButtons:e("slot",{name:"shareButtons"}),shareCodes:e("slot",{name:"shareCodes"}),pagination:e("slot",{name:"pagination"}),empty:e(D,{headerText:this.emptyStateHeaderText,descriptionText:this.emptyStateDescriptionText,imageUrl:this.emptyStateImageUrl}),loading:e(N,null)};var r=__assign(__assign({slots:a},n),{loading:n.states.loading,noCodes:n.states.noCodes});return e(O,Object.assign({},r))};return t}());function D(t){var n=t.headerText,a=t.descriptionText,r=t.imageUrl;return e("slot",{name:"empty"},e("sqm-empty",{emptyStateHeader:n,emptyStateText:a,emptyStateImage:r}))}function N(){return e("slot",{name:"loading"},e(B,null),e(B,null),e(B,null),e(B,null))}function B(){return e("sl-skeleton",{style:{width:"100%"}})}function $(t){return g({titleText:t.titleText,textColor:t.textColor,states:{noCodes:false,loading:false}},t.demoData||{},{arrayMerge:function(t,e){return e}})}}}}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as e,r as s}from"./p-c7c11325.js";import{i as t}from"./p-
|
|
1
|
+
import{h as e,r as s}from"./p-c7c11325.js";import{i as t}from"./p-7e0d1e4c.js";import{l as i,k as a,f as r,n}from"./p-63e29387.js";import{d as o,t as l,F as c,i as d,p}from"./p-0ec54f97.js";import{c as m}from"./p-c1086930.js";import{g as u}from"./p-6951663b.js";import{c as f}from"./p-cef45012.js";import{E as h}from"./p-49b20dae.js";import{T as g}from"./p-204861a6.js";import{V as y,S as x,a as v}from"./p-38c7775a.js";import{u as b}from"./p-c30ad421.js";const C=f({Wrapper:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-medium)",maxWidth:"550px"},HeaderContainer:{display:"flex",flexDirection:"column"},InputsContainer:{display:"flex",gap:"var(--sl-spacing-medium)",position:"relative",flexDirection:"column"},CodeInputContainer:{display:"flex",gap:"var(--sl-spacing-medium)"},CodeInput:{maxWidth:"40px","&::part(base)":{borderRadius:"4px !important"},"&::part(input)":{margin:"0",padding:"0 var(--sl-input-spacing-small)",fontSize:"var(--sl-font-size-large)"}},CodeInputError:{...h,maxWidth:"40px","&::part(base)":{borderRadius:"4px !important"},"&::part(input)":{margin:"0",padding:"0 var(--sl-input-spacing-small)",fontSize:"var(--sl-font-size-large)"}},ErrorText:{color:"var(--sqm-danger-color-text)",fontSize:"var(--sl-font-size-small)",margin:"0"},ContinueButton:{width:"100%",maxWidth:"100px"},FooterContainer:{display:"flex",flexDirection:"column"},SkeletonOne:{width:"50%",height:"16px"},SkeletonTwo:{width:"30%",height:"34px"},SkeletonThree:{width:"15%",height:"24px"}}),k=C.toString();function E(s){const{states:i,refs:a,callbacks:r,text:n}=s,o=t.formatMessage({id:"resendCodeText",defaultMessage:n.resendCodeText},{resendCodeLink:e("a",{href:"",style:{textDecoration:"underline",color:"inherit",cursor:"pointer"},onClick:e=>{e.preventDefault(),r.resendEmail()}},n.resendCodeLabel)}),l=t.formatMessage({id:"codeResentSuccessfully",defaultMessage:n.codeResentSuccessfullyText},{email:i.email}),c=i.verifyFailed?C.classes.CodeInputError:C.classes.CodeInput;return e("div",{part:"sqm-base"},e("style",{type:"text/css"},"\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n\n\n",k),e("div",{class:C.classes.Wrapper},e("div",{class:C.classes.HeaderContainer},e(g,{type:"p"},t.formatMessage({id:"emailHeaderText",defaultMessage:i.verifyFailed?n.reverifyCodeHeaderText:n.verifyCodeHeaderText},{email:i.email}))),i.emailResent&&e("sqm-form-message",{type:"success",exportparts:"successalert-icon"},e("b",null,l)),e("div",{class:C.classes.InputsContainer},e("div",{ref:a.codeWrapperRef,class:C.classes.CodeInputContainer},e("sl-input",{class:c,name:"code"}),e("sl-input",{class:c,name:"code"}),e("sl-input",{class:c,name:"code"}),e("sl-input",{class:c,name:"code"}),e("sl-input",{class:c,name:"code"}),e("sl-input",{class:c,name:"code"})),i.verifyFailed&&e("p",{class:C.classes.ErrorText},n.invalidCodeText),e("sl-button",{class:C.classes.ContinueButton,onClick:r.submitCode,disabled:i.loading||i.initialiseLoading,loading:i.loading||i.initialiseLoading,exportparts:"base: primarybutton-base",type:"primary"},n.verifyText)),e("div",{class:C.classes.FooterContainer},e(g,{type:"p"},o))))}o.gql`
|
|
2
2
|
mutation submitImpactPublisherEmail2FACode(
|
|
3
3
|
$user: UserIdInput!
|
|
4
4
|
$code: String!
|