@saasquatch/mint-components 2.0.0 → 2.0.1
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-3e88d710.js → IndirectTaxDetailsView-e5f70b8b.js} +2 -2
- package/dist/cjs/{ShadowViewAddon-646dec73.js → ShadowViewAddon-1b38dcfc.js} +1 -1
- package/dist/cjs/{global-39cb0afc.js → global-8bba5b3a.js} +2 -745
- 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 +3 -3
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +4 -4
- 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-lead-checkbox-field-view-f1c46d4b.js → sqm-lead-checkbox-field-view-340acad0.js} +1 -1
- package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-lead-input-field-view-6d388092.js → sqm-lead-input-field-view-06ed3632.js} +1 -1
- package/dist/cjs/sqm-lead-input-field.cjs.entry.js +3 -3
- 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-6b17e545.js → sqm-portal-email-verification-view-5518eb0d.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-profile-view-845367bb.js → sqm-portal-profile-view-615e6975.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 +8 -8
- package/dist/cjs/{useLeadFormState-b355759b.js → useLeadFormState-fd0445f9.js} +1 -1
- package/dist/cjs/{utils-ac82f977.js → utils-83d125fa.js} +1 -1
- package/dist/collection/global/global.js +3 -14
- package/dist/esm/{IndirectTaxDetailsView-e5d8767d.js → IndirectTaxDetailsView-0a57b622.js} +2 -2
- package/dist/esm/{ShadowViewAddon-5928ca9d.js → ShadowViewAddon-1adaf077.js} +1 -1
- package/dist/esm/{global-943536b9.js → global-1099f20d.js} +2 -745
- 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 +3 -3
- package/dist/esm/sqm-big-stat_47.entry.js +4 -4
- 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-lead-checkbox-field-view-adcc49c0.js → sqm-lead-checkbox-field-view-cbafee07.js} +1 -1
- package/dist/esm/sqm-lead-checkbox-field.entry.js +3 -3
- package/dist/esm/{sqm-lead-input-field-view-c0b5aed5.js → sqm-lead-input-field-view-f3775c28.js} +1 -1
- package/dist/esm/sqm-lead-input-field.entry.js +3 -3
- 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-8ceb6302.js → sqm-portal-email-verification-view-7d86299c.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
- package/dist/esm/{sqm-portal-profile-view-2ec60449.js → sqm-portal-profile-view-3ed13e4d.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 +8 -8
- package/dist/esm/{useLeadFormState-9a652a42.js → useLeadFormState-c379e5d7.js} +1 -1
- package/dist/esm/{utils-f27e62dc.js → utils-6122971b.js} +1 -1
- package/dist/esm-es5/{IndirectTaxDetailsView-e5d8767d.js → IndirectTaxDetailsView-0a57b622.js} +1 -1
- package/dist/esm-es5/{ShadowViewAddon-5928ca9d.js → ShadowViewAddon-1adaf077.js} +1 -1
- package/dist/esm-es5/{global-943536b9.js → global-1099f20d.js} +4 -4
- 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_47.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-lead-checkbox-field-view-adcc49c0.js → sqm-lead-checkbox-field-view-cbafee07.js} +1 -1
- package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-input-field-view-c0b5aed5.js → sqm-lead-input-field-view-f3775c28.js} +1 -1
- package/dist/esm-es5/sqm-lead-input-field.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-8ceb6302.js → sqm-portal-email-verification-view-7d86299c.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-2ec60449.js → sqm-portal-profile-view-3ed13e4d.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/{useLeadFormState-9a652a42.js → useLeadFormState-c379e5d7.js} +1 -1
- package/dist/esm-es5/{utils-f27e62dc.js → utils-6122971b.js} +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-a1b3f61a.js → p-00bc7211.js} +1 -1
- package/dist/mint-components/{p-20f8e7ca.entry.js → p-010957a1.entry.js} +1 -1
- package/dist/mint-components/{p-58b668a0.js → p-0e1a1b14.js} +1 -1
- package/dist/mint-components/{p-0cb51ea1.system.entry.js → p-14e813a7.system.entry.js} +1 -1
- package/dist/mint-components/{p-c67ffd25.system.entry.js → p-18720462.system.entry.js} +1 -1
- package/dist/mint-components/{p-a30d7069.system.entry.js → p-22a9114f.system.entry.js} +1 -1
- package/dist/mint-components/{p-735c9185.entry.js → p-31bba357.entry.js} +1 -1
- package/dist/mint-components/{p-bef123be.entry.js → p-47c83656.entry.js} +1 -1
- package/dist/mint-components/{p-5a3e2966.entry.js → p-4c811d12.entry.js} +1 -1
- package/dist/mint-components/{p-1e406d04.system.entry.js → p-4ce51b1c.system.entry.js} +1 -1
- package/dist/mint-components/{p-dbb79392.js → p-4fed8672.js} +1 -1
- package/dist/mint-components/{p-3fa99fea.system.entry.js → p-511c87ce.system.entry.js} +1 -1
- package/dist/mint-components/{p-9f57e731.system.entry.js → p-56009bf0.system.entry.js} +1 -1
- package/dist/mint-components/{p-8677688c.entry.js → p-5d059c95.entry.js} +1 -1
- package/dist/mint-components/{p-c90fcb02.system.js → p-60465a2d.system.js} +1 -1
- package/dist/mint-components/{p-58f4bf7a.entry.js → p-60c14cec.entry.js} +1 -1
- package/dist/mint-components/{p-0ac84da5.system.entry.js → p-6445e926.system.entry.js} +1 -1
- package/dist/mint-components/{p-c5f92183.system.entry.js → p-662ed116.system.entry.js} +1 -1
- package/dist/mint-components/{p-db64c957.entry.js → p-6c006998.entry.js} +2 -2
- package/dist/mint-components/{p-252465eb.js → p-6d5bd95a.js} +1 -1
- package/dist/mint-components/{p-e4017ba5.entry.js → p-6d9ce4e5.entry.js} +1 -1
- package/dist/mint-components/{p-fc86ba65.system.entry.js → p-717b6730.system.entry.js} +1 -1
- package/dist/mint-components/{p-06b4fa6a.entry.js → p-720341b1.entry.js} +1 -1
- package/dist/mint-components/{p-a275725a.system.js → p-74f43a08.system.js} +1 -1
- package/dist/mint-components/{p-c44b3725.js → p-79a3344f.js} +1 -1
- package/dist/mint-components/{p-d181b17c.js → p-7a268047.js} +1 -1
- package/dist/mint-components/p-8b5b2acc.entry.js +1 -0
- package/dist/mint-components/{p-53b49d27.system.js → p-967a9040.system.js} +1 -1
- package/dist/mint-components/{p-ee3d2ae4.system.js → p-9f8d34d1.system.js} +1 -1
- package/dist/mint-components/{p-8e913ce5.entry.js → p-a217cc8d.entry.js} +1 -1
- package/dist/mint-components/{p-124af9d6.entry.js → p-a5c63310.entry.js} +1 -1
- package/dist/mint-components/{p-08b373b9.system.js → p-aa08457e.system.js} +1 -1
- package/dist/mint-components/{p-38c4653d.js → p-aa8c6332.js} +1 -1
- package/dist/mint-components/{p-ee290b30.system.js → p-ad4348c3.system.js} +1 -1
- package/dist/mint-components/{p-2fd2f22b.entry.js → p-aefaec37.entry.js} +1 -1
- package/dist/mint-components/{p-5bb24669.system.entry.js → p-bec87ac9.system.entry.js} +1 -1
- package/dist/mint-components/{p-6b55555b.system.js → p-c85f204b.system.js} +1 -1
- package/dist/mint-components/{p-b5fd4fb6.system.js → p-c994512c.system.js} +1 -1
- package/dist/mint-components/{p-11927355.system.entry.js → p-d2bb770d.system.entry.js} +1 -1
- package/dist/mint-components/{p-19de8749.system.entry.js → p-d3120982.system.entry.js} +1 -1
- package/dist/mint-components/p-db1a0db1.js +1233 -0
- package/dist/mint-components/{p-f3ccba80.system.js → p-e0a724dd.system.js} +19 -19
- package/dist/mint-components/{p-94ae86fc.entry.js → p-ea0bc627.entry.js} +1 -1
- package/dist/mint-components/{p-946f8a2c.js → p-ed16b35a.js} +1 -1
- package/dist/mint-components/{p-6dd86003.system.js → p-f0eae4e6.system.js} +1 -1
- package/dist/mint-components/{p-54c250de.system.entry.js → p-f401ef19.system.entry.js} +1 -1
- package/dist/mint-components/{p-c4f275db.system.entry.js → p-fedb9ab8.system.entry.js} +1 -1
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/collection/global/styles.v1.js +0 -733
- package/dist/collection/global/styles.v1.ts +0 -735
- package/dist/mint-components/global/styles.v1.ts +0 -735
- package/dist/mint-components/p-37ef2ce1.entry.js +0 -1
- package/dist/mint-components/p-8ea16fb6.js +0 -1233
- package/dist/types/global/styles.v1.d.ts +0 -2
- /package/dist/collection/global/{styles.v2.js → styles.js} +0 -0
- /package/dist/collection/global/{styles.v2.ts → styles.ts} +0 -0
- /package/dist/mint-components/global/{styles.v2.ts → styles.ts} +0 -0
- /package/dist/types/global/{styles.v2.d.ts → styles.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,h as t}from"./p-c7c11325.js";import"./p-
|
|
1
|
+
import{r as s,h as t}from"./p-c7c11325.js";import"./p-db1a0db1.js";import{i as e,n as i}from"./p-63e29387.js";import{i as o}from"./p-0ec54f97.js";import{c as a}from"./p-c1086930.js";import{a as r,g as c}from"./p-9ec99ced.js";import"./p-cef45012.js";import{L as n,R as h}from"./p-ed16b35a.js";import{L as m}from"./p-4fed8672.js";const p=class{constructor(t){s(this,t),this.ignored=!0,this.checkboxLabel="By signing up you agree to the {labelLink}",this.checkboxLabelLink="https://example.com",this.checkboxLabelLinkText="Terms and Conditions",this.errorMessage="Must be checked",this.checkboxOptional=!1,i(this)}disconnectedCallback(){}render(){const s=r([{attribute:"checkbox-name",value:this.checkboxName}]);if(!o()&&s)return t(h,{missingProps:s,heading:"An error occured while loading this form",subheading:"A technical problem prevented this checkbox field from loading. Please contact us with the link to this page.",description:"Values for the following attributes are missing:"});const i={...c(this)},{states:p}=o()?a({states:{leadFormState:{}}},this.demoData||{},{arrayMerge:(s,t)=>t}):{states:{leadFormState:e(n)}};return t(m,{states:p,content:i})}};export{p as sqm_lead_checkbox_field}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e}from"./p-c7c11325.js";import{i as s}from"./p-
|
|
1
|
+
import{h as e}from"./p-c7c11325.js";import{i as s}from"./p-db1a0db1.js";import{k as t,y as a}from"./p-63e29387.js";import{_ as i}from"./p-0ec54f97.js";import{c as o}from"./p-cef45012.js";const l=o({IconStyle:{display:"block",position:"absolute",top:"23px"},DivStyle:{marginLeft:"28px"},Details:{marginLeft:"28px"},Heading:{display:"inline-block"},Children:{display:"none"}}),r=l.toString();function n({missingProps:a,heading:o="There was a problem loading this section",subheading:n="There was a technical problem that prevented this section from loading. Please contact us with the link to this page.",description:c="Error occured while loading <{tagName}>. Values for the following attributes are missing:"},d){if(!a)return!1;const p=i(),[m,u]=t(!1);return e("sl-alert",{type:"danger",open:!0},e("style",{type:"text/css"},r),e("div",{slot:"icon",class:l.classes.IconStyle},e("sl-icon",{name:"exclamation-octagon"})),e("div",{class:l.classes.DivStyle},e("h2",{class:l.classes.Heading},s.formatMessage({id:"error-heading",defaultMessage:o})),e("p",null,s.formatMessage({id:"error-subheading",defaultMessage:n}))),e("details",{class:l.classes.Details},e("summary",{onClick:()=>u(!m)},m?"Less":"More"," details"),e("p",null,s.formatMessage({id:"error-description",defaultMessage:c},{tagName:p.tagName.toLowerCase()})),e("ul",null,a.map((s=>e("li",null,e("strong",null,s.attribute)))))),e("div",{class:l.classes.Children},d))}const c="sq:lead-form-state";function d(e){const s=i(),[t,o]=a(s,"sq:lead-form-state",e);return a(s,"sq:lead-form-state-internal",[t,o]),{leadFormState:t,setLeadFormState:o}}export{c as L,n as R,d as u}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-59b028db.system.js","./p-
|
|
1
|
+
System.register(["./p-59b028db.system.js","./p-e0a724dd.system.js","./p-1a673057.system.js","./p-8a6494c7.system.js"],(function(e){"use strict";var a,i,t,l,r;return{setters:[function(e){a=e.h},function(e){i=e.i},function(e){t=e.j;l=e.a},function(e){r=e.E}],execute:function(){e("L",u);var s={ErrorStyle:r,FieldContainer:{"margin-bottom":"var(--sl-spacing-medium)"}};var n="\n:host {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\n";t.setup(l());var d=t.createStyleSheet(s);var o=d.toString();function u(e){var t,l,r,s,u,v;var f=e.states,c=e.content;var p=function(e){var a=e.fieldLabel;return i.formatMessage({id:"requiredFieldErrorMessage-"+a,defaultMessage:c.requiredFieldErrorMessage},{fieldLabel:a})};return a("div",{class:d.classes.FieldContainer,part:"sqm-base"},a("style",{type:"text/css"},n,o),a("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",name:"/"+c.fieldName,type:c.fieldType,label:""+c.fieldLabel+(c.fieldOptional?" "+c.optionalLabel:"")},!c.fieldOptional?{required:true}:[],{disabled:((t=f.leadFormState)===null||t===void 0?void 0:t.loading)||((l=f.leadFormState)===null||l===void 0?void 0:l.disabled),validationError:function(e){var a=e.value;if(!a&&!c.fieldOptional){return p({fieldLabel:c.fieldLabel})}}},((s=(r=f.leadFormState)===null||r===void 0?void 0:r.validationErrors)===null||s===void 0?void 0:s[c.fieldName])?{class:d.classes.ErrorStyle,helpText:((v=(u=f.leadFormState)===null||u===void 0?void 0:u.validationErrors)===null||v===void 0?void 0:v[c.fieldName])||c.requiredFieldErrorMessage}:[])))}}}}));
|
|
@@ -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-f3ccba80.system.js","./p-4f5329a2.system.js","./p-171310d9.system.js","./p-4bd679a7.system.js","./p-6333265f.system.js","./p-1a673057.system.js","./p-17a0f310.system.js","./p-8a6494c7.system.js","./p-ce81839d.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-e0a724dd.system.js","./p-4f5329a2.system.js","./p-171310d9.system.js","./p-4bd679a7.system.js","./p-6333265f.system.js","./p-1a673057.system.js","./p-17a0f310.system.js","./p-8a6494c7.system.js","./p-ce81839d.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}})}}}}));
|