fansunited-frontend-components 0.0.1-RC3 → 0.0.1-RC5

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 (162) hide show
  1. package/{dist/esm/components.js → classic-quiz-play.es.js} +1 -1
  2. package/classic-quiz-play.umd.js +174 -0
  3. package/index.d.ts +3 -0
  4. package/package.json +4 -26
  5. package/src/components/ClassicQuizNotFound.d.ts +4 -0
  6. package/src/components/ClassicQuizNotFound.d.ts.map +1 -0
  7. package/src/components/ClassicQuizNotFound.js +55 -0
  8. package/src/components/ClassicQuizPlay.d.ts +5 -0
  9. package/src/components/ClassicQuizPlay.d.ts.map +1 -0
  10. package/src/components/ClassicQuizPlay.js +321 -0
  11. package/src/components/Leads/CollectLead.d.ts +22 -0
  12. package/src/components/Leads/CollectLead.d.ts.map +1 -0
  13. package/src/components/Leads/CollectLead.js +20 -0
  14. package/src/components/Leads/LeadAgreementCheckbox.d.ts +10 -0
  15. package/src/components/Leads/LeadAgreementCheckbox.d.ts.map +1 -0
  16. package/src/components/Leads/LeadAgreementCheckbox.js +45 -0
  17. package/src/components/Leads/LeadForm.d.ts +20 -0
  18. package/src/components/Leads/LeadForm.d.ts.map +1 -0
  19. package/src/components/Leads/LeadForm.js +289 -0
  20. package/src/components/Shared/AlertMessage.d.ts +10 -0
  21. package/src/components/Shared/AlertMessage.d.ts.map +1 -0
  22. package/src/components/Shared/AlertMessage.js +37 -0
  23. package/src/components/Shared/Answers/Answers.d.ts +14 -0
  24. package/src/components/Shared/Answers/Answers.d.ts.map +1 -0
  25. package/src/components/Shared/Answers/Answers.js +31 -0
  26. package/src/components/Shared/Answers/Option.d.ts +13 -0
  27. package/src/components/Shared/Answers/Option.d.ts.map +1 -0
  28. package/src/components/Shared/Answers/Option.js +118 -0
  29. package/src/components/Shared/Button.d.ts +12 -0
  30. package/src/components/Shared/Button.d.ts.map +1 -0
  31. package/src/components/Shared/Button.js +43 -0
  32. package/src/components/Shared/MainCard.d.ts +10 -0
  33. package/src/components/Shared/MainCard.d.ts.map +1 -0
  34. package/src/components/Shared/MainCard.js +24 -0
  35. package/src/components/Shared/Pagination.d.ts +10 -0
  36. package/src/components/Shared/Pagination.d.ts.map +1 -0
  37. package/src/components/Shared/Pagination.js +118 -0
  38. package/src/components/Shared/PresentedBy.d.ts +8 -0
  39. package/src/components/Shared/PresentedBy.d.ts.map +1 -0
  40. package/src/components/Shared/PresentedBy.js +51 -0
  41. package/src/components/Shared/ScoreStateWrapper.d.ts +13 -0
  42. package/src/components/Shared/ScoreStateWrapper.d.ts.map +1 -0
  43. package/src/components/Shared/ScoreStateWrapper.js +254 -0
  44. package/src/components/Shared/Stepper.d.ts +11 -0
  45. package/src/components/Shared/Stepper.d.ts.map +1 -0
  46. package/src/components/Shared/Stepper.js +75 -0
  47. package/src/components/Shared/Stopwatch.d.ts +12 -0
  48. package/src/components/Shared/Stopwatch.d.ts.map +1 -0
  49. package/src/components/Shared/Stopwatch.js +103 -0
  50. package/src/components/Variants/Overlay/AuthError/OverlayAuthError.d.ts +8 -0
  51. package/src/components/Variants/Overlay/AuthError/OverlayAuthError.d.ts.map +1 -0
  52. package/src/components/Variants/Overlay/AuthError/OverlayAuthError.js +68 -0
  53. package/src/components/Variants/Overlay/AuthError/OverlayAuthError.styles.d.ts +118 -0
  54. package/src/components/Variants/Overlay/AuthError/OverlayAuthError.styles.d.ts.map +1 -0
  55. package/src/components/Variants/Overlay/AuthError/OverlayAuthError.styles.js +103 -0
  56. package/src/components/Variants/Overlay/OverlayVariant.d.ts +5 -0
  57. package/src/components/Variants/Overlay/OverlayVariant.d.ts.map +1 -0
  58. package/src/components/Variants/Overlay/OverlayVariant.js +100 -0
  59. package/src/components/Variants/Overlay/OverlayVariant.styles.d.ts +286 -0
  60. package/src/components/Variants/Overlay/OverlayVariant.styles.d.ts.map +1 -0
  61. package/src/components/Variants/Overlay/OverlayVariant.styles.js +266 -0
  62. package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.d.ts +16 -0
  63. package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.d.ts.map +1 -0
  64. package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.js +90 -0
  65. package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.styles.d.ts +364 -0
  66. package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.styles.d.ts.map +1 -0
  67. package/src/components/Variants/Overlay/ScoreState/OverlayScoreState.styles.js +374 -0
  68. package/src/components/Variants/Split/AuthError/SplitAuthError.d.ts +8 -0
  69. package/src/components/Variants/Split/AuthError/SplitAuthError.d.ts.map +1 -0
  70. package/src/components/Variants/Split/AuthError/SplitAuthError.js +44 -0
  71. package/src/components/Variants/Split/AuthError/SplitAuthError.styles.d.ts +126 -0
  72. package/src/components/Variants/Split/AuthError/SplitAuthError.styles.d.ts.map +1 -0
  73. package/src/components/Variants/Split/AuthError/SplitAuthError.styles.js +95 -0
  74. package/src/components/Variants/Split/ScoreState/SplitScoreState.d.ts +16 -0
  75. package/src/components/Variants/Split/ScoreState/SplitScoreState.d.ts.map +1 -0
  76. package/src/components/Variants/Split/ScoreState/SplitScoreState.js +84 -0
  77. package/src/components/Variants/Split/ScoreState/SplitScoreState.styles.d.ts +403 -0
  78. package/src/components/Variants/Split/ScoreState/SplitScoreState.styles.d.ts.map +1 -0
  79. package/src/components/Variants/Split/ScoreState/SplitScoreState.styles.js +400 -0
  80. package/src/components/Variants/Split/SplitVariant.d.ts +5 -0
  81. package/src/components/Variants/Split/SplitVariant.d.ts.map +1 -0
  82. package/src/components/Variants/Split/SplitVariant.js +79 -0
  83. package/src/components/Variants/Split/SplitVariant.styles.d.ts +252 -0
  84. package/src/components/Variants/Split/SplitVariant.styles.d.ts.map +1 -0
  85. package/src/components/Variants/Split/SplitVariant.styles.js +216 -0
  86. package/src/components/Variants/Standard/AuthError/StandardAuthError.d.ts +9 -0
  87. package/src/components/Variants/Standard/AuthError/StandardAuthError.d.ts.map +1 -0
  88. package/src/components/Variants/Standard/AuthError/StandardAuthError.js +43 -0
  89. package/src/components/Variants/Standard/AuthError/StandardAuthError.styles.d.ts +231 -0
  90. package/src/components/Variants/Standard/AuthError/StandardAuthError.styles.d.ts.map +1 -0
  91. package/src/components/Variants/Standard/AuthError/StandardAuthError.styles.js +201 -0
  92. package/src/components/Variants/Standard/ScoreState/StandardScoreState.d.ts +17 -0
  93. package/src/components/Variants/Standard/ScoreState/StandardScoreState.d.ts.map +1 -0
  94. package/src/components/Variants/Standard/ScoreState/StandardScoreState.js +78 -0
  95. package/src/components/Variants/Standard/ScoreState/StandardScoreState.styles.d.ts +350 -0
  96. package/src/components/Variants/Standard/ScoreState/StandardScoreState.styles.d.ts.map +1 -0
  97. package/src/components/Variants/Standard/ScoreState/StandardScoreState.styles.js +349 -0
  98. package/src/components/Variants/Standard/StandardVariant.d.ts +10 -0
  99. package/src/components/Variants/Standard/StandardVariant.d.ts.map +1 -0
  100. package/src/components/Variants/Standard/StandardVariant.js +82 -0
  101. package/src/components/Variants/Standard/StandardVariant.styles.d.ts +414 -0
  102. package/src/components/Variants/Standard/StandardVariant.styles.d.ts.map +1 -0
  103. package/src/components/Variants/Standard/StandardVariant.styles.js +373 -0
  104. package/src/constants/constants.d.ts +7 -0
  105. package/src/constants/constants.d.ts.map +1 -0
  106. package/src/constants/constants.js +446 -0
  107. package/src/hooks/useClassicQuizById.d.ts +3 -0
  108. package/src/hooks/useClassicQuizById.d.ts.map +1 -0
  109. package/src/hooks/useClassicQuizById.js +20 -0
  110. package/src/hooks/useEmbedCodeContainer.d.ts +2 -0
  111. package/src/hooks/useEmbedCodeContainer.d.ts.map +1 -0
  112. package/src/hooks/useEmbedCodeContainer.js +38 -0
  113. package/src/hooks/useMyParticipation.d.ts +3 -0
  114. package/src/hooks/useMyParticipation.d.ts.map +1 -0
  115. package/src/hooks/useMyParticipation.js +22 -0
  116. package/src/hooks/useScoreStateHelpers.d.ts +18 -0
  117. package/src/hooks/useScoreStateHelpers.d.ts.map +1 -0
  118. package/src/hooks/useScoreStateHelpers.js +156 -0
  119. package/src/index.d.ts +3 -0
  120. package/src/index.d.ts.map +1 -0
  121. package/src/index.js +2 -0
  122. package/src/main.d.ts +5 -0
  123. package/src/main.d.ts.map +1 -0
  124. package/src/main.js +53 -0
  125. package/src/services/service.d.ts +1 -0
  126. package/src/services/service.d.ts.map +1 -0
  127. package/src/services/service.js +1 -0
  128. package/src/styles/form.styles.d.ts +19 -0
  129. package/src/styles/form.styles.d.ts.map +1 -0
  130. package/src/styles/form.styles.js +18 -0
  131. package/src/types/types.d.ts +28 -0
  132. package/src/types/types.d.ts.map +1 -0
  133. package/src/types/types.js +1 -0
  134. package/tsconfig.tsbuildinfo +1 -0
  135. package/dist/esm/components.d.ts +0 -1
  136. package/dist/esm/src/index.d.ts +0 -4
  137. package/dist/esm/src/index.d.ts.map +0 -1
  138. package/dist/esm/src/indexUmd.d.ts +0 -2
  139. package/dist/esm/src/indexUmd.d.ts.map +0 -1
  140. package/dist/esm/vite.config.d.ts +0 -3
  141. package/dist/esm/vite.config.d.ts.map +0 -1
  142. package/dist/esm/vite.config.umd.d.ts +0 -3
  143. package/dist/esm/vite.config.umd.d.ts.map +0 -1
  144. package/dist/src/index.d.ts +0 -3
  145. package/dist/src/index.d.ts.map +0 -1
  146. package/dist/src/index.js +0 -2
  147. package/dist/src/indexUmd.d.ts +0 -2
  148. package/dist/src/indexUmd.d.ts.map +0 -1
  149. package/dist/src/indexUmd.js +0 -4
  150. package/dist/tsconfig.tsbuildinfo +0 -1
  151. package/dist/vite.config.d.ts +0 -3
  152. package/dist/vite.config.d.ts.map +0 -1
  153. package/dist/vite.config.js +0 -38
  154. package/dist/vite.config.umd.d.ts +0 -3
  155. package/dist/vite.config.umd.d.ts.map +0 -1
  156. package/dist/vite.config.umd.js +0 -35
  157. package/src/index.ts +0 -3
  158. package/src/indexUmd.ts +0 -5
  159. package/tsconfig.json +0 -10
  160. package/vite.config.ts +0 -42
  161. package/vite.config.umd.ts +0 -39
  162. package/vite.config_2.ts +0 -30
