@biggive/components 0.0.4 → 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.
@@ -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)) {
@@ -123,7 +122,7 @@ export class BiggiveCampaignCard {
123
122
  static get is() { return "biggive-campaign-card"; }
124
123
  static get encapsulation() { return "shadow"; }
125
124
  static get originalStyleUrls() { return {
126
- "$": ["biggive-campaign-card.css"]
125
+ "$": ["biggive-campaign-card.scss"]
127
126
  }; }
128
127
  static get styleUrls() { return {
129
128
  "$": ["biggive-campaign-card.css"]
@@ -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,
@@ -3,12 +3,7 @@
3
3
  }
4
4
 
5
5
  .grid {
6
- display: -webkit-box;
7
- display: -moz-box;
8
- display: -webkit-flex;
9
6
  display: flex;
10
- -webkit-flex-flow: row wrap;
11
7
  flex-flow: row wrap;
12
- -webkit-justify-content: space-between;
13
8
  justify-content: space-between;
14
- }
9
+ }
@@ -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"; }
@@ -318,7 +318,7 @@ class CampaignGroupsService {
318
318
  }
319
319
  }
320
320
 
321
- const biggiveCampaignCardCss = ":host{display:block;margin-bottom:30px}:host([column='1-5']){width:100%}:host([column='1-2']){width:calc(50% - (30px / 2))}:host([column='1-3']){width:calc(33.3% - (60px / 3))}:host([column='1-4']){width:calc(25% - (90px / 4))}:host([column='1-5']){width:calc(20% - (120px / 5))}.container{font-family:'Euclid Triangle', sans-serif;filter:drop-shadow(-1px 6px 3px rgba(0,0,0,0.25))}.sleeve{clip-path:polygon(\n 0% 0%, \n 0% 0%, \n 100% 0%, \n 100% 0%, \n 100% 100%, \n 100% 100%, \n 10% 100%, \n 0 90% \n )}.content{padding:15px;background-color:#FFFFFF}.campaign-type{margin-left:15px;width:0;height:0;border-style:inset;border-width:86.6px 50px 0 50px;border-color:#2AF135 transparent transparent transparent;float:left;transform:rotate(360deg)}.campaign-type span{display:block;text-align:center;top:-75px;left:-25px;position:relative;width:46.5px;height:46.5px;margin:0;color:#2C089B;font-size:12px}.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:-.125rem}";
321
+ const biggiveCampaignCardCss = ":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}";
322
322
 
323
323
  const BiggiveCampaignCard = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
324
324
  constructor() {
@@ -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"],
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
2
 
3
- const biggiveGridCss = ":host{display:block}.grid{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;-webkit-justify-content:space-between;justify-content:space-between}";
3
+ const biggiveGridCss = ":host{display:block}.grid{display:flex;flex-flow:row wrap;justify-content:space-between}";
4
4
 
5
5
  const BiggiveGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
6
  constructor() {
@@ -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"]);
@@ -318,68 +318,67 @@ class CampaignGroupsService {
318
318
  }
319
319
  }
320
320
 
321
- const biggiveCampaignCardCss = ":host{display:block;margin-bottom:30px}:host([column='1-5']){width:100%}:host([column='1-2']){width:calc(50% - (30px / 2))}:host([column='1-3']){width:calc(33.3% - (60px / 3))}:host([column='1-4']){width:calc(25% - (90px / 4))}:host([column='1-5']){width:calc(20% - (120px / 5))}.container{font-family:'Euclid Triangle', sans-serif;filter:drop-shadow(-1px 6px 3px rgba(0,0,0,0.25))}.sleeve{clip-path:polygon(\n 0% 0%, \n 0% 0%, \n 100% 0%, \n 100% 0%, \n 100% 100%, \n 100% 100%, \n 10% 100%, \n 0 90% \n )}.content{padding:15px;background-color:#FFFFFF}.campaign-type{margin-left:15px;width:0;height:0;border-style:inset;border-width:86.6px 50px 0 50px;border-color:#2AF135 transparent transparent transparent;float:left;transform:rotate(360deg)}.campaign-type span{display:block;text-align:center;top:-75px;left:-25px;position:relative;width:46.5px;height:46.5px;margin:0;color:#2C089B;font-size:12px}.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:-.125rem}";
321
+ const biggiveCampaignCardCss = ":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}";
322
322
 
323
323
  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)) {
@@ -393,7 +392,7 @@ const BiggiveCampaignCard = class {
393
392
  };
394
393
  BiggiveCampaignCard.style = biggiveCampaignCardCss;
395
394
 
396
- const biggiveGridCss = ":host{display:block}.grid{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;-webkit-justify-content:space-between;justify-content:space-between}";
395
+ const biggiveGridCss = ":host{display:block}.grid{display:flex;flex-flow:row wrap;justify-content:space-between}";
397
396
 
398
397
  const BiggiveGrid = class {
399
398
  constructor(hostRef) {
@@ -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