retreaverjs-rails 0.2.24 → 0.2.26

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 (56) hide show
  1. checksums.yaml +4 -4
  2. data/build.js +104 -0
  3. data/lib/retreaverjs/compile.rb +6 -5
  4. data/lib/retreaverjs/rails/version.rb +1 -1
  5. data/package.json +14 -27
  6. data/src/retreaver/campaign.js +4 -2
  7. data/vendor/assets/javascripts/retreaver.js +29 -13
  8. data/vendor/assets/javascripts/retreaver.min.js +2 -2
  9. data/vendor/documentation/javascript/v1/Retreaver.Campaign.html +343 -282
  10. data/vendor/documentation/javascript/v1/Retreaver.Number.html +875 -713
  11. data/vendor/documentation/javascript/v1/Retreaver.html +161 -130
  12. data/vendor/documentation/javascript/v1/campaign.js.html +11 -85
  13. data/vendor/documentation/javascript/v1/fonts/OpenSans-Bold-webfont.eot +0 -0
  14. data/vendor/documentation/javascript/v1/fonts/OpenSans-Bold-webfont.svg +1830 -0
  15. data/vendor/documentation/javascript/v1/fonts/OpenSans-Bold-webfont.woff +0 -0
  16. data/vendor/documentation/javascript/v1/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  17. data/vendor/documentation/javascript/v1/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
  18. data/vendor/documentation/javascript/v1/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  19. data/vendor/documentation/javascript/v1/fonts/OpenSans-Italic-webfont.eot +0 -0
  20. data/vendor/documentation/javascript/v1/fonts/OpenSans-Italic-webfont.svg +1830 -0
  21. data/vendor/documentation/javascript/v1/fonts/OpenSans-Italic-webfont.woff +0 -0
  22. data/vendor/documentation/javascript/v1/fonts/OpenSans-Light-webfont.eot +0 -0
  23. data/vendor/documentation/javascript/v1/fonts/OpenSans-Light-webfont.svg +1831 -0
  24. data/vendor/documentation/javascript/v1/fonts/OpenSans-Light-webfont.woff +0 -0
  25. data/vendor/documentation/javascript/v1/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  26. data/vendor/documentation/javascript/v1/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
  27. data/vendor/documentation/javascript/v1/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  28. data/vendor/documentation/javascript/v1/fonts/OpenSans-Regular-webfont.eot +0 -0
  29. data/vendor/documentation/javascript/v1/fonts/OpenSans-Regular-webfont.svg +1831 -0
  30. data/vendor/documentation/javascript/v1/fonts/OpenSans-Regular-webfont.woff +0 -0
  31. data/vendor/documentation/javascript/v1/global.html +123 -93
  32. data/vendor/documentation/javascript/v1/index.html +10 -8
  33. data/vendor/documentation/javascript/v1/number.js.html +1 -1
  34. data/vendor/documentation/javascript/v1/retreaver.js.html +8 -7
  35. data/vendor/documentation/javascript/v1/retreaver_campaign.js.html +400 -0
  36. data/vendor/documentation/javascript/v1/retreaver_number.js.html +275 -0
  37. data/vendor/documentation/javascript/v1/scripts/linenumber.js +20 -12
  38. data/vendor/documentation/javascript/v1/styles/jsdoc-default.css +201 -133
  39. data/vendor/documentation/javascript/v1/styles/prettify-tomorrow.css +1 -1
  40. data/vendor/documentation/javascript/{dev → v2}/Retreaver.Campaign.html +3 -3
  41. data/vendor/documentation/javascript/{dev → v2}/Retreaver.Number.html +1 -1
  42. data/vendor/documentation/javascript/{dev → v2}/Retreaver.html +2 -2
  43. data/vendor/documentation/javascript/{dev → v2}/campaign.js.html +39 -48
  44. data/vendor/documentation/javascript/{dev → v2}/global.html +2 -2
  45. data/vendor/documentation/javascript/{dev → v2}/index.html +1 -1
  46. data/vendor/documentation/javascript/{dev → v2}/number.js.html +1 -1
  47. data/vendor/documentation/javascript/{dev → v2}/retreaver.js.html +2 -2
  48. metadata +42 -24
  49. data/Gruntfile.js +0 -50
  50. /data/vendor/documentation/javascript/{dev → v2}/scripts/linenumber.js +0 -0
  51. /data/vendor/documentation/javascript/{dev → v2}/scripts/prettify/Apache-License-2.0.txt +0 -0
  52. /data/vendor/documentation/javascript/{dev → v2}/scripts/prettify/lang-css.js +0 -0
  53. /data/vendor/documentation/javascript/{dev → v2}/scripts/prettify/prettify.js +0 -0
  54. /data/vendor/documentation/javascript/{dev → v2}/styles/jsdoc-default.css +0 -0
  55. /data/vendor/documentation/javascript/{dev → v2}/styles/prettify-jsdoc.css +0 -0
  56. /data/vendor/documentation/javascript/{dev → v2}/styles/prettify-tomorrow.css +0 -0
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <title>JSDoc: Namespace: Retreaver</title>
6
-
6
+
7
7
  <script src="scripts/prettify/prettify.js"> </script>
