Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@getchange/change-drop-in

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@getchange/change-drop-in - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

dist/change-donation-form-247486ec.js

2

dist/change-donation-form.min.js

@@ -1,1 +0,1 @@

export{C as ChangeDonationForm}from"./change-donation-form-df56f086.js";
export{C as ChangeDonationForm}from"./change-donation-form-247486ec.js";

@@ -1,1 +0,1 @@

import{r as e,e as t,t as r,i,n as o,s as n,$ as a,y as s,o as d,w as c,l}from"./change-donation-form-df56f086.js";var p=function(e,t,r,i){var o,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,r,a):o(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let h=class extends n{constructor(){super(),this.searchResults=[],this.loading=!1}render(){return a`<div id="search-area">${s`<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M24.163 41.6551C33.8263 41.6551 41.66 33.8221 41.66 24.1596C41.66 14.4971 33.8263 6.66406 24.163 6.66406C14.4997 6.66406 6.66602 14.4971 6.66602 24.1596C6.66602 33.8221 14.4997 41.6551 24.163 41.6551Z" stroke="#8A959E" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M36.5332 36.5322L46.6565 46.6549" stroke="#8A959E" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>`} <input type="text" placeholder="Nonprofit name or EIN" name="nonprofit-search" @input="${this.performSearch}" class="${d({"search-term":!this.noSearchTerm()})}"></div>${this.noSearchTerm()?c:a`<div id="backdrop">${this.renderSearchResults()}</div>`}`}renderSearchResults(){return a`<div id="search-results" tabindex="1">${0!==this.searchResults.length?a`${this.searchResults.slice(0,10).map((e=>a`<button class="search-result" @click="${()=>this.handleSearchResultClick(e)}"><img src="${e.icon_url}"><div class="name">${e.name}</div><div class="category">${e.category}</div></button>`))}`:c} ${0!==this.searchResults.length||this.loading?c:a`<p id="no-results"><img src="${this.noResultsIcon}"><br><b>No results.</b><br>Are we missing a nonprofit? Email hello@getchange.io and we'll help!</p>`} ${this.loading?a`<div id="loading-overlay"><span class="spinner"></span></div>`:c}</div>`}clear(){this.searchInput.value="",this.requestUpdate()}handleSearchResultClick(e){this.dispatchEvent(new CustomEvent("select-nonprofit",{detail:e,bubbles:!0,composed:!0}))}performSearch(){const e=this.searchInput.value;if(""===e)return this.loading=!1,void(this.searchResults=[]);this.loading=!0,this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=window.setTimeout((()=>{const t=new URLSearchParams;t.append("search_term",e),fetch(`https://api.getchange.io/api/v1/nonprofit_basics?${t.toString()}`,{headers:{"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>e.nonprofits)).then((e=>{this.searchResults=e})).catch((()=>{})).finally((()=>{this.loading=!1}))}),200)}noSearchTerm(){if(!this.searchInput)return!0;return null===this.searchInput.value||""===this.searchInput.value}};h.styles=[e`:host{display:block;position:relative;--spinner-primary-color:white;--spinner-secondary-color:rgba(255, 255, 255, 0.2)}input:focus~#icon{opacity:.8}#search-area{display:flex;align-items:center;position:relative;z-index:2}#search-area svg{position:absolute;left:.7em;width:1.5em}input{width:100%;border-radius:1em;background:var(--input-background-color,#fff);padding:.8em 1.1em .8em 3em;margin:0;font-family:inherit;border:1px solid var(--input-border-color,transparent);color:var(--input-color,#000);box-shadow:0 0 21px rgba(0,0,0,.04)}input.search-term{border-bottom-left-radius:0;border-bottom-right-radius:0;box-shadow:none;border-bottom:1px solid var(--input-border-color,#ddd)}input::placeholder{color:var(--input-placeholder-color,#999)}#no-results{text-align:center;font-size:1.3em}#search-results{padding:1.2em;position:relative;top:.1em;box-sizing:border-box;min-height:9em}.search-result{display:flex;align-items:center;padding:9px 16px;margin:0 -16px;width:calc(100% + 32px);border-radius:6px;border:none;z-index:1;color:inherit;text-decoration:none;background-color:transparent;transition:background-color .1s ease-out;white-space:nowrap;text-overflow:ellipsis}.search-result img{height:1.5em;border-radius:50%;margin-right:.7em}.search-result:hover{background-color:var(--search-result-background-hover,#f6f7fa)}@media (max-width:800px){.search-result .name{flex:1}}.search-result .category{color:var(--color,#000);opacity:.5;margin-left:12px}#loading-overlay{position:absolute;display:flex;justify-content:center;background-color:rgba(0,0,0,.1);align-items:center;z-index:10;--inset:10px;left:var(--inset);right:var(--inset);top:calc(.5em + var(--inset));bottom:var(--inset);border-radius:1em}#backdrop{position:absolute;top:0;left:0;right:0;background-color:var(--input-background-color,#fff);padding-top:2.2em;border-radius:1em;box-shadow:0 0 21px rgba(0,0,0,.04);z-index:1}.spinner{width:48px;height:48px;border:5px solid var(--spinner-primary-color,#8637e1);border-bottom-color:var(--spinner-secondary-color,rgba(134,55,225,.2));border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}button,input{font-size:inherit}button{cursor:pointer}`],p([t()],h.prototype,"noResultsIcon",void 0),p([r()],h.prototype,"searchResults",void 0),p([r()],h.prototype,"loading",void 0),p([i("input[type=text]")],h.prototype,"searchInput",void 0),h=p([o("change-search-bar")],h);var u=function(e,t,r,i){var o,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,r,a):o(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let f=class extends n{constructor(){super(),this.featuredNonprofitIds=[],this.title="Support a cause",this.featuredNonprofits=[],this.view="featured",this.addEventListener("select-nonprofit",(e=>{this.handleSelectNonprofit(e.detail),this.changeSearchBar.clear()}))}firstUpdated(){(async function(e){const t=new URLSearchParams;for(const r of e)t.append("ids[]",r);return fetch(`https://api.getchange.io/api/v1/nonprofit_basics?${t.toString()}`).then((e=>e.json())).then((e=>e.nonprofits))})(this.featuredNonprofitIds).then((e=>this.featuredNonprofits=e.slice(0,4)))}render(){return a`<div id="container"><h1>${this.title}</h1><change-search-bar></change-search-bar>${"featured"===this.view?this.renderFeaturedGrid():this.renderCause()}</div>`}renderFeaturedGrid(){return a`<div id="featured-grid">${this.featuredNonprofits.map((e=>a`<button class="featured-nonprofit" @click="${()=>this.handleSelectNonprofit(e)}"><div class="top-bar"><img src="${e.icon_url}"><div><div class="name">${function(e,t){const r=e.split(" "),i=r.slice(0,r.length-1),o=r[r.length-1];return a`${i.join(" ")} <span></span><div style="white-space:nowrap;display:inline-block">${o} ${t}</div>`}(e.name,a`<span class="arrow">${v()}</span>`)}</div><div class="category">${e.category}</div></div></div><div class="description">${e.description}</div></button>`))}</div>`}renderCause(){var e,t,r,i,o,n,s;return a`<div id="cause-view"><div><button @click="${()=>this.view="featured"}" id="back-button">${v()} Back</button><div class="top-bar"><img src="${l(null===(e=this.selectedNonprofit)||void 0===e?void 0:e.icon_url)}"><div><div class="name">${null===(t=this.selectedNonprofit)||void 0===t?void 0:t.name}</div><div class="category">${null===(r=this.selectedNonprofit)||void 0===r?void 0:r.category}</div></div></div><div class="title">Mission</div><div>${null===(i=this.selectedNonprofit)||void 0===i?void 0:i.description}</div><div class="title">ein</div><div>${null===(o=this.selectedNonprofit)||void 0===o?void 0:o.ein.slice(0,2)}-${null===(n=this.selectedNonprofit)||void 0===n?void 0:n.ein.slice(2)}</div></div><change-donation-form solana .publicKey="${this.publicKey}" .nonprofitId="${null===(s=this.selectedNonprofit)||void 0===s?void 0:s.id}"></change-donation-form></div>`}handleSelectNonprofit(e){this.selectedNonprofit=e,this.view="cause"}};function v(){return s`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M16.62 2.99c-.49-.49-1.28-.49-1.77 0L6.54 11.3c-.39.39-.39 1.02 0 1.41l8.31 8.31c.49.49 1.28.49 1.77 0s.49-1.28 0-1.77L9.38 12l7.25-7.25c.48-.48.48-1.28-.01-1.76z"/></svg>`}f.styles=e`:host{display:block;max-width:800px;font-family:sans-serif;background-color:var(--background-color,#f7f9fa);color:var(--color,#000);padding:1em}#container{display:flex;flex-direction:column;align-items:center}change-search-bar{width:100%}#featured-grid{display:flex;flex-wrap:wrap;width:40em;max-width:100%;margin-top:1em}.featured-nonprofit{display:flex;flex-direction:column;justify-content:flex-start;box-shadow:0 0 21px rgba(0,0,0,.04);border-radius:1em;padding:1em;background-color:var(--card-background-color,#fff);flex:1;min-width:15em;max-width:100%;margin:1em;text-align:left}.featured-nonprofit .arrow{display:inline-block;opacity:0;transform:translateX(-.1em);transition:all .1s ease-out}.featured-nonprofit:hover .arrow{opacity:1;transform:translateX(0)}.featured-nonprofit .arrow svg{line-height:0;height:.9em;width:.9em;top:2px;vertical-align:-2px;transform:rotate(180deg)}.top-bar{display:flex;align-items:center;margin-bottom:1em}.top-bar>img{width:3em;margin-right:1em;border-radius:50%;align-self:center}.top-bar>div{flex:1}.name{font-weight:700;margin-bottom:.2em}.category{color:#aaa}#cause-view{display:flex;justify-content:center;flex-wrap:wrap;padding:1em}#cause-view>div{padding:1.5em;flex:1;min-width:15em}#back-button{display:flex;align-items:center;color:var(--detail-color,#999);margin-bottom:1em}#back-button svg{margin-right:.2em}#cause-view .title{text-transform:uppercase;font-size:.8em;font-weight:700;color:var(--detail-color,#999);margin-top:2em;margin-bottom:.2em}change-donation-form{--background-color:var(--card-background-color, white);border-radius:1em;flex:1}button{font-size:inherit;color:inherit;border:none;cursor:pointer;background:0 0}`,u([t({type:Array,attribute:"featured-nonprofits"})],f.prototype,"featuredNonprofitIds",void 0),u([t({type:String,attribute:"public-key"})],f.prototype,"publicKey",void 0),u([t()],f.prototype,"title",void 0),u([r()],f.prototype,"featuredNonprofits",void 0),u([r()],f.prototype,"view",void 0),u([r()],f.prototype,"selectedNonprofit",void 0),u([i("change-search-bar")],f.prototype,"changeSearchBar",void 0),f=u([o("change-drop-in")],f);export{f as ChangeDropIn};
import{r as e,e as t,t as r,i,n as o,s as n,$ as a,y as s,o as d,w as c,l}from"./change-donation-form-247486ec.js";var p=function(e,t,r,i){var o,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,r,a):o(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let h=class extends n{constructor(){super(),this.searchResults=[],this.loading=!1}render(){return a`<div id="search-area">${s`<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M24.163 41.6551C33.8263 41.6551 41.66 33.8221 41.66 24.1596C41.66 14.4971 33.8263 6.66406 24.163 6.66406C14.4997 6.66406 6.66602 14.4971 6.66602 24.1596C6.66602 33.8221 14.4997 41.6551 24.163 41.6551Z" stroke="#8A959E" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M36.5332 36.5322L46.6565 46.6549" stroke="#8A959E" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>`} <input type="text" placeholder="Nonprofit name or EIN" name="nonprofit-search" @input="${this.performSearch}" class="${d({"search-term":!this.noSearchTerm()})}"></div>${this.noSearchTerm()?c:a`<div id="backdrop">${this.renderSearchResults()}</div>`}`}renderSearchResults(){return a`<div id="search-results" tabindex="1">${0!==this.searchResults.length?a`${this.searchResults.slice(0,10).map((e=>a`<button class="search-result" @click="${()=>this.handleSearchResultClick(e)}"><img src="${e.icon_url}"><div class="name">${e.name}</div><div class="category">${e.category}</div></button>`))}`:c} ${0!==this.searchResults.length||this.loading?c:a`<p id="no-results"><img src="${this.noResultsIcon}"><br><b>No results.</b><br>Are we missing a nonprofit? Email hello@getchange.io and we'll help!</p>`} ${this.loading?a`<div id="loading-overlay"><span class="spinner"></span></div>`:c}</div>`}clear(){this.searchInput.value="",this.requestUpdate()}handleSearchResultClick(e){this.dispatchEvent(new CustomEvent("select-nonprofit",{detail:e,bubbles:!0,composed:!0}))}performSearch(){const e=this.searchInput.value;if(""===e)return this.loading=!1,void(this.searchResults=[]);this.loading=!0,this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=window.setTimeout((()=>{const t=new URLSearchParams;t.append("search_term",e),fetch(`https://api.getchange.io/api/v1/nonprofit_basics?${t.toString()}`,{headers:{"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>e.nonprofits)).then((e=>{this.searchResults=e})).catch((()=>{})).finally((()=>{this.loading=!1}))}),200)}noSearchTerm(){if(!this.searchInput)return!0;return null===this.searchInput.value||""===this.searchInput.value}};h.styles=[e`:host{display:block;position:relative;--spinner-primary-color:white;--spinner-secondary-color:rgba(255, 255, 255, 0.2)}input:focus~#icon{opacity:.8}#search-area{display:flex;align-items:center;position:relative;z-index:2}#search-area svg{position:absolute;left:.7em;width:1.5em}input{width:100%;border-radius:1em;background:var(--input-background-color,#fff);padding:.8em 1.1em .8em 3em;margin:0;font-family:inherit;border:1px solid var(--input-border-color,transparent);color:var(--input-color,#000);box-shadow:0 0 21px rgba(0,0,0,.04)}input.search-term{border-bottom-left-radius:0;border-bottom-right-radius:0;box-shadow:none;border-bottom:1px solid var(--input-border-color,#ddd)}input::placeholder{color:var(--input-placeholder-color,#999)}#no-results{text-align:center;font-size:1.3em}#search-results{padding:1.2em;position:relative;top:.1em;box-sizing:border-box;min-height:9em}.search-result{display:flex;align-items:center;padding:9px 16px;margin:0 -16px;width:calc(100% + 32px);border-radius:6px;border:none;z-index:1;color:inherit;text-decoration:none;background-color:transparent;transition:background-color .1s ease-out;white-space:nowrap;text-overflow:ellipsis}.search-result img{height:1.5em;border-radius:50%;margin-right:.7em}.search-result:hover{background-color:var(--search-result-background-hover,#f6f7fa)}@media (max-width:800px){.search-result .name{flex:1}}.search-result .category{color:var(--color,#000);opacity:.5;margin-left:12px}#loading-overlay{position:absolute;display:flex;justify-content:center;background-color:rgba(0,0,0,.1);align-items:center;z-index:10;--inset:10px;left:var(--inset);right:var(--inset);top:calc(.5em + var(--inset));bottom:var(--inset);border-radius:1em}#backdrop{position:absolute;top:0;left:0;right:0;background-color:var(--input-background-color,#fff);padding-top:2.2em;border-radius:1em;box-shadow:0 0 21px rgba(0,0,0,.04);z-index:1}.spinner{width:48px;height:48px;border:5px solid var(--spinner-primary-color,#8637e1);border-bottom-color:var(--spinner-secondary-color,rgba(134,55,225,.2));border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}button,input{font-size:inherit}button{cursor:pointer}`],p([t()],h.prototype,"noResultsIcon",void 0),p([r()],h.prototype,"searchResults",void 0),p([r()],h.prototype,"loading",void 0),p([i("input[type=text]")],h.prototype,"searchInput",void 0),h=p([o("change-search-bar")],h);var u=function(e,t,r,i){var o,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,r,a):o(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};let f=class extends n{constructor(){super(),this.featuredNonprofitIds=[],this.title="Support a cause",this.featuredNonprofits=[],this.view="featured",this.addEventListener("select-nonprofit",(e=>{this.handleSelectNonprofit(e.detail),this.changeSearchBar.clear()}))}firstUpdated(){(async function(e){const t=new URLSearchParams;for(const r of e)t.append("ids[]",r);return fetch(`https://api.getchange.io/api/v1/nonprofit_basics?${t.toString()}`).then((e=>e.json())).then((e=>e.nonprofits))})(this.featuredNonprofitIds).then((e=>this.featuredNonprofits=e.slice(0,4)))}render(){return a`<div id="container"><h1>${this.title}</h1><change-search-bar></change-search-bar>${"featured"===this.view?this.renderFeaturedGrid():this.renderCause()}</div>`}renderFeaturedGrid(){return a`<div id="featured-grid">${this.featuredNonprofits.map((e=>a`<button class="featured-nonprofit" @click="${()=>this.handleSelectNonprofit(e)}"><div class="top-bar"><img src="${e.icon_url}"><div><div class="name">${function(e,t){const r=e.split(" "),i=r.slice(0,r.length-1),o=r[r.length-1];return a`${i.join(" ")} <span></span><div style="white-space:nowrap;display:inline-block">${o} ${t}</div>`}(e.name,a`<span class="arrow">${v()}</span>`)}</div><div class="category">${e.category}</div></div></div><div class="description">${e.description}</div></button>`))}</div>`}renderCause(){var e,t,r,i,o,n,s;return a`<div id="cause-view"><div><button @click="${()=>this.view="featured"}" id="back-button">${v()} Back</button><div class="top-bar"><img src="${l(null===(e=this.selectedNonprofit)||void 0===e?void 0:e.icon_url)}"><div><div class="name">${null===(t=this.selectedNonprofit)||void 0===t?void 0:t.name}</div><div class="category">${null===(r=this.selectedNonprofit)||void 0===r?void 0:r.category}</div></div></div><div class="title">Mission</div><div>${null===(i=this.selectedNonprofit)||void 0===i?void 0:i.description}</div><div class="title">ein</div><div>${null===(o=this.selectedNonprofit)||void 0===o?void 0:o.ein.slice(0,2)}-${null===(n=this.selectedNonprofit)||void 0===n?void 0:n.ein.slice(2)}</div></div><change-donation-form solana .publicKey="${this.publicKey}" .nonprofitId="${null===(s=this.selectedNonprofit)||void 0===s?void 0:s.id}"></change-donation-form></div>`}handleSelectNonprofit(e){this.selectedNonprofit=e,this.view="cause"}};function v(){return s`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M16.62 2.99c-.49-.49-1.28-.49-1.77 0L6.54 11.3c-.39.39-.39 1.02 0 1.41l8.31 8.31c.49.49 1.28.49 1.77 0s.49-1.28 0-1.77L9.38 12l7.25-7.25c.48-.48.48-1.28-.01-1.76z"/></svg>`}f.styles=e`:host{display:block;max-width:800px;font-family:sans-serif;background-color:var(--background-color,#f7f9fa);color:var(--color,#000);padding:1em}#container{display:flex;flex-direction:column;align-items:center}change-search-bar{width:100%}#featured-grid{display:flex;flex-wrap:wrap;width:40em;max-width:100%;margin-top:1em}.featured-nonprofit{display:flex;flex-direction:column;justify-content:flex-start;box-shadow:0 0 21px rgba(0,0,0,.04);border-radius:1em;padding:1em;background-color:var(--card-background-color,#fff);flex:1;min-width:15em;max-width:100%;margin:1em;text-align:left}.featured-nonprofit .arrow{display:inline-block;opacity:0;transform:translateX(-.1em);transition:all .1s ease-out}.featured-nonprofit:hover .arrow{opacity:1;transform:translateX(0)}.featured-nonprofit .arrow svg{line-height:0;height:.9em;width:.9em;top:2px;vertical-align:-2px;transform:rotate(180deg)}.top-bar{display:flex;align-items:center;margin-bottom:1em}.top-bar>img{width:3em;margin-right:1em;border-radius:50%;align-self:center}.top-bar>div{flex:1}.name{font-weight:700;margin-bottom:.2em}.category{color:#aaa}#cause-view{display:flex;justify-content:center;flex-wrap:wrap;padding:1em}#cause-view>div{padding:1.5em;flex:1;min-width:15em}#back-button{display:flex;align-items:center;color:var(--detail-color,#999);margin-bottom:1em}#back-button svg{margin-right:.2em}#cause-view .title{text-transform:uppercase;font-size:.8em;font-weight:700;color:var(--detail-color,#999);margin-top:2em;margin-bottom:.2em}change-donation-form{--background-color:var(--card-background-color, white);border-radius:1em;flex:1}button{font-size:inherit;color:inherit;border:none;cursor:pointer;background:0 0}`,u([t({type:Array,attribute:"featured-nonprofits"})],f.prototype,"featuredNonprofitIds",void 0),u([t({type:String,attribute:"public-key"})],f.prototype,"publicKey",void 0),u([t()],f.prototype,"title",void 0),u([r()],f.prototype,"featuredNonprofits",void 0),u([r()],f.prototype,"view",void 0),u([r()],f.prototype,"selectedNonprofit",void 0),u([i("change-search-bar")],f.prototype,"changeSearchBar",void 0),f=u([o("change-drop-in")],f);export{f as ChangeDropIn};
{
"name": "@getchange/change-drop-in",
"version": "1.4.0",
"version": "1.5.0",
"description": "UI element that lets users donate crypto",

@@ -5,0 +5,0 @@ "type": "module",

@@ -33,2 +33,4 @@ # change-drop-in

| nonprofit-id (\*required) | The ID of the nonprofit you'd like to accept donations for. You can find nonprofit IDs at https://api.getchange.io. |
| success-url | When a coinbase donation is completed, the page containing the `<change-donation-form>` will redirect to this URL, if provided. |
| metadata-* | Any attributes starting with "metdata-" will be attached to completed coinbase donations. For example, `metadata-tracking-id="abcd"` will add `tracking-id: abcd` to the resulting donation, so you can see it in your donation reports. |
| solana | Add this attribute to accept SOL (Solana) donations. A second payment method option will appear in the form. |

@@ -35,0 +37,0 @@

@@ -33,3 +33,3 @@ import { LitElement, html, css, svg, nothing, PropertyValues } from "lit";

VERSION = "1.4.0";
VERSION = "1.5.0";

@@ -182,2 +182,8 @@ settings = this.fetchSettings();

params.set("metadata[last_name]", this.lastNameInput?.value);
this.getAttributeNames().forEach((name) => {
if (name.startsWith("metadata-")) {
const key = name.substring("metadata-".length);
params.set(`metadata[${key}]`, this.getAttribute(name) as string);
}
});
// Make up a unique ID for the checkout. This ID is used to poll for the

@@ -184,0 +190,0 @@ // payment status.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc