@saasquatch/mint-components 1.11.1-37 → 1.11.1-39
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/{ShadowViewAddon-074b426e.js → ShadowViewAddon-2d56f3b4.js} +1 -1
- package/dist/cjs/{copy-text-view-acb2707b.js → copy-text-view-29330e8a.js} +5 -30
- package/dist/cjs/sqm-big-stat_38.cjs.entry.js +2 -2
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +2 -2
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -2
- package/dist/collection/components/sqm-referral-code/sqm-referral-code.js +2 -2
- package/dist/collection/components/sqm-referral-codes/useReferralCodes.js +5 -30
- package/dist/esm/{ShadowViewAddon-100e4928.js → ShadowViewAddon-db086943.js} +1 -1
- package/dist/esm/{copy-text-view-cfdca341.js → copy-text-view-47f83e9b.js} +5 -30
- package/dist/esm/sqm-big-stat_38.entry.js +2 -2
- package/dist/esm/sqm-pagination_3.entry.js +2 -2
- package/dist/esm/sqm-stencilbook.entry.js +2 -2
- package/dist/esm-es5/{ShadowViewAddon-100e4928.js → ShadowViewAddon-db086943.js} +1 -1
- package/dist/esm-es5/copy-text-view-47f83e9b.js +1 -0
- package/dist/esm-es5/sqm-big-stat_38.entry.js +1 -1
- package/dist/esm-es5/sqm-pagination_3.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-4da7a951.system.entry.js → p-284f26ec.system.entry.js} +1 -1
- package/dist/mint-components/{p-799cd8f5.system.entry.js → p-29e0dedf.system.entry.js} +1 -1
- package/dist/mint-components/{p-d4f00976.system.js → p-3ef97112.system.js} +1 -1
- package/dist/mint-components/p-64473f17.system.js +1 -0
- package/dist/mint-components/{p-267a2e5a.entry.js → p-8a50339c.entry.js} +2 -2
- package/dist/mint-components/{p-bc49a074.js → p-8cd49ec4.js} +1 -1
- package/dist/mint-components/{p-60213708.system.entry.js → p-8e84ba06.system.entry.js} +1 -1
- package/dist/mint-components/p-9ed09b3a.system.js +1 -1
- package/dist/mint-components/{p-89c05109.entry.js → p-b6f61a27.entry.js} +1 -1
- package/dist/mint-components/{p-6aac1288.entry.js → p-e91bdadf.entry.js} +1 -1
- package/dist/mint-components/p-ebd6c7e5.js +52 -0
- package/dist/types/components/sqm-referral-code/sqm-referral-code.d.ts +1 -1
- package/dist/types/components.d.ts +2 -2
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/copy-text-view-cfdca341.js +0 -1
- package/dist/mint-components/p-cda9aafd.js +0 -52
- package/dist/mint-components/p-efcb080f.system.js +0 -1
- package/dist/types/global/android.d.ts +0 -7
- package/dist/types/global/demo.d.ts +0 -2
- package/dist/types/stories/features.d.ts +0 -4
- package/dist/types/stories/templates.d.ts +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e,h as t,c as s}from"./p-61d5f26e.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-019506c4.js";import{i as u}from"./p-66c7b15c.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,f as k,q as C,r as E,x as S,u as I,z as R,S as M}from"./p-8c765c81.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-
|
|
1
|
+
import{r as e,h as t,c as s}from"./p-61d5f26e.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-019506c4.js";import{i as u}from"./p-66c7b15c.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,f as k,q as C,r as E,x as S,u as I,z as R,S as M}from"./p-8c765c81.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-ebd6c7e5.js";import{c as L}from"./p-c1086930.js";import"./p-02be1a88.js";import{a as $}from"./p-134424df.js";import{u as D}from"./p-0ebd104c.js";import"./p-1a4e5a3a.js";import"./p-ee343d0b.js";import{p as V}from"./p-8d363802.js";import{R as F,u as j}from"./p-0a26adee.js";import{i as B}from"./p-146c2a0e.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-8cd49ec4.js";import"./p-f29e62e1.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 {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import{h as e}from"./p-61d5f26e.js";import{f as t}from"./p-019506c4.js";import{d as i,Q as o,H as n,z as s,k as l,C as a,B as r}from"./p-8c765c81.js";import{c as d}from"./p-cef45012.js";import{H as u}from"./p-02be1a88.js";const p=i.gql`
|
|
2
|
+
query getCodes(
|
|
3
|
+
$engagementMedium: UserEngagementMedium!
|
|
4
|
+
$limit: Int!
|
|
5
|
+
$offset: Int!
|
|
6
|
+
$filter: ReferralCodeFilterInput
|
|
7
|
+
) {
|
|
8
|
+
viewer {
|
|
9
|
+
... on User {
|
|
10
|
+
referralCodeList(limit: $limit, offset: $offset, filter: $filter) {
|
|
11
|
+
data {
|
|
12
|
+
code
|
|
13
|
+
dateUsed
|
|
14
|
+
dateCopied
|
|
15
|
+
singleUse
|
|
16
|
+
shareLinkCodes(limit: $limit) {
|
|
17
|
+
data {
|
|
18
|
+
linkCode
|
|
19
|
+
shareLink: shortUrl(
|
|
20
|
+
shareMedium: DIRECT
|
|
21
|
+
engagementMedium: EMBED
|
|
22
|
+
)
|
|
23
|
+
email: shortUrl(
|
|
24
|
+
shareMedium: EMAIL
|
|
25
|
+
engagementMedium: $engagementMedium
|
|
26
|
+
)
|
|
27
|
+
whatsApp: shortUrl(
|
|
28
|
+
shareMedium: WHATSAPP
|
|
29
|
+
engagementMedium: $engagementMedium
|
|
30
|
+
)
|
|
31
|
+
fbMessenger: shortUrl(
|
|
32
|
+
shareMedium: FBMESSENGER
|
|
33
|
+
engagementMedium: $engagementMedium
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
count
|
|
39
|
+
totalCount
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
`,m="sq:referral-codes",c="sq:referral-codes-pagination",f=i.gql`
|
|
45
|
+
mutation markReferralCodeCopied($referralCode: String!) {
|
|
46
|
+
markReferralCodeCopied(referralCode: $referralCode) {
|
|
47
|
+
referralCode {
|
|
48
|
+
dateCopied
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
`;function v(e){const i=o(),d=r(),u=e.programId||n(),{refresh:m}=s(),{envelope:c,states:f,callbacks:v}=l(p,(e=>{var t;return null===(t=null==e?void 0:e.viewer)||void 0===t?void 0:t.referralCodeList}),{limit:1,offset:0},{engagementMedium:d,programId:u,filter:{fuelTank_eq:!0,programId_eq:u,dateUsed_exists:!1}},!(null==i?void 0:i.jwt)),[g,b]=a({namespace:"sq:referral-codes-pagination",initialValue:{states:f,callbacks:v}}),[h,C]=a({namespace:"sq:referral-codes",initialValue:{refresh:m,loading:!0,referralCode:"",shareLink:"",isCopied:!1,isUsed:!1,email:{messageLink:""},fbmessenger:{messageLink:"",shareLink:""},whatsapp:{messageLink:""}}});return t((()=>{var e,t,i,o,n,s,l,a,r,d,u,p,g,h,k,x;if(null===(e=null==c?void 0:c.data)||void 0===e?void 0:e.length){const e=c.data[0];C({refresh:m,referralCode:e.code,isCopied:!!e.dateCopied,isUsed:!!e.dateUsed,shareLink:null===(o=null===(i=null===(t=e.shareLinkCodes)||void 0===t?void 0:t.data)||void 0===i?void 0:i[0])||void 0===o?void 0:o.direct,email:{messageLink:null===(l=null===(s=null===(n=e.shareLinkCodes)||void 0===n?void 0:n.data)||void 0===s?void 0:s[0])||void 0===l?void 0:l.email},fbmessenger:{messageLink:null===(d=null===(r=null===(a=e.shareLinkCodes)||void 0===a?void 0:a.data)||void 0===r?void 0:r[0])||void 0===d?void 0:d.fbMessenger,shareLink:null===(g=null===(p=null===(u=e.shareLinkCodes)||void 0===u?void 0:u.data)||void 0===p?void 0:p[0])||void 0===g?void 0:g.fbMessenger},whatsapp:{messageLink:null===(x=null===(k=null===(h=e.shareLinkCodes)||void 0===h?void 0:h.data)||void 0===k?void 0:k[0])||void 0===x?void 0:x.whatsApp}}),b({states:f,callbacks:v})}}),[c]),console.log({referralData:c,states:f}),{states:{...f,noCodes:0===(null==c?void 0:c.totalCount)},data:h,callbacks:{}}}const g={right:"\nsl-input::part(input){\n text-align: right;\n}",center:" \nsl-input::part(input){\n text-align: center;\n}",left:""},b=d({HostBlock:u,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)"}}),h=b.toString();function C(t){const{buttonStyle:i="icon"}=t;console.log("notification text is",t.notificationText);const o=!t.loading&&t.error,n=o?t.inputPlaceholderText:t.copyString,s=o||t.loading||t.disabled,l=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:b.classes.ContainerDiv},e("style",{type:"text/css"},h,"\n :host{\n display: block; \n width: 100%;\n }\n",g[t.textAlign],s&&"\n sl-input::part(input){\n cursor: default;\n }\n"),e("div",{class:b.classes.containerStyle,style:{flexDirection:"button-below"===i?"column":"row"}},e("sl-input",{class:`${b.classes.inputStyle} ${o?b.classes.inputErrorStyle:""}`,exportparts:"base: input-base, input: input-label",value:t.loading?"Loading...":n,readonly:!0,disabled:s},"icon"===i&&l,o&&e("p",{slot:"help-text",class:b.classes.errorTextStyle},t.errorText)),("button-outside"===i||"button-below"===i)&&l),t.isCopied&&t.showNotificationText&&t.notificationText&&e("p",{part:"sqm-notification-text",class:b.classes.notificationTextStyle},t.notificationText))}export{C,c as R,f as S,m as a,v as u}
|
|
@@ -2623,7 +2623,7 @@ export namespace Components {
|
|
|
2623
2623
|
"showNotificationText": boolean;
|
|
2624
2624
|
/**
|
|
2625
2625
|
* Change the text alignment
|
|
2626
|
-
* @uiName
|
|
2626
|
+
* @uiName Referral code alignment
|
|
2627
2627
|
* @uiType string
|
|
2628
2628
|
* @uiEnum ["left", "center", "right"]
|
|
2629
2629
|
* @uiEnumNames ["Left", "Center", "Right"]
|
|
@@ -8560,7 +8560,7 @@ declare namespace LocalJSX {
|
|
|
8560
8560
|
"showNotificationText"?: boolean;
|
|
8561
8561
|
/**
|
|
8562
8562
|
* Change the text alignment
|
|
8563
|
-
* @uiName
|
|
8563
|
+
* @uiName Referral code alignment
|
|
8564
8564
|
* @uiType string
|
|
8565
8565
|
* @uiEnum ["left", "center", "right"]
|
|
8566
8566
|
* @uiEnumNames ["Left", "Center", "Right"]
|
package/docs/docs.docx
CHANGED
|
Binary file
|