8
8
  <script src="scripts/prettify/lang-css.js"> </script>
9
9
  <!--[if lt IE 9]>
@@ -16,77 +16,83 @@
16
16
  <body>
17
17
 
18
18
  <div id="main">
19
-
19
+
20
20
  <h1 class="page-title">Namespace: Retreaver</h1>
21
+
21
22
 
22
-
23
+
23
24
 
24
25
 
25
26
 
26
27
  <section>
27
-
28
+
28
29
  <header>
29
- <h2>
30
- Retreaver
31
- </h2>
32
30
 
33
- </header>
31
+ <h2>Retreaver</h2>
32
+
33
+
34
+ </header>
34
35
 
35
36
  <article>
36
37
  <div class="container-overview">
37
38
 
38
-
39
-
40
-
41
39
 
40
+
42
41
 
42
+
43
+
43
44
  <dl class="details">
44
-
45
-
46
-
47
-
48
-
49
45
 
50
46
 
47
+
51
48
 
49
+
52
50
 
51
+
53
52
 
53
+
54
54
 
55
+
55
56
 
57
+
56
58
 
59
+
57
60
 
61
+
58
62
 
63
+
59
64
 
65
+
60
66
 
67
+
61
68
 
69
+
62
70
 
63
71
  <dt class="tag-source">Source:</dt>
64
72
  <dd class="tag-source"><ul class="dummy"><li>
65
73
  <a href="retreaver.js.html">retreaver.js</a>, <a href="retreaver.js.html#line2">line 2</a>
66
74
  </li></ul></dd>
67
75
 
76
+
68
77
 
78
+
69
79
 
70
-
71
-
72
-
80
+
73
81
 
74
82
  </dl>
75
83
 
76
-
84
+
77
85
 
78
86
 
79
87
  </div>
88
+
80
89
 
90
+
81
91
 
82
-
83
-
84
-
85
-
86
-
92
+
87
93
 
88
94
  <h3 class="subsection-title">Classes</h3>
89
-
95
+
90
96
  <dl>
91
97
  <dt><a href="Retreaver.Campaign.html">Campaign</a></dt>
92
98
  <dd></dd>
@@ -95,62 +101,71 @@
95
101
  <dd></dd>
96
102
  </dl>
97
103
 
104
+
98
105
 
106
+
99
107
 
108
+
100
109
 
110
+
101
111
 
102
-
112
+
103
113
 
104
114
  <h3 class="subsection-title">Methods</h3>
115
+
105
116
 
106
- <dl>
107
117
 
108
- <dt>
109
- <h4 class="name" id="configure"><span class="type-signature">&lt;static> </span>configure<span class="signature">(options)</span><span class="type-signature"></span></h4>
110
-
111
-
112
- </dt>
113
- <dd>
114
-
115
-
116
- <div class="description">
117
- Configure the retreaver client library.
118
- </div>
119
-
120
118
 
