@saasquatch/vanilla-components 1.2.3 → 1.2.4-2

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