@saasquatch/mint-components 1.11.1-1 → 1.11.1-11

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 (47) hide show
  1. package/dist/cjs/{ShadowViewAddon-2c6026c3.js → ShadowViewAddon-79c07eba.js} +22 -8
  2. package/dist/cjs/{copy-text-view-a22ad7e7.js → copy-text-view-35a47e8d.js} +70 -24
  3. package/dist/cjs/sqm-big-stat_38.cjs.entry.js +2 -2
  4. package/dist/cjs/sqm-pagination_3.cjs.entry.js +13 -2
  5. package/dist/cjs/sqm-stencilbook.cjs.entry.js +3 -3
  6. package/dist/collection/components/sqm-pagination/sqm-pagination.js +2 -1
  7. package/dist/collection/components/sqm-referral-code/useReferralCode.js +5 -1
  8. package/dist/collection/components/sqm-referral-codes/sqm-referral-codes.js +7 -1
  9. package/dist/collection/components/sqm-referral-codes/useReferralCodes.js +70 -25
  10. package/dist/collection/components/sqm-share-button/useShareButton.js +19 -9
  11. package/dist/collection/components/sqm-share-link/useShareLink.js +5 -1
  12. package/dist/esm/{ShadowViewAddon-5bb2b69a.js → ShadowViewAddon-4da4fdfb.js} +22 -8
  13. package/dist/esm/{copy-text-view-bf55abeb.js → copy-text-view-3fa5df7b.js} +71 -26
  14. package/dist/esm/sqm-big-stat_38.entry.js +2 -2
  15. package/dist/esm/sqm-pagination_3.entry.js +13 -2
  16. package/dist/esm/sqm-stencilbook.entry.js +3 -3
  17. package/dist/esm-es5/{ShadowViewAddon-5bb2b69a.js → ShadowViewAddon-4da4fdfb.js} +1 -1
  18. package/dist/esm-es5/copy-text-view-3fa5df7b.js +1 -0
  19. package/dist/esm-es5/sqm-big-stat_38.entry.js +1 -1
  20. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  21. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  22. package/dist/mint-components/mint-components.esm.js +1 -1
  23. package/dist/mint-components/p-1a9d1ab7.entry.js +13 -0
  24. package/dist/mint-components/p-5fc8d87c.system.js +1 -1
  25. package/dist/mint-components/p-6f3efdb3.system.entry.js +1 -0
  26. package/dist/mint-components/p-7a974e40.system.js +1 -0
  27. package/dist/mint-components/{p-b71c0e2d.system.entry.js → p-a0e5ce9c.system.entry.js} +1 -1
  28. package/dist/mint-components/p-b15294d0.system.js +1 -0
  29. package/dist/mint-components/{p-b0ce005d.entry.js → p-c7d387f7.entry.js} +2 -2
  30. package/dist/mint-components/{p-fec0ac31.js → p-f177d285.js} +24 -24
  31. package/dist/mint-components/p-f5e1e208.js +48 -0
  32. package/dist/mint-components/{p-73c6b26d.entry.js → p-f8d3cb7a.entry.js} +1 -1
  33. package/dist/mint-components/{p-4856b234.system.entry.js → p-fa88b63b.system.entry.js} +1 -1
  34. package/dist/types/components/sqm-referral-codes/sqm-referral-codes-view.d.ts +2 -0
  35. package/dist/types/components/sqm-referral-codes/useReferralCodes.d.ts +3 -14
  36. package/dist/types/global/android.d.ts +7 -0
  37. package/dist/types/global/demo.d.ts +2 -0
  38. package/dist/types/stories/features.d.ts +4 -0
  39. package/dist/types/stories/templates.d.ts +4 -0
  40. package/docs/docs.docx +0 -0
  41. package/package.json +1 -1
  42. package/dist/esm-es5/copy-text-view-bf55abeb.js +0 -1
  43. package/dist/mint-components/p-0161f5da.entry.js +0 -13
  44. package/dist/mint-components/p-646d302a.system.js +0 -1
  45. package/dist/mint-components/p-6628bc0e.system.js +0 -1
  46. package/dist/mint-components/p-c37137cd.js +0 -2
  47. package/dist/mint-components/p-eb4e9efb.system.entry.js +0 -1
