@saasquatch/vanilla-components 1.2.3-1 → 1.2.4-1

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 (92) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/{WidgetHost-d7b870ce.js → WidgetHost-71b013eb.js} +615 -615
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/sqh-close-button.cjs.entry.js +27 -22
  5. package/dist/cjs/sqh-copy-button_12.cjs.entry.js +1054 -980
  6. package/dist/cjs/sqh-referral-code.cjs.entry.js +22 -22
  7. package/dist/cjs/sqh-rewards-actions.cjs.entry.js +26 -11
  8. package/dist/cjs/widget-components.cjs.js +1 -1
  9. package/dist/collection/components/close-button/close-button.js +67 -56
  10. package/dist/collection/components/copy-button/copy-button.js +386 -293
  11. package/dist/collection/components/copy-link-button/copy-link-button.js +230 -182
  12. package/dist/collection/components/global-container/global-container.js +169 -126
  13. package/dist/collection/components/image-component/image-component.js +174 -132
  14. package/dist/collection/components/partner-stat-component/partner-stat-component.js +185 -155
  15. package/dist/collection/components/referral-code/referral-code.js +33 -30
  16. package/dist/collection/components/referral-component/referral-component.js +254 -236
  17. package/dist/collection/components/referral-list/referral-list.js +929 -671
  18. package/dist/collection/components/rewards-actions/rewards-actions.js +104 -77
  19. package/dist/collection/components/share-button/share-button.js +309 -255
  20. package/dist/collection/components/share-button-container/share-button-container.js +2467 -1534
  21. package/dist/collection/components/stat-component/stat-component.js +185 -155
  22. package/dist/collection/components/stats-container/stats-container.js +204 -180
  23. package/dist/collection/components/text-component/text-component.js +276 -249
  24. package/dist/collection/entrypoint.js +32 -32
  25. package/dist/collection/global/global.js +4 -4
  26. package/dist/collection/services/FormatJs.js +15 -15
  27. package/dist/collection/services/WidgetHost.js +621 -621
  28. package/dist/collection/utilities.js +81 -81
  29. package/dist/esm/{WidgetHost-a27e693d.js → WidgetHost-9c337319.js} +615 -615
  30. package/dist/esm/loader.mjs +1 -1
  31. package/dist/esm/polyfills/core-js.js +0 -0
  32. package/dist/esm/polyfills/dom.js +0 -0
  33. package/dist/esm/polyfills/es5-html-element.js +0 -0
  34. package/dist/esm/polyfills/index.js +0 -0
  35. package/dist/esm/polyfills/system.js +0 -0
  36. package/dist/esm/sqh-close-button.entry.js +27 -22
  37. package/dist/esm/sqh-copy-button_12.entry.js +1053 -979
  38. package/dist/esm/sqh-referral-code.entry.js +22 -22
  39. package/dist/esm/sqh-rewards-actions.entry.js +26 -11
  40. package/dist/esm/widget-components.mjs +1 -1
  41. package/dist/esm-es5/{WidgetHost-a27e693d.js → WidgetHost-9c337319.js} +9432 -9432
  42. package/dist/esm-es5/_commonjsHelpers-1d681858.js +17 -17
  43. package/dist/esm-es5/css-shim-a659079f.js +122 -122
  44. package/dist/esm-es5/dom-4061ceba.js +468 -468
  45. package/dist/esm-es5/en-be593af0.js +1471 -1471
  46. package/dist/esm-es5/index-8ea8b6d8.js +1758 -1758
  47. package/dist/esm-es5/loader.mjs +11 -11
  48. package/dist/esm-es5/sqh-close-button.entry.js +35 -30
  49. package/dist/esm-es5/sqh-copy-button_12.entry.js +9571 -9485
  50. package/dist/esm-es5/sqh-referral-code.entry.js +29 -29
  51. package/dist/esm-es5/sqh-rewards-actions.entry.js +31 -16
  52. package/dist/esm-es5/widget-components.mjs +6 -6
  53. package/dist/types/components/close-button/close-button.d.ts +15 -7
  54. package/dist/types/components/copy-button/copy-button.d.ts +104 -23
  55. package/dist/types/components/copy-link-button/copy-link-button.d.ts +59 -17
  56. package/dist/types/components/global-container/global-container.d.ts +46 -9
  57. package/dist/types/components/image-component/image-component.d.ts +50 -9
  58. package/dist/types/components/partner-stat-component/partner-stat-component.d.ts +48 -16
  59. package/dist/types/components/referral-code/referral-code.d.ts +9 -6
  60. package/dist/types/components/referral-component/referral-component.d.ts +45 -17
  61. package/dist/types/components/referral-list/referral-list.d.ts +248 -44
  62. package/dist/types/components/rewards-actions/rewards-actions.d.ts +24 -6
  63. package/dist/types/components/share-button/share-button.d.ts +81 -17
  64. package/dist/types/components/share-button-container/share-button-container.d.ts +681 -97
  65. package/dist/types/components/stat-component/stat-component.d.ts +47 -16
  66. package/dist/types/components/stats-container/stats-container.d.ts +44 -23
  67. package/dist/types/components/text-component/text-component.d.ts +77 -16
  68. package/dist/types/components.d.ts +2050 -2
  69. package/dist/types/global/global.d.ts +4 -4
  70. package/dist/types/saasquatch.d.ts +103 -103
  71. package/dist/types/services/FormatJs.d.ts +7 -7
  72. package/dist/types/services/WidgetHost.d.ts +45 -45
  73. package/dist/types/utilities.d.ts +7 -7
  74. package/dist/widget-components/entrypoint.js +32 -32
  75. package/dist/widget-components/p-24fc4ba9.js +1 -1
  76. package/dist/widget-components/{p-d4b27c72.entry.js → p-366f1663.entry.js} +1 -1
  77. package/dist/widget-components/p-46109683.js +3 -3
  78. package/dist/widget-components/{p-650d012d.entry.js → p-54ea7a00.entry.js} +1 -1
  79. package/dist/widget-components/p-58be1132.system.js +1 -1
  80. package/dist/widget-components/{p-9adc7c50.system.js → p-8e232564.system.js} +0 -0
  81. package/dist/widget-components/{p-c0cdba77.system.entry.js → p-b17efca4.system.entry.js} +1 -1
  82. package/dist/widget-components/p-c8bc8c77.system.entry.js +1 -0
  83. package/dist/widget-components/{p-93574d86.entry.js → p-d416634a.entry.js} +16 -16
  84. package/dist/widget-components/p-d97c955d.system.entry.js +8 -0
  85. package/dist/widget-components/{p-9525bf4a.js → p-edd43dbc.js} +0 -0
  86. package/dist/widget-components/widget-components.esm.js +1 -1
  87. package/dist/widget-components/widget-components.js +1 -1
  88. package/docs/raisins.json +1 -0
  89. package/package.json +96 -89
  90. package/readme.md +52 -52
  91. package/dist/widget-components/p-45e253f6.system.entry.js +0 -8
  92. package/dist/widget-components/p-908068c2.system.entry.js +0 -1
