@saasquatch/mint-components 1.11.1-18 → 1.11.1-19
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-2742c017.js → ShadowViewAddon-829a4a54.js} +1 -1
- package/dist/cjs/{copy-text-view-acd7cf5a.js → copy-text-view-26af5e83.js} +1 -3
- package/dist/cjs/sqm-big-stat_38.cjs.entry.js +2 -2
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -2
- package/dist/collection/components/sqm-referral-codes/useReferralCodes.js +1 -3
- package/dist/esm/{ShadowViewAddon-62f50be9.js → ShadowViewAddon-5dd82db7.js} +1 -1
- package/dist/esm/{copy-text-view-377f6cdb.js → copy-text-view-5576636c.js} +1 -3
- package/dist/esm/sqm-big-stat_38.entry.js +2 -2
- package/dist/esm/sqm-pagination_3.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +2 -2
- package/dist/esm-es5/{ShadowViewAddon-62f50be9.js → ShadowViewAddon-5dd82db7.js} +1 -1
- package/dist/esm-es5/{copy-text-view-377f6cdb.js → copy-text-view-5576636c.js} +1 -1
- 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-a06c4f74.system.entry.js → p-0200f850.system.entry.js} +1 -1
- package/dist/mint-components/{p-a83c594b.entry.js → p-2ad4e1ca.entry.js} +1 -1
- package/dist/mint-components/{p-859466c3.system.entry.js → p-4220a58e.system.entry.js} +1 -1
- package/dist/mint-components/p-47df4ecb.system.js +1 -1
- package/dist/mint-components/{p-3b7e4f6f.system.js → p-54373bbc.system.js} +1 -1
- package/dist/mint-components/{p-38e26b09.system.entry.js → p-5d668752.system.entry.js} +1 -1
- package/dist/mint-components/{p-a89c2d2e.js → p-63d1fc5b.js} +1 -1
- package/dist/mint-components/p-8aafd211.js +54 -0
- package/dist/mint-components/{p-cbe3764b.entry.js → p-b0ca8329.entry.js} +1 -1
- package/dist/mint-components/{p-3d155833.system.js → p-bed1cf1a.system.js} +1 -1
- package/dist/mint-components/{p-6541dc8c.entry.js → p-f55744e7.entry.js} +1 -1
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/mint-components/p-db0fe328.js +0 -54
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saasquatch/mint-components",
|
|
3
3
|
"title": "Mint Components",
|
|
4
|
-
"version": "1.11.1-
|
|
4
|
+
"version": "1.11.1-19",
|
|
5
5
|
"description": "A minimal design library with components for referral and loyalty experiences. Built with Shoelace components by Saasquatch.",
|
|
6
6
|
"icon": "https://res.cloudinary.com/saasquatch/image/upload/v1652219900/squatch-assets/For_Mint.svg",
|
|
7
7
|
"raisins": "docs/raisins.json",
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./p-64c3217a.js";import{f as t}from"./p-fd2c5407.js";import{d as i,Q as o,z as n,k as s,C as a,B as l}from"./p-08db5ea4.js";import{c as r}from"./p-cef45012.js";import{H as d}from"./p-02be1a88.js";const u=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
|
-
`,p="sq:referral-codes",c="sq:referral-codes-pagination",m=i.gql`
|
|
47
|
-
mutation markReferralCodeCopied($referralCode: String!) {
|
|
48
|
-
markReferralCodeCopied(referralCode: $referralCode) {
|
|
49
|
-
referralCode {
|
|
50
|
-
dateCopied
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
`;function f(e){const i=o(),r=l();console.log({props:e});const{refresh:d}=n(),{envelope:p,states:c,callbacks:m}=s(u,(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:r},!(null==i?void 0:i.jwt)),[f,v]=a({namespace:"sq:referral-codes-pagination",initialValue:{states:c,callbacks:m}}),[g,b]=a({namespace:"sq:referral-codes",initialValue:{refresh:d,loading:!0,referralCode:"",shareLink:"",isCopied:!1,isUsed:!1,email:{messageLink:""},fbMessenger:{messageLink:"",shareLink:""},whatsApp:{messageLink:""}}});return t((()=>{var e,t,i,o,n,s,a,l,r,u,c,m,f,v,g,h;if(null===(e=null==p?void 0:p.data)||void 0===e?void 0:e.length){const e=p.data[0];b({refresh:d,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===(a=null===(s=null===(n=e.shareLinkCodes)||void 0===n?void 0:n.data)||void 0===s?void 0:s[0])||void 0===a?void 0:a.email},fbMessenger:{messageLink:null===(u=null===(r=null===(l=e.shareLinkCodes)||void 0===l?void 0:l.data)||void 0===r?void 0:r[0])||void 0===u?void 0:u.fbMessenger,shareLink:null===(f=null===(m=null===(c=e.shareLinkCodes)||void 0===c?void 0:c.data)||void 0===m?void 0:m[0])||void 0===f?void 0:f.fbMessenger},whatsApp:{messageLink:null===(h=null===(g=null===(v=e.shareLinkCodes)||void 0===v?void 0:v.data)||void 0===g?void 0:g[0])||void 0===h?void 0:h.whatsApp}})}}),[p]),t((()=>{v({states:c,callbacks:m})}),[c.loading]),console.log({referralData:p,states:c}),{states:{...c,noCodes:0===(null==p?void 0:p.totalCount)},data:g,callbacks:{}}}const v={right:"\nsl-input::part(input){\n text-align: right;\n}",center:" \nsl-input::part(input){\n text-align: center;\n}",left:""},g=r({HostBlock:d,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)"}}),b=g.toString();function h(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,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"},b,"\n :host{\n display: block; \n width: 100%;\n }\n",v[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} ${o?g.classes.inputErrorStyle:""}`,exportparts:"base: input-base, input: input-label",value:t.loading?"Loading...":n,readonly:!0,disabled:s},"icon"===i&&a,o&&e("p",{slot:"help-text",class:g.classes.errorTextStyle},t.errorText)),("button-outside"===i||"button-below"===i)&&a),t.isCopied&&t.showNotificationText&&t.notificationText&&e("p",{part:"sqm-notification-text",class:g.classes.notificationTextStyle},t.notificationText))}export{h as C,c as R,m as S,p as a,f as u}
|