@biggive/components 0.0.1 → 0.0.4

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.
Files changed (100) hide show
  1. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-Bold.woff +0 -0
  2. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-Bold.woff2 +0 -0
  3. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-BoldItalic.woff +0 -0
  4. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-BoldItalic.woff2 +0 -0
  5. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-Italic.woff +0 -0
  6. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-Italic.woff2 +0 -0
  7. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-Light.woff +0 -0
  8. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-Light.woff2 +0 -0
  9. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-LightItalic.woff +0 -0
  10. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-LightItalic.woff2 +0 -0
  11. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-Medium.woff +0 -0
  12. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-Medium.woff2 +0 -0
  13. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-MediumItalic.woff +0 -0
  14. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-MediumItalic.woff2 +0 -0
  15. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-Regular.woff +0 -0
  16. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-Regular.woff2 +0 -0
  17. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-SemiBold.woff +0 -0
  18. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-SemiBold.woff2 +0 -0
  19. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-SemiBoldItalic.woff +0 -0
  20. package/dist/biggive/assets/fonts/EuclidTriangle/EuclidTriangle-SemiBoldItalic.woff2 +0 -0
  21. package/dist/biggive/assets/fonts/EuclidTriangle/stylesheet.css +89 -0
  22. package/dist/biggive/assets/images/banner.png +0 -0
  23. package/dist/biggive/biggive.esm.js +1 -0
  24. package/dist/biggive/index.esm.js +0 -0
  25. package/dist/biggive/p-ce3d5ebc.js +2 -0
  26. package/dist/biggive/p-e6a690fb.entry.js +11 -0
  27. package/dist/cjs/biggive-campaign-card_3.cjs.entry.js +426 -0
  28. package/dist/cjs/biggive.cjs.js +19 -0
  29. package/dist/cjs/index-8692cc53.js +1154 -0
  30. package/dist/cjs/index.cjs.js +2 -0
  31. package/dist/cjs/loader.cjs.js +21 -0
  32. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-Bold.woff +0 -0
  33. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-Bold.woff2 +0 -0
  34. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-BoldItalic.woff +0 -0
  35. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-BoldItalic.woff2 +0 -0
  36. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-Italic.woff +0 -0
  37. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-Italic.woff2 +0 -0
  38. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-Light.woff +0 -0
  39. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-Light.woff2 +0 -0
  40. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-LightItalic.woff +0 -0
  41. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-LightItalic.woff2 +0 -0
  42. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-Medium.woff +0 -0
  43. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-Medium.woff2 +0 -0
  44. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-MediumItalic.woff +0 -0
  45. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-MediumItalic.woff2 +0 -0
  46. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-Regular.woff +0 -0
  47. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-Regular.woff2 +0 -0
  48. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-SemiBold.woff +0 -0
  49. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-SemiBold.woff2 +0 -0
  50. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-SemiBoldItalic.woff +0 -0
  51. package/dist/collection/assets/fonts/EuclidTriangle/EuclidTriangle-SemiBoldItalic.woff2 +0 -0
  52. package/dist/collection/assets/fonts/EuclidTriangle/stylesheet.css +89 -0
  53. package/dist/collection/assets/images/banner.png +0 -0
  54. package/dist/collection/collection-manifest.json +14 -0
  55. package/dist/collection/components/biggive-campaign-card/biggive-campaign-card.css +199 -0
  56. package/dist/collection/components/biggive-campaign-card/biggive-campaign-card.js +385 -0
  57. package/dist/collection/components/biggive-grid/biggive-grid.css +14 -0
  58. package/dist/collection/components/biggive-grid/biggive-grid.js +15 -0
  59. package/dist/collection/components/demo-campaign-cards/demo-campaign-cards.css +3 -0
  60. package/dist/collection/components/demo-campaign-cards/demo-campaign-cards.js +14 -0
  61. package/dist/collection/index.js +1 -0
  62. package/dist/collection/util/campaign-groups.js +145 -0
  63. package/dist/components/biggive-campaign-card.d.ts +11 -0
  64. package/dist/components/biggive-campaign-card.js +6 -0
  65. package/dist/components/biggive-campaign-card2.js +424 -0
  66. package/dist/components/biggive-grid.d.ts +11 -0
  67. package/dist/components/biggive-grid.js +6 -0
  68. package/dist/components/biggive-grid2.js +30 -0
  69. package/dist/components/demo-campaign-cards.d.ts +11 -0
  70. package/dist/components/demo-campaign-cards.js +45 -0
  71. package/dist/components/index.d.ts +24 -0
  72. package/dist/components/index.js +4 -0
  73. package/dist/esm/biggive-campaign-card_3.entry.js +420 -0
  74. package/dist/esm/biggive.js +17 -0
  75. package/dist/esm/index-4c3bc0b8.js +1128 -0
  76. package/dist/esm/index.js +1 -0
  77. package/dist/esm/loader.js +17 -0
  78. package/dist/esm/polyfills/core-js.js +11 -0
  79. package/dist/esm/polyfills/css-shim.js +1 -0
  80. package/dist/esm/polyfills/dom.js +79 -0
  81. package/dist/esm/polyfills/es5-html-element.js +1 -0
  82. package/dist/esm/polyfills/index.js +34 -0
  83. package/dist/esm/polyfills/system.js +6 -0
  84. package/dist/index.cjs.js +1 -0
  85. package/dist/index.js +1 -0
  86. package/dist/types/components/biggive-campaign-card/biggive-campaign-card.d.ts +60 -0
  87. package/dist/types/components/biggive-grid/biggive-grid.d.ts +3 -0
  88. package/dist/types/components/demo-campaign-cards/demo-campaign-cards.d.ts +3 -0
  89. package/dist/types/components.d.ts +159 -0
  90. package/dist/types/index.d.ts +1 -0
  91. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  92. package/dist/types/util/campaign-groups.d.ts +13 -0
  93. package/loader/cdn.js +3 -0
  94. package/loader/index.cjs.js +3 -0
  95. package/loader/index.d.ts +12 -0
  96. package/loader/index.es2017.js +3 -0
  97. package/loader/index.js +4 -0
  98. package/loader/package.json +10 -0
  99. package/package.json +1 -1
  100. package/readme.md +3 -1
