@saasquatch/vanilla-components 1.2.3 → 1.2.4-10

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 (112) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/{WidgetHost-d7b870ce.js → WidgetHost-f349e877.js} +772 -615
  3. package/dist/cjs/{en-a49a5ef5.js → en-3a7cb52e.js} +2 -2
  4. package/dist/cjs/{index-deb40352.js → index-09a04159.js} +54 -3
  5. package/dist/cjs/loader.cjs.js +3 -3
  6. package/dist/cjs/sqh-close-button.cjs.entry.js +28 -23
  7. package/dist/cjs/{sqh-copy-button_12.cjs.entry.js → sqh-copy-button_14.cjs.entry.js} +2278 -1068
  8. package/dist/cjs/sqh-referral-code.cjs.entry.js +23 -23
  9. package/dist/cjs/sqh-rewards-actions.cjs.entry.js +27 -12
  10. package/dist/cjs/widget-components.cjs.js +3 -3
  11. package/dist/collection/collection-manifest.json +2 -0
  12. package/dist/collection/components/close-button/close-button.js +70 -56
  13. package/dist/collection/components/copy-button/copy-button.js +389 -293
  14. package/dist/collection/components/copy-link-button/copy-link-button.js +236 -182
  15. package/dist/collection/components/cta-component/cta-component.css +6 -0
  16. package/dist/collection/components/cta-component/cta-component.js +393 -0
  17. package/dist/collection/components/global-container/global-container.js +170 -126
  18. package/dist/collection/components/image-component/image-component.js +178 -132
  19. package/dist/collection/components/partner-stat-component/partner-stat-component.js +199 -155
  20. package/dist/collection/components/progress-indicator/progress-indicator.css +73 -0
  21. package/dist/collection/components/progress-indicator/progress-indicator.js +554 -0
  22. package/dist/collection/components/referral-code/referral-code.js +36 -30
  23. package/dist/collection/components/referral-component/referral-component.js +255 -236
  24. package/dist/collection/components/referral-list/referral-list.js +935 -671
  25. package/dist/collection/components/rewards-actions/rewards-actions.js +105 -77
  26. package/dist/collection/components/share-button/share-button.js +310 -255
  27. package/dist/collection/components/share-button-container/share-button-container.js +2439 -1534
  28. package/dist/collection/components/stat-component/stat-component.js +200 -155
  29. package/dist/collection/components/stats-container/stats-container.js +210 -180
  30. package/dist/collection/components/text-component/text-component.js +304 -249
  31. package/dist/collection/entrypoint.js +32 -32
  32. package/dist/collection/global/global.js +4 -4
  33. package/dist/collection/services/FormatJs.js +15 -15
  34. package/dist/collection/services/WidgetHost.js +778 -621
  35. package/dist/collection/utilities.js +81 -81
  36. package/dist/esm/{WidgetHost-a27e693d.js → WidgetHost-c033b6ac.js} +772 -615
  37. package/dist/esm/{en-be593af0.js → en-a652ab83.js} +1 -1
  38. package/dist/esm/{index-8ea8b6d8.js → index-342d7c26.js} +54 -3
  39. package/dist/esm/loader.mjs +3 -3
  40. package/dist/esm/polyfills/core-js.js +0 -0
  41. package/dist/esm/polyfills/dom.js +0 -0
  42. package/dist/esm/polyfills/es5-html-element.js +0 -0
  43. package/dist/esm/polyfills/index.js +0 -0
  44. package/dist/esm/polyfills/system.js +0 -0
  45. package/dist/esm/sqh-close-button.entry.js +28 -23
  46. package/dist/esm/{sqh-copy-button_12.entry.js → sqh-copy-button_14.entry.js} +2275 -1067
  47. package/dist/esm/sqh-referral-code.entry.js +23 -23
  48. package/dist/esm/sqh-rewards-actions.entry.js +27 -12
  49. package/dist/esm/widget-components.mjs +3 -3
  50. package/dist/esm-es5/{WidgetHost-a27e693d.js → WidgetHost-c033b6ac.js} +9524 -9432
  51. package/dist/esm-es5/_commonjsHelpers-1d681858.js +17 -17
  52. package/dist/esm-es5/css-shim-a659079f.js +122 -122
  53. package/dist/esm-es5/dom-4061ceba.js +468 -468
  54. package/dist/esm-es5/{en-be593af0.js → en-a652ab83.js} +1471 -1471
  55. package/dist/esm-es5/{index-8ea8b6d8.js → index-342d7c26.js} +1808 -1758
  56. package/dist/esm-es5/loader.mjs +11 -11
  57. package/dist/esm-es5/sqh-close-button.entry.js +35 -30
  58. package/dist/esm-es5/{sqh-copy-button_12.entry.js → sqh-copy-button_14.entry.js} +10582 -9485
  59. package/dist/esm-es5/sqh-referral-code.entry.js +29 -29
  60. package/dist/esm-es5/sqh-rewards-actions.entry.js +31 -16
  61. package/dist/esm-es5/widget-components.mjs +6 -6
  62. package/dist/types/components/close-button/close-button.d.ts +18 -7
  63. package/dist/types/components/copy-button/copy-button.d.ts +93 -23
  64. package/dist/types/components/copy-link-button/copy-link-button.d.ts +55 -17
  65. package/dist/types/components/cta-component/cta-component.d.ts +89 -0
  66. package/dist/types/components/global-container/global-container.d.ts +43 -9
  67. package/dist/types/components/image-component/image-component.d.ts +46 -9
  68. package/dist/types/components/partner-stat-component/partner-stat-component.d.ts +52 -16
  69. package/dist/types/components/progress-indicator/progress-indicator.d.ts +91 -0
  70. package/dist/types/components/referral-code/referral-code.d.ts +12 -6
  71. package/dist/types/components/referral-component/referral-component.d.ts +46 -17
  72. package/dist/types/components/referral-list/referral-list.d.ts +242 -44
  73. package/dist/types/components/rewards-actions/rewards-actions.d.ts +25 -6
  74. package/dist/types/components/share-button/share-button.d.ts +80 -17
  75. package/dist/types/components/share-button-container/share-button-container.d.ts +611 -97
  76. package/dist/types/components/stat-component/stat-component.d.ts +50 -16
  77. package/dist/types/components/stats-container/stats-container.d.ts +47 -23
  78. package/dist/types/components/text-component/text-component.d.ts +74 -16
  79. package/dist/types/components.d.ts +2226 -2
  80. package/dist/types/global/global.d.ts +4 -4
  81. package/dist/types/saasquatch.d.ts +105 -103
  82. package/dist/types/services/FormatJs.d.ts +7 -7
  83. package/dist/types/services/WidgetHost.d.ts +51 -45
  84. package/dist/types/utilities.d.ts +7 -7
  85. package/dist/widget-components/entrypoint.js +32 -32
  86. package/dist/widget-components/p-0839fd2c.system.entry.js +10 -0
  87. package/dist/widget-components/{p-44a6559d.js → p-17d80384.js} +1 -1
  88. package/dist/widget-components/p-24fc4ba9.js +1 -1
  89. package/dist/widget-components/{p-650d012d.entry.js → p-3ba562d0.entry.js} +1 -1
  90. package/dist/widget-components/{p-d4b27c72.entry.js → p-4293e873.entry.js} +1 -1
  91. package/dist/widget-components/p-46109683.js +3 -3
  92. package/dist/widget-components/{p-9adc7c50.system.js → p-54e83dfb.system.js} +2 -2
  93. package/dist/widget-components/{p-e2b4739f.system.entry.js → p-665b8d42.system.entry.js} +1 -1
  94. package/dist/widget-components/{p-9525bf4a.js → p-6e753d23.js} +68 -3
  95. package/dist/widget-components/p-a952fcf2.entry.js +233 -0
  96. package/dist/widget-components/{p-a846f503.system.js → p-aaf44379.system.js} +1 -1
  97. package/dist/widget-components/{p-c0cdba77.system.entry.js → p-abf8a511.system.entry.js} +1 -1
  98. package/dist/widget-components/p-ad5121cf.system.js +1 -0
  99. package/dist/widget-components/{p-908068c2.system.entry.js → p-d9e9c55c.system.entry.js} +1 -1
  100. package/dist/widget-components/{p-58be1132.system.js → p-e82def83.system.js} +1 -1
  101. package/dist/widget-components/{p-9746ae26.entry.js → p-fb528be6.entry.js} +1 -1
  102. package/dist/widget-components/p-fbf0c7fe.js +1 -0
  103. package/dist/widget-components/widget-components.esm.js +1 -1
  104. package/dist/widget-components/widget-components.js +1 -1
  105. package/docs/raisins.json +1 -0
  106. package/package.json +97 -89
  107. package/readme.md +52 -52
  108. package/CHANGELOG.md +0 -143
  109. package/dist/widget-components/p-485eaf44.js +0 -1
  110. package/dist/widget-components/p-75ab4c57.entry.js +0 -148
  111. package/dist/widget-components/p-d2335c54.system.entry.js +0 -8
  112. package/dist/widget-components/p-e61a8100.system.js +0 -1