@@ -1,671 +1,929 @@
1
- import { h, Component, Prop, State } from "@stencil/core";
2
- import { css } from "emotion";
3
- import { uuid } from "../../utilities";
4
- import { API } from "../../services/WidgetHost";
5
- export class ReferralList {
6
- constructor() {
7
- this.offset = 0;
8
- this.loading = true;
9
- }
10
- componentWillLoad() {
11
- if (!this.ishidden) {
12
- return this.getReferrals(this.showreferrer)
13
- .then((res) => {
14
- this.referrals = res.referrals.data;
15
- this.referredBy = res.referredByReferral;
16
- this.referralsCount = res.referrals.totalCount;
17
- this.loading = false;
18
- this.locale = res.locale;
19
- })
20
- .catch((e) => {
21
- this.onError(e);
22
- });
23
- }
24
- }
25
- getReferrals(showReferrer, offset = 0) {
26
- return API.graphql.getReferrals(showReferrer, offset);
27
- }
28
- paginate(offset, event) {
29
- if (this.loading)
30
- return null;
31
- let { referralsCount } = this;
32
- if (this.showreferrer && this.referredBy)
33
- referralsCount++;
34
- if (offset >= referralsCount || offset < 0)
35
- return null;
36
- this.loading = true;
37
- const { target } = event;
38
- target.innerText = "...";
39
- this.getReferrals(offset).then((res) => {
40
- target.innerText =
41
- offset > this.offset ? this.paginatemore : this.paginateless;
42
- this.referrals = res.referrals.data;
43
- this.offset = offset;
44
- this.loading = false;
45
- });
46
- }
47
- onError(e) {
48
- console.error(e);
49
- this.loading = false;
50
- }
51
- render() {
52
- let referredByRow;
53
- let referralsRow;
54
- const referralvariables = {
55
- usefirstreward: this.usefirstreward,
56
- referrercontent: this.referrercontent,
57
- convertedcontent: this.convertedcontent,
58
- pendingcontent: this.pendingcontent,
59
- pendingvalue: this.pendingvalue,
60
- referrervalue: this.referrervalue,
61
- valuecontent: this.valuecontent,
62
- expiredcontent: this.expiredcontent,
63
- expiredvalue: this.expiredvalue,
64
- expiresvalue: this.expiresvalue,
65
- redeemedvalue: this.redeemedvalue,
66
- showexpiry: this.showexpiry,
67
- shownotes: this.shownotes,
68
- cancelledvalue: this.cancelledvalue,
69
- cancelledcontent: this.cancelledcontent,
70
- };
71
- if (this.referrals) {
72
- referralsRow = this.referrals.map((ref) => {
73
- const referraltype = ref.rewards.length > 0 || ref.dateConverted ? "converted" : "pending";
74
- return (h("sqh-referral-component", { id: uuid(), referral: ref, referralvariables: referralvariables, referraltype: referraltype, unknownuser: this.unknownuser, locale: this.internationalization ? this.locale : "en-US" }));
75
- });
76
- }
77
- if (this.referrals.length < 3 && this.referredBy && this.showreferrer) {
78
- referredByRow = (h("sqh-referral-component", { id: uuid(), referral: this.referredBy, referralvariables: referralvariables, referraltype: "referrer", unknownuser: this.unknownuser, locale: this.internationalization ? this.locale : "en-US" }));
79
- }
80
- const clz = css `
81
- .squatch-referrals-icon.icon-ok-circled {
82
- color: ${this.rewardcolor};
83
- }
84
- .squatch-referrals-icon.icon-attention {
85
- color: ${this.pendingcolor};
86
- }
87
- .squatch-referrals-value {
88
- color: ${this.rewardcolor};
89
- }
90
- .squatch-referrals-value.pending {
91
- color: ${this.pendingcolor};
92
- }
93
- .squatch-referrals-value.referrer {
94
- color: ${this.rewardcolor};
95
- }
96
- .squatch-referrals-value.expired {
97
- color: ${this.expiredcolor};
98
- }
99
- .squatch-value-contents.expired {
100
- color: ${this.expiredcolor};
101
- }
102
- .squatch-referrals-icon.icon-attention.expired {
103
- color: ${this.expiredcolor};
104
- }
105
- .squatch-referrals-value.cancelled {
106
- color: ${this.cancelledcolor};
107
- }
108
- .squatch-value-contents.cancelled {
109
- color: ${this.cancelledcolor};
110
- }
111
- .squatch-referrals-icon.icon-attention.cancelled {
112
- color: ${this.cancelledcolor};
113
- }
114
- .squatch-referrals-heading {
115
- color: ${this.referralnamecolor};
116
- }
117
- .squatch-referrals-description,
118
- .squatch-referrals-value-content {
119
- color: ${this.referraltextcolor};
120
- }
121
- .squatch-customer-note {
122
- color: ${this.customernotecolor || "darkslategray"};
123
- }
124
- .squatch-referrals-scroll-action {
125
- font-family: ${"inherit"};
126
- }
127
- `;
128
- const totalReferralsCount = this.showreferrer && this.referredBy
129
- ? this.referralsCount + 1
130
- : this.referralsCount;
131
- return !this.ishidden && totalReferralsCount > 0 ? (
132
- // Referral List when not hidden and 1 or more referrals
133
- h("div", { class: `squatch-referrals ${clz}` },
134
- h("div", { class: "squatch-referrals-scroll-container" },
135
- referralsRow,
136
- referredByRow),
137
- h("div", { class: "squatch-referrals-scroll-action-container" },
138
- h("button", { class: `
139
- squatch-referrals-scroll-action previous ${this.loading
140
- ? "disabled"
141
- : this.offset === 0
142
- ? "disabled"
143
- : ""}
144
- `, onClick: (event) => this.paginate(this.offset - 3, event) }, this.paginateless),
145
- h("button", { class: `
146
- squatch-referrals-scroll-action view-more ${this.loading
147
- ? "disabled"
148
- : this.showreferrer && this.referredBy
149
- ? this.offset >= this.referralsCount - 2
150
- ? "disabled"
151
- : ""
152
- : this.offset >= this.referralsCount - 3
153
- ? "disabled"
154
- : ""}
155
- `, "view-more": true, onClick: (event) => this.paginate(this.offset + 3, event) }, this.paginatemore)))) : (
156
- // 'No Referrals Yet' button if this.referralCount < 1
157
- h("div", { class: "squatch-referrals-scroll-action-container" },
158
- h("button", { disabled: true, class: "squatch-no-referrals-yet" }, this.noreferralsyet)));
159
- }
160
- static get is() { return "sqh-referral-list"; }
161
- static get originalStyleUrls() { return {
162
- "$": ["referral-list.scss"]
163
- }; }
164
- static get styleUrls() { return {
165
- "$": ["referral-list.css"]
166
- }; }
167
- static get properties() { return {
168
- "ishidden": {
169
- "type": "boolean",
170
- "mutable": false,
171
- "complexType": {
172
- "original": "boolean",
173
- "resolved": "boolean",
174
- "references": {}
175
- },
176
- "required": false,
177
- "optional": false,
178
- "docs": {
179
- "tags": [],
180
- "text": ""
181
- },
182
- "attribute": "ishidden",
183
- "reflect": false
184
- },
185
- "paginatemore": {
186
- "type": "string",
187
- "mutable": false,
188
- "complexType": {
189
- "original": "string",
190
- "resolved": "string",
191
- "references": {}
192
- },
193
- "required": false,
194
- "optional": false,
195
- "docs": {
196
- "tags": [],
197
- "text": ""
198
- },
199
- "attribute": "paginatemore",
200
- "reflect": false
201
- },
202
- "paginateless": {
203
- "type": "string",
204
- "mutable": false,
205
- "complexType": {
206
- "original": "string",
207
- "resolved": "string",
208
- "references": {}
209
- },
210
- "required": false,
211
- "optional": false,
212
- "docs": {
213
- "tags": [],
214
- "text": ""
215
- },
216
- "attribute": "paginateless",
217
- "reflect": false
218
- },
219
- "noreferralsyet": {
220
- "type": "string",
221
- "mutable": false,
222
- "complexType": {
223
- "original": "string",
224
- "resolved": "string",
225
- "references": {}
226
- },
227
- "required": false,
228
- "optional": false,
229
- "docs": {
230
- "tags": [],
231
- "text": ""
232
- },
233
- "attribute": "noreferralsyet",
234
- "reflect": false
235
- },
236
- "referralnamecolor": {
237
- "type": "string",
238
- "mutable": false,
239
- "complexType": {
240
- "original": "string",
241
- "resolved": "string",
242
- "references": {}
243
- },
244
- "required": false,
245
- "optional": false,
246
- "docs": {
247
- "tags": [],
248
- "text": ""
249
- },
250
- "attribute": "referralnamecolor",
251
- "reflect": false
252
- },
253
- "referraltextcolor": {
254
- "type": "string",
255
- "mutable": false,
256
- "complexType": {
257
- "original": "string",
258
- "resolved": "string",
259
- "references": {}
260
- },
261
- "required": false,
262
- "optional": false,
263
- "docs": {
264
- "tags": [],
265
- "text": ""
266
- },
267
- "attribute": "referraltextcolor",
268
- "reflect": false
269
- },
270
- "unknownuser": {
271
- "type": "string",
272
- "mutable": false,
273
- "complexType": {
274
- "original": "string",
275
- "resolved": "string",
276
- "references": {}
277
- },
278
- "required": false,
279
- "optional": false,
280
- "docs": {
281
- "tags": [],
282
- "text": ""
283
- },
284
- "attribute": "unknownuser",
285
- "reflect": false
286
- },
287
- "showexpiry": {
288
- "type": "boolean",
289
- "mutable": false,
290
- "complexType": {
291
- "original": "boolean",
292
- "resolved": "boolean",
293
- "references": {}
294
- },
295
- "required": false,
296
- "optional": false,
297
- "docs": {
298
- "tags": [],
299
- "text": ""
300
- },
301
- "attribute": "showexpiry",
302
- "reflect": false
303
- },
304
- "shownotes": {
305
- "type": "boolean",
306
- "mutable": false,
307
- "complexType": {
308
- "original": "boolean",
309
- "resolved": "boolean",
310
- "references": {}
311
- },
312
- "required": false,
313
- "optional": false,
314
- "docs": {
315
- "tags": [],
316
- "text": ""
317
- },
318
- "attribute": "shownotes",
319
- "reflect": false
320
- },
321
- "redeemedvalue": {
322
- "type": "string",
323
- "mutable": false,
324
- "complexType": {
325
- "original": "string",
326
- "resolved": "string",
327
- "references": {}
328
- },
329
- "required": false,
330
- "optional": false,
331
- "docs": {
332
- "tags": [],
333
- "text": ""
334
- },
335
- "attribute": "redeemedvalue",
336
- "reflect": false
337
- },
338
- "showreferrer": {
339
- "type": "boolean",
340
- "mutable": false,
341
- "complexType": {
342
- "original": "boolean",
343
- "resolved": "boolean",
344
- "references": {}
345
- },
346
- "required": false,
347
- "optional": false,
348
- "docs": {
349
- "tags": [],
350
- "text": ""
351
- },
352
- "attribute": "showreferrer",
353
- "reflect": false
354
- },
355
- "referrercontent": {
356
- "type": "string",
357
- "mutable": false,
358
- "complexType": {
359
- "original": "string",
360
- "resolved": "string",
361
- "references": {}
362
- },
363
- "required": false,
364
- "optional": false,
365
- "docs": {
366
- "tags": [],
367
- "text": ""
368
- },
369
- "attribute": "referrercontent",
370
- "reflect": false
371
- },
372
- "referrervalue": {
373
- "type": "string",
374
- "mutable": false,
375
- "complexType": {
376
- "original": "string",
377
- "resolved": "string",
378
- "references": {}
379
- },
380
- "required": false,
381
- "optional": false,
382
- "docs": {
383
- "tags": [],
384
- "text": ""
385
- },
386
- "attribute": "referrervalue",
387
- "reflect": false
388
- },
389
- "rewardcolor": {
390
- "type": "string",
391
- "mutable": false,
392
- "complexType": {
393
- "original": "string",
394
- "resolved": "string",
395
- "references": {}
396
- },
397
- "required": false,
398
- "optional": false,
399
- "docs": {
400
- "tags": [],
401
- "text": ""
402
- },
403
- "attribute": "rewardcolor",
404
- "reflect": false
405
- },
406
- "customernotecolor": {
407
- "type": "string",
408
- "mutable": false,
409
- "complexType": {
410
- "original": "string",
411
- "resolved": "string",
412
- "references": {}
413
- },
414
- "required": false,
415
- "optional": false,
416
- "docs": {
417
- "tags": [],
418
- "text": ""
419
- },
420
- "attribute": "customernotecolor",
421
- "reflect": false
422
- },
423
- "usefirstreward": {
424
- "type": "boolean",
425
- "mutable": false,
426
- "complexType": {
427
- "original": "boolean",
428
- "resolved": "boolean",
429
- "references": {}
430
- },
431
- "required": false,
432
- "optional": false,
433
- "docs": {
434
- "tags": [],
435
- "text": ""
436
- },
437
- "attribute": "usefirstreward",
438
- "reflect": false
439
- },
440
- "convertedcontent": {
441
- "type": "string",
442
- "mutable": false,
443
- "complexType": {
444
- "original": "string",
445
- "resolved": "string",
446
- "references": {}
447
- },
448
- "required": false,
449
- "optional": false,
450
- "docs": {
451
- "tags": [],
452
- "text": ""
453
- },
454
- "attribute": "convertedcontent",
455
- "reflect": false
456
- },
457
- "valuecontent": {
458
- "type": "string",
459
- "mutable": false,
460
- "complexType": {
461
- "original": "string",
462
- "resolved": "string",
463
- "references": {}
464
- },
465
- "required": false,
466
- "optional": false,
467
- "docs": {
468
- "tags": [],
469
- "text": ""
470
- },
471
- "attribute": "valuecontent",
472
- "reflect": false
473
- },
474
- "pendingcolor": {
475
- "type": "string",
476
- "mutable": false,
477
- "complexType": {
478
- "original": "string",
479
- "resolved": "string",
480
- "references": {}
481
- },
482
- "required": false,
483
- "optional": false,
484
- "docs": {
485
- "tags": [],
486
- "text": ""
487
- },
488
- "attribute": "pendingcolor",
489
- "reflect": false
490
- },
491
- "pendingcontent": {
492
- "type": "string",
493
- "mutable": false,
494
- "complexType": {
495
- "original": "string",
496
- "resolved": "string",
497
- "references": {}
498
- },
499
- "required": false,
500
- "optional": false,
501
- "docs": {
502
- "tags": [],
503
- "text": ""
504
- },
505
- "attribute": "pendingcontent",
506
- "reflect": false
507
- },
508
- "pendingvalue": {
509
- "type": "string",
510
- "mutable": false,
511
- "complexType": {
512
- "original": "string",
513
- "resolved": "string",
514
- "references": {}
515
- },
516
- "required": false,
517
- "optional": false,
518
- "docs": {
519
- "tags": [],
520
- "text": ""
521
- },
522
- "attribute": "pendingvalue",
523
- "reflect": false
524
- },
525
- "expiredcolor": {
526
- "type": "string",
527
- "mutable": false,
528
- "complexType": {
529
- "original": "string",
530
- "resolved": "string",
531
- "references": {}
532
- },
533
- "required": false,
534
- "optional": false,
535
- "docs": {
536
- "tags": [],
537
- "text": ""
538
- },
539
- "attribute": "expiredcolor",
540
- "reflect": false
541
- },
542
- "expiredcontent": {
543
- "type": "string",
544
- "mutable": false,
545
- "complexType": {
546
- "original": "string",
547
- "resolved": "string",
548
- "references": {}
549
- },
550
- "required": false,
551
- "optional": false,
552
- "docs": {
553
- "tags": [],
554
- "text": ""
555
- },
556
- "attribute": "expiredcontent",
557
- "reflect": false
558
- },
559
- "expiredvalue": {
560
- "type": "string",
561
- "mutable": false,
562
- "complexType": {
563
- "original": "string",
564
- "resolved": "string",
565
- "references": {}
566
- },
567
- "required": false,
568
- "optional": false,
569
- "docs": {
570
- "tags": [],
571
- "text": ""
572
- },
573
- "attribute": "expiredvalue",
574
- "reflect": false
575
- },
576
- "expiresvalue": {
577
- "type": "string",
578
- "mutable": false,
579
- "complexType": {
580
- "original": "string",
581
- "resolved": "string",
582
- "references": {}
583
- },
584
- "required": false,
585
- "optional": false,
586
- "docs": {
587
- "tags": [],
588
- "text": ""
589
- },
590
- "attribute": "expiresvalue",
591
- "reflect": false
592
- },
593
- "cancelledcolor": {
594
- "type": "string",
595
- "mutable": false,
596
- "complexType": {
597
- "original": "string",
598
- "resolved": "string",
599
- "references": {}
600
- },
601
- "required": false,
602
- "optional": false,
603
- "docs": {
604
- "tags": [],
605
- "text": ""
606
- },
607
- "attribute": "cancelledcolor",
608
- "reflect": false
609
- },
610
- "cancelledcontent": {
611
- "type": "string",
612
- "mutable": false,
613
- "complexType": {
614
- "original": "string",
615
- "resolved": "string",
616
- "references": {}
617
- },
618
- "required": false,
619
- "optional": false,
620
- "docs": {
621
- "tags": [],
622
- "text": ""
623
- },
624
- "attribute": "cancelledcontent",
625
- "reflect": false
626
- },
627
- "cancelledvalue": {
628
- "type": "string",
629
- "mutable": false,
630
- "complexType": {
631
- "original": "string",
632
- "resolved": "string",
633
- "references": {}
634
- },
635
- "required": false,
636
- "optional": false,
637
- "docs": {
638
- "tags": [],
639
- "text": ""
640
- },
641
- "attribute": "cancelledvalue",
642
- "reflect": false
643
- },
644
- "internationalization": {
645
- "type": "boolean",
646
- "mutable": false,
647
- "complexType": {
648
- "original": "boolean",
649
- "resolved": "boolean",
650
- "references": {}
651
- },
652
- "required": false,
653
- "optional": false,
654
- "docs": {
655
- "tags": [],
656
- "text": ""
657
- },
658
- "attribute": "internationalization",
659
- "reflect": false
660
- }
661
- }; }
662
- static get states() { return {
663
- "referrals": {},
664
- "referralsCount": {},
665
- "referredBy": {},
666
- "rewards": {},
667
- "loading": {},
668
- "offset": {},
669
- "locale": {}
670
- }; }
671
- }
1
+ import { h, Component, Prop, State } from "@stencil/core";
2
+ import { css } from "emotion";
3
+ import { uuid } from "../../utilities";
4
+ import { API } from "../../services/WidgetHost";
5
+ /**
6
+ * @uiName Referral List
7
+ */
8
+ export class ReferralList {
9
+ constructor() {
10
+ this.offset = 0;
11
+ this.loading = true;
12
+ }
13
+ componentWillLoad() {
14
+ if (!this.ishidden) {
15
+ return this.getReferrals(this.showreferrer)
16
+ .then((res) => {
17
+ this.referrals = res.referrals.data;
18
+ this.referredBy = res.referredByReferral;
19
+ this.referralsCount = res.referrals.totalCount;
20
+ this.loading = false;
21
+ this.locale = res.locale;
22
+ })
23
+ .catch((e) => {
24
+ this.onError(e);
25
+ });
26
+ }
27
+ }
28
+ getReferrals(showReferrer, offset = 0) {
29
+ return API.graphql.getReferrals(showReferrer, offset);
30
+ }
31
+ paginate(offset, event) {
32
+ if (this.loading)
33
+ return null;
34
+ let { referralsCount } = this;
35
+ if (this.showreferrer && this.referredBy)
36
+ referralsCount++;
37
+ if (offset >= referralsCount || offset < 0)
38
+ return null;
39
+ this.loading = true;
40
+ const { target } = event;
41
+ target.innerText = "...";
42
+ this.getReferrals(this.showreferrer, offset).then((res) => {
43
+ target.innerText =
44
+ offset > this.offset ? this.paginatemore : this.paginateless;
45
+ this.referrals = res.referrals.data;
46
+ this.offset = offset;
47
+ this.loading = false;
48
+ });
49
+ }
50
+ onError(e) {
51
+ console.error(e);
52
+ this.loading = false;
53
+ }
54
+ render() {
55
+ let referredByRow;
56
+ let referralsRow;
57
+ const referralvariables = {
58
+ usefirstreward: this.usefirstreward,
59
+ referrercontent: this.referrercontent,
60
+ convertedcontent: this.convertedcontent,
61
+ pendingcontent: this.pendingcontent,
62
+ pendingvalue: this.pendingvalue,
63
+ referrervalue: this.referrervalue,
64
+ valuecontent: this.valuecontent,
65
+ expiredcontent: this.expiredcontent,
66
+ expiredvalue: this.expiredvalue,
67
+ expiresvalue: this.expiresvalue,
68
+ redeemedvalue: this.redeemedvalue,
69
+ showexpiry: this.showexpiry,
70
+ shownotes: this.shownotes,
71
+ cancelledvalue: this.cancelledvalue,
72
+ cancelledcontent: this.cancelledcontent,
73
+ };
74
+ if (this.referrals) {
75
+ referralsRow = this.referrals.map((ref) => {
76
+ const referraltype = ref.rewards.length > 0 || ref.dateConverted ? "converted" : "pending";
77
+ return (h("sqh-referral-component", { id: uuid(), referral: ref, referralvariables: referralvariables, referraltype: referraltype, unknownuser: this.unknownuser, locale: this.internationalization ? this.locale : "en-US" }));
78
+ });
79
+ }
80
+ if (this.referrals.length < 3 && this.referredBy && this.showreferrer) {
81
+ referredByRow = (h("sqh-referral-component", { id: uuid(), referral: this.referredBy, referralvariables: referralvariables, referraltype: "referrer", unknownuser: this.unknownuser, locale: this.internationalization ? this.locale : "en-US" }));
82
+ }
83
+ const clz = css `
84
+ .squatch-referrals-icon.icon-ok-circled {
85
+ color: ${this.rewardcolor};
86
+ }
87
+ .squatch-referrals-icon.icon-attention {
88
+ color: ${this.pendingcolor};
89
+ }
90
+ .squatch-referrals-value {
91
+ color: ${this.rewardcolor};
92
+ }
93
+ .squatch-referrals-value.pending {
94
+ color: ${this.pendingcolor};
95
+ }
96
+ .squatch-referrals-value.referrer {
97
+ color: ${this.rewardcolor};
98
+ }
99
+ .squatch-referrals-value.expired {
100
+ color: ${this.expiredcolor};
101
+ }
102
+ .squatch-value-contents.expired {
103
+ color: ${this.expiredcolor};
104
+ }
105
+ .squatch-referrals-icon.icon-attention.expired {
106
+ color: ${this.expiredcolor};
107
+ }
108
+ .squatch-referrals-value.cancelled {
109
+ color: ${this.cancelledcolor};
110
+ }
111
+ .squatch-value-contents.cancelled {
112
+ color: ${this.cancelledcolor};
113
+ }
114
+ .squatch-referrals-icon.icon-attention.cancelled {
115
+ color: ${this.cancelledcolor};
116
+ }
117
+ .squatch-referrals-heading {
118
+ color: ${this.referralnamecolor};
119
+ }
120
+ .squatch-referrals-description,
121
+ .squatch-referrals-value-content {
122
+ color: ${this.referraltextcolor};
123
+ }
124
+ .squatch-customer-note {
125
+ color: ${this.customernotecolor || "darkslategray"};
126
+ }
127
+ .squatch-referrals-scroll-action {
128
+ font-family: ${"inherit"};
129
+ }
130
+ `;
131
+ const totalReferralsCount = this.showreferrer && this.referredBy
132
+ ? this.referralsCount + 1
133
+ : this.referralsCount;
134
+ return !this.ishidden && totalReferralsCount > 0 ? (
135
+ // Referral List when not hidden and 1 or more referrals
136
+ h("div", { class: `squatch-referrals ${clz}` },
137
+ h("div", { class: "squatch-referrals-scroll-container" },
138
+ referralsRow,
139
+ referredByRow),
140
+ h("div", { class: "squatch-referrals-scroll-action-container" },
141
+ h("button", { class: `
142
+ squatch-referrals-scroll-action previous ${this.loading
143
+ ? "disabled"
144
+ : this.offset === 0
145
+ ? "disabled"
146
+ : ""}
147
+ `, onClick: (event) => this.paginate(this.offset - 3, event) }, this.paginateless),
148
+ h("button", { class: `
149
+ squatch-referrals-scroll-action view-more ${this.loading
150
+ ? "disabled"
151
+ : this.showreferrer && this.referredBy
152
+ ? this.offset >= this.referralsCount - 2
153
+ ? "disabled"
154
+ : ""
155
+ : this.offset >= this.referralsCount - 3
156
+ ? "disabled"
157
+ : ""}
158
+ `, "view-more": true, onClick: (event) => this.paginate(this.offset + 3, event) }, this.paginatemore)))) : (
159
+ // 'No Referrals Yet' button if this.referralCount < 1
160
+ h("div", { class: "squatch-referrals-scroll-action-container" },
161
+ h("button", { disabled: true, class: "squatch-no-referrals-yet" }, this.noreferralsyet)));
162
+ }
163
+ static get is() { return "sqh-referral-list"; }
164
+ static get originalStyleUrls() { return {
165
+ "$": ["referral-list.scss"]
166
+ }; }
167
+ static get styleUrls() { return {
168
+ "$": ["referral-list.css"]
169
+ }; }
170
+ static get properties() { return {
171
+ "ishidden": {
172
+ "type": "boolean",
173
+ "mutable": false,
174
+ "complexType": {
175
+ "original": "boolean",
176
+ "resolved": "boolean",
177
+ "references": {}
178
+ },
179
+ "required": false,
180
+ "optional": false,
181
+ "docs": {
182
+ "tags": [{
183
+ "text": "Hide Referral List",
184
+ "name": "uiName"
185
+ }],
186
+ "text": "Hide or show the component"
187
+ },
188
+ "attribute": "ishidden",
189
+ "reflect": false
190
+ },
191
+ "paginatemore": {
192
+ "type": "string",
193
+ "mutable": false,
194
+ "complexType": {
195
+ "original": "string",
196
+ "resolved": "string",
197
+ "references": {}
198
+ },
199
+ "required": false,
200
+ "optional": false,
201
+ "docs": {
202
+ "tags": [{
203
+ "text": "Paginate More Text",
204
+ "name": "uiName"
205
+ }, {
206
+ "text": "\"View More\"",
207
+ "name": "default"
208
+ }],
209
+ "text": "Shown inside the paginate more button"
210
+ },
211
+ "attribute": "paginatemore",
212
+ "reflect": false
213
+ },
214
+ "paginateless": {
215
+ "type": "string",
216
+ "mutable": false,
217
+ "complexType": {
218
+ "original": "string",
219
+ "resolved": "string",
220
+ "references": {}
221
+ },
222
+ "required": false,
223
+ "optional": false,
224
+ "docs": {
225
+ "tags": [{
226
+ "text": "Paginate Less Text",
227
+ "name": "uiName"
228
+ }, {
229
+ "text": "\"Previous\"",
230
+ "name": "default"
231
+ }],
232
+ "text": "Shown inside the paginate less button"
233
+ },
234
+ "attribute": "paginateless",
235
+ "reflect": false
236
+ },
237
+ "noreferralsyet": {
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
+ "text": "Empty Referrals Text",
250
+ "name": "uiName"
251
+ }, {
252
+ "text": "\"No Referrals Yet...\"",
253
+ "name": "default"
254
+ }],
255
+ "text": "Shown when referral list is empty"
256
+ },
257
+ "attribute": "noreferralsyet",
258
+ "reflect": false
259
+ },
260
+ "referralnamecolor": {
261
+ "type": "string",
262
+ "mutable": false,
263
+ "complexType": {
264
+ "original": "string",
265
+ "resolved": "string",
266
+ "references": {}
267
+ },
268
+ "required": false,
269
+ "optional": false,
270
+ "docs": {
271
+ "tags": [{
272
+ "text": "Referral Name Color",
273
+ "name": "uiName"
274
+ }, {
275
+ "text": "color",
276
+ "name": "uiWidget"
277
+ }, {
278
+ "text": "color",
279
+ "name": "format"
280
+ }, {
281
+ "text": "\"darkslategray\"",
282
+ "name": "default"
283
+ }],
284
+ "text": "Text color of the referred users name"
285
+ },
286
+ "attribute": "referralnamecolor",
287
+ "reflect": false
288
+ },
289
+ "referraltextcolor": {
290
+ "type": "string",
291
+ "mutable": false,
292
+ "complexType": {
293
+ "original": "string",
294
+ "resolved": "string",
295
+ "references": {}
296
+ },
297
+ "required": false,
298
+ "optional": false,
299
+ "docs": {
300
+ "tags": [{
301
+ "text": "Referral Text Color",
302
+ "name": "uiName"
303
+ }, {
304
+ "text": "color",
305
+ "name": "uiWidget"
306
+ }, {
307
+ "text": "color",
308
+ "name": "format"
309
+ }, {
310
+ "text": "\"lightgray\"",
311
+ "name": "default"
312
+ }],
313
+ "text": "Text color of the referral status"
314
+ },
315
+ "attribute": "referraltextcolor",
316
+ "reflect": false
317
+ },
318
+ "unknownuser": {
319
+ "type": "string",
320
+ "mutable": false,
321
+ "complexType": {
322
+ "original": "string",
323
+ "resolved": "string",
324
+ "references": {}
325
+ },
326
+ "required": false,
327
+ "optional": false,
328
+ "docs": {
329
+ "tags": [{
330
+ "text": "Unknown User Text",
331
+ "name": "uiName"
332
+ }, {
333
+ "text": "\"Your Friend\"",
334
+ "name": "default"
335
+ }],
336
+ "text": "Text shown when the referred users name is unknown"
337
+ },
338
+ "attribute": "unknownuser",
339
+ "reflect": false
340
+ },
341
+ "showexpiry": {
342
+ "type": "boolean",
343
+ "mutable": false,
344
+ "complexType": {
345
+ "original": "boolean",
346
+ "resolved": "boolean",
347
+ "references": {}
348
+ },
349
+ "required": false,
350
+ "optional": false,
351
+ "docs": {
352
+ "tags": [{
353
+ "text": "Show Expiry",
354
+ "name": "uiName"
355
+ }],
356
+ "text": "Show or hide expired rewards"
357
+ },
358
+ "attribute": "showexpiry",
359
+ "reflect": false
360
+ },
361
+ "shownotes": {
362
+ "type": "boolean",
363
+ "mutable": false,
364
+ "complexType": {
365
+ "original": "boolean",
366
+ "resolved": "boolean",
367
+ "references": {}
368
+ },
369
+ "required": false,
370
+ "optional": false,
371
+ "docs": {
372
+ "tags": [{
373
+ "text": "Show Customer Note",
374
+ "name": "uiName"
375
+ }],
376
+ "text": "Show the customer note for a referral"
377
+ },
378
+ "attribute": "shownotes",
379
+ "reflect": false
380
+ },
381
+ "redeemedvalue": {
382
+ "type": "string",
383
+ "mutable": false,
384
+ "complexType": {
385
+ "original": "string",
386
+ "resolved": "string",
387
+ "references": {}
388
+ },
389
+ "required": false,
390
+ "optional": false,
391
+ "docs": {
392
+ "tags": [{
393
+ "text": "Redeemed Value",
394
+ "name": "uiName"
395
+ }, {
396
+ "text": "Converted Referrals",
397
+ "name": "uiGroup"
398
+ }, {
399
+ "text": "\"Redeemed\"",
400
+ "name": "default"
401
+ }],
402
+ "text": "Shown when reward is redeemed"
403
+ },
404
+ "attribute": "redeemedvalue",
405
+ "reflect": false
406
+ },
407
+ "showreferrer": {
408
+ "type": "boolean",
409
+ "mutable": false,
410
+ "complexType": {
411
+ "original": "boolean",
412
+ "resolved": "boolean",
413
+ "references": {}
414
+ },
415
+ "required": false,
416
+ "optional": false,
417
+ "docs": {
418
+ "tags": [{
419
+ "text": "Show Referrer",
420
+ "name": "uiName"
421
+ }, {
422
+ "text": "Referrer",
423
+ "name": "uiGroup"
424
+ }, {
425
+ "text": "\"\"",
426
+ "name": "default"
427
+ }],
428
+ "text": "Show or hide the referrer"
429
+ },
430
+ "attribute": "showreferrer",
431
+ "reflect": false
432
+ },
433
+ "referrercontent": {
434
+ "type": "string",
435
+ "mutable": false,
436
+ "complexType": {
437
+ "original": "string",
438
+ "resolved": "string",
439
+ "references": {}
440
+ },
441
+ "required": false,
442
+ "optional": false,
443
+ "docs": {
444
+ "tags": [{
445
+ "text": "Referrer Content",
446
+ "name": "uiName"
447
+ }, {
448
+ "text": "Referrer",
449
+ "name": "uiGroup"
450
+ }, {
451
+ "text": "\"Referred you {date}\"",
452
+ "name": "default"
453
+ }],
454
+ "text": "Text explaining who referred you to the program"
455
+ },
456
+ "attribute": "referrercontent",
457
+ "reflect": false
458
+ },
459
+ "referrervalue": {
460
+ "type": "string",
461
+ "mutable": false,
462
+ "complexType": {
463
+ "original": "string",
464
+ "resolved": "string",
465
+ "references": {}
466
+ },
467
+ "required": false,
468
+ "optional": false,
469
+ "docs": {
470
+ "tags": [{
471
+ "text": "Referrer Value",
472
+ "name": "uiName"
473
+ }, {
474
+ "text": "Referrer",
475
+ "name": "uiGroup"
476
+ }, {
477
+ "text": "\"Referred\"",
478
+ "name": "default"
479
+ }],
480
+ "text": "Referred Text shown in reward column"
481
+ },
482
+ "attribute": "referrervalue",
483
+ "reflect": false
484
+ },
485
+ "rewardcolor": {
486
+ "type": "string",
487
+ "mutable": false,
488
+ "complexType": {
489
+ "original": "string",
490
+ "resolved": "string",
491
+ "references": {}
492
+ },
493
+ "required": false,
494
+ "optional": false,
495
+ "docs": {
496
+ "tags": [{
497
+ "text": "Reward Color",
498
+ "name": "uiName"
499
+ }, {
500
+ "text": "Converted Referrals",
501
+ "name": "uiGroup"
502
+ }, {
503
+ "text": "color",
504
+ "name": "uiWidget"
505
+ }, {
506
+ "text": "color",
507
+ "name": "format"
508
+ }, {
509
+ "text": "\"#4BB543\"",
510
+ "name": "default"
511
+ }],
512
+ "text": "Color of the successful reward icon and the text value"
513
+ },
514
+ "attribute": "rewardcolor",
515
+ "reflect": false
516
+ },
517
+ "customernotecolor": {
518
+ "type": "string",
519
+ "mutable": false,
520
+ "complexType": {
521
+ "original": "string",
522
+ "resolved": "string",
523
+ "references": {}
524
+ },
525
+ "required": false,
526
+ "optional": false,
527
+ "docs": {
528
+ "tags": [{
529
+ "text": "Reward Color",
530
+ "name": "uiName"
531
+ }, {
532
+ "text": "Converted Referrals",
533
+ "name": "uiGroup"
534
+ }, {
535
+ "text": "color",
536
+ "name": "uiWidget"
537
+ }, {
538
+ "text": "color",
539
+ "name": "format"
540
+ }],
541
+ "text": "Color of the customer note"
542
+ },
543
+ "attribute": "customernotecolor",
544
+ "reflect": false
545
+ },
546
+ "usefirstreward": {
547
+ "type": "boolean",
548
+ "mutable": false,
549
+ "complexType": {
550
+ "original": "boolean",
551
+ "resolved": "boolean",
552
+ "references": {}
553
+ },
554
+ "required": false,
555
+ "optional": false,
556
+ "docs": {
557
+ "tags": [{
558
+ "text": "Use First Reward",
559
+ "name": "uiName"
560
+ }, {
561
+ "text": "Converted Referrals",
562
+ "name": "uiGroup"
563
+ }],
564
+ "text": "Show value of the first earned reward inside the rewards column"
565
+ },
566
+ "attribute": "usefirstreward",
567
+ "reflect": false
568
+ },
569
+ "convertedcontent": {
570
+ "type": "string",
571
+ "mutable": false,
572
+ "complexType": {
573
+ "original": "string",
574
+ "resolved": "string",
575
+ "references": {}
576
+ },
577
+ "required": false,
578
+ "optional": false,
579
+ "docs": {
580
+ "tags": [{
581
+ "text": "Converted Content",
582
+ "name": "uiName"
583
+ }, {
584
+ "text": "Converted Referrals",
585
+ "name": "uiGroup"
586
+ }, {
587
+ "text": "\"Signed up, referred {date}\"",
588
+ "name": "default"
589
+ }],
590
+ "text": "Content shown when a referral is converted"
591
+ },
592
+ "attribute": "convertedcontent",
593
+ "reflect": false
594
+ },
595
+ "valuecontent": {
596
+ "type": "string",
597
+ "mutable": false,
598
+ "complexType": {
599
+ "original": "string",
600
+ "resolved": "string",
601
+ "references": {}
602
+ },
603
+ "required": false,
604
+ "optional": false,
605
+ "docs": {
606
+ "tags": [{
607
+ "text": "Value Content",
608
+ "name": "uiName"
609
+ }, {
610
+ "text": "Converted Referrals",
611
+ "name": "uiGroup"
612
+ }, {
613
+ "text": "textArea",
614
+ "name": "uiWidget"
615
+ }, {
616
+ "text": "\"and {extrarewards} more {extrarewards, plural, one {reward} other {rewards}}\"",
617
+ "name": "default"
618
+ }],
619
+ "text": "Value shown in the rewards column"
620
+ },
621
+ "attribute": "valuecontent",
622
+ "reflect": false
623
+ },
624
+ "pendingcolor": {
625
+ "type": "string",
626
+ "mutable": false,
627
+ "complexType": {
628
+ "original": "string",
629
+ "resolved": "string",
630
+ "references": {}
631
+ },
632
+ "required": false,
633
+ "optional": false,
634
+ "docs": {
635
+ "tags": [{
636
+ "text": "Pending Color",
637
+ "name": "uiName"
638
+ }, {
639
+ "text": "Pending Referrals",
640
+ "name": "uiGroup"
641
+ }, {
642
+ "text": "color",
643
+ "name": "uiWidget"
644
+ }, {
645
+ "text": "color",
646
+ "name": "format"
647
+ }, {
648
+ "text": "\"lightgray\"",
649
+ "name": "default"
650
+ }],
651
+ "text": "Color of the pending icon and text"
652
+ },
653
+ "attribute": "pendingcolor",
654
+ "reflect": false
655
+ },
656
+ "pendingcontent": {
657
+ "type": "string",
658
+ "mutable": false,
659
+ "complexType": {
660
+ "original": "string",
661
+ "resolved": "string",
662
+ "references": {}
663
+ },
664
+ "required": false,
665
+ "optional": false,
666
+ "docs": {
667
+ "tags": [{
668
+ "text": "Pending Content",
669
+ "name": "uiName"
670
+ }, {
671
+ "text": "Pending Referrals",
672
+ "name": "uiGroup"
673
+ }, {
674
+ "text": "\"Trial user, referred {date}\"",
675
+ "name": "default"
676
+ }],
677
+ "text": "Pending content shown in the user column"
678
+ },
679
+ "attribute": "pendingcontent",
680
+ "reflect": false
681
+ },
682
+ "pendingvalue": {
683
+ "type": "string",
684
+ "mutable": false,
685
+ "complexType": {
686
+ "original": "string",
687
+ "resolved": "string",
688
+ "references": {}
689
+ },
690
+ "required": false,
691
+ "optional": false,
692
+ "docs": {
693
+ "tags": [{
694
+ "text": "Pending Value",
695
+ "name": "uiName"
696
+ }, {
697
+ "text": "Pending Referrals",
698
+ "name": "uiGroup"
699
+ }, {
700
+ "text": "\"Referral pending\"",
701
+ "name": "default"
702
+ }],
703
+ "text": "Pending content shown alongside the icon in the referral column"
704
+ },
705
+ "attribute": "pendingvalue",
706
+ "reflect": false
707
+ },
708
+ "expiredcolor": {
709
+ "type": "string",
710
+ "mutable": false,
711
+ "complexType": {
712
+ "original": "string",
713
+ "resolved": "string",
714
+ "references": {}
715
+ },
716
+ "required": false,
717
+ "optional": false,
718
+ "docs": {
719
+ "tags": [{
720
+ "text": "Expired Color",
721
+ "name": "uiName"
722
+ }, {
723
+ "text": "Expired Rewards",
724
+ "name": "uiGroup"
725
+ }, {
726
+ "text": "color",
727
+ "name": "uiWidget"
728
+ }, {
729
+ "text": "color",
730
+ "name": "format"
731
+ }, {
732
+ "text": "\"lightgray\"",
733
+ "name": "default"
734
+ }],
735
+ "text": "Color of the expired icon and text"
736
+ },
737
+ "attribute": "expiredcolor",
738
+ "reflect": false
739
+ },
740
+ "expiredcontent": {
741
+ "type": "string",
742
+ "mutable": false,
743
+ "complexType": {
744
+ "original": "string",
745
+ "resolved": "string",
746
+ "references": {}
747
+ },
748
+ "required": false,
749
+ "optional": false,
750
+ "docs": {
751
+ "tags": [{
752
+ "text": "Expired Content",
753
+ "name": "uiName"
754
+ }, {
755
+ "text": "Expired Rewards",
756
+ "name": "uiGroup"
757
+ }, {
758
+ "text": "\"Signed up, referred {date}\"",
759
+ "name": "default"
760
+ }],
761
+ "text": "Expired content shown in the user column"
762
+ },
763
+ "attribute": "expiredcontent",
764
+ "reflect": false
765
+ },
766
+ "expiredvalue": {
767
+ "type": "string",
768
+ "mutable": false,
769
+ "complexType": {
770
+ "original": "string",
771
+ "resolved": "string",
772
+ "references": {}
773
+ },
774
+ "required": false,
775
+ "optional": false,
776
+ "docs": {
777
+ "tags": [{
778
+ "text": "Expired Value",
779
+ "name": "uiName"
780
+ }, {
781
+ "text": "Expired Rewards",
782
+ "name": "uiGroup"
783
+ }, {
784
+ "text": "\"Expired Reward\"",
785
+ "name": "default"
786
+ }],
787
+ "text": "Expired content shown alongside the icon in the referral column"
788
+ },
789
+ "attribute": "expiredvalue",
790
+ "reflect": false
791
+ },
792
+ "expiresvalue": {
793
+ "type": "string",
794
+ "mutable": false,
795
+ "complexType": {
796
+ "original": "string",
797
+ "resolved": "string",
798
+ "references": {}
799
+ },
800
+ "required": false,
801
+ "optional": false,
802
+ "docs": {
803
+ "tags": [{
804
+ "text": "Expires Value",
805
+ "name": "uiName"
806
+ }, {
807
+ "text": "Expired Rewards",
808
+ "name": "uiGroup"
809
+ }],
810
+ "text": "Reward expiry ICU message"
811
+ },
812
+ "attribute": "expiresvalue",
813
+ "reflect": false
814
+ },
815
+ "cancelledcolor": {
816
+ "type": "string",
817
+ "mutable": false,
818
+ "complexType": {
819
+ "original": "string",
820
+ "resolved": "string",
821
+ "references": {}
822
+ },
823
+ "required": false,
824
+ "optional": false,
825
+ "docs": {
826
+ "tags": [{
827
+ "text": "Cancelled Color",
828
+ "name": "uiName"
829
+ }, {
830
+ "text": "Cancelled Rewards",
831
+ "name": "uiGroup"
832
+ }, {
833
+ "text": "color",
834
+ "name": "uiWidget"
835
+ }, {
836
+ "text": "color",
837
+ "name": "format"
838
+ }, {
839
+ "text": "\"#C81D05\"",
840
+ "name": "default"
841
+ }],
842
+ "text": "Color of the cancelled icon and text"
843
+ },
844
+ "attribute": "cancelledcolor",
845
+ "reflect": false
846
+ },
847
+ "cancelledcontent": {
848
+ "type": "string",
849
+ "mutable": false,
850
+ "complexType": {
851
+ "original": "string",
852
+ "resolved": "string",
853
+ "references": {}
854
+ },
855
+ "required": false,
856
+ "optional": false,
857
+ "docs": {
858
+ "tags": [{
859
+ "text": "Cancelled Content",
860
+ "name": "uiName"
861
+ }, {
862
+ "text": "Cancelled Rewards",
863
+ "name": "uiGroup"
864
+ }, {
865
+ "text": "\"Signed up, referred {date}\"",
866
+ "name": "default"
867
+ }],
868
+ "text": "Cancelled text content shown in the user column"
869
+ },
870
+ "attribute": "cancelledcontent",
871
+ "reflect": false
872
+ },
873
+ "cancelledvalue": {
874
+ "type": "string",
875
+ "mutable": false,
876
+ "complexType": {
877
+ "original": "string",
878
+ "resolved": "string",
879
+ "references": {}
880
+ },
881
+ "required": false,
882
+ "optional": false,
883
+ "docs": {
884
+ "tags": [{
885
+ "text": "Cancelled Value",
886
+ "name": "uiName"
887
+ }, {
888
+ "text": "Cancelled Rewards",
889
+ "name": "uiGroup"
890
+ }, {
891
+ "text": "\"Cancelled Reward\"",
892
+ "name": "default"
893
+ }],
894
+ "text": "Cancelled text content shown alongside the icon in the referral column"
895
+ },
896
+ "attribute": "cancelledvalue",
897
+ "reflect": false
898
+ },
899
+ "internationalization": {
900
+ "type": "boolean",
901
+ "mutable": false,
902
+ "complexType": {
903
+ "original": "boolean",
904
+ "resolved": "boolean",
905
+ "references": {}
906
+ },
907
+ "required": false,
908
+ "optional": false,
909
+ "docs": {
910
+ "tags": [{
911
+ "text": "Internationalization",
912
+ "name": "uiName"
913
+ }],
914
+ "text": "When true, the local gets set by using the value passed to the referral component"
915
+ },
916
+ "attribute": "internationalization",
917
+ "reflect": false
918
+ }
919
+ }; }
920
+ static get states() { return {
921
+ "referrals": {},
922
+ "referralsCount": {},
923
+ "referredBy": {},
924
+ "rewards": {},
925
+ "loading": {},
926
+ "offset": {},
927
+ "locale": {}
928
+ }; }
929
+ }