@saasquatch/vanilla-components 1.3.0-2 → 1.4.0

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