@@ -0,0 +1,446 @@
1
+ export const quizTypes = ["timed", "countdown"];
2
+ export const countries = [
3
+ { code: "AD", label: "Andorra", phone: "376" },
4
+ {
5
+ code: "AE",
6
+ label: "United Arab Emirates",
7
+ phone: "971",
8
+ },
9
+ { code: "AF", label: "Afghanistan", phone: "93" },
10
+ {
11
+ code: "AG",
12
+ label: "Antigua and Barbuda",
13
+ phone: "1-268",
14
+ },
15
+ { code: "AI", label: "Anguilla", phone: "1-264" },
16
+ { code: "AL", label: "Albania", phone: "355" },
17
+ { code: "AM", label: "Armenia", phone: "374" },
18
+ { code: "AO", label: "Angola", phone: "244" },
19
+ { code: "AQ", label: "Antarctica", phone: "672" },
20
+ { code: "AR", label: "Argentina", phone: "54" },
21
+ { code: "AS", label: "American Samoa", phone: "1-684" },
22
+ { code: "AT", label: "Austria", phone: "43" },
23
+ {
24
+ code: "AU",
25
+ label: "Australia",
26
+ phone: "61",
27
+ suggested: true,
28
+ },
29
+ { code: "AW", label: "Aruba", phone: "297" },
30
+ { code: "AX", label: "Alland Islands", phone: "358" },
31
+ { code: "AZ", label: "Azerbaijan", phone: "994" },
32
+ {
33
+ code: "BA",
34
+ label: "Bosnia and Herzegovina",
35
+ phone: "387",
36
+ },
37
+ { code: "BB", label: "Barbados", phone: "1-246" },
38
+ { code: "BD", label: "Bangladesh", phone: "880" },
39
+ { code: "BE", label: "Belgium", phone: "32" },
40
+ { code: "BF", label: "Burkina Faso", phone: "226" },
41
+ { code: "BG", label: "Bulgaria", phone: "359" },
42
+ { code: "BH", label: "Bahrain", phone: "973" },
43
+ { code: "BI", label: "Burundi", phone: "257" },
44
+ { code: "BJ", label: "Benin", phone: "229" },
45
+ { code: "BL", label: "Saint Barthelemy", phone: "590" },
46
+ { code: "BM", label: "Bermuda", phone: "1-441" },
47
+ { code: "BN", label: "Brunei Darussalam", phone: "673" },
48
+ { code: "BO", label: "Bolivia", phone: "591" },
49
+ { code: "BR", label: "Brazil", phone: "55" },
50
+ { code: "BS", label: "Bahamas", phone: "1-242" },
51
+ { code: "BT", label: "Bhutan", phone: "975" },
52
+ { code: "BV", label: "Bouvet Island", phone: "47" },
53
+ { code: "BW", label: "Botswana", phone: "267" },
54
+ { code: "BY", label: "Belarus", phone: "375" },
55
+ { code: "BZ", label: "Belize", phone: "501" },
56
+ {
57
+ code: "CA",
58
+ label: "Canada",
59
+ phone: "1",
60
+ suggested: true,
61
+ },
62
+ {
63
+ code: "CC",
64
+ label: "Cocos (Keeling) Islands",
65
+ phone: "61",
66
+ },
67
+ {
68
+ code: "CD",
69
+ label: "Congo, Democratic Republic of the",
70
+ phone: "243",
71
+ },
72
+ {
73
+ code: "CF",
74
+ label: "Central African Republic",
75
+ phone: "236",
76
+ },
77
+ {
78
+ code: "CG",
79
+ label: "Congo, Republic of the",
80
+ phone: "242",
81
+ },
82
+ { code: "CH", label: "Switzerland", phone: "41" },
83
+ { code: "CI", label: "Cote d'Ivoire", phone: "225" },
84
+ { code: "CK", label: "Cook Islands", phone: "682" },
85
+ { code: "CL", label: "Chile", phone: "56" },
86
+ { code: "CM", label: "Cameroon", phone: "237" },
87
+ { code: "CN", label: "China", phone: "86" },
88
+ { code: "CO", label: "Colombia", phone: "57" },
89
+ { code: "CR", label: "Costa Rica", phone: "506" },
90
+ { code: "CU", label: "Cuba", phone: "53" },
91
+ { code: "CV", label: "Cape Verde", phone: "238" },
92
+ { code: "CW", label: "Curacao", phone: "599" },
93
+ { code: "CX", label: "Christmas Island", phone: "61" },
94
+ { code: "CY", label: "Cyprus", phone: "357" },
95
+ { code: "CZ", label: "Czech Republic", phone: "420" },
96
+ {
97
+ code: "DE",
98
+ label: "Germany",
99
+ phone: "49",
100
+ suggested: true,
101
+ },
102
+ { code: "DJ", label: "Djibouti", phone: "253" },
103
+ { code: "DK", label: "Denmark", phone: "45" },
104
+ { code: "DM", label: "Dominica", phone: "1-767" },
105
+ {
106
+ code: "DO",
107
+ label: "Dominican Republic",
108
+ phone: "1-809",
109
+ },
110
+ { code: "DZ", label: "Algeria", phone: "213" },
111
+ { code: "EC", label: "Ecuador", phone: "593" },
112
+ { code: "EE", label: "Estonia", phone: "372" },
113
+ { code: "EG", label: "Egypt", phone: "20" },
114
+ { code: "EH", label: "Western Sahara", phone: "212" },
115
+ { code: "ER", label: "Eritrea", phone: "291" },
116
+ { code: "ES", label: "Spain", phone: "34" },
117
+ { code: "ET", label: "Ethiopia", phone: "251" },
118
+ { code: "FI", label: "Finland", phone: "358" },
119
+ { code: "FJ", label: "Fiji", phone: "679" },
120
+ {
121
+ code: "FK",
122
+ label: "Falkland Islands (Malvinas)",
123
+ phone: "500",
124
+ },
125
+ {
126
+ code: "FM",
127
+ label: "Micronesia, Federated States of",
128
+ phone: "691",
129
+ },
130
+ { code: "FO", label: "Faroe Islands", phone: "298" },
131
+ {
132
+ code: "FR",
133
+ label: "France",
134
+ phone: "33",
135
+ suggested: true,
136
+ },
137
+ { code: "GA", label: "Gabon", phone: "241" },
138
+ { code: "GB", label: "United Kingdom", phone: "44" },
139
+ { code: "GD", label: "Grenada", phone: "1-473" },
140
+ { code: "GE", label: "Georgia", phone: "995" },
141
+ { code: "GF", label: "French Guiana", phone: "594" },
142
+ { code: "GG", label: "Guernsey", phone: "44" },
143
+ { code: "GH", label: "Ghana", phone: "233" },
144
+ { code: "GI", label: "Gibraltar", phone: "350" },
145
+ { code: "GL", label: "Greenland", phone: "299" },
146
+ { code: "GM", label: "Gambia", phone: "220" },
147
+ { code: "GN", label: "Guinea", phone: "224" },
148
+ { code: "GP", label: "Guadeloupe", phone: "590" },
149
+ { code: "GQ", label: "Equatorial Guinea", phone: "240" },
150
+ { code: "GR", label: "Greece", phone: "30" },
151
+ {
152
+ code: "GS",
153
+ label: "South Georgia and the South Sandwich Islands",
154
+ phone: "500",
155
+ },
156
+ { code: "GT", label: "Guatemala", phone: "502" },
157
+ { code: "GU", label: "Guam", phone: "1-671" },
158
+ { code: "GW", label: "Guinea-Bissau", phone: "245" },
159
+ { code: "GY", label: "Guyana", phone: "592" },
160
+ { code: "HK", label: "Hong Kong", phone: "852" },
161
+ {
162
+ code: "HM",
163
+ label: "Heard Island and McDonald Islands",
164
+ phone: "672",
165
+ },
166
+ { code: "HN", label: "Honduras", phone: "504" },
167
+ { code: "HR", label: "Croatia", phone: "385" },
168
+ { code: "HT", label: "Haiti", phone: "509" },
169
+ { code: "HU", label: "Hungary", phone: "36" },
170
+ { code: "ID", label: "Indonesia", phone: "62" },
171
+ { code: "IE", label: "Ireland", phone: "353" },
172
+ { code: "IL", label: "Israel", phone: "972" },
173
+ { code: "IM", label: "Isle of Man", phone: "44" },
174
+ { code: "IN", label: "India", phone: "91" },
175
+ {
176
+ code: "IO",
177
+ label: "British Indian Ocean Territory",
178
+ phone: "246",
179
+ },
180
+ { code: "IQ", label: "Iraq", phone: "964" },
181
+ {
182
+ code: "IR",
183
+ label: "Iran, Islamic Republic of",
184
+ phone: "98",
185
+ },
186
+ { code: "IS", label: "Iceland", phone: "354" },
187
+ { code: "IT", label: "Italy", phone: "39" },
188
+ { code: "JE", label: "Jersey", phone: "44" },
189
+ { code: "JM", label: "Jamaica", phone: "1-876" },
190
+ { code: "JO", label: "Jordan", phone: "962" },
191
+ {
192
+ code: "JP",
193
+ label: "Japan",
194
+ phone: "81",
195
+ suggested: true,
196
+ },
197
+ { code: "KE", label: "Kenya", phone: "254" },
198
+ { code: "KG", label: "Kyrgyzstan", phone: "996" },
199
+ { code: "KH", label: "Cambodia", phone: "855" },
200
+ { code: "KI", label: "Kiribati", phone: "686" },
201
+ { code: "KM", label: "Comoros", phone: "269" },
202
+ {
203
+ code: "KN",
204
+ label: "Saint Kitts and Nevis",
205
+ phone: "1-869",
206
+ },
207
+ {
208
+ code: "KP",
209
+ label: "Korea, Democratic People's Republic of",
210
+ phone: "850",
211
+ },
212
+ { code: "KR", label: "Korea, Republic of", phone: "82" },
213
+ { code: "KW", label: "Kuwait", phone: "965" },
214
+ { code: "KY", label: "Cayman Islands", phone: "1-345" },
215
+ { code: "KZ", label: "Kazakhstan", phone: "7" },
216
+ {
217
+ code: "LA",
218
+ label: "Lao People's Democratic Republic",
219
+ phone: "856",
220
+ },
221
+ { code: "LB", label: "Lebanon", phone: "961" },
222
+ { code: "LC", label: "Saint Lucia", phone: "1-758" },
223
+ { code: "LI", label: "Liechtenstein", phone: "423" },
224
+ { code: "LK", label: "Sri Lanka", phone: "94" },
225
+ { code: "LR", label: "Liberia", phone: "231" },
226
+ { code: "LS", label: "Lesotho", phone: "266" },
227
+ { code: "LT", label: "Lithuania", phone: "370" },
228
+ { code: "LU", label: "Luxembourg", phone: "352" },
229
+ { code: "LV", label: "Latvia", phone: "371" },
230
+ { code: "LY", label: "Libya", phone: "218" },
231
+ { code: "MA", label: "Morocco", phone: "212" },
232
+ { code: "MC", label: "Monaco", phone: "377" },
233
+ {
234
+ code: "MD",
235
+ label: "Moldova, Republic of",
236
+ phone: "373",
237
+ },
238
+ { code: "ME", label: "Montenegro", phone: "382" },
239
+ {
240
+ code: "MF",
241
+ label: "Saint Martin (French part)",
242
+ phone: "590",
243
+ },
244
+ { code: "MG", label: "Madagascar", phone: "261" },
245
+ { code: "MH", label: "Marshall Islands", phone: "692" },
246
+ {
247
+ code: "MK",
248
+ label: "Macedonia, the Former Yugoslav Republic of",
249
+ phone: "389",
250
+ },
251
+ { code: "ML", label: "Mali", phone: "223" },
252
+ { code: "MM", label: "Myanmar", phone: "95" },
253
+ { code: "MN", label: "Mongolia", phone: "976" },
254
+ { code: "MO", label: "Macao", phone: "853" },
255
+ {
256
+ code: "MP",
257
+ label: "Northern Mariana Islands",
258
+ phone: "1-670",
259
+ },
260
+ { code: "MQ", label: "Martinique", phone: "596" },
261
+ { code: "MR", label: "Mauritania", phone: "222" },
262
+ { code: "MS", label: "Montserrat", phone: "1-664" },
263
+ { code: "MT", label: "Malta", phone: "356" },
264
+ { code: "MU", label: "Mauritius", phone: "230" },
265
+ { code: "MV", label: "Maldives", phone: "960" },
266
+ { code: "MW", label: "Malawi", phone: "265" },
267
+ { code: "MX", label: "Mexico", phone: "52" },
268
+ { code: "MY", label: "Malaysia", phone: "60" },
269
+ { code: "MZ", label: "Mozambique", phone: "258" },
270
+ { code: "NA", label: "Namibia", phone: "264" },
271
+ { code: "NC", label: "New Caledonia", phone: "687" },
272
+ { code: "NE", label: "Niger", phone: "227" },
273
+ { code: "NF", label: "Norfolk Island", phone: "672" },
274
+ { code: "NG", label: "Nigeria", phone: "234" },
275
+ { code: "NI", label: "Nicaragua", phone: "505" },
276
+ { code: "NL", label: "Netherlands", phone: "31" },
277
+ { code: "NO", label: "Norway", phone: "47" },
278
+ { code: "NP", label: "Nepal", phone: "977" },
279
+ { code: "NR", label: "Nauru", phone: "674" },
280
+ { code: "NU", label: "Niue", phone: "683" },
281
+ { code: "NZ", label: "New Zealand", phone: "64" },
282
+ { code: "OM", label: "Oman", phone: "968" },
283
+ { code: "PA", label: "Panama", phone: "507" },
284
+ { code: "PE", label: "Peru", phone: "51" },
285
+ { code: "PF", label: "French Polynesia", phone: "689" },
286
+ { code: "PG", label: "Papua New Guinea", phone: "675" },
287
+ { code: "PH", label: "Philippines", phone: "63" },
288
+ { code: "PK", label: "Pakistan", phone: "92" },
289
+ { code: "PL", label: "Poland", phone: "48" },
290
+ {
291
+ code: "PM",
292
+ label: "Saint Pierre and Miquelon",
293
+ phone: "508",
294
+ },
295
+ { code: "PN", label: "Pitcairn", phone: "870" },
296
+ { code: "PR", label: "Puerto Rico", phone: "1" },
297
+ {
298
+ code: "PS",
299
+ label: "Palestine, State of",
300
+ phone: "970",
301
+ },
302
+ { code: "PT", label: "Portugal", phone: "351" },
303
+ { code: "PW", label: "Palau", phone: "680" },
304
+ { code: "PY", label: "Paraguay", phone: "595" },
305
+ { code: "QA", label: "Qatar", phone: "974" },
306
+ { code: "RE", label: "Reunion", phone: "262" },
307
+ { code: "RO", label: "Romania", phone: "40" },
308
+ { code: "RS", label: "Serbia", phone: "381" },
309
+ { code: "RU", label: "Russian Federation", phone: "7" },
310
+ { code: "RW", label: "Rwanda", phone: "250" },
311
+ { code: "SA", label: "Saudi Arabia", phone: "966" },
312
+ { code: "SB", label: "Solomon Islands", phone: "677" },
313
+ { code: "SC", label: "Seychelles", phone: "248" },
314
+ { code: "SD", label: "Sudan", phone: "249" },
315
+ { code: "SE", label: "Sweden", phone: "46" },
316
+ { code: "SG", label: "Singapore", phone: "65" },
317
+ { code: "SH", label: "Saint Helena", phone: "290" },
318
+ { code: "SI", label: "Slovenia", phone: "386" },
319
+ {
320
+ code: "SJ",
321
+ label: "Svalbard and Jan Mayen",
322
+ phone: "47",
323
+ },
324
+ { code: "SK", label: "Slovakia", phone: "421" },
325
+ { code: "SL", label: "Sierra Leone", phone: "232" },
326
+ { code: "SM", label: "San Marino", phone: "378" },
327
+ { code: "SN", label: "Senegal", phone: "221" },
328
+ { code: "SO", label: "Somalia", phone: "252" },
329
+ { code: "SR", label: "Suriname", phone: "597" },
330
+ { code: "SS", label: "South Sudan", phone: "211" },
331
+ {
332
+ code: "ST",
333
+ label: "Sao Tome and Principe",
334
+ phone: "239",
335
+ },
336
+ { code: "SV", label: "El Salvador", phone: "503" },
337
+ {
338
+ code: "SX",
339
+ label: "Sint Maarten (Dutch part)",
340
+ phone: "1-721",
341
+ },
342
+ {
343
+ code: "SY",
344
+ label: "Syrian Arab Republic",
345
+ phone: "963",
346
+ },
347
+ { code: "SZ", label: "Swaziland", phone: "268" },
348
+ {
349
+ code: "TC",
350
+ label: "Turks and Caicos Islands",
351
+ phone: "1-649",
352
+ },
353
+ { code: "TD", label: "Chad", phone: "235" },
354
+ {
355
+ code: "TF",
356
+ label: "French Southern Territories",
357
+ phone: "262",
358
+ },
359
+ { code: "TG", label: "Togo", phone: "228" },
360
+ { code: "TH", label: "Thailand", phone: "66" },
361
+ { code: "TJ", label: "Tajikistan", phone: "992" },
362
+ { code: "TK", label: "Tokelau", phone: "690" },
363
+ { code: "TL", label: "Timor-Leste", phone: "670" },
364
+ { code: "TM", label: "Turkmenistan", phone: "993" },
365
+ { code: "TN", label: "Tunisia", phone: "216" },
366
+ { code: "TO", label: "Tonga", phone: "676" },
367
+ { code: "TR", label: "Turkey", phone: "90" },
368
+ {
369
+ code: "TT",
370
+ label: "Trinidad and Tobago",
371
+ phone: "1-868",
372
+ },
373
+ { code: "TV", label: "Tuvalu", phone: "688" },
374
+ {
375
+ code: "TW",
376
+ label: "Taiwan",
377
+ phone: "886",
378
+ },
379
+ {
380
+ code: "TZ",
381
+ label: "United Republic of Tanzania",
382
+ phone: "255",
383
+ },
384
+ { code: "UA", label: "Ukraine", phone: "380" },
385
+ { code: "UG", label: "Uganda", phone: "256" },
386
+ {
387
+ code: "US",
388
+ label: "United States",
389
+ phone: "1",
390
+ suggested: true,
391
+ },
392
+ { code: "UY", label: "Uruguay", phone: "598" },
393
+ { code: "UZ", label: "Uzbekistan", phone: "998" },
394
+ {
395
+ code: "VA",
396
+ label: "Holy See (Vatican City State)",
397
+ phone: "379",
398
+ },
399
+ {
400
+ code: "VC",
401
+ label: "Saint Vincent and the Grenadines",
402
+ phone: "1-784",
403
+ },
404
+ { code: "VE", label: "Venezuela", phone: "58" },
405
+ {
406
+ code: "VG",
407
+ label: "British Virgin Islands",
408
+ phone: "1-284",
409
+ },
410
+ {
411
+ code: "VI",
412
+ label: "US Virgin Islands",
413
+ phone: "1-340",
414
+ },
415
+ { code: "VN", label: "Vietnam", phone: "84" },
416
+ { code: "VU", label: "Vanuatu", phone: "678" },
417
+ { code: "WF", label: "Wallis and Futuna", phone: "681" },
418
+ { code: "WS", label: "Samoa", phone: "685" },
419
+ { code: "XK", label: "Kosovo", phone: "383" },
420
+ { code: "YE", label: "Yemen", phone: "967" },
421
+ { code: "YT", label: "Mayotte", phone: "262" },
422
+ { code: "ZA", label: "South Africa", phone: "27" },
423
+ { code: "ZM", label: "Zambia", phone: "260" },
424
+ { code: "ZW", label: "Zimbabwe", phone: "263" },
425
+ ];
426
+ export const languageToCountryCode = {
427
+ en: "GB", // English -> United Kingdom
428
+ bg: "BG", // Bulgarian -> Bulgaria
429
+ de: "DE", // German -> Germany
430
+ "fr-be": "BE", // French (Belgium) -> Belgium
431
+ fr: "FR", // French -> France
432
+ it: "IT", // Italian -> Italy
433
+ pl: "PL", // Polish -> Poland
434
+ "pt-br": "BR", // Portuguese (Brazil) -> Brazil
435
+ pt: "PT", // Portuguese -> Portugal
436
+ ro: "RO", // Romanian -> Romania
437
+ sr: "RS", // Serbian -> Serbia
438
+ };
439
+ export const getDefaultCountryByCode = (phoneCountryCode) => {
440
+ const code = phoneCountryCode || "44";
441
+ return countries.find((country) => country.phone === code) || null;
442
+ };
443
+ export const getDefaultCountryByLanguage = (language) => {
444
+ const code = language ? languageToCountryCode[language] : "GB";
445
+ return countries.find((country) => country.code === code) || null;
446
+ };
@@ -0,0 +1,3 @@
1
+ import { ClassicQuizFullModel, FansUnitedSDKModel } from "fansunited-sdk-esm";
2
+ export declare const useClassicQuizById: (id: string, sdk: FansUnitedSDKModel) => ClassicQuizFullModel | null;
3
+ //# sourceMappingURL=useClassicQuizById.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useClassicQuizById.d.ts","sourceRoot":"","sources":["../../../src/hooks/useClassicQuizById.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAG9E,eAAO,MAAM,kBAAkB,OAAQ,MAAM,OAAO,kBAAkB,gCAsBrE,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { ClassicQuizFullModel } from "fansunited-sdk-esm";
2
+ import { useEffect, useState } from "react";
3
+ export const useClassicQuizById = (id, sdk) => {
4
+ const [classicQuiz, setClassicQuiz] = useState(null);
5
+ const getClassicQuizById = async () => {
6
+ try {
7
+ const response = await sdk.miniGames.getClassicQuizById(id, true, true);
8
+ setClassicQuiz(response);
9
+ }
10
+ catch (e) {
11
+ console.error(e);
12
+ setClassicQuiz(new ClassicQuizFullModel());
13
+ }
14
+ };
15
+ useEffect(() => {
16
+ getClassicQuizById();
17
+ return () => setClassicQuiz(null);
18
+ }, [id]);
19
+ return classicQuiz;
20
+ };
@@ -0,0 +1,2 @@
1
+ export declare const useEmbedCode: (embedCode: string, applyFilterScreen: boolean) => import("react").RefObject<HTMLDivElement>;
2
+ //# sourceMappingURL=useEmbedCodeContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEmbedCodeContainer.d.ts","sourceRoot":"","sources":["../../../src/hooks/useEmbedCodeContainer.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,cAAe,MAAM,qBAAqB,OAAO,8CA0CzE,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { useEffect, useRef } from "react";
2
+ export const useEmbedCode = (embedCode, applyFilterScreen) => {
3
+ const embedContainerRef = useRef(null);
4
+ useEffect(() => {
5
+ if (embedCode && embedContainerRef.current) {
6
+ // First, set the HTML content
7
+ embedContainerRef.current.innerHTML = embedCode;
8
+ // Then, handle any iframes specifically
9
+ const iframes = embedContainerRef.current.getElementsByTagName("iframe");
10
+ for (let i = 0; i < iframes.length; i++) {
11
+ const iframe = iframes[i];
12
+ // Force iframe refresh
13
+ const src = iframe.src;
14
+ iframe.src = "";
15
+ setTimeout(() => {
16
+ iframe.src = src;
17
+ }, 100);
18
+ }
19
+ // Handle any script tags if needed
20
+ const scripts = embedContainerRef.current.getElementsByTagName("script");
21
+ for (let i = 0; i < scripts.length; i++) {
22
+ const script = scripts[i];
23
+ const newScript = document.createElement("script");
24
+ Array.from(script.attributes).forEach((attr) => {
25
+ newScript.setAttribute(attr.name, attr.value);
26
+ });
27
+ newScript.innerHTML = script.innerHTML;
28
+ script.parentNode?.replaceChild(newScript, script);
29
+ }
30
+ }
31
+ return () => {
32
+ if (embedContainerRef.current) {
33
+ embedContainerRef.current.innerHTML = "";
34
+ }
35
+ };
36
+ }, [embedCode, applyFilterScreen]);
37
+ return embedContainerRef;
38
+ };
@@ -0,0 +1,3 @@
1
+ import { ClassicQuizUserParticipationModel, FansUnitedSDKModel } from "fansunited-sdk-esm";
2
+ export declare const useMyParticipation: (id: string, sdk: FansUnitedSDKModel) => ClassicQuizUserParticipationModel[] | null;
3
+ //# sourceMappingURL=useMyParticipation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMyParticipation.d.ts","sourceRoot":"","sources":["../../../src/hooks/useMyParticipation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,kBAAkB,OAAQ,MAAM,OAAO,kBAAkB,+CAwBrE,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { ClassicQuizUserParticipationModel, } from "fansunited-sdk-esm";
2
+ import { useEffect, useState } from "react";
3
+ export const useMyParticipation = (id, sdk) => {
4
+ const [summary, setSummary] = useState(null);
5
+ const getClassicQuizById = async () => {
6
+ try {
7
+ const summary = await sdk.miniGames.getMyClassicQuizParticipations({
8
+ classicQuizIds: [id],
9
+ });
10
+ setSummary(summary);
11
+ }
12
+ catch (e) {
13
+ console.error(e);
14
+ setSummary([new ClassicQuizUserParticipationModel()]);
15
+ }
16
+ };
17
+ useEffect(() => {
18
+ getClassicQuizById();
19
+ return () => setSummary([]);
20
+ }, [id]);
21
+ return summary;
22
+ };
@@ -0,0 +1,18 @@
1
+ import { ClassicQuizUserParticipationModel, ClassicQuizFullModel } from "fansunited-sdk-esm";
2
+ import { WidgetTemplate } from "@fansunited/common";
3
+ interface UseQuizScoreLogicProps {
4
+ summary: ClassicQuizUserParticipationModel;
5
+ totalTime: number;
6
+ classicQuiz: ClassicQuizFullModel;
7
+ variant: WidgetTemplate;
8
+ }
9
+ export declare const useScoreStateHelpers: ({ summary, totalTime, classicQuiz, }: UseQuizScoreLogicProps) => {
10
+ scorePercentage: number;
11
+ getHexagonBackground: () => string;
12
+ formatTime: () => string;
13
+ displayCongratulations: () => string;
14
+ getRandomEmoji: (mode: "light" | "dark") => string;
15
+ shareResult: () => void;
16
+ };
17
+ export {};
18
+ //# sourceMappingURL=useScoreStateHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScoreStateHelpers.d.ts","sourceRoot":"","sources":["../../../src/hooks/useScoreStateHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iCAAiC,EACjC,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAa,cAAc,EAAE,MAAM,oBAAoB,CAAC;AA2C/D,UAAU,sBAAsB;IAC9B,OAAO,EAAE,iCAAiC,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,oBAAoB,CAAC;IAClC,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,eAAO,MAAM,oBAAoB,yCAI9B,sBAAsB;;;sBAcA,MAAM;;2BA+BC,OAAO,GAAG,MAAM,KAAG,MAAM;;CA4ExD,CAAC"}