121
119
 
120
+
122
121
 
122
+ <h4 class="name" id=".configure"><span class="type-signature">(static) </span>configure<span class="signature">(options)</span><span class="type-signature"></span></h4>
123
123
 
124
+
124
125
 
126
+
127
+
128
+
129
+ <div class="description">
130
+ Configure the retreaver client library.
131
+ </div>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <h5>Parameters:</h5>
125
142
 
126
- <h5>Parameters:</h5>
127
-
128
143
 
129
144
  <table class="params">
130
145
  <thead>
131
- <tr>
132
-
133
- <th>Name</th>
134
-
135
-
136
- <th>Type</th>
137
-
138
-
139
-
140
-
141
-
142
- <th class="last">Description</th>
143
- </tr>
144
- </thead>
145
-
146
- <tbody>
147
-
148
-
146
+ <tr>
147
+
148
+ <th>Name</th>
149
+
150
+
151
+ <th>Type</th>
152
+
153
+
154
+
155
+
156
+
157
+ <th class="last">Description</th>
158
+ </tr>
159
+ </thead>
160
+
161
+ <tbody>
162
+
163
+
149
164
  <tr>
150
165
 
151
166
  <td class="name"><code>options</code></td>
152
167
 
153
-
168
+
154
169
  <td class="type">
155
170
 
156
171
 
@@ -159,40 +174,40 @@
159
174
 
160
175
 
161
176
  </td>
177
+
162
178
 
179
+
163
180
 
164
-
165
-
166
-
181
+
167
182
  <td class="description last">
168
183
  <h6>Properties</h6>
169
184
 
170
185
 
171
186
  <table class="params">
172
187
  <thead>
173
- <tr>
174
-
175
- <th>Name</th>
176
-
177
-
178
- <th>Type</th>
179
-
180
-
181
-
182
-
183
-
184
- <th class="last">Description</th>
185
- </tr>
186
- </thead>
187
-
188
- <tbody>
189
-
190
-
188
+ <tr>
189
+
190
+ <th>Name</th>
191
+
192
+
193
+ <th>Type</th>
194
+
195
+
196
+
197
+
198
+
199
+ <th class="last">Description</th>
200
+ </tr>
201
+ </thead>
202
+
203
+ <tbody>
204
+
205
+
191
206
  <tr>
192
207
 
193
208
  <td class="name"><code>host</code></td>
194
209
 
195
-
210
+
196
211
  <td class="type">
197
212
 
198
213
 
@@ -201,21 +216,21 @@
201
216
 
202
217
 
203
218
  </td>
219
+
204
220
 
221
+
205
222
 
206
-
207
-
208
-
223
+
209
224
  <td class="description last">Retreaver API Host</td>
210
225
  </tr>
211
-
212
-
213
-
226
+
227
+
228
+
214
229
  <tr>
215
230
 
216
231
  <td class="name"><code>prefix</code></td>
217
232
 
218
-
233
+
219
234
  <td class="type">
220
235
 
221
236
 
@@ -224,87 +239,103 @@
224
239
 
225
240
 
226
241
  </td>
242
+
227
243
 
244
+
228
245
 
229
-
230
-
231
-
246
+
232
247
  <td class="description last">http or https</td>
233
248
  </tr>
234
-
235
-
236
- </tbody>
249
+
250
+
251
+ </tbody>
237
252
  </table>
253
+
238
254
  </td>
239
255
  </tr>
240
-
241
-
242
- </tbody>
243
- </table>
244
-
245
-
256
+
246
257
 
258
+ </tbody>
259
+ </table>
260
+
261
+
262
+
263
+
264
+
265
+
247
266
  <dl class="details">
248
-
249
-
250
-
251
-
252
-
253
267
 
254
268
 
269
+
255
270
 
271
+
256
272
 
273
+
257
274
 
275
+
258
276
 
277
+
259
278
 
279
+
260
280
 
281
+
261
282
 
283
+
262
284
 
285
+
263
286
 
287
+
264
288
 
289
+
265
290
 