@@ -0,0 +1,385 @@
1
+ import { Component, Prop, h } from '@stencil/core';
2
+ import { CampaignGroupsService } from '../../util/campaign-groups';
3
+ /**
4
+ * @todo Currency code for the campaign must be passed as a `@Prop`, not localised to the prospective donor.
5
+ */
6
+ export class BiggiveCampaignCard {
7
+ constructor() {
8
+ /**
9
+ * @param {string} banner Full URL of a banner image.
10
+ */
11
+ this.banner = '';
12
+ /**
13
+ * @param {string} number (Ceiling of) whole number of days until campaign end.
14
+ */
15
+ this.daysRemaining = null;
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.
19
+ */
20
+ this.target = null;
21
+ /**
22
+ * @param {string} organisationName Display name of the charity or non-profit.
23
+ */
24
+ this.organisationName = null;
25
+ /**
26
+ * @param {string} organisationName Display name of the charity's specific time-bound fundraising campaign.
27
+ */
28
+ this.campaignTitle = null;
29
+ /**
30
+ * @param {string} campaignType e.g. "Match Funded".
31
+ */
32
+ this.campaignType = null;
33
+ /**
34
+ * @param {string} beneficiaries Pipe (|) -separated list of full category labels.
35
+ */
36
+ this.beneficiaries = '';
37
+ /**
38
+ * @param {string} categories Pipe (|) -separated list of full category labels.
39
+ */
40
+ this.categories = '';
41
+ /**
42
+ * @param {number} totalFundsRaised Match funds not yet used or reserved, in major unit of currency
43
+ * e.g. pounds GBP.
44
+ */
45
+ this.matchFundsRemaining = null;
46
+ /**
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.
49
+ */
50
+ this.totalFundsRaised = null;
51
+ /**
52
+ * @param {string} callToActionUrl Full URL of a call to action.
53
+ */
54
+ this.callToActionUrl = null;
55
+ /**
56
+ * @param {string} callToActionLabel Text for the link to `callToActionUrl`.
57
+ */
58
+ this.callToActionLabel = null;
59
+ }
60
+ getBeneficiaryIcons() {
61
+ return this.beneficiaries.length > 0 ? this.beneficiaries.split('|').map(beneficiary => CampaignGroupsService.getBeneficiaryIcon(beneficiary)) : [];
62
+ }
63
+ getCategoryIcons() {
64
+ return this.categories.length > 0 ? this.categories.split('|').map(category => CampaignGroupsService.getCategoryIcon(category)) : [];
65
+ }
66
+ formatCurrency(num) {
67
+ if (!isNaN(num)) {
68
+ return parseInt(num).toLocaleString();
69
+ }
70
+ return num;
71
+ }
72
+ render() {
73
+ return (h("div", { class: "container" },
74
+ h("div", { class: "sleeve" },
75
+ h("div", { class: "campaign-type" },
76
+ h("span", null, this.campaignType)),
77
+ this.banner.length > 0 ? (h("div", { class: "image-wrap banner", style: { 'background-image': 'url(' + this.banner + ')' } },
78
+ h("img", { src: this.banner, class: "banner" }))) : null,
79
+ h("div", { class: "content" },
80
+ h("div", { class: "meta-wrap style-1" },
81
+ h("div", { class: "meta-item" },
82
+ h("span", { class: "label" }, "Days Remaining:"),
83
+ " ",
84
+ h("span", { class: "text" }, this.daysRemaining)),
85
+ h("div", { class: "meta-item" },
86
+ h("span", { class: "label" }, "Target:"),
87
+ " ",
88
+ h("span", { class: "text" },
89
+ "\u00A3",
90
+ this.formatCurrency(this.target)))),
91
+ h("header", null,
92
+ h("div", { class: "slug" }, this.organisationName),
93
+ h("h3", null, this.campaignTitle)),
94
+ h("div", { class: "meta-wrap style-2" },
95
+ h("div", { class: "meta-item" },
96
+ h("span", { class: "label" }, "Categories"),
97
+ h("span", { class: "text" }, this.getCategoryIcons().map((iconDefinition) => (h("svg", { width: "512", height: "512", xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" },
98
+ h("path", { d: iconDefinition.icon[4].toString() })))))),
99
+ h("div", { class: "meta-item" },
100
+ h("span", { class: "label" }, "Helping"),
101
+ h("span", { class: "text" }, this.getBeneficiaryIcons().map(iconDefinition => (h("svg", { width: "512", height: "512", xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" },
102
+ h("path", { d: iconDefinition.icon[4].toString() }))))))),
103
+ h("div", { class: "meta-wrap style-3" },
104
+ h("div", { class: "meta-item" },
105
+ h("span", { class: "label" },
106
+ "Match",
107
+ h("br", null),
108
+ "Funds Remaining"),
109
+ h("span", { class: "text" },
110
+ "\u00A3",
111
+ this.formatCurrency(this.matchFundsRemaining))),
112
+ h("div", { class: "meta-item" },
113
+ h("span", { class: "label" },
114
+ "Total",
115
+ h("br", null),
116
+ "Funds Received"),
117
+ h("span", { class: "text" },
118
+ "\u00A3",
119
+ this.formatCurrency(this.totalFundsRaised)))),
120
+ h("div", { class: "button-wrap" },
121
+ h("a", { href: this.callToActionUrl, class: "call-to-action" }, this.callToActionLabel))))));
122
+ }
123
+ static get is() { return "biggive-campaign-card"; }
124
+ static get encapsulation() { return "shadow"; }
125
+ static get originalStyleUrls() { return {
126
+ "$": ["biggive-campaign-card.css"]
127
+ }; }
128
+ static get styleUrls() { return {
129
+ "$": ["biggive-campaign-card.css"]
130
+ }; }
131
+ static get properties() { return {
132
+ "banner": {
133
+ "type": "string",
134
+ "mutable": false,
135
+ "complexType": {
136
+ "original": "string",
137
+ "resolved": "string",
138
+ "references": {}
139
+ },
140
+ "required": false,
141
+ "optional": false,
142
+ "docs": {
143
+ "tags": [{
144
+ "name": "param",
145
+ "text": "banner Full URL of a banner image."
146
+ }],
147
+ "text": ""
148
+ },
149
+ "attribute": "banner",
150
+ "reflect": false,
151
+ "defaultValue": "''"
152
+ },
153
+ "daysRemaining": {
154
+ "type": "number",
155
+ "mutable": false,
156
+ "complexType": {
157
+ "original": "number",
158
+ "resolved": "number",
159
+ "references": {}
160
+ },
161
+ "required": false,
162
+ "optional": false,
163
+ "docs": {
164
+ "tags": [{
165
+ "name": "param",
166
+ "text": "number (Ceiling of) whole number of days until campaign end."
167
+ }],
168
+ "text": ""
169
+ },
170
+ "attribute": "days-remaining",
171
+ "reflect": false,
172
+ "defaultValue": "null"
173
+ },
174
+ "target": {
175
+ "type": "number",
176
+ "mutable": false,
177
+ "complexType": {
178
+ "original": "number",
179
+ "resolved": "number",
180
+ "references": {}
181
+ },
182
+ "required": false,
183
+ "optional": false,
184
+ "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": ""
190
+ },
191
+ "attribute": "target",
192
+ "reflect": false,
193
+ "defaultValue": "null"
194
+ },
195
+ "organisationName": {
196
+ "type": "string",
197
+ "mutable": false,
198
+ "complexType": {
199
+ "original": "string",
200
+ "resolved": "string",
201
+ "references": {}
202
+ },
203
+ "required": false,
204
+ "optional": false,
205
+ "docs": {
206
+ "tags": [{
207
+ "name": "param",
208
+ "text": "organisationName Display name of the charity or non-profit."
209
+ }],
210
+ "text": ""
211
+ },
212
+ "attribute": "organisation-name",
213
+ "reflect": false,
214
+ "defaultValue": "null"
215
+ },
216
+ "campaignTitle": {
217
+ "type": "string",
218
+ "mutable": false,
219
+ "complexType": {
220
+ "original": "string",
221
+ "resolved": "string",
222
+ "references": {}
223
+ },
224
+ "required": false,
225
+ "optional": false,
226
+ "docs": {
227
+ "tags": [{
228
+ "name": "param",
229
+ "text": "organisationName Display name of the charity's specific time-bound fundraising campaign."
230
+ }],
231
+ "text": ""
232
+ },
233
+ "attribute": "campaign-title",
234
+ "reflect": false,
235
+ "defaultValue": "null"
236
+ },
237
+ "campaignType": {
238
+ "type": "string",
239
+ "mutable": false,
240
+ "complexType": {
241
+ "original": "string",
242
+ "resolved": "string",
243
+ "references": {}
244
+ },
245
+ "required": false,
246
+ "optional": false,
247
+ "docs": {
248
+ "tags": [{
249
+ "name": "param",
250
+ "text": "campaignType e.g. \"Match Funded\"."
251
+ }],
252
+ "text": ""
253
+ },
254
+ "attribute": "campaign-type",
255
+ "reflect": false,
256
+ "defaultValue": "null"
257
+ },
258
+ "beneficiaries": {
259
+ "type": "string",
260
+ "mutable": false,
261
+ "complexType": {
262
+ "original": "string",
263
+ "resolved": "string",
264
+ "references": {}
265
+ },
266
+ "required": false,
267
+ "optional": false,
268
+ "docs": {
269
+ "tags": [{
270
+ "name": "param",
271
+ "text": "beneficiaries Pipe (|) -separated list of full category labels."
272
+ }],
273
+ "text": ""
274
+ },
275
+ "attribute": "beneficiaries",
276
+ "reflect": false,
277
+ "defaultValue": "''"
278
+ },
279
+ "categories": {
280
+ "type": "string",
281
+ "mutable": false,
282
+ "complexType": {
283
+ "original": "string",
284
+ "resolved": "string",
285
+ "references": {}
286
+ },
287
+ "required": false,
288
+ "optional": false,
289
+ "docs": {
290
+ "tags": [{
291
+ "name": "param",
292
+ "text": "categories Pipe (|) -separated list of full category labels."
293
+ }],
294
+ "text": ""
295
+ },
296
+ "attribute": "categories",
297
+ "reflect": false,
298
+ "defaultValue": "''"
299
+ },
300
+ "matchFundsRemaining": {
301
+ "type": "number",
302
+ "mutable": false,
303
+ "complexType": {
304
+ "original": "number",
305
+ "resolved": "number",
306
+ "references": {}
307
+ },
308
+ "required": false,
309
+ "optional": false,
310
+ "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": ""
316
+ },
317
+ "attribute": "match-funds-remaining",
318
+ "reflect": false,
319
+ "defaultValue": "null"
320
+ },
321
+ "totalFundsRaised": {
322
+ "type": "number",
323
+ "mutable": false,
324
+ "complexType": {
325
+ "original": "number",
326
+ "resolved": "number",
327
+ "references": {}
328
+ },
329
+ "required": false,
330
+ "optional": false,
331
+ "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": ""
337
+ },
338
+ "attribute": "total-funds-raised",
339
+ "reflect": false,
340
+ "defaultValue": "null"
341
+ },
342
+ "callToActionUrl": {
343
+ "type": "string",
344
+ "mutable": false,
345
+ "complexType": {
346
+ "original": "string",
347
+ "resolved": "string",
348
+ "references": {}
349
+ },
350
+ "required": false,
351
+ "optional": false,
352
+ "docs": {
353
+ "tags": [{
354
+ "name": "param",
355
+ "text": "callToActionUrl Full URL of a call to action."
356
+ }],
357
+ "text": ""
358
+ },
359
+ "attribute": "call-to-action-url",
360
+ "reflect": false,
361
+ "defaultValue": "null"
362
+ },
363
+ "callToActionLabel": {
364
+ "type": "string",
365
+ "mutable": false,
366
+ "complexType": {
367
+ "original": "string",
368
+ "resolved": "string",
369
+ "references": {}
370
+ },
371
+ "required": false,
372
+ "optional": false,
373
+ "docs": {
374
+ "tags": [{
375
+ "name": "param",
376
+ "text": "callToActionLabel Text for the link to `callToActionUrl`."
377
+ }],
378
+ "text": ""
379
+ },
380
+ "attribute": "call-to-action-label",
381
+ "reflect": false,
382
+ "defaultValue": "null"
383
+ }
384
+ }; }
385
+ }
@@ -0,0 +1,14 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ .grid {
6
+ display: -webkit-box;
7
+ display: -moz-box;
8
+ display: -webkit-flex;
9
+ display: flex;
10
+ -webkit-flex-flow: row wrap;
11
+ flex-flow: row wrap;
12
+ -webkit-justify-content: space-between;
13
+ justify-content: space-between;
14
+ }
@@ -0,0 +1,15 @@
1
+ import { Component, h } from '@stencil/core';
2
+ export class BiggiveGrid {
3
+ render() {
4
+ return (h("div", { class: "grid" },
5
+ h("slot", null)));
6
+ }
7
+ static get is() { return "biggive-grid"; }
8
+ static get encapsulation() { return "shadow"; }
9
+ static get originalStyleUrls() { return {
10
+ "$": ["biggive-grid.css"]
11
+ }; }
12
+ static get styleUrls() { return {
13
+ "$": ["biggive-grid.css"]
14
+ }; }
15
+ }
@@ -0,0 +1,3 @@
1
+ :host {
2
+ display: block;
3
+ }
@@ -0,0 +1,14 @@
1
+ import { Component, getAssetPath, h } from '@stencil/core';
2
+ export class DemoCampaignCards {
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" })))));
5
+ }
6
+ static get is() { return "demo-campaign-cards"; }
7
+ static get encapsulation() { return "shadow"; }
8
+ static get originalStyleUrls() { return {
9
+ "$": ["demo-campaign-cards.css"]
10
+ }; }
11
+ static get styleUrls() { return {
12
+ "$": ["demo-campaign-cards.css"]
13
+ }; }
14
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,145 @@
1
+ import { faAccessibleIcon } from '@fortawesome/free-brands-svg-icons';
2
+ import { faBaby, faBalanceScale, faBlind, faBook, faCampground, faChild, faFutbol, faHeartbeat, faHospital, faInfoCircle, faMedal, faMicroscope, faMortarPestle, faParachuteBox, faPaw, faPeopleCarry, faPlaceOfWorship, faPlus, faRainbow, faRibbon, faSeedling, faTheaterMasks, faUniversalAccess, faUserGraduate, faVenus, } from '@fortawesome/free-solid-svg-icons';
3
+ import { faUsers } from '@fortawesome/pro-duotone-svg-icons';
4
+ import { faHeadSideMedical, faHomeHeart } from '@fortawesome/pro-solid-svg-icons';
5
+ export class CampaignGroupsService {
6
+ static getBeneficiaries() {
7
+ return [
8
+ {
9
+ name: 'Children (3-18)',
10
+ icon: faChild,
11
+ },
12
+ {
13
+ name: 'General Public/Humankind',
14
+ icon: faUniversalAccess,
15
+ },
16
+ {
17
+ name: 'Infants (<2)',
18
+ icon: faBaby,
19
+ },
20
+ {
21
+ name: 'LGBTQAI',
22
+ icon: faRainbow,
23
+ },
24
+ {
25
+ name: 'Minority Groups',
26
+ icon: faUsers,
27
+ },
28
+ {
29
+ name: 'Older People',
30
+ icon: faBlind,
31
+ },
32
+ {
33
+ name: 'People With Disabilities',
34
+ icon: faAccessibleIcon,
35
+ },
36
+ {
37
+ name: 'Refugees/Asylum Seekers',
38
+ icon: faCampground,
39
+ },
40
+ {
41
+ name: 'Women & Girls',
42
+ icon: faVenus,
43
+ },
44
+ {
45
+ name: 'Young People (18-30)',
46
+ icon: faUserGraduate,
47
+ },
48
+ {
49
+ name: 'Other',
50
+ icon: faPlus,
51
+ },
52
+ ];
53
+ }
54
+ static getCategories() {
55
+ return [
56
+ {
57
+ name: 'Animals',
58
+ icon: faPaw,
59
+ },
60
+ {
61
+ name: 'Armed Forces/Emergency Services',
62
+ icon: faMedal,
63
+ },
64
+ {
65
+ name: 'Arts/Culture/Heritage',
66
+ icon: faTheaterMasks,
67
+ },
68
+ {
69
+ name: 'Cancer',
70
+ icon: faRibbon,
71
+ },
72
+ {
73
+ name: 'Community Support & Development',
74
+ icon: faPeopleCarry,
75
+ },
76
+ {
77
+ name: 'Disaster Relief',
78
+ icon: faParachuteBox,
79
+ },
80
+ {
81
+ name: 'Education/Training/Employment',
82
+ icon: faBook,
83
+ },
84
+ {
85
+ name: 'Environment/Conservation',
86
+ icon: faSeedling,
87
+ },
88
+ {
89
+ name: 'Health/Wellbeing',
90
+ icon: faHeartbeat,
91
+ },
92
+ {
93
+ name: 'Homeless/Refuge',
94
+ icon: faHomeHeart,
95
+ },
96
+ {
97
+ name: 'Hospitals/Hospices',
98
+ icon: faHospital,
99
+ },
100
+ {
101
+ name: 'Human Rights/Advocacy',
102
+ icon: faBalanceScale,
103
+ },
104
+ {
105
+ name: 'Information/Advice',
106
+ icon: faInfoCircle,
107
+ },
108
+ {
109
+ name: 'Medical Research',
110
+ icon: faMicroscope,
111
+ },
112
+ {
113
+ name: 'Mental Health',
114
+ icon: faHeadSideMedical,
115
+ },
116
+ {
117
+ name: 'Poverty Alleviation/Relief',
118
+ icon: faMortarPestle,
119
+ },
120
+ {
121
+ name: 'Religious',
122
+ icon: faPlaceOfWorship,
123
+ },
124
+ {
125
+ name: 'Sports/Recreation',
126
+ icon: faFutbol,
127
+ },
128
+ {
129
+ name: 'Other',
130
+ icon: faPlus,
131
+ },
132
+ ];
133
+ }
134
+ static getBeneficiaryIcon(beneficiary) {
135
+ const matchingItems = CampaignGroupsService.getBeneficiaries().filter(ii => ii.name === beneficiary);
136
+ // For an unknown/invalid beneficiary, show 'other' symbol.
137
+ return matchingItems[0].icon || faPlus;
138
+ }
139
+ static getCategoryIcon(category) {
140
+ var _a;
141
+ const matchingItems = CampaignGroupsService.getCategories().filter(ii => ii.name === category);
142
+ // For an unknown/invalid category, show 'other' symbol.
143
+ return ((_a = matchingItems[0]) === null || _a === void 0 ? void 0 : _a.icon) || faPlus;
144
+ }
145
+ }
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface BiggiveCampaignCard extends Components.BiggiveCampaignCard, HTMLElement {}
4
+ export const BiggiveCampaignCard: {
5
+ prototype: BiggiveCampaignCard;
6
+ new (): BiggiveCampaignCard;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { B as BiggiveCampaignCard$1, d as defineCustomElement$1 } from './biggive-campaign-card2.js';
2
+
3
+ const BiggiveCampaignCard = BiggiveCampaignCard$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { BiggiveCampaignCard, defineCustomElement };