@@ -1,671 +1,935 @@
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
+ * @exampleGroup Referrals
9
+ * @example Referral List - <sqh-referral-list ishidden="false" 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": "color",
285
+ "name": "format"
286
+ }, {
287
+ "text": "\"darkslategray\"",
288
+ "name": "default"
289
+ }],
290
+ "text": "Text color of the referred user's name."
291
+ },
292
+ "attribute": "referralnamecolor",
293
+ "reflect": false
294
+ },
295
+ "referraltextcolor": {
296
+ "type": "string",
297
+ "mutable": false,
298
+ "complexType": {
299
+ "original": "string",
300
+ "resolved": "string",
301
+ "references": {}
302
+ },
303
+ "required": false,
304
+ "optional": false,
305
+ "docs": {
306
+ "tags": [{
307
+ "text": "Referral Status Text Color",
308
+ "name": "uiName"
309
+ }, {
310
+ "text": "color",
311
+ "name": "uiWidget"
312
+ }, {
313
+ "text": "color",
314
+ "name": "format"
315
+ }, {
316
+ "text": "\"lightgray\"",
317
+ "name": "default"
318
+ }],
319
+ "text": ""
320
+ },
321
+ "attribute": "referraltextcolor",
322
+ "reflect": false
323
+ },
324
+ "unknownuser": {
325
+ "type": "string",
326
+ "mutable": false,
327
+ "complexType": {
328
+ "original": "string",
329
+ "resolved": "string",
330
+ "references": {}
331
+ },
332
+ "required": false,
333
+ "optional": false,
334
+ "docs": {
335
+ "tags": [{
336
+ "text": "Unknown User Text",
337
+ "name": "uiName"
338
+ }, {
339
+ "text": "\"Your Friend\"",
340
+ "name": "default"
341
+ }],
342
+ "text": "Text shown when the referred user's name is unknown."
343
+ },
344
+ "attribute": "unknownuser",
345
+ "reflect": false
346
+ },
347
+ "showexpiry": {
348
+ "type": "boolean",
349
+ "mutable": false,
350
+ "complexType": {
351
+ "original": "boolean",
352
+ "resolved": "boolean",
353
+ "references": {}
354
+ },
355
+ "required": false,
356
+ "optional": false,
357
+ "docs": {
358
+ "tags": [{
359
+ "text": "Show Expired Rewards",
360
+ "name": "uiName"
361
+ }],
362
+ "text": ""
363
+ },
364
+ "attribute": "showexpiry",
365
+ "reflect": false
366
+ },
367
+ "shownotes": {
368
+ "type": "boolean",
369
+ "mutable": false,
370
+ "complexType": {
371
+ "original": "boolean",
372
+ "resolved": "boolean",
373
+ "references": {}
374
+ },
375
+ "required": false,
376
+ "optional": false,
377
+ "docs": {
378
+ "tags": [{
379
+ "text": "Show Customer Note",
380
+ "name": "uiName"
381
+ }],
382
+ "text": ""
383
+ },
384
+ "attribute": "shownotes",
385
+ "reflect": false
386
+ },
387
+ "redeemedvalue": {
388
+ "type": "string",
389
+ "mutable": false,
390
+ "complexType": {
391
+ "original": "string",
392
+ "resolved": "string",
393
+ "references": {}
394
+ },
395
+ "required": false,
396
+ "optional": false,
397
+ "docs": {
398
+ "tags": [{
399
+ "text": "Redeemed Text",
400
+ "name": "uiName"
401
+ }, {
402
+ "text": "Converted Referrals",
403
+ "name": "uiGroup"
404
+ }, {
405
+ "text": "\"Redeemed\"",
406
+ "name": "default"
407
+ }],
408
+ "text": "Shown when reward is redeemed."
409
+ },
410
+ "attribute": "redeemedvalue",
411
+ "reflect": false
412
+ },
413
+ "showreferrer": {
414
+ "type": "boolean",
415
+ "mutable": false,
416
+ "complexType": {
417
+ "original": "boolean",
418
+ "resolved": "boolean",
419
+ "references": {}
420
+ },
421
+ "required": false,
422
+ "optional": false,
423
+ "docs": {
424
+ "tags": [{
425
+ "text": "Show Referred By",
426
+ "name": "uiName"
427
+ }, {
428
+ "text": "Referrer",
429
+ "name": "uiGroup"
430
+ }, {
431
+ "text": "\"\"",
432
+ "name": "default"
433
+ }],
434
+ "text": "Show referral and reward information on who referred you."
435
+ },
436
+ "attribute": "showreferrer",
437
+ "reflect": false
438
+ },
439
+ "referrercontent": {
440
+ "type": "string",
441
+ "mutable": false,
442
+ "complexType": {
443
+ "original": "string",
444
+ "resolved": "string",
445
+ "references": {}
446
+ },
447
+ "required": false,
448
+ "optional": false,
449
+ "docs": {
450
+ "tags": [{
451
+ "text": "Referrer Description",
452
+ "name": "uiName"
453
+ }, {
454
+ "text": "Referrer",
455
+ "name": "uiGroup"
456
+ }, {
457
+ "text": "\"Referred you {date}\"",
458
+ "name": "default"
459
+ }],
460
+ "text": "Text explaining who referred you to the program."
461
+ },
462
+ "attribute": "referrercontent",
463
+ "reflect": false
464
+ },
465
+ "referrervalue": {
466
+ "type": "string",
467
+ "mutable": false,
468
+ "complexType": {
469
+ "original": "string",
470
+ "resolved": "string",
471
+ "references": {}
472
+ },
473
+ "required": false,
474
+ "optional": false,
475
+ "docs": {
476
+ "tags": [{
477
+ "text": "Referrer Text",
478
+ "name": "uiName"
479
+ }, {
480
+ "text": "Referrer",
481
+ "name": "uiGroup"
482
+ }, {
483
+ "text": "\"Referred\"",
484
+ "name": "default"
485
+ }],
486
+ "text": "Referred Text shown in reward column."
487
+ },
488
+ "attribute": "referrervalue",
489
+ "reflect": false
490
+ },
491
+ "rewardcolor": {
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": "Reward Color",
504
+ "name": "uiName"
505
+ }, {
506
+ "text": "Converted Referrals",
507
+ "name": "uiGroup"
508
+ }, {
509
+ "text": "color",
510
+ "name": "uiWidget"
511
+ }, {
512
+ "text": "color",
513
+ "name": "format"
514
+ }, {
515
+ "text": "\"#4BB543\"",
516
+ "name": "default"
517
+ }],
518
+ "text": "Color of the successful reward icon and text in the rewards column."
519
+ },
520
+ "attribute": "rewardcolor",
521
+ "reflect": false
522
+ },
523
+ "customernotecolor": {
524
+ "type": "string",
525
+ "mutable": false,
526
+ "complexType": {
527
+ "original": "string",
528
+ "resolved": "string",
529
+ "references": {}
530
+ },
531
+ "required": false,
532
+ "optional": false,
533
+ "docs": {
534
+ "tags": [{
535
+ "text": "Customer Note Color",
536
+ "name": "uiName"
537
+ }, {
538
+ "text": "Converted Referrals",
539
+ "name": "uiGroup"
540
+ }, {
541
+ "text": "color",
542
+ "name": "uiWidget"
543
+ }, {
544
+ "text": "color",
545
+ "name": "format"
546
+ }],
547
+ "text": ""
548
+ },
549
+ "attribute": "customernotecolor",
550
+ "reflect": false
551
+ },
552
+ "usefirstreward": {
553
+ "type": "boolean",
554
+ "mutable": false,
555
+ "complexType": {
556
+ "original": "boolean",
557
+ "resolved": "boolean",
558
+ "references": {}
559
+ },
560
+ "required": false,
561
+ "optional": false,
562
+ "docs": {
563
+ "tags": [{
564
+ "text": "Use First Reward",
565
+ "name": "uiName"
566
+ }, {
567
+ "text": "Converted Referrals",
568
+ "name": "uiGroup"
569
+ }],
570
+ "text": "Show the value of the first earned reward inside the rewards column."
571
+ },
572
+ "attribute": "usefirstreward",
573
+ "reflect": false
574
+ },
575
+ "convertedcontent": {
576
+ "type": "string",
577
+ "mutable": false,
578
+ "complexType": {
579
+ "original": "string",
580
+ "resolved": "string",
581
+ "references": {}
582
+ },
583
+ "required": false,
584
+ "optional": false,
585
+ "docs": {
586
+ "tags": [{
587
+ "text": "Converted Description",
588
+ "name": "uiName"
589
+ }, {
590
+ "text": "Converted Referrals",
591
+ "name": "uiGroup"
592
+ }, {
593
+ "text": "\"Signed up, referred {date}\"",
594
+ "name": "default"
595
+ }],
596
+ "text": "Description shown when a referral is converted."
597
+ },
598
+ "attribute": "convertedcontent",
599
+ "reflect": false
600
+ },
601
+ "valuecontent": {
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": "Value Content",
614
+ "name": "uiName"
615
+ }, {
616
+ "text": "Converted Referrals",
617
+ "name": "uiGroup"
618
+ }, {
619
+ "text": "textArea",
620
+ "name": "uiWidget"
621
+ }, {
622
+ "text": "\"and {extrarewards} more {extrarewards, plural, one {reward} other {rewards}}\"",
623
+ "name": "default"
624
+ }],
625
+ "text": "ICU message shown in the rewards column. See {@link https://unicode-org.github.io/icu/userguide/format_parse/messages/ ICU messages} for more details."
626
+ },
627
+ "attribute": "valuecontent",
628
+ "reflect": false
629
+ },
630
+ "pendingcolor": {
631
+ "type": "string",
632
+ "mutable": false,
633
+ "complexType": {
634
+ "original": "string",
635
+ "resolved": "string",
636
+ "references": {}
637
+ },
638
+ "required": false,
639
+ "optional": false,
640
+ "docs": {
641
+ "tags": [{
642
+ "text": "Pending Color",
643
+ "name": "uiName"
644
+ }, {
645
+ "text": "Pending Referrals",
646
+ "name": "uiGroup"
647
+ }, {
648
+ "text": "color",
649
+ "name": "uiWidget"
650
+ }, {
651
+ "text": "color",
652
+ "name": "format"
653
+ }, {
654
+ "text": "\"lightgray\"",
655
+ "name": "default"
656
+ }],
657
+ "text": "Color of the pending reward icon and text in the rewards column."
658
+ },
659
+ "attribute": "pendingcolor",
660
+ "reflect": false
661
+ },
662
+ "pendingcontent": {
663
+ "type": "string",
664
+ "mutable": false,
665
+ "complexType": {
666
+ "original": "string",
667
+ "resolved": "string",
668
+ "references": {}
669
+ },
670
+ "required": false,
671
+ "optional": false,
672
+ "docs": {
673
+ "tags": [{
674
+ "text": "Pending Description",
675
+ "name": "uiName"
676
+ }, {
677
+ "text": "Pending Referrals",
678
+ "name": "uiGroup"
679
+ }, {
680
+ "text": "\"Trial user, referred {date}\"",
681
+ "name": "default"
682
+ }],
683
+ "text": "Pending description shown in the referral column."
684
+ },
685
+ "attribute": "pendingcontent",
686
+ "reflect": false
687
+ },
688
+ "pendingvalue": {
689
+ "type": "string",
690
+ "mutable": false,
691
+ "complexType": {
692
+ "original": "string",
693
+ "resolved": "string",
694
+ "references": {}
695
+ },
696
+ "required": false,
697
+ "optional": false,
698
+ "docs": {
699
+ "tags": [{
700
+ "text": "Pending Text",
701
+ "name": "uiName"
702
+ }, {
703
+ "text": "Pending Referrals",
704
+ "name": "uiGroup"
705
+ }, {
706
+ "text": "\"Referral pending\"",
707
+ "name": "default"
708
+ }],
709
+ "text": "Pending text shown alongside the icon in the referral column."
710
+ },
711
+ "attribute": "pendingvalue",
712
+ "reflect": false
713
+ },
714
+ "expiredcolor": {
715
+ "type": "string",
716
+ "mutable": false,
717
+ "complexType": {
718
+ "original": "string",
719
+ "resolved": "string",
720
+ "references": {}
721
+ },
722
+ "required": false,
723
+ "optional": false,
724
+ "docs": {
725
+ "tags": [{
726
+ "text": "Expired Color",
727
+ "name": "uiName"
728
+ }, {
729
+ "text": "Expired Rewards",
730
+ "name": "uiGroup"
731
+ }, {
732
+ "text": "color",
733
+ "name": "uiWidget"
734
+ }, {
735
+ "text": "color",
736
+ "name": "format"
737
+ }, {
738
+ "text": "\"lightgray\"",
739
+ "name": "default"
740
+ }],
741
+ "text": "Color of the expired reward icon and text in the rewards column."
742
+ },
743
+ "attribute": "expiredcolor",
744
+ "reflect": false
745
+ },
746
+ "expiredcontent": {
747
+ "type": "string",
748
+ "mutable": false,
749
+ "complexType": {
750
+ "original": "string",
751
+ "resolved": "string",
752
+ "references": {}
753
+ },
754
+ "required": false,
755
+ "optional": false,
756
+ "docs": {
757
+ "tags": [{
758
+ "text": "Expired Description",
759
+ "name": "uiName"
760
+ }, {
761
+ "text": "Expired Rewards",
762
+ "name": "uiGroup"
763
+ }, {
764
+ "text": "\"Signed up, referred {date}\"",
765
+ "name": "default"
766
+ }],
767
+ "text": "Expired text shown in the referral column."
768
+ },
769
+ "attribute": "expiredcontent",
770
+ "reflect": false
771
+ },
772
+ "expiredvalue": {
773
+ "type": "string",
774
+ "mutable": false,
775
+ "complexType": {
776
+ "original": "string",
777
+ "resolved": "string",
778
+ "references": {}
779
+ },
780
+ "required": false,
781
+ "optional": false,
782
+ "docs": {
783
+ "tags": [{
784
+ "text": "Expired Text",
785
+ "name": "uiName"
786
+ }, {
787
+ "text": "Expired Rewards",
788
+ "name": "uiGroup"
789
+ }, {
790
+ "text": "\"Expired Reward\"",
791
+ "name": "default"
792
+ }],
793
+ "text": "Expired text shown alongside the icon in the referral column."
794
+ },
795
+ "attribute": "expiredvalue",
796
+ "reflect": false
797
+ },
798
+ "expiresvalue": {
799
+ "type": "string",
800
+ "mutable": false,
801
+ "complexType": {
802
+ "original": "string",
803
+ "resolved": "string",
804
+ "references": {}
805
+ },
806
+ "required": false,
807
+ "optional": false,
808
+ "docs": {
809
+ "tags": [{
810
+ "text": "Expires Text",
811
+ "name": "uiName"
812
+ }, {
813
+ "text": "Expired Rewards",
814
+ "name": "uiGroup"
815
+ }],
816
+ "text": "Reward expiry ICU message"
817
+ },
818
+ "attribute": "expiresvalue",
819
+ "reflect": false
820
+ },
821
+ "cancelledcolor": {
822
+ "type": "string",
823
+ "mutable": false,
824
+ "complexType": {
825
+ "original": "string",
826
+ "resolved": "string",
827
+ "references": {}
828
+ },
829
+ "required": false,
830
+ "optional": false,
831
+ "docs": {
832
+ "tags": [{
833
+ "text": "Cancelled Color",
834
+ "name": "uiName"
835
+ }, {
836
+ "text": "Cancelled Rewards",
837
+ "name": "uiGroup"
838
+ }, {
839
+ "text": "color",
840
+ "name": "uiWidget"
841
+ }, {
842
+ "text": "color",
843
+ "name": "format"
844
+ }, {
845
+ "text": "\"#C81D05\"",
846
+ "name": "default"
847
+ }],
848
+ "text": "Color of the cancelled icon and text in the rewards column."
849
+ },
850
+ "attribute": "cancelledcolor",
851
+ "reflect": false
852
+ },
853
+ "cancelledcontent": {
854
+ "type": "string",
855
+ "mutable": false,
856
+ "complexType": {
857
+ "original": "string",
858
+ "resolved": "string",
859
+ "references": {}
860
+ },
861
+ "required": false,
862
+ "optional": false,
863
+ "docs": {
864
+ "tags": [{
865
+ "text": "Cancelled Description",
866
+ "name": "uiName"
867
+ }, {
868
+ "text": "Cancelled Rewards",
869
+ "name": "uiGroup"
870
+ }, {
871
+ "text": "\"Signed up, referred {date}\"",
872
+ "name": "default"
873
+ }],
874
+ "text": "Content shown in the referral column for a cancelled reward."
875
+ },
876
+ "attribute": "cancelledcontent",
877
+ "reflect": false
878
+ },
879
+ "cancelledvalue": {
880
+ "type": "string",
881
+ "mutable": false,
882
+ "complexType": {
883
+ "original": "string",
884
+ "resolved": "string",
885
+ "references": {}
886
+ },
887
+ "required": false,
888
+ "optional": false,
889
+ "docs": {
890
+ "tags": [{
891
+ "text": "Cancelled Text",
892
+ "name": "uiName"
893
+ }, {
894
+ "text": "Cancelled Rewards",
895
+ "name": "uiGroup"
896
+ }, {
897
+ "text": "\"Cancelled Reward\"",
898
+ "name": "default"
899
+ }],
900
+ "text": "Text shown alongside the icon in the referral column for a cancelled reward."
901
+ },
902
+ "attribute": "cancelledvalue",
903
+ "reflect": false
904
+ },
905
+ "internationalization": {
906
+ "type": "boolean",
907
+ "mutable": false,
908
+ "complexType": {
909
+ "original": "boolean",
910
+ "resolved": "boolean",
911
+ "references": {}
912
+ },
913
+ "required": false,
914
+ "optional": false,
915
+ "docs": {
916
+ "tags": [{
917
+ "text": "Internationalization",
918
+ "name": "uiName"
919
+ }],
920
+ "text": "Use the value passed to the referral component to set the locale of the user."
921
+ },
922
+ "attribute": "internationalization",
923
+ "reflect": false
924
+ }
925
+ }; }
926
+ static get states() { return {
927
+ "referrals": {},
928
+ "referralsCount": {},
929
+ "referredBy": {},
930
+ "rewards": {},
931
+ "loading": {},
932
+ "offset": {},
933
+ "locale": {}
934
+ }; }
935
+ }