291
+
266
292
 
267
293
  <dt class="tag-source">Source:</dt>
268
294
  <dd class="tag-source"><ul class="dummy"><li>
269
295
  <a href="retreaver.js.html">retreaver.js</a>, <a href="retreaver.js.html#line7">line 7</a>
270
296
  </li></ul></dd>
271
297
 
298
+
272
299
 
300
+
273
301
 
274
-
275
-
276
-
302
+
277
303
 
278
304
  </dl>
279
305
 
280
-
281
-
282
306
 
283
-
284
307
 
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+ <h5>Example</h5>
285
325
 
286
-
287
-
288
-
289
-
290
-
291
-
292
- <h5>Example</h5>
293
-
294
326
  <pre class="prettyprint"><code>Retreaver.configure({host: 'api.rtvrapi.com', prefix: 'https'});</code></pre>
295
327
 
296
-
297
- </dd>
298
328
 
299
- </dl>
300
-
301
-
329
+
330
+
302
331
 
332
+
303
333
 
334
+
304
335
 
305
336
  </article>
306
337
 
307
- </section>
338
+ </section>
308
339
 
309
340
 
310
341
 
@@ -312,13 +343,13 @@
312
343
  </div>
313
344
 
314
345
  <nav>
315
- <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Retreaver.Campaign.html">Campaign</a></li><li><a href="Retreaver.Number.html">Number</a></li></ul><h3>Namespaces</h3><ul><li><a href="Retreaver.html">Retreaver</a></li></ul><h3><a href="global.html">Global</a></h3>
346
+ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="Retreaver.html">Retreaver</a></li></ul><h3>Classes</h3><ul><li><a href="Retreaver.Campaign.html">Campaign</a></li><li><a href="Retreaver.Number.html">Number</a></li></ul><h3><a href="global.html">Global</a></h3>
316
347
  </nav>
317
348
 
318
- <br clear="both">
349
+ <br class="clear">
319
350
 
320
351
  <footer>
321
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Tue Sep 03 2024 17:08:24 GMT+0300 (EEST)
352
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a> on Sat Aug 23 2025 21:55:04 GMT+0300 (Eastern European Summer Time)
322
353
  </footer>
323
354
 
324
355
  <script> prettyPrint(); </script>
@@ -118,8 +118,7 @@
118
118
  }
119
119
 
120
120
  function handle_true_call_integration(number) {
121
- const trueCallConfig = get_integration_config(number, "truecall.com");
122
-
121
+ trueCallConfig = get_integration_config(number, "truecall.com");
123
122
  if (typeof(trueCallConfig) == "undefined") {
124
123
  return;
125
124
  }
@@ -131,88 +130,27 @@
131
130
  trueCallScriptTag.type = 'text/javascript';
132
131
  trueCallScriptTag.async = true;
133
132
  trueCallScriptTag.defer = true;
134
- trueCallScriptTag.dataset.campaign_uuid = trueCallConfig["tcCampaignUuid"];
135
- trueCallScriptTag.dataset.use_set_did = "1";
133
+ trueCallScriptTag.dataset.tc_campaign_id = trueCallConfig["tcCampaignId"];
136
134
  trueCallScriptTag.id = "__tc_script"
137
135
  trueCallScriptTag.src = trueCallConfig["scriptSrc"];
138
136
  (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(trueCallScriptTag);
139
137
  })();
140
138
  }
141
139
 
