@saasquatch/mint-components 1.11.1-8 → 1.11.1-9
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-d2b1e28a.js → ShadowViewAddon-2b0d0016.js} +1 -1
- package/dist/cjs/{copy-text-view-94e76d0a.js → copy-text-view-b2240d63.js} +5 -5
- 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 +5 -5
- package/dist/esm/{ShadowViewAddon-76b1137d.js → ShadowViewAddon-81afccad.js} +1 -1
- package/dist/esm/{copy-text-view-2ba105b6.js → copy-text-view-30eb24f2.js} +5 -5
- 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-76b1137d.js → ShadowViewAddon-81afccad.js} +1 -1
- package/dist/esm-es5/{copy-text-view-2ba105b6.js → copy-text-view-30eb24f2.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-09e30e46.entry.js → p-1c09c85d.entry.js} +1 -1
- package/dist/mint-components/p-5ac0db5b.js +48 -0
- package/dist/mint-components/{p-f6b820fd.system.js → p-5c2a7c12.system.js} +1 -1
- package/dist/mint-components/p-5fc8d87c.system.js +1 -1
- package/dist/mint-components/{p-c3dc5a23.js → p-72234fe8.js} +1 -1
- package/dist/mint-components/{p-a0b1ecf2.system.entry.js → p-76f11db8.system.entry.js} +1 -1
- package/dist/mint-components/{p-89fc3144.entry.js → p-a21567fa.entry.js} +1 -1
- package/dist/mint-components/{p-55a421bb.system.entry.js → p-bbb41b23.system.entry.js} +1 -1
- package/dist/mint-components/{p-a182b053.entry.js → p-c728e889.entry.js} +1 -1
- package/dist/mint-components/{p-8f33fa36.system.entry.js → p-d69163f5.system.entry.js} +1 -1
- package/dist/mint-components/{p-7356f9c9.system.js → p-f86a9b05.system.js} +1 -1
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/mint-components/p-e983c342.js +0 -48
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-9",
|
|
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,48 +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 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.shortUrl,email:{messageLink:null===(o=null===(n=e.shareLinkCodes)||void 0===n?void 0:n[0])||void 0===o?void 0:o.shortUrl},fbMessenger:{messageLink:null===(a=null===(s=e.shareLinkCodes)||void 0===s?void 0:s[0])||void 0===a?void 0:a.shortUrl,shareLink:null===(d=null===(l=e.shareLinkCodes)||void 0===l?void 0:l[0])||void 0===d?void 0:d.shortUrl},whatsApp:{messageLink:null===(p=null===(u=e.shareLinkCodes)||void 0===u?void 0:u[0])||void 0===p?void 0:p.shortUrl}})}}),[r]),t((()=>{m({states:u,callbacks:p})}),[u.loading]),console.log({referralData:r,states:u}),{states:{...u,noCodes: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}
|