@biggive/components 0.0.6 → 0.0.7

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.
@@ -1 +1 @@
1
- import{p as a,b as i}from"./p-ce3d5ebc.js";(()=>{const i=import.meta.url,n={};return""!==i&&(n.resourcesUrl=new URL(".",i).href),a(n)})().then((a=>i([["p-13363c51",[[1,"demo-campaign-cards"],[1,"biggive-campaign-card",{banner:[1],daysRemaining:[2,"days-remaining"],target:[2],organisationName:[1,"organisation-name"],campaignTitle:[1,"campaign-title"],campaignType:[1,"campaign-type"],beneficiaries:[1],categories:[1],matchFundsRemaining:[2,"match-funds-remaining"],totalFundsRaised:[2,"total-funds-raised"],callToActionUrl:[1,"call-to-action-url"],callToActionLabel:[1,"call-to-action-label"]}],[1,"biggive-grid"]]]],a)));
1
+ import{p as a,b as i}from"./p-ce3d5ebc.js";(()=>{const i=import.meta.url,n={};return""!==i&&(n.resourcesUrl=new URL(".",i).href),a(n)})().then((a=>i([["p-3becad6c",[[1,"demo-campaign-cards"],[1,"biggive-campaign-card",{banner:[1],daysRemaining:[2,"days-remaining"],target:[2],organisationName:[1,"organisation-name"],campaignTitle:[1,"campaign-title"],campaignType:[1,"campaign-type"],beneficiaries:[16],categories:[16],matchFundsRemaining:[2,"match-funds-remaining"],totalFundsRaised:[2,"total-funds-raised"],callToActionUrl:[1,"call-to-action-url"],callToActionLabel:[1,"call-to-action-label"]}],[1,"biggive-grid"]]]],a)));
@@ -8,4 +8,4 @@ import{r as e,h as c,g as a}from"./p-ce3d5ebc.js";
8
8
  * Font Awesome Free 6.1.2 by @fontawesome - https://fontawesome.com
9
9
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
10
10
  * Copyright 2022 Fonticons, Inc.