142
- const trueCallInterval = setInterval(function() {
143
- if (window.TrueCall) {
144
- window.TrueCall.setDID(number.get("number")).then(function() {
140
+ const obtainTrueCallId = new Promise(function(resolve) {
141
+ const trueCallInterval = setInterval(function() {
142
+ if (window.TrueCall && window.TrueCall.getId()) {
143
+ resolve(window.TrueCall.getId())
145
144
  clearInterval(trueCallInterval);
146
- return window.TrueCall.getIdAsync();
147
- }).then(function(trueCallId) {
148
- const tags = {};
149
- tags[trueCallConfig["tagName"]] = trueCallId;
150
- number.replace_tags(tags);
151
- });
152
- }
153
- }, trueCallConfig["checkIntervalMs"]);
154
- }
155
-
156
- function handle_red_track_integration(number) {
157
- const redTrackConfig = get_integration_config(number, "red_track");
158
-
159
- if (typeof(redTrackConfig) == "undefined") {
160
- return;
161
- }
162
-
163
- function getRedTrackClickID(name) {
164
- const value = '; ' + document.cookie;
165
- const parts = value.split('; ' + name + '=');
166
- if (parts.length == 2) return parts.pop().split(';').shift();
167
- }
168
-
169
- const obtainRedTrackClickID = new Promise( function (resolve) {
170
- const myInterval = setInterval(function () {
171
- const redTrackClickID = getRedTrackClickID('rtkclickid-store');
172
- if (redTrackClickID) {
173
- resolve(redTrackClickID);
174
- clearInterval(myInterval);
175
145
  }
176
- }, redTrackConfig["checkIntervalMs"]);
177
- });
178
-
179
- obtainRedTrackClickID.then(function (redTrackClickID) {
180
- const tags = {};
181
- tags[redTrackConfig["tagName"]] = redTrackClickID;
182
- number.replace_tags(tags);
183
- });
184
-
185
- }
186
-
187
- function handle_click_flare_integration(number) {
188
- const clickFlareConfig = get_integration_config(number, "click_flare");
189
-
190
- if (typeof(clickFlareConfig) == "undefined") {
191
- return;
192
- }
193
-
194
- const getClickFlareClickID = function() {
195
- if (window.clickflare && window.clickflare.data && window.clickflare.data.event_tokens && window.clickflare.data.event_tokens.click_id) {
196
- return window.clickflare.data.event_tokens.click_id;
197
- }
198
- };
199
-
200
- const obtainClickFlareClickID = new Promise(function (resolve) {
201
- const myInterval = setInterval(function () {
202
- const clickFlareClickID = getClickFlareClickID();
203
- if (clickFlareClickID) {
204
- resolve(clickFlareClickID);
205
- clearInterval(myInterval);
206
- }
207
- }, clickFlareConfig["checkIntervalMs"]);
208
- });
146
+ }, trueCallConfig["checkIntervalMs"]); // Try to get the trueCallId every X milliseconds
147
+ })
209
148
 
210
- obtainClickFlareClickID.then(function (clickFlareClickID) {
149
+ obtainTrueCallId.then(function (trueCallId) {
211
150
  const tags = {};
212
- tags[clickFlareConfig["tagName"]] = clickFlareClickID;
151
+ tags[trueCallConfig["tagName"]] = trueCallId;
213
152
  number.replace_tags(tags);
214
153
  });
215
-
216
154
  }
217
155
 
218
156
  var self = this;
@@ -271,24 +209,12 @@
271
209
  console.error("Could not integrate with truecall.com, ", e);
272
210
  }
273
211
 
274
- try {
275
- handle_red_track_integration(number);
276
- } catch (e) {
277
- console.error("Could not integrate with Red Track, ", e);
278
- }
279
-
280
212
  try {
281
213
  handle_google_analytics_integration(number);
282
214
  } catch (e) {
283
215
  console.error("Could not integrate with google analytics, ", e);
284
216
  }
285
217
 
286
- try {
287
- handle_click_flare_integration(number);
288
- } catch (e) {
289
- console.error("Could not integrate with click flare, ", e);
290
- }
291
-
292
218
  // if there is a replacement in the response, replace all occurrences
293
219
  // of that number on the page with the retreaver number
294
220
  if (typeof(data.number.replacement_numbers) !== 'undefined') {
@@ -388,7 +314,7 @@
388
314
  <br clear="both">
389
315
 
390
316
  <footer>
391
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Tue Sep 03 2024 17:08:23 GMT+0300 (EEST)
317
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Jul 18 2024 09:29:56 GMT+0200 (CEST)
392
318
  </footer>
393
319
 
394
320
  <script> prettyPrint(); </script>