@@ -0,0 +1,48 @@
1
+ import{h as e}from"./p-64c3217a.js";import{f as t}from"./p-fd2c5407.js";import{d as i,Q as n,k as o,C as s,B as a}from"./p-00be5090.js";import{c as l}from"./p-cef45012.js";import{H as r}from"./p-02be1a88.js";const d=i.gql`
2
+ query getCodes(
3
+ $limit: Int!
4
+ $offset: Int!
5
+ $engagementMedium: UserEngagementMedium!
6
+ ) {
7
+ viewer {
8
+ ... on User {
9
+ referralCodeList(
10
+ limit: $limit
11
+ offset: $offset
12
+ filter: { fuelTank_eq: true }
13
+ ) {
14
+ data {
15
+ code
16
+ dateUsed
17
+ dateCopied
18
+ shareLinkCodes(limit: $limit, offset: $offset) {
19
+ data {
20
+ linkCode
21
+ shareLink: shortUrl(
22
+ shareMedium: DIRECT
23
+ engagementMedium: EMBED
24
+ )
25
+ email: shortUrl(
26
+ shareMedium: EMAIL
27
+ engagementMedium: $engagementMedium
28
+ )
29
+ whatsApp: shortUrl(
30
+ shareMedium: WHATSAPP
31
+ engagementMedium: $engagementMedium
32
+ )
33
+ fbMessenger: shortUrl(
34
+ shareMedium: FBMESSENGER
35
+ engagementMedium: $engagementMedium
36
+ )
37
+ }
38
+ }
39
+ }
40
+ count
41
+ totalCount
42
+ }
43
+ }
44
+ }
45
+ }
46
+ `,u="sq:referral-codes",p="sq:referral-codes-pagination",c=i.gql`
47
+ mutation test {}
48
+ `;function m(e){const i=n(),l=a();console.log({props:e});const{envelope:r,states:u,callbacks:p}=o(d,(e=>{var t;return console.log({queryData:e}),null===(t=null==e?void 0:e.viewer)||void 0===t?void 0:t.referralCodeList}),{limit:1,offset:0},{engagementMedium:l},!(null==i?void 0:i.jwt)),[c,m]=s({namespace:"sq:referral-codes-pagination",initialValue:{states:u,callbacks:p}}),[f,g]=s({namespace:"sq:referral-codes",initialValue:{loading:!0,referralCode:"",shareLink:"",email:{messageLink:""},fbMessenger:{messageLink:"",shareLink:""},whatsApp:{messageLink:""}}});return t((()=>{var e,t,i,n,o,s,a,l,d,u,p;if(null===(e=null==r?void 0:r.data)||void 0===e?void 0:e.length){const e=r.data[0];g({referralCode:e.code,shareLink:null===(i=null===(t=e.shareLinkCodes)||void 0===t?void 0:t[0])||void 0===i?void 0:i.direct,email:{messageLink:null===(o=null===(n=e.shareLinkCodes)||void 0===n?void 0:n[0])||void 0===o?void 0:o.email},fbMessenger:{messageLink:null===(a=null===(s=e.shareLinkCodes)||void 0===s?void 0:s[0])||void 0===a?void 0:a.fbMessenger,shareLink:null===(d=null===(l=e.shareLinkCodes)||void 0===l?void 0:l[0])||void 0===d?void 0:d.fbMessenger},whatsApp:{messageLink:null===(p=null===(u=e.shareLinkCodes)||void 0===u?void 0:u[0])||void 0===p?void 0:p.whatsApp}})}}),[r]),t((()=>{m({states:u,callbacks:p})}),[u.loading]),console.log({referralData:r,states:u}),{states:{...u,noCodes:0===(null==r?void 0:r.totalCount)},data:f,callbacks:{}}}const f={right:"\nsl-input::part(input){\n text-align: right;\n}",center:" \nsl-input::part(input){\n text-align: center;\n}",left:""},g=l({HostBlock:r,inputStyle:{"&::part(input)":{textOverflow:"ellipsis",width:"100%"},"&::part(base)":{cursor:"pointer",overflow:"visible"},width:"100%"},inputErrorStyle:{"&::part(base)":{border:"2px solid red"}},ContainerDiv:{display:"flex",alignItems:"flex-start",flexDirection:"column",justifyContent:"center",gap:"var(--sl-spacing-x-small)",width:"100%"},containerStyle:{display:"flex",alignItems:"center",gap:"var(--sl-spacing-x-small)",width:"100%"},errorTextStyle:{margin:"0",color:"var(--sl-color-danger-500)"},notificationTextStyle:{margin:"0",color:"var(--sl-color-neutral-500)"}}),v=g.toString();function b(t){const{buttonStyle:i="icon"}=t;console.log("notification text is",t.notificationText);const n=!t.loading&&t.error,o=n?t.inputPlaceholderText:t.copyString,s=n||t.loading||t.disabled,a=e("sl-tooltip",{trigger:"manual",content:t.tooltiptext,placement:"button-below"===t.buttonStyle?"bottom":"button-outside"===t.buttonStyle?"top":"top-end",disabled:t.disabled,open:t.open,skidding:"icon"===t.buttonStyle?-5:0,slot:"suffix"},"icon"===i?e("sl-icon-button",{exportparts:"base: icon-button-base",onClick:()=>{var e;return null===(e=t.onClick)||void 0===e?void 0:e.call(t)},name:"files",disabled:s}):e("sl-button",{exportparts:"base: copy-button-base",onClick:()=>{var e;return null===(e=t.onClick)||void 0===e?void 0:e.call(t)},size:"medium",style:{width:`${"button-below"===i&&"100%"}`},disabled:s,type:"primary"},t.copyButtonLabel||"Copy"));return e("div",{class:g.classes.ContainerDiv},e("style",{type:"text/css"},v,"\n :host{\n display: block; \n width: 100%;\n }\n",f[t.textAlign],s&&"\n sl-input::part(input){\n cursor: default;\n }\n"),e("div",{class:g.classes.containerStyle,style:{flexDirection:"button-below"===i?"column":"row"}},e("sl-input",{class:`${g.classes.inputStyle} ${n?g.classes.inputErrorStyle:""}`,exportparts:"base: input-base, input: input-label",value:t.loading?"Loading...":o,readonly:!0,disabled:s},"icon"===i&&a,n&&e("p",{slot:"help-text",class:g.classes.errorTextStyle},t.errorText)),("button-outside"===i||"button-below"===i)&&a),t.showNotificationText&&t.notificationText&&e("p",{part:"sqm-notification-text",class:g.classes.notificationTextStyle},t.notificationText))}export{b as C,p as R,c as S,u as a,m as u}
@@ -1,4 +1,4 @@
1
- import{r as e,h as t,c as s}from"./p-64c3217a.js";import{n as r,f as a,k as n,i,u as o,m as l,b as d,j as c}from"./p-fd2c5407.js";import{i as u}from"./p-9c3d78e9.js";import{i as h,_ as m,d as p,Q as v,H as g,$ as f,y as b,B as y,L as x,g as w,e as k,p as C,q as E,x as S,u as I,r as R,S as M}from"./p-00be5090.js";import{j as q}from"./p-e7e129ac.js";import{g as _,a as T,s as N}from"./p-9ec99ced.js";import{c as A}from"./p-cef45012.js";import{C as P}from"./p-c37137cd.js";import{c as L}from"./p-c1086930.js";import"./p-02be1a88.js";import{a as $}from"./p-8077e9c6.js";import{u as D}from"./p-6b0e6a6c.js";import"./p-251e7567.js";import"./p-5d0c9424.js";import{p as V}from"./p-8d363802.js";import{R as F,u as j}from"./p-d666b326.js";import{i as B}from"./p-bd4e9c2b.js";import{A as z}from"./p-121cdc60.js";import{b as U,U as O,B as H,O as W,J as G,C as Z,K,D as Y,E as X,H as J,I as Q,V as ee,L as te,N as se,d as re,i as ae,P as ne,e as ie,f as oe,R as le,W as de,j as ce,a as ue,S as he,u as me,c as pe,T as ve}from"./p-fec0ac31.js";import"./p-c7fd9e16.js";const ge=class{constructor(t){e(this,t),this.flexReverse=!1,this.ignored=!0,r(this)}disconnectedCallback(){}render(){var e;const{props:s,label:r}=h()?U(this):O(this),a=!!(null===(e=m().innerHTML)||void 0===e?void 0:e.trim()),n=t("slot",{name:"label"},a?t("slot",null):r);return t(H,Object.assign({},s,{labelSlot:n}))}},fe=class{constructor(t){e(this,t),r(this)}disconnectedCallback(){}render(){var e,r;const n=null!==(e=function(e){if(e)try{return W(e)}catch{}}(this.brandColor))&&void 0!==e?e:"",i=(null!==(r=this.brandFont)&&void 0!==r?r:"Nunito Sans").trim()||void 0;a((()=>{if(!i)return;const e=document.createElement("link");return e.setAttribute("href",function(...e){return`https://fonts.googleapis.com/css2?${e.map((e=>`family=${encodeURIComponent(e)}`)).join("&")}`}(i)),e.setAttribute("rel","stylesheet"),document.head.appendChild(e),()=>document.head.removeChild(e)}),[i]);const o=null!=i?i:"";return t(s,null,t("style",null,`\n\n :host{\n display: contents;\n }\n /* \n Selects any element placed inside a slot\n - resets css variable inheritence for fonts\n \n */\n ::slotted(*) {\n --sl-font-sans: "${o}", arial;\n --sl-input-font-family: "${o}", arial;\n --sl-tooltip-font-family: "${o}", arial;\n font-family: "${o}", arial;\n\t\t\t\n ${n}\n\n --sl-focus-ring-color-primary: var(--sl-color-primary-100);\n --sl-input-border-color-focus: var(--sl-color-primary-500);\n --sl-color-primary-hue: var(--sl-color-primary-500);\n }`),t("slot",null))}},be=class{constructor(t){e(this,t),this.ignored=!0,this.width=347,this.gap=24,r(this)}disconnectedCallback(){}render(){return t(G,Object.assign({},_(this)),t("slot",null))}},ye=A({IconStyle:{display:"block",position:"absolute",top:"23px"},DivStyle:{marginLeft:"28px"},Details:{marginLeft:"28px"},Heading:{display:"inline-block"},Children:{display:"none"}}),xe=ye.toString();function we({missingProps:e,heading:s="There was a problem loading this section",subheading:r="There was a technical problem that prevented this section from loading. Please contact us with the link to this page.",description:a="Error occured while loading <{tagName}>. Values for the following attributes are missing:"},i){if(!e)return!1;const o=m(),[l,d]=n(!1);return t("sl-alert",{type:"danger",open:!0},t("style",{type:"text/css"},xe),t("div",{slot:"icon",class:ye.classes.IconStyle},t("sl-icon",{name:"exclamation-octagon"})),t("div",{class:ye.classes.DivStyle},t("h2",{class:ye.classes.Heading},u.formatMessage({id:"error-heading",defaultMessage:s})),t("p",null,u.formatMessage({id:"error-subheading",defaultMessage:r}))),t("details",{class:ye.classes.Details},t("summary",{onClick:()=>d(!l)},l?"Less":"More"," details"),t("p",null,u.formatMessage({id:"error-description",defaultMessage:a},{tagName:o.tagName.toLowerCase()})),t("ul",null,e.map((e=>t("li",null,t("strong",null,e.attribute)))))),t("div",{class:ye.classes.Children},i))}const ke=class{constructor(t){e(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,r(this)}disconnectedCallback(){}render(){const e=T([{attribute:"checkbox-name",value:this.checkboxName}]);if(!h()&&e)return t(we,{missingProps:e,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 s={..._(this)},{states:r,callbacks:o}=h()?L({states:{registrationFormState:{},checked:!1},callbacks:{setChecked:()=>{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):function(e){var t;const s=i(F),[r,o]=n(!1);return a((()=>{var t,r;(null===(t=null==s?void 0:s.initialData)||void 0===t?void 0:t[e.checkboxName])&&o(!!(null===(r=null==s?void 0:s.initialData)||void 0===r?void 0:r[e.checkboxName]))}),[null===(t=null==s?void 0:s.initialData)||void 0===t?void 0:t[e.checkboxName]]),{states:{registrationFormState:s,checked:r},callbacks:{setChecked:o}}}(this);return t(Z,{states:r,content:s,callbacks:o})}},Ce=p.gql`
1
+ import{r as e,h as t,c as s}from"./p-64c3217a.js";import{n as r,f as a,k as n,i,u as o,m as l,b as d,j as c}from"./p-fd2c5407.js";import{i as u}from"./p-9c3d78e9.js";import{i as h,_ as m,d as p,Q as v,H as g,$ as f,y as b,B as y,L as x,g as w,e as k,p as C,q as E,x as S,u as I,r as R,S as M}from"./p-00be5090.js";import{j as q}from"./p-e7e129ac.js";import{g as _,a as T,s as N}from"./p-9ec99ced.js";import{c as A}from"./p-cef45012.js";import{C as P}from"./p-f5e1e208.js";import{c as L}from"./p-c1086930.js";import"./p-02be1a88.js";import{a as $}from"./p-8077e9c6.js";import{u as D}from"./p-6b0e6a6c.js";import"./p-251e7567.js";import"./p-5d0c9424.js";import{p as V}from"./p-8d363802.js";import{R as F,u as j}from"./p-d666b326.js";import{i as B}from"./p-bd4e9c2b.js";import{A as z}from"./p-121cdc60.js";import{b as U,U as O,B as H,O as W,J as G,C as Z,K,D as Y,E as X,H as J,I as Q,V as ee,L as te,N as se,d as re,i as ae,P as ne,e as ie,f as oe,R as le,W as de,j as ce,a as ue,S as he,u as me,c as pe,T as ve}from"./p-f177d285.js";import"./p-c7fd9e16.js";const ge=class{constructor(t){e(this,t),this.flexReverse=!1,this.ignored=!0,r(this)}disconnectedCallback(){}render(){var e;const{props:s,label:r}=h()?U(this):O(this),a=!!(null===(e=m().innerHTML)||void 0===e?void 0:e.trim()),n=t("slot",{name:"label"},a?t("slot",null):r);return t(H,Object.assign({},s,{labelSlot:n}))}},fe=class{constructor(t){e(this,t),r(this)}disconnectedCallback(){}render(){var e,r;const n=null!==(e=function(e){if(e)try{return W(e)}catch{}}(this.brandColor))&&void 0!==e?e:"",i=(null!==(r=this.brandFont)&&void 0!==r?r:"Nunito Sans").trim()||void 0;a((()=>{if(!i)return;const e=document.createElement("link");return e.setAttribute("href",function(...e){return`https://fonts.googleapis.com/css2?${e.map((e=>`family=${encodeURIComponent(e)}`)).join("&")}`}(i)),e.setAttribute("rel","stylesheet"),document.head.appendChild(e),()=>document.head.removeChild(e)}),[i]);const o=null!=i?i:"";return t(s,null,t("style",null,`\n\n :host{\n display: contents;\n }\n /* \n Selects any element placed inside a slot\n - resets css variable inheritence for fonts\n \n */\n ::slotted(*) {\n --sl-font-sans: "${o}", arial;\n --sl-input-font-family: "${o}", arial;\n --sl-tooltip-font-family: "${o}", arial;\n font-family: "${o}", arial;\n\t\t\t\n ${n}\n\n --sl-focus-ring-color-primary: var(--sl-color-primary-100);\n --sl-input-border-color-focus: var(--sl-color-primary-500);\n --sl-color-primary-hue: var(--sl-color-primary-500);\n }`),t("slot",null))}},be=class{constructor(t){e(this,t),this.ignored=!0,this.width=347,this.gap=24,r(this)}disconnectedCallback(){}render(){return t(G,Object.assign({},_(this)),t("slot",null))}},ye=A({IconStyle:{display:"block",position:"absolute",top:"23px"},DivStyle:{marginLeft:"28px"},Details:{marginLeft:"28px"},Heading:{display:"inline-block"},Children:{display:"none"}}),xe=ye.toString();function we({missingProps:e,heading:s="There was a problem loading this section",subheading:r="There was a technical problem that prevented this section from loading. Please contact us with the link to this page.",description:a="Error occured while loading <{tagName}>. Values for the following attributes are missing:"},i){if(!e)return!1;const o=m(),[l,d]=n(!1);return t("sl-alert",{type:"danger",open:!0},t("style",{type:"text/css"},xe),t("div",{slot:"icon",class:ye.classes.IconStyle},t("sl-icon",{name:"exclamation-octagon"})),t("div",{class:ye.classes.DivStyle},t("h2",{class:ye.classes.Heading},u.formatMessage({id:"error-heading",defaultMessage:s})),t("p",null,u.formatMessage({id:"error-subheading",defaultMessage:r}))),t("details",{class:ye.classes.Details},t("summary",{onClick:()=>d(!l)},l?"Less":"More"," details"),t("p",null,u.formatMessage({id:"error-description",defaultMessage:a},{tagName:o.tagName.toLowerCase()})),t("ul",null,e.map((e=>t("li",null,t("strong",null,e.attribute)))))),t("div",{class:ye.classes.Children},i))}const ke=class{constructor(t){e(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,r(this)}disconnectedCallback(){}render(){const e=T([{attribute:"checkbox-name",value:this.checkboxName}]);if(!h()&&e)return t(we,{missingProps:e,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 s={..._(this)},{states:r,callbacks:o}=h()?L({states:{registrationFormState:{},checked:!1},callbacks:{setChecked:()=>{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):function(e){var t;const s=i(F),[r,o]=n(!1);return a((()=>{var t,r;(null===(t=null==s?void 0:s.initialData)||void 0===t?void 0:t[e.checkboxName])&&o(!!(null===(r=null==s?void 0:s.initialData)||void 0===r?void 0:r[e.checkboxName]))}),[null===(t=null==s?void 0:s.initialData)||void 0===t?void 0:t[e.checkboxName]]),{states:{registrationFormState:s,checked:r},callbacks:{setChecked:o}}}(this);return t(Z,{states:r,content:s,callbacks:o})}},Ce=p.gql`
2
2
  query fuelTankRewardsQuery($programId: ID!) {
3
3
  user: viewer {
4
4
  ... on User {