11
- */class A{static getBeneficiaries(){return[{name:"Children (3-18)",icon:s},{name:"General Public/Humankind",icon:y},{name:"Infants (<2)",icon:t},{name:"LGBTQAI",icon:u},{name:"Minority Groups",icon:N},{name:"Older People",icon:M},{name:"People With Disabilities",icon:i},{name:"Refugees/Asylum Seekers",icon:l},{name:"Women & Girls",icon:S},{name:"Young People (18-30)",icon:w},{name:"Other",icon:L}]}static getCategories(){return[{name:"Animals",icon:z},{name:"Armed Forces/Emergency Services",icon:h},{name:"Arts/Culture/Heritage",icon:m},{name:"Cancer",icon:v},{name:"Community Support & Development",icon:x},{name:"Disaster Relief",icon:g},{name:"Education/Training/Employment",icon:n},{name:"Environment/Conservation",icon:V},{name:"Health/Wellbeing",icon:C},{name:"Homeless/Refuge",icon:F},{name:"Hospitals/Hospices",icon:p},{name:"Human Rights/Advocacy",icon:H},{name:"Information/Advice",icon:o},{name:"Medical Research",icon:f},{name:"Mental Health",icon:k},{name:"Poverty Alleviation/Relief",icon:d},{name:"Religious",icon:b},{name:"Sports/Recreation",icon:r},{name:"Other",icon:L}]}static getBeneficiaryIcon(e){return A.getBeneficiaries().filter((c=>c.name===e))[0].icon||L}static getCategoryIcon(e){var c;return(null===(c=A.getCategories().filter((c=>c.name===e))[0])||void 0===c?void 0:c.icon)||L}}const R=class{constructor(c){e(this,c),this.banner="",this.daysRemaining=null,this.target=null,this.organisationName=null,this.campaignTitle=null,this.campaignType=null,this.beneficiaries="",this.categories="",this.matchFundsRemaining=null,this.totalFundsRaised=null,this.callToActionUrl=null,this.callToActionLabel=null}getBeneficiaryIcons(){return this.beneficiaries.length>0?this.beneficiaries.split("|").map((e=>A.getBeneficiaryIcon(e))):[]}getCategoryIcons(){return this.categories.length>0?this.categories.split("|").map((e=>A.getCategoryIcon(e))):[]}formatCurrency(e){return isNaN(e)?e:parseInt(e).toLocaleString()}render(){return c("div",{class:"container"},c("div",{class:"sleeve"},c("div",{class:"campaign-type"},c("span",null,this.campaignType)),this.banner.length>0?c("div",{class:"image-wrap banner",style:{"background-image":"url("+this.banner+")"}},c("img",{src:this.banner,class:"banner"})):null,c("div",{class:"content"},c("div",{class:"meta-wrap style-1"},c("div",{class:"meta-item"},c("span",{class:"label"},"Days Remaining:")," ",c("span",{class:"text"},this.daysRemaining)),c("div",{class:"meta-item"},c("span",{class:"label"},"Target:")," ",c("span",{class:"text"},"£",this.formatCurrency(this.target)))),c("header",null,c("div",{class:"slug"},this.organisationName),c("h3",null,this.campaignTitle)),c("div",{class:"meta-wrap style-2"},c("div",{class:"meta-item"},c("span",{class:"label"},"Categories"),c("span",{class:"text"},this.getCategoryIcons().map((e=>c("svg",{width:"512",height:"512",xmlns:"http://www.w3.org/2000/svg",class:"icon",viewBox:"0 0 512 512"},c("path",{d:e.icon[4].toString()})))))),c("div",{class:"meta-item"},c("span",{class:"label"},"Helping"),c("span",{class:"text"},this.getBeneficiaryIcons().map((e=>c("svg",{width:"512",height:"512",xmlns:"http://www.w3.org/2000/svg",class:"icon",viewBox:"0 0 512 512"},c("path",{d:e.icon[4].toString()}))))))),c("div",{class:"meta-wrap style-3"},c("div",{class:"meta-item"},c("span",{class:"label"},"Match",c("br",null),"Funds Remaining"),c("span",{class:"text"},"£",this.formatCurrency(this.matchFundsRemaining))),c("div",{class:"meta-item"},c("span",{class:"label"},"Total",c("br",null),"Funds Received"),c("span",{class:"text"},"£",this.formatCurrency(this.totalFundsRaised)))),c("div",{class:"button-wrap"},c("a",{href:this.callToActionUrl,class:"call-to-action"},this.callToActionLabel)))))}};R.style=':host{display:block;margin-bottom:30px}.container{font-family:"Euclid Triangle", sans-serif;filter:drop-shadow(-1px 6px 3px rgba(0, 0, 0, 0.25))}.sleeve{clip-path:polygon(0% 0%, 0% 0%, 100% 0%, 100% 0%, 100% 100%, 100% 100%, 10% 100%, 0 90%)}.content{padding:15px;background-color:#FFFFFF}.campaign-type{margin-left:15px;width:0;height:0;border-style:inset;border-width:85px 45px 0 45px;border-color:#2AF135 transparent transparent transparent;float:left;transform:rotate(360deg)}.campaign-type span{display:block;text-align:center;top:-85px;left:-25px;position:relative;width:45px;height:45px;margin:0;color:#2C089B;font-size:0.9rem}.banner{padding-bottom:30%;background-repeat:no-repeat;background-position:center center;background-size:cover}.banner img{display:none}.meta-wrap.style-1{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-1 .meta-item{width:50%}.meta-wrap.style-1 .meta-item .label{font-weight:bold}.meta-wrap.style-1 .meta-item .text{color:#2C089B}header{margin-bottom:20px}header .slug{text-transform:uppercase;font-size:12px;line-height:14px}header h3{margin:0;padding:0;font-size:24px;line-height:28px}.meta-wrap.style-2{display:flex;font-size:12px;line-height:14px;margin-bottom:40px}.meta-wrap.style-2 .meta-item{width:50%}.meta-wrap.style-2 .meta-item .label{font-weight:bold;display:block;margin-bottom:10px}.meta-wrap.style-2 .meta-item .text{display:block;font-size:16px;line-height:18px}.meta-wrap.style-2 .meta-item .text i{margin-right:10px}.meta-wrap.style-3{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-3 .meta-item{margin-right:60px}.meta-wrap.style-3 .meta-item .label{font-weight:bold;display:block;font-size:12px;line-height:14px;margin-bottom:10px}.meta-wrap.style-3 .meta-item .text{display:block;font-size:36px;line-height:40px;font-weight:bold}.meta-wrap.style-3 .meta-item:last-child .text{color:#2C089B}.button-wrap{text-align:right}.button-wrap a{display:inline-block;padding:15px 30px;color:#FFFFFF;background-color:#2C089B;cursor:pointer;text-transform:uppercase;font-size:12px;text-decoration:none}.icon{height:1rem;width:2rem;vertical-align:-0.125rem}';const B=class{constructor(c){e(this,c)}render(){return c("div",{class:"grid"},c("slot",null))}};B.style=":host{display:block}.grid{display:flex;flex-flow:row wrap;justify-content:space-between}";const I=class{constructor(c){e(this,c)}render(){return c("biggive-grid",null,[...Array(12)].map((()=>c("biggive-campaign-card",{banner:a("/assets/images/banner.png"),"days-remaining":50,target:5e4,"organisation-name":"Ardent Theatre Company","campaign-type":"Match Funded","campaign-title":"Strike! A play by Tracy Ryan",categories:"Arts/Culture/Heritage|Environment/Conservation|Health/Wellbeing",beneficiaries:"General Public/Humankind","match-funds-remaining":17424,"total-funds-raised":15424,"call-to-action-url":"#","call-to-action-label":"Donate"}))))}};I.style=":host{display:block}";export{R as biggive_campaign_card,B as biggive_grid,I as demo_campaign_cards}
11
+ */class A{static getBeneficiaries(){return[{name:"Children (3-18)",icon:s},{name:"General Public/Humankind",icon:y},{name:"Infants (<2)",icon:t},{name:"LGBTQAI",icon:u},{name:"Minority Groups",icon:N},{name:"Older People",icon:M},{name:"People With Disabilities",icon:i},{name:"Refugees/Asylum Seekers",icon:l},{name:"Women & Girls",icon:S},{name:"Young People (18-30)",icon:w},{name:"Other",icon:L}]}static getCategories(){return[{name:"Animals",icon:z},{name:"Armed Forces/Emergency Services",icon:h},{name:"Arts/Culture/Heritage",icon:m},{name:"Cancer",icon:v},{name:"Community Support & Development",icon:x},{name:"Disaster Relief",icon:g},{name:"Education/Training/Employment",icon:n},{name:"Environment/Conservation",icon:V},{name:"Health/Wellbeing",icon:C},{name:"Homeless/Refuge",icon:F},{name:"Hospitals/Hospices",icon:p},{name:"Human Rights/Advocacy",icon:H},{name:"Information/Advice",icon:o},{name:"Medical Research",icon:f},{name:"Mental Health",icon:k},{name:"Poverty Alleviation/Relief",icon:d},{name:"Religious",icon:b},{name:"Sports/Recreation",icon:r},{name:"Other",icon:L}]}static getBeneficiaryIcon(e){return A.getBeneficiaries().filter((c=>c.name===e))[0].icon||L}static getCategoryIcon(e){var c;return(null===(c=A.getCategories().filter((c=>c.name===e))[0])||void 0===c?void 0:c.icon)||L}}const R=class{constructor(c){e(this,c),this.banner="",this.daysRemaining=null,this.target=null,this.organisationName=null,this.campaignTitle=null,this.campaignType=null,this.beneficiaries=[],this.categories=[],this.matchFundsRemaining=null,this.totalFundsRaised=null,this.callToActionUrl=null,this.callToActionLabel=null}getBeneficiaryIcons(){return this.beneficiaries.map((e=>A.getBeneficiaryIcon(e)))}getCategoryIcons(){return this.categories.map((e=>A.getCategoryIcon(e)))}formatCurrency(e){return isNaN(e)?e:parseInt(e).toLocaleString()}render(){return c("div",{class:"container"},c("div",{class:"sleeve"},c("div",{class:"campaign-type"},c("span",null,this.campaignType)),this.banner.length>0?c("div",{class:"image-wrap banner",style:{"background-image":"url("+this.banner+")"}},c("img",{src:this.banner,class:"banner"})):null,c("div",{class:"content"},c("div",{class:"meta-wrap style-1"},c("div",{class:"meta-item"},c("span",{class:"label"},"Days Remaining:")," ",c("span",{class:"text"},this.daysRemaining)),c("div",{class:"meta-item"},c("span",{class:"label"},"Target:")," ",c("span",{class:"text"},"£",this.formatCurrency(this.target)))),c("header",null,c("div",{class:"slug"},this.organisationName),c("h3",null,this.campaignTitle)),c("div",{class:"meta-wrap style-2"},c("div",{class:"meta-item"},c("span",{class:"label"},"Categories"),c("span",{class:"text"},this.getCategoryIcons().map((e=>c("svg",{width:"512",height:"512",xmlns:"http://www.w3.org/2000/svg",class:"icon",viewBox:"0 0 512 512"},c("path",{d:e.icon[4].toString()})))))),c("div",{class:"meta-item"},c("span",{class:"label"},"Helping"),c("span",{class:"text"},this.getBeneficiaryIcons().map((e=>c("svg",{width:"512",height:"512",xmlns:"http://www.w3.org/2000/svg",class:"icon",viewBox:"0 0 512 512"},c("path",{d:e.icon[4].toString()}))))))),c("div",{class:"meta-wrap style-3"},c("div",{class:"meta-item"},c("span",{class:"label"},"Match",c("br",null),"Funds Remaining"),c("span",{class:"text"},"£",this.formatCurrency(this.matchFundsRemaining))),c("div",{class:"meta-item"},c("span",{class:"label"},"Total",c("br",null),"Funds Received"),c("span",{class:"text"},"£",this.formatCurrency(this.totalFundsRaised)))),c("div",{class:"button-wrap"},c("a",{href:this.callToActionUrl,class:"call-to-action"},this.callToActionLabel)))))}};R.style=':host{display:block;margin-bottom:30px}.container{font-family:"Euclid Triangle", sans-serif;filter:drop-shadow(-1px 6px 3px rgba(0, 0, 0, 0.25))}.sleeve{clip-path:polygon(0% 0%, 0% 0%, 100% 0%, 100% 0%, 100% 100%, 100% 100%, 10% 100%, 0 90%)}.content{padding:15px;background-color:#FFFFFF}.campaign-type{margin-left:15px;width:0;height:0;border-style:inset;border-width:85px 45px 0 45px;border-color:#2AF135 transparent transparent transparent;float:left;transform:rotate(360deg)}.campaign-type span{display:block;text-align:center;top:-85px;left:-25px;position:relative;width:45px;height:45px;margin:0;color:#2C089B;font-size:0.9rem}.banner{padding-bottom:30%;background-repeat:no-repeat;background-position:center center;background-size:cover}.banner img{display:none}.meta-wrap.style-1{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-1 .meta-item{width:50%}.meta-wrap.style-1 .meta-item .label{font-weight:bold}.meta-wrap.style-1 .meta-item .text{color:#2C089B}header{margin-bottom:20px}header .slug{text-transform:uppercase;font-size:12px;line-height:14px}header h3{margin:0;padding:0;font-size:24px;line-height:28px}.meta-wrap.style-2{display:flex;font-size:12px;line-height:14px;margin-bottom:40px}.meta-wrap.style-2 .meta-item{width:50%}.meta-wrap.style-2 .meta-item .label{font-weight:bold;display:block;margin-bottom:10px}.meta-wrap.style-2 .meta-item .text{display:block;font-size:16px;line-height:18px}.meta-wrap.style-2 .meta-item .text i{margin-right:10px}.meta-wrap.style-3{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-3 .meta-item{margin-right:60px}.meta-wrap.style-3 .meta-item .label{font-weight:bold;display:block;font-size:12px;line-height:14px;margin-bottom:10px}.meta-wrap.style-3 .meta-item .text{display:block;font-size:36px;line-height:40px;font-weight:bold}.meta-wrap.style-3 .meta-item:last-child .text{color:#2C089B}.button-wrap{text-align:right}.button-wrap a{display:inline-block;padding:15px 30px;color:#FFFFFF;background-color:#2C089B;cursor:pointer;text-transform:uppercase;font-size:12px;text-decoration:none}.icon{height:1rem;width:2rem;vertical-align:-0.125rem}';const B=class{constructor(c){e(this,c)}render(){return c("div",{class:"grid"},c("slot",null))}};B.style=":host{display:block}.grid{display:flex;flex-flow:row wrap;justify-content:space-between}";const I=class{constructor(c){e(this,c)}render(){return c("biggive-grid",null,[...Array(12)].map((()=>c("biggive-campaign-card",{banner:a("/assets/images/banner.png"),"days-remaining":50,target:5e4,"organisation-name":"Ardent Theatre Company","campaign-type":"Match Funded","campaign-title":"Strike! A play by Tracy Ryan",categories:["Arts/Culture/Heritage","Environment/Conservation","Health/Wellbeing"],beneficiaries:["General Public/Humankind"],"match-funds-remaining":17424,"total-funds-raised":15424,"call-to-action-url":"#","call-to-action-label":"Donate"}))))}};I.style=":host{display:block}";export{R as biggive_campaign_card,B as biggive_grid,I as demo_campaign_cards}
@@ -328,62 +328,61 @@ const BiggiveCampaignCard = class {
328
328
  constructor(hostRef) {
329
329
  index.registerInstance(this, hostRef);
330
330
  /**
331
- * @param {string} banner Full URL of a banner image.
331
+ * Full URL of a banner image.
332
332
  */
333
333
  this.banner = '';
334
334
  /**
335
- * @param {string} number (Ceiling of) whole number of days until campaign end.
335
+ * (Ceiling of) whole number of days until campaign end.
336
336
  */
337
337
  this.daysRemaining = null;
338
338
  /**
339
- * @param {number} totalFundsRaised Target for the campaign including matching but excluding any
340
- * tax relief, in major unit of currency e.g. pounds GBP.
339
+ * Target for the campaign including matching but excluding any
340
+ * tax relief, in major unit of currency e.g. pounds GBP.
341
341
  */
342
342
  this.target = null;
343
343
  /**
344
- * @param {string} organisationName Display name of the charity or non-profit.
344
+ * Display name of the charity or non-profit.
345
345
  */
346
346
  this.organisationName = null;
347
347
  /**
348
- * @param {string} organisationName Display name of the charity's specific time-bound fundraising campaign.
348
+ * Display name of the charity's specific time-bound fundraising campaign.
349
349
  */
350
350
  this.campaignTitle = null;
351
351
  /**
352
- * @param {string} campaignType e.g. "Match Funded".
352
+ * e.g. "Match Funded".
353
353
  */
354
354
  this.campaignType = null;
355
355
  /**
356
- * @param {string} beneficiaries Pipe (|) -separated list of full category labels.
356
+ * Array of full beneficiary labels.
357
357
  */
358
- this.beneficiaries = '';
358
+ this.beneficiaries = [];
359
359
  /**
360
- * @param {string} categories Pipe (|) -separated list of full category labels.
360
+ * Array of full category labels.
361
361
  */
362
- this.categories = '';
362
+ this.categories = [];
363
363
  /**
364
- * @param {number} totalFundsRaised Match funds not yet used or reserved, in major unit of currency
365
- * e.g. pounds GBP.
364
+ * Match funds not yet used or reserved, in major unit of currency e.g. pounds GBP.
366
365
  */
367
366
  this.matchFundsRemaining = null;
368
367
  /**
369
- * @param {number} totalFundsRaised Total the campaign has raised so far including matching but excluding any
370
- * tax relief, in major unit of currency e.g. pounds GBP.
368
+ * Total the campaign has raised so far including matching but excluding any
369
+ * tax relief, in major unit of currency e.g. pounds GBP.
371
370
  */
372
371
  this.totalFundsRaised = null;
373
372
  /**
374
- * @param {string} callToActionUrl Full URL of a call to action.
373
+ * Full URL of a call to action.
375
374
  */
376
375
  this.callToActionUrl = null;
377
376
  /**
378
- * @param {string} callToActionLabel Text for the link to `callToActionUrl`.
377
+ * Text for the link to `callToActionUrl`.
379
378
  */
380
379
  this.callToActionLabel = null;
381
380
  }
382
381
  getBeneficiaryIcons() {
383
- return this.beneficiaries.length > 0 ? this.beneficiaries.split('|').map(beneficiary => CampaignGroupsService.getBeneficiaryIcon(beneficiary)) : [];
382
+ return this.beneficiaries.map(beneficiary => CampaignGroupsService.getBeneficiaryIcon(beneficiary));
384
383
  }
385
384
  getCategoryIcons() {
386
- return this.categories.length > 0 ? this.categories.split('|').map(category => CampaignGroupsService.getCategoryIcon(category)) : [];
385
+ return this.categories.map(category => CampaignGroupsService.getCategoryIcon(category));
387
386
  }
388
387
  formatCurrency(num) {
389
388
  if (!isNaN(num)) {
@@ -416,7 +415,7 @@ const DemoCampaignCards = class {
416
415
  index.registerInstance(this, hostRef);
417
416
  }
418
417
  render() {
419
- return (index.h("biggive-grid", null, [...Array(12)].map(() => (index.h("biggive-campaign-card", { banner: index.getAssetPath('/assets/images/banner.png'), "days-remaining": 50, target: 50000, "organisation-name": "Ardent Theatre Company", "campaign-type": "Match Funded", "campaign-title": "Strike! A play by Tracy Ryan", categories: "Arts/Culture/Heritage|Environment/Conservation|Health/Wellbeing", beneficiaries: "General Public/Humankind", "match-funds-remaining": 17424, "total-funds-raised": 15424, "call-to-action-url": "#", "call-to-action-label": "Donate" })))));
418
+ return (index.h("biggive-grid", null, [...Array(12)].map(() => (index.h("biggive-campaign-card", { banner: index.getAssetPath('/assets/images/banner.png'), "days-remaining": 50, target: 50000, "organisation-name": "Ardent Theatre Company", "campaign-type": "Match Funded", "campaign-title": "Strike! A play by Tracy Ryan", categories: ['Arts/Culture/Heritage', 'Environment/Conservation', 'Health/Wellbeing'], beneficiaries: ['General Public/Humankind'], "match-funds-remaining": 17424, "total-funds-raised": 15424, "call-to-action-url": "#", "call-to-action-label": "Donate" })))));
420
419
  }
421
420
  };
422
421
  DemoCampaignCards.style = demoCampaignCardsCss;
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["biggive-campaign-card_3.cjs",[[1,"demo-campaign-cards"],[1,"biggive-campaign-card",{"banner":[1],"daysRemaining":[2,"days-remaining"],"target":[2],"organisationName":[1,"organisation-name"],"campaignTitle":[1,"campaign-title"],"campaignType":[1,"campaign-type"],"beneficiaries":[1],"categories":[1],"matchFundsRemaining":[2,"match-funds-remaining"],"totalFundsRaised":[2,"total-funds-raised"],"callToActionUrl":[1,"call-to-action-url"],"callToActionLabel":[1,"call-to-action-label"]}],[1,"biggive-grid"]]]], options);
18
+ return index.bootstrapLazy([["biggive-campaign-card_3.cjs",[[1,"demo-campaign-cards"],[1,"biggive-campaign-card",{"banner":[1],"daysRemaining":[2,"days-remaining"],"target":[2],"organisationName":[1,"organisation-name"],"campaignTitle":[1,"campaign-title"],"campaignType":[1,"campaign-type"],"beneficiaries":[16],"categories":[16],"matchFundsRemaining":[2,"match-funds-remaining"],"totalFundsRaised":[2,"total-funds-raised"],"callToActionUrl":[1,"call-to-action-url"],"callToActionLabel":[1,"call-to-action-label"]}],[1,"biggive-grid"]]]], options);
19
19
  });
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["biggive-campaign-card_3.cjs",[[1,"demo-campaign-cards"],[1,"biggive-campaign-card",{"banner":[1],"daysRemaining":[2,"days-remaining"],"target":[2],"organisationName":[1,"organisation-name"],"campaignTitle":[1,"campaign-title"],"campaignType":[1,"campaign-type"],"beneficiaries":[1],"categories":[1],"matchFundsRemaining":[2,"match-funds-remaining"],"totalFundsRaised":[2,"total-funds-raised"],"callToActionUrl":[1,"call-to-action-url"],"callToActionLabel":[1,"call-to-action-label"]}],[1,"biggive-grid"]]]], options);
17
+ return index.bootstrapLazy([["biggive-campaign-card_3.cjs",[[1,"demo-campaign-cards"],[1,"biggive-campaign-card",{"banner":[1],"daysRemaining":[2,"days-remaining"],"target":[2],"organisationName":[1,"organisation-name"],"campaignTitle":[1,"campaign-title"],"campaignType":[1,"campaign-type"],"beneficiaries":[16],"categories":[16],"matchFundsRemaining":[2,"match-funds-remaining"],"totalFundsRaised":[2,"total-funds-raised"],"callToActionUrl":[1,"call-to-action-url"],"callToActionLabel":[1,"call-to-action-label"]}],[1,"biggive-grid"]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -6,62 +6,61 @@ import { CampaignGroupsService } from '../../util/campaign-groups';
6
6
  export class BiggiveCampaignCard {
7
7
  constructor() {
8
8
  /**
9
- * @param {string} banner Full URL of a banner image.
9
+ * Full URL of a banner image.
10
10
  */
11
11
  this.banner = '';
12
12
  /**
13
- * @param {string} number (Ceiling of) whole number of days until campaign end.
13
+ * (Ceiling of) whole number of days until campaign end.
14
14
  */
15
15
  this.daysRemaining = null;
16
16
  /**
17
- * @param {number} totalFundsRaised Target for the campaign including matching but excluding any
18
- * tax relief, in major unit of currency e.g. pounds GBP.
17
+ * Target for the campaign including matching but excluding any
18
+ * tax relief, in major unit of currency e.g. pounds GBP.
19
19
  */
20
20
  this.target = null;
21
21
  /**
22
- * @param {string} organisationName Display name of the charity or non-profit.
22
+ * Display name of the charity or non-profit.
23
23
  */
24
24
  this.organisationName = null;
25
25
  /**
26
- * @param {string} organisationName Display name of the charity's specific time-bound fundraising campaign.
26
+ * Display name of the charity's specific time-bound fundraising campaign.
27
27
  */
28
28
  this.campaignTitle = null;
29
29
  /**
30
- * @param {string} campaignType e.g. "Match Funded".
30
+ * e.g. "Match Funded".
31
31
  */
32
32
  this.campaignType = null;
33
33
  /**
34
- * @param {string} beneficiaries Pipe (|) -separated list of full category labels.
34
+ * Array of full beneficiary labels.
35
35
  */
36
- this.beneficiaries = '';
36
+ this.beneficiaries = [];
37
37
  /**
38
- * @param {string} categories Pipe (|) -separated list of full category labels.
38
+ * Array of full category labels.
39
39
  */
40
- this.categories = '';
40
+ this.categories = [];
41
41
  /**
42
- * @param {number} totalFundsRaised Match funds not yet used or reserved, in major unit of currency
43
- * e.g. pounds GBP.
42
+ * Match funds not yet used or reserved, in major unit of currency e.g. pounds GBP.
44
43
  */
45
44
  this.matchFundsRemaining = null;
46
45
  /**
47
- * @param {number} totalFundsRaised Total the campaign has raised so far including matching but excluding any
48
- * tax relief, in major unit of currency e.g. pounds GBP.
46
+ * Total the campaign has raised so far including matching but excluding any
47
+ * tax relief, in major unit of currency e.g. pounds GBP.
49
48
  */
50
49
  this.totalFundsRaised = null;
51
50
  /**
52
- * @param {string} callToActionUrl Full URL of a call to action.
51
+ * Full URL of a call to action.
53
52
  */
54
53
  this.callToActionUrl = null;
55
54
  /**
56
- * @param {string} callToActionLabel Text for the link to `callToActionUrl`.
55
+ * Text for the link to `callToActionUrl`.
57
56
  */
58
57
  this.callToActionLabel = null;
59
58
  }
60
59
  getBeneficiaryIcons() {
61
- return this.beneficiaries.length > 0 ? this.beneficiaries.split('|').map(beneficiary => CampaignGroupsService.getBeneficiaryIcon(beneficiary)) : [];
60
+ return this.beneficiaries.map(beneficiary => CampaignGroupsService.getBeneficiaryIcon(beneficiary));
62
61
  }
63
62
  getCategoryIcons() {
64
- return this.categories.length > 0 ? this.categories.split('|').map(category => CampaignGroupsService.getCategoryIcon(category)) : [];
63
+ return this.categories.map(category => CampaignGroupsService.getCategoryIcon(category));
65
64
  }
66
65
  formatCurrency(num) {
67
66
  if (!isNaN(num)) {
@@ -140,11 +139,8 @@ export class BiggiveCampaignCard {
140
139
  "required": false,
141
140
  "optional": false,
142
141
  "docs": {
143
- "tags": [{
144
- "name": "param",
145
- "text": "banner Full URL of a banner image."
146
- }],
147
- "text": ""
142
+ "tags": [],
143
+ "text": "Full URL of a banner image."
148
144
  },
149
145
  "attribute": "banner",
150
146
  "reflect": false,
@@ -161,11 +157,8 @@ export class BiggiveCampaignCard {
161
157
  "required": false,
162
158
  "optional": false,
163
159
  "docs": {
164
- "tags": [{
165
- "name": "param",
166
- "text": "number (Ceiling of) whole number of days until campaign end."
167
- }],
168
- "text": ""
160
+ "tags": [],
161
+ "text": "(Ceiling of) whole number of days until campaign end."
169
162
  },
170
163
  "attribute": "days-remaining",
171
164
  "reflect": false,
@@ -182,11 +175,8 @@ export class BiggiveCampaignCard {
182
175
  "required": false,
183
176
  "optional": false,
184
177
  "docs": {
185
- "tags": [{
186
- "name": "param",
187
- "text": "totalFundsRaised Target for the campaign including matching but excluding any\n tax relief, in major unit of currency e.g. pounds GBP."
188
- }],
189
- "text": ""
178
+ "tags": [],
179
+ "text": "Target for the campaign including matching but excluding any\ntax relief, in major unit of currency e.g. pounds GBP."
190
180
  },
191
181
  "attribute": "target",
192
182
  "reflect": false,
@@ -203,11 +193,8 @@ export class BiggiveCampaignCard {
203
193
  "required": false,
204
194
  "optional": false,
205
195
  "docs": {
206
- "tags": [{
207
- "name": "param",
208
- "text": "organisationName Display name of the charity or non-profit."
209
- }],
210
- "text": ""
196
+ "tags": [],
197
+ "text": "Display name of the charity or non-profit."
211
198
  },
212
199
  "attribute": "organisation-name",
213
200
  "reflect": false,
@@ -224,11 +211,8 @@ export class BiggiveCampaignCard {
224
211
  "required": false,
225
212
  "optional": false,
226
213
  "docs": {
227
- "tags": [{
228
- "name": "param",
229
- "text": "organisationName Display name of the charity's specific time-bound fundraising campaign."
230
- }],
231
- "text": ""
214
+ "tags": [],
215
+ "text": "Display name of the charity's specific time-bound fundraising campaign."
232
216
  },
233
217
  "attribute": "campaign-title",
234
218
  "reflect": false,
@@ -245,57 +229,44 @@ export class BiggiveCampaignCard {
245
229
  "required": false,
246
230
  "optional": false,
247
231
  "docs": {
248
- "tags": [{
249
- "name": "param",
250
- "text": "campaignType e.g. \"Match Funded\"."
251
- }],
252
- "text": ""
232
+ "tags": [],
233
+ "text": "e.g. \"Match Funded\"."
253
234
  },
254
235
  "attribute": "campaign-type",
255
236
  "reflect": false,
256
237
  "defaultValue": "null"
257
238
  },
258
239
  "beneficiaries": {
259
- "type": "string",
240
+ "type": "unknown",
260
241
  "mutable": false,
261
242
  "complexType": {
262
- "original": "string",
263
- "resolved": "string",
243
+ "original": "string[]",
244
+ "resolved": "string[]",
264
245
  "references": {}
265
246
  },
266
247
  "required": false,
267
248
  "optional": false,
268
249
  "docs": {
269
- "tags": [{
270
- "name": "param",
271
- "text": "beneficiaries Pipe (|) -separated list of full category labels."
272
- }],
273
- "text": ""
250
+ "tags": [],
251
+ "text": "Array of full beneficiary labels."
274
252
  },
275
- "attribute": "beneficiaries",
276
- "reflect": false,
277
- "defaultValue": "''"
253
+ "defaultValue": "[]"
278
254
  },
279
255
  "categories": {
280
- "type": "string",
256
+ "type": "unknown",
281
257
  "mutable": false,
282
258
  "complexType": {
283
- "original": "string",
284
- "resolved": "string",
259
+ "original": "string[]",
260
+ "resolved": "string[]",
285
261
  "references": {}
286
262
  },
287
263
  "required": false,
288
264
  "optional": false,
289
265
  "docs": {
290
- "tags": [{
291
- "name": "param",
292
- "text": "categories Pipe (|) -separated list of full category labels."
293
- }],
294
- "text": ""
266
+ "tags": [],
267
+ "text": "Array of full category labels."
295
268
  },
296
- "attribute": "categories",
297
- "reflect": false,
298
- "defaultValue": "''"
269
+ "defaultValue": "[]"
299
270
  },
300
271
  "matchFundsRemaining": {
301
272
  "type": "number",
@@ -308,11 +279,8 @@ export class BiggiveCampaignCard {
308
279
  "required": false,
309
280
  "optional": false,
310
281
  "docs": {
311
- "tags": [{
312
- "name": "param",
313
- "text": "totalFundsRaised Match funds not yet used or reserved, in major unit of currency\n e.g. pounds GBP."
314
- }],
315
- "text": ""
282
+ "tags": [],
283
+ "text": "Match funds not yet used or reserved, in major unit of currency e.g. pounds GBP."
316
284
  },
317
285
  "attribute": "match-funds-remaining",
318
286
  "reflect": false,
@@ -329,11 +297,8 @@ export class BiggiveCampaignCard {
329
297
  "required": false,
330
298
  "optional": false,
331
299
  "docs": {
332
- "tags": [{
333
- "name": "param",
334
- "text": "totalFundsRaised Total the campaign has raised so far including matching but excluding any\ntax relief, in major unit of currency e.g. pounds GBP."
335
- }],
336
- "text": ""
300
+ "tags": [],
301
+ "text": "Total the campaign has raised so far including matching but excluding any\ntax relief, in major unit of currency e.g. pounds GBP."
337
302
  },
338
303
  "attribute": "total-funds-raised",
339
304
  "reflect": false,
@@ -350,11 +315,8 @@ export class BiggiveCampaignCard {
350
315
  "required": false,
351
316
  "optional": false,
352
317
  "docs": {
353
- "tags": [{
354
- "name": "param",
355
- "text": "callToActionUrl Full URL of a call to action."
356
- }],
357
- "text": ""
318
+ "tags": [],
319
+ "text": "Full URL of a call to action."
358
320
  },
359
321
  "attribute": "call-to-action-url",
360
322
  "reflect": false,
@@ -371,11 +333,8 @@ export class BiggiveCampaignCard {
371
333
  "required": false,
372
334
  "optional": false,
373
335
  "docs": {
374
- "tags": [{
375
- "name": "param",
376
- "text": "callToActionLabel Text for the link to `callToActionUrl`."
377
- }],
378
- "text": ""
336
+ "tags": [],
337
+ "text": "Text for the link to `callToActionUrl`."
379
338
  },
380
339
  "attribute": "call-to-action-label",
381
340
  "reflect": false,
@@ -1,7 +1,7 @@
1
1
  import { Component, getAssetPath, h } from '@stencil/core';
2
2
  export class DemoCampaignCards {
3
3
  render() {
4
- return (h("biggive-grid", null, [...Array(12)].map(() => (h("biggive-campaign-card", { banner: getAssetPath('/assets/images/banner.png'), "days-remaining": 50, target: 50000, "organisation-name": "Ardent Theatre Company", "campaign-type": "Match Funded", "campaign-title": "Strike! A play by Tracy Ryan", categories: "Arts/Culture/Heritage|Environment/Conservation|Health/Wellbeing", beneficiaries: "General Public/Humankind", "match-funds-remaining": 17424, "total-funds-raised": 15424, "call-to-action-url": "#", "call-to-action-label": "Donate" })))));
4
+ return (h("biggive-grid", null, [...Array(12)].map(() => (h("biggive-campaign-card", { banner: getAssetPath('/assets/images/banner.png'), "days-remaining": 50, target: 50000, "organisation-name": "Ardent Theatre Company", "campaign-type": "Match Funded", "campaign-title": "Strike! A play by Tracy Ryan", categories: ['Arts/Culture/Heritage', 'Environment/Conservation', 'Health/Wellbeing'], beneficiaries: ['General Public/Humankind'], "match-funds-remaining": 17424, "total-funds-raised": 15424, "call-to-action-url": "#", "call-to-action-label": "Donate" })))));
5
5
  }
6
6
  static get is() { return "demo-campaign-cards"; }
7
7
  static get encapsulation() { return "shadow"; }
@@ -326,62 +326,61 @@ const BiggiveCampaignCard = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
326
326
  this.__registerHost();
327
327
  this.__attachShadow();
328
328
  /**
329
- * @param {string} banner Full URL of a banner image.
329
+ * Full URL of a banner image.
330
330
  */
331
331
  this.banner = '';
332
332
  /**
333
- * @param {string} number (Ceiling of) whole number of days until campaign end.
333
+ * (Ceiling of) whole number of days until campaign end.
334
334
  */
335
335
  this.daysRemaining = null;
336
336
  /**
337
- * @param {number} totalFundsRaised Target for the campaign including matching but excluding any
338
- * tax relief, in major unit of currency e.g. pounds GBP.
337
+ * Target for the campaign including matching but excluding any
338
+ * tax relief, in major unit of currency e.g. pounds GBP.
339
339
  */
340
340
  this.target = null;
341
341
  /**
342
- * @param {string} organisationName Display name of the charity or non-profit.
342
+ * Display name of the charity or non-profit.
343
343
  */
344
344
  this.organisationName = null;
345
345
  /**
346
- * @param {string} organisationName Display name of the charity's specific time-bound fundraising campaign.
346
+ * Display name of the charity's specific time-bound fundraising campaign.
347
347
  */
348
348
  this.campaignTitle = null;
349
349
  /**
350
- * @param {string} campaignType e.g. "Match Funded".
350
+ * e.g. "Match Funded".
351
351
  */
352
352
  this.campaignType = null;
353
353
  /**
354
- * @param {string} beneficiaries Pipe (|) -separated list of full category labels.
354
+ * Array of full beneficiary labels.
355
355
  */
356
- this.beneficiaries = '';
356
+ this.beneficiaries = [];
357
357
  /**
358
- * @param {string} categories Pipe (|) -separated list of full category labels.
358
+ * Array of full category labels.
359
359
  */
360
- this.categories = '';
360
+ this.categories = [];
361
361
  /**
362
- * @param {number} totalFundsRaised Match funds not yet used or reserved, in major unit of currency
363
- * e.g. pounds GBP.
362
+ * Match funds not yet used or reserved, in major unit of currency e.g. pounds GBP.
364
363
  */
365
364
  this.matchFundsRemaining = null;
366
365
  /**
367
- * @param {number} totalFundsRaised Total the campaign has raised so far including matching but excluding any
368
- * tax relief, in major unit of currency e.g. pounds GBP.
366
+ * Total the campaign has raised so far including matching but excluding any
367
+ * tax relief, in major unit of currency e.g. pounds GBP.
369
368
  */
370
369
  this.totalFundsRaised = null;
371
370
  /**
372
- * @param {string} callToActionUrl Full URL of a call to action.
371
+ * Full URL of a call to action.
373
372
  */
374
373
  this.callToActionUrl = null;
375
374
  /**
376
- * @param {string} callToActionLabel Text for the link to `callToActionUrl`.
375
+ * Text for the link to `callToActionUrl`.
377
376
  */
378
377
  this.callToActionLabel = null;
379
378
  }
380
379
  getBeneficiaryIcons() {
381
- return this.beneficiaries.length > 0 ? this.beneficiaries.split('|').map(beneficiary => CampaignGroupsService.getBeneficiaryIcon(beneficiary)) : [];
380
+ return this.beneficiaries.map(beneficiary => CampaignGroupsService.getBeneficiaryIcon(beneficiary));
382
381
  }
383
382
  getCategoryIcons() {
384
- return this.categories.length > 0 ? this.categories.split('|').map(category => CampaignGroupsService.getCategoryIcon(category)) : [];
383
+ return this.categories.map(category => CampaignGroupsService.getCategoryIcon(category));
385
384
  }
386
385
  formatCurrency(num) {
387
386
  if (!isNaN(num)) {
@@ -400,8 +399,8 @@ const BiggiveCampaignCard = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
400
399
  "organisationName": [1, "organisation-name"],
401
400
  "campaignTitle": [1, "campaign-title"],
402
401
  "campaignType": [1, "campaign-type"],
403
- "beneficiaries": [1],
404
- "categories": [1],
402
+ "beneficiaries": [16],
403
+ "categories": [16],
405
404
  "matchFundsRemaining": [2, "match-funds-remaining"],
406
405
  "totalFundsRaised": [2, "total-funds-raised"],
407
406
  "callToActionUrl": [1, "call-to-action-url"],
@@ -11,7 +11,7 @@ const DemoCampaignCards$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
11
11
  this.__attachShadow();
12
12
  }
13
13
  render() {
14
- return (h("biggive-grid", null, [...Array(12)].map(() => (h("biggive-campaign-card", { banner: getAssetPath('/assets/images/banner.png'), "days-remaining": 50, target: 50000, "organisation-name": "Ardent Theatre Company", "campaign-type": "Match Funded", "campaign-title": "Strike! A play by Tracy Ryan", categories: "Arts/Culture/Heritage|Environment/Conservation|Health/Wellbeing", beneficiaries: "General Public/Humankind", "match-funds-remaining": 17424, "total-funds-raised": 15424, "call-to-action-url": "#", "call-to-action-label": "Donate" })))));
14
+ return (h("biggive-grid", null, [...Array(12)].map(() => (h("biggive-campaign-card", { banner: getAssetPath('/assets/images/banner.png'), "days-remaining": 50, target: 50000, "organisation-name": "Ardent Theatre Company", "campaign-type": "Match Funded", "campaign-title": "Strike! A play by Tracy Ryan", categories: ['Arts/Culture/Heritage', 'Environment/Conservation', 'Health/Wellbeing'], beneficiaries: ['General Public/Humankind'], "match-funds-remaining": 17424, "total-funds-raised": 15424, "call-to-action-url": "#", "call-to-action-label": "Donate" })))));
15
15
  }
16
16
  static get style() { return demoCampaignCardsCss; }
17
17
  }, [1, "demo-campaign-cards"]);
@@ -324,62 +324,61 @@ const BiggiveCampaignCard = class {
324
324
  constructor(hostRef) {
325
325
  registerInstance(this, hostRef);
326
326
  /**
327
- * @param {string} banner Full URL of a banner image.
327
+ * Full URL of a banner image.
328
328
  */
329
329
  this.banner = '';
330
330
  /**
331
- * @param {string} number (Ceiling of) whole number of days until campaign end.
331
+ * (Ceiling of) whole number of days until campaign end.
332
332
  */
333
333
  this.daysRemaining = null;
334
334
  /**
335
- * @param {number} totalFundsRaised Target for the campaign including matching but excluding any
336
- * tax relief, in major unit of currency e.g. pounds GBP.
335
+ * Target for the campaign including matching but excluding any
336
+ * tax relief, in major unit of currency e.g. pounds GBP.
337
337
  */
338
338
  this.target = null;
339
339
  /**
340
- * @param {string} organisationName Display name of the charity or non-profit.
340
+ * Display name of the charity or non-profit.
341
341
  */
342
342
  this.organisationName = null;
343
343
  /**
344
- * @param {string} organisationName Display name of the charity's specific time-bound fundraising campaign.
344
+ * Display name of the charity's specific time-bound fundraising campaign.
345
345
  */
346
346
  this.campaignTitle = null;
347
347
  /**
348
- * @param {string} campaignType e.g. "Match Funded".
348
+ * e.g. "Match Funded".
349
349
  */
350
350
  this.campaignType = null;
351
351
  /**
352
- * @param {string} beneficiaries Pipe (|) -separated list of full category labels.
352
+ * Array of full beneficiary labels.
353
353
  */
354
- this.beneficiaries = '';
354
+ this.beneficiaries = [];
355
355
  /**
356
- * @param {string} categories Pipe (|) -separated list of full category labels.
356
+ * Array of full category labels.
357
357
  */
358
- this.categories = '';
358
+ this.categories = [];
359
359
  /**
360
- * @param {number} totalFundsRaised Match funds not yet used or reserved, in major unit of currency
361
- * e.g. pounds GBP.
360
+ * Match funds not yet used or reserved, in major unit of currency e.g. pounds GBP.
362
361
  */
363
362
  this.matchFundsRemaining = null;
364
363
  /**
365
- * @param {number} totalFundsRaised Total the campaign has raised so far including matching but excluding any
366
- * tax relief, in major unit of currency e.g. pounds GBP.
364
+ * Total the campaign has raised so far including matching but excluding any
365
+ * tax relief, in major unit of currency e.g. pounds GBP.
367
366
  */
368
367
  this.totalFundsRaised = null;
369
368
  /**
370
- * @param {string} callToActionUrl Full URL of a call to action.
369
+ * Full URL of a call to action.
371
370
  */
372
371
  this.callToActionUrl = null;
373
372
  /**
374
- * @param {string} callToActionLabel Text for the link to `callToActionUrl`.
373
+ * Text for the link to `callToActionUrl`.
375
374
  */
376
375
  this.callToActionLabel = null;
377
376
  }
378
377
  getBeneficiaryIcons() {
379
- return this.beneficiaries.length > 0 ? this.beneficiaries.split('|').map(beneficiary => CampaignGroupsService.getBeneficiaryIcon(beneficiary)) : [];
378
+ return this.beneficiaries.map(beneficiary => CampaignGroupsService.getBeneficiaryIcon(beneficiary));
380
379
  }
381
380
  getCategoryIcons() {
382
- return this.categories.length > 0 ? this.categories.split('|').map(category => CampaignGroupsService.getCategoryIcon(category)) : [];
381
+ return this.categories.map(category => CampaignGroupsService.getCategoryIcon(category));
383
382
  }
384
383
  formatCurrency(num) {
385
384
  if (!isNaN(num)) {
@@ -412,7 +411,7 @@ const DemoCampaignCards = class {
412
411
  registerInstance(this, hostRef);
413
412
  }
414
413
  render() {
415
- return (h("biggive-grid", null, [...Array(12)].map(() => (h("biggive-campaign-card", { banner: getAssetPath('/assets/images/banner.png'), "days-remaining": 50, target: 50000, "organisation-name": "Ardent Theatre Company", "campaign-type": "Match Funded", "campaign-title": "Strike! A play by Tracy Ryan", categories: "Arts/Culture/Heritage|Environment/Conservation|Health/Wellbeing", beneficiaries: "General Public/Humankind", "match-funds-remaining": 17424, "total-funds-raised": 15424, "call-to-action-url": "#", "call-to-action-label": "Donate" })))));
414
+ return (h("biggive-grid", null, [...Array(12)].map(() => (h("biggive-campaign-card", { banner: getAssetPath('/assets/images/banner.png'), "days-remaining": 50, target: 50000, "organisation-name": "Ardent Theatre Company", "campaign-type": "Match Funded", "campaign-title": "Strike! A play by Tracy Ryan", categories: ['Arts/Culture/Heritage', 'Environment/Conservation', 'Health/Wellbeing'], beneficiaries: ['General Public/Humankind'], "match-funds-remaining": 17424, "total-funds-raised": 15424, "call-to-action-url": "#", "call-to-action-label": "Donate" })))));
416
415
  }
417
416
  };
418
417
  DemoCampaignCards.style = demoCampaignCardsCss;
@@ -13,5 +13,5 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
15
  patchBrowser().then(options => {
16
- return bootstrapLazy([["biggive-campaign-card_3",[[1,"demo-campaign-cards"],[1,"biggive-campaign-card",{"banner":[1],"daysRemaining":[2,"days-remaining"],"target":[2],"organisationName":[1,"organisation-name"],"campaignTitle":[1,"campaign-title"],"campaignType":[1,"campaign-type"],"beneficiaries":[1],"categories":[1],"matchFundsRemaining":[2,"match-funds-remaining"],"totalFundsRaised":[2,"total-funds-raised"],"callToActionUrl":[1,"call-to-action-url"],"callToActionLabel":[1,"call-to-action-label"]}],[1,"biggive-grid"]]]], options);
16
+ return bootstrapLazy([["biggive-campaign-card_3",[[1,"demo-campaign-cards"],[1,"biggive-campaign-card",{"banner":[1],"daysRemaining":[2,"days-remaining"],"target":[2],"organisationName":[1,"organisation-name"],"campaignTitle":[1,"campaign-title"],"campaignType":[1,"campaign-type"],"beneficiaries":[16],"categories":[16],"matchFundsRemaining":[2,"match-funds-remaining"],"totalFundsRaised":[2,"total-funds-raised"],"callToActionUrl":[1,"call-to-action-url"],"callToActionLabel":[1,"call-to-action-label"]}],[1,"biggive-grid"]]]], options);
17
17
  });
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["biggive-campaign-card_3",[[1,"demo-campaign-cards"],[1,"biggive-campaign-card",{"banner":[1],"daysRemaining":[2,"days-remaining"],"target":[2],"organisationName":[1,"organisation-name"],"campaignTitle":[1,"campaign-title"],"campaignType":[1,"campaign-type"],"beneficiaries":[1],"categories":[1],"matchFundsRemaining":[2,"match-funds-remaining"],"totalFundsRaised":[2,"total-funds-raised"],"callToActionUrl":[1,"call-to-action-url"],"callToActionLabel":[1,"call-to-action-label"]}],[1,"biggive-grid"]]]], options);
13
+ return bootstrapLazy([["biggive-campaign-card_3",[[1,"demo-campaign-cards"],[1,"biggive-campaign-card",{"banner":[1],"daysRemaining":[2,"days-remaining"],"target":[2],"organisationName":[1,"organisation-name"],"campaignTitle":[1,"campaign-title"],"campaignType":[1,"campaign-type"],"beneficiaries":[16],"categories":[16],"matchFundsRemaining":[2,"match-funds-remaining"],"totalFundsRaised":[2,"total-funds-raised"],"callToActionUrl":[1,"call-to-action-url"],"callToActionLabel":[1,"call-to-action-label"]}],[1,"biggive-grid"]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -3,54 +3,53 @@
3
3
  */
4
4
  export declare class BiggiveCampaignCard {
5
5
  /**
6
- * @param {string} banner Full URL of a banner image.
6
+ * Full URL of a banner image.
7
7
  */
8
8
  banner: string;
9
9
  /**
10
- * @param {string} number (Ceiling of) whole number of days until campaign end.
10
+ * (Ceiling of) whole number of days until campaign end.
11
11
  */
12
12
  daysRemaining: number;
13
13
  /**
14
- * @param {number} totalFundsRaised Target for the campaign including matching but excluding any
15
- * tax relief, in major unit of currency e.g. pounds GBP.
14
+ * Target for the campaign including matching but excluding any
15
+ * tax relief, in major unit of currency e.g. pounds GBP.
16
16
  */
17
17
  target: number;
18
18
  /**
19
- * @param {string} organisationName Display name of the charity or non-profit.
19
+ * Display name of the charity or non-profit.
20
20
  */
21
21
  organisationName: string;
22
22
  /**
23
- * @param {string} organisationName Display name of the charity's specific time-bound fundraising campaign.
23
+ * Display name of the charity's specific time-bound fundraising campaign.
24
24
  */
25
25
  campaignTitle: string;
26
26
  /**
27
- * @param {string} campaignType e.g. "Match Funded".
27
+ * e.g. "Match Funded".
28
28
  */
29
29
  campaignType: string;
30
30
  /**
31
- * @param {string} beneficiaries Pipe (|) -separated list of full category labels.
31
+ * Array of full beneficiary labels.
32
32
  */
33
- beneficiaries: string;
33
+ beneficiaries: string[];
34
34
  /**
35
- * @param {string} categories Pipe (|) -separated list of full category labels.
35
+ * Array of full category labels.
36
36
  */
37
- categories: string;
37
+ categories: string[];
38
38
  /**
39
- * @param {number} totalFundsRaised Match funds not yet used or reserved, in major unit of currency
40
- * e.g. pounds GBP.
39
+ * Match funds not yet used or reserved, in major unit of currency e.g. pounds GBP.
41
40
  */
42
41
  matchFundsRemaining: number;
43
42
  /**
44
- * @param {number} totalFundsRaised Total the campaign has raised so far including matching but excluding any
45
- * tax relief, in major unit of currency e.g. pounds GBP.
43
+ * Total the campaign has raised so far including matching but excluding any
44
+ * tax relief, in major unit of currency e.g. pounds GBP.
46
45
  */
47
46
  totalFundsRaised: number;
48
47
  /**
49
- * @param {string} callToActionUrl Full URL of a call to action.
48
+ * Full URL of a call to action.
50
49
  */
51
50
  callToActionUrl: string;
52
51
  /**
53
- * @param {string} callToActionLabel Text for the link to `callToActionUrl`.
52
+ * Text for the link to `callToActionUrl`.
54
53
  */
55
54
  callToActionLabel: string;
56
55
  private getBeneficiaryIcons;
@@ -8,51 +8,51 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  export namespace Components {
9
9
  interface BiggiveCampaignCard {
10
10
  /**
11
- * @param banner Full URL of a banner image.
11
+ * Full URL of a banner image.
12
12
  */
13
13
  "banner": string;
14
14
  /**
15
- * @param beneficiaries Pipe (|) -separated list of full category labels.
15
+ * Array of full beneficiary labels.
16
16
  */
17
- "beneficiaries": string;
17
+ "beneficiaries": string[];
18
18
  /**
19
- * @param callToActionLabel Text for the link to `callToActionUrl`.
19
+ * Text for the link to `callToActionUrl`.
20
20
  */
21
21
  "callToActionLabel": string;
22
22
  /**
23
- * @param callToActionUrl Full URL of a call to action.
23
+ * Full URL of a call to action.
24
24
  */
25
25
  "callToActionUrl": string;
26
26
  /**
27
- * @param organisationName Display name of the charity's specific time-bound fundraising campaign.
27
+ * Display name of the charity's specific time-bound fundraising campaign.
28
28
  */
29
29
  "campaignTitle": string;
30
30
  /**
31
- * @param campaignType e.g. "Match Funded".
31
+ * e.g. "Match Funded".
32
32
  */
33
33
  "campaignType": string;
34
34
  /**
35
- * @param categories Pipe (|) -separated list of full category labels.
35
+ * Array of full category labels.
36
36
  */
37
- "categories": string;
37
+ "categories": string[];
38
38
  /**
39
- * @param number (Ceiling of) whole number of days until campaign end.
39
+ * (Ceiling of) whole number of days until campaign end.
40
40
  */
41
41
  "daysRemaining": number;
42
42
  /**
43
- * @param totalFundsRaised Match funds not yet used or reserved, in major unit of currency e.g. pounds GBP.
43
+ * Match funds not yet used or reserved, in major unit of currency e.g. pounds GBP.
44
44
  */
45
45
  "matchFundsRemaining": number;
46
46
  /**
47
- * @param organisationName Display name of the charity or non-profit.
47
+ * Display name of the charity or non-profit.
48
48
  */
49
49
  "organisationName": string;
50
50
  /**
51
- * @param totalFundsRaised Target for the campaign including matching but excluding any tax relief, in major unit of currency e.g. pounds GBP.
51
+ * Target for the campaign including matching but excluding any tax relief, in major unit of currency e.g. pounds GBP.
52
52
  */
53
53
  "target": number;
54
54
  /**
55
- * @param totalFundsRaised Total the campaign has raised so far including matching but excluding any tax relief, in major unit of currency e.g. pounds GBP.
55
+ * Total the campaign has raised so far including matching but excluding any tax relief, in major unit of currency e.g. pounds GBP.
56
56
  */
57
57
  "totalFundsRaised": number;
58
58
  }
@@ -89,51 +89,51 @@ declare global {
89
89
  declare namespace LocalJSX {
90
90
  interface BiggiveCampaignCard {
91
91
  /**
92
- * @param banner Full URL of a banner image.
92
+ * Full URL of a banner image.
93
93
  */
94
94
  "banner"?: string;
95
95
  /**
96
- * @param beneficiaries Pipe (|) -separated list of full category labels.
96
+ * Array of full beneficiary labels.
97
97
  */
98
- "beneficiaries"?: string;
98
+ "beneficiaries"?: string[];
99
99
  /**
100
- * @param callToActionLabel Text for the link to `callToActionUrl`.
100
+ * Text for the link to `callToActionUrl`.
101
101
  */
102
102
  "callToActionLabel"?: string;
103
103
  /**
104
- * @param callToActionUrl Full URL of a call to action.
104
+ * Full URL of a call to action.
105
105
  */
106
106
  "callToActionUrl"?: string;
107
107
  /**
108
- * @param organisationName Display name of the charity's specific time-bound fundraising campaign.
108
+ * Display name of the charity's specific time-bound fundraising campaign.
109
109
  */
110
110
  "campaignTitle"?: string;
111
111
  /**
112
- * @param campaignType e.g. "Match Funded".
112
+ * e.g. "Match Funded".
113
113
  */
114
114
  "campaignType"?: string;
115
115
  /**
116
- * @param categories Pipe (|) -separated list of full category labels.
116
+ * Array of full category labels.
117
117
  */
118
- "categories"?: string;
118
+ "categories"?: string[];
119
119
  /**
120
- * @param number (Ceiling of) whole number of days until campaign end.
120
+ * (Ceiling of) whole number of days until campaign end.
121
121
  */
122
122
  "daysRemaining"?: number;
123
123
  /**
124
- * @param totalFundsRaised Match funds not yet used or reserved, in major unit of currency e.g. pounds GBP.
124
+ * Match funds not yet used or reserved, in major unit of currency e.g. pounds GBP.
125
125
  */
126
126
  "matchFundsRemaining"?: number;
127
127
  /**
128
- * @param organisationName Display name of the charity or non-profit.
128
+ * Display name of the charity or non-profit.
129
129
  */
130
130
  "organisationName"?: string;
131
131
  /**
132
- * @param totalFundsRaised Target for the campaign including matching but excluding any tax relief, in major unit of currency e.g. pounds GBP.
132
+ * Target for the campaign including matching but excluding any tax relief, in major unit of currency e.g. pounds GBP.
133
133
  */
134
134
  "target"?: number;
135
135
  /**
136
- * @param totalFundsRaised Total the campaign has raised so far including matching but excluding any tax relief, in major unit of currency e.g. pounds GBP.
136
+ * Total the campaign has raised so far including matching but excluding any tax relief, in major unit of currency e.g. pounds GBP.
137
137
  */
138
138
  "totalFundsRaised"?: number;
139
139
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biggive/components",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Big Give Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -20,11 +20,11 @@
20
20
  ],
21
21
  "scripts": {
22
22
  "build": "stencil build --docs",
23
- "start": "stencil build --dev --watch --serve --port 3939",
23
+ "start": "stencil build --dev --watch --serve",
24
24
  "lint": "eslint src/**/*{.ts,.tsx}",
25
25
  "lint:fix": "eslint --fix src/**/*{.ts,.tsx}",
26
- "test": "stencil test --spec --e2e --port 3939",
27
- "test.watch": "stencil test --spec --e2e --watchAll --port 3939",
26
+ "test": "stencil test --spec --e2e",
27
+ "test.watch": "stencil test --spec --e2e --watchAll",
28
28
  "generate": "stencil generate",
29
29
  "prepare": "husky install",
30
30
  "pre-commit": "lint-staged"
package/readme.md CHANGED
@@ -66,7 +66,9 @@ For now:
66
66
  folder as the app's own images. This is the approach taken on [this proof of concept branch](https://github.com/thebiggive/donate-frontend/tree/COM-5-proof-of-concept).
67
67
  Should we find managing image assets messy in apps generally, an alternative approach we might
68
68
  try is importing images to component style and adding [`@rollup/plugin-image`](https://github.com/rollup/plugins/tree/master/packages/image/#readme)
69
- to Stencil's build config.
69
+ to Stencil's build config. Or if there are only a few, we could also investigate
70
+ whether `assetsDirs` on a `@Component` folds in what's needed in a way that works
71
+ in Angular et al.
70
72
 
71
73
  ### Make any required changes to the sample web components
72
74