@oanda/labs-sentiment-widget 1.0.169 → 1.0.170
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.
- package/CHANGELOG.md +668 -0
- package/dist/main/SentimentWidget/SentimentWidget.js +13 -8
- package/dist/main/SentimentWidget/SentimentWidget.js.map +1 -1
- package/dist/main/SentimentWidget/render.js +4 -2
- package/dist/main/SentimentWidget/render.js.map +1 -1
- package/dist/main/SentimentWidget/types.js.map +1 -1
- package/dist/module/SentimentWidget/SentimentWidget.js +14 -9
- package/dist/module/SentimentWidget/SentimentWidget.js.map +1 -1
- package/dist/module/SentimentWidget/render.js +4 -2
- package/dist/module/SentimentWidget/render.js.map +1 -1
- package/dist/module/SentimentWidget/types.js.map +1 -1
- package/dist/types/SentimentWidget/SentimentWidget.d.ts +1 -1
- package/dist/types/SentimentWidget/types.d.ts +2 -7
- package/package.json +3 -3
- package/src/SentimentWidget/SentimentWidget.tsx +24 -13
- package/src/SentimentWidget/render.tsx +7 -3
- package/src/SentimentWidget/types.ts +2 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,674 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 1.0.170 (2024-11-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 1.0.169 (2024-11-20)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 1.0.168 (2024-11-19)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## 1.0.167 (2024-10-14)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## 1.0.166 (2024-10-07)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## 1.0.165 (2024-10-03)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## 1.0.164 (2024-09-26)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## 1.0.163 (2024-09-18)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## 1.0.162 (2024-09-12)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 1.0.161 (2024-09-11)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## 1.0.160 (2024-09-10)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## 1.0.159 (2024-09-09)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## 1.0.158 (2024-09-04)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## 1.0.157 (2024-09-04)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## 1.0.156 (2024-09-02)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## 1.0.155 (2024-08-29)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## 1.0.154 (2024-08-29)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## 1.0.153 (2024-08-23)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## 1.0.152 (2024-08-23)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
## 1.0.151 (2024-08-20)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## 1.0.150 (2024-08-19)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
## 1.0.149 (2024-08-07)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## 1.0.148 (2024-08-01)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## 1.0.147 (2024-08-01)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
## 1.0.146 (2024-07-26)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## 1.0.145 (2024-07-25)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
## 1.0.144 (2024-07-22)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
## 1.0.143 (2024-07-19)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
## 1.0.142 (2024-07-16)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
## 1.0.141 (2024-07-16)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
## 1.0.140 (2024-07-12)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
## 1.0.139 (2024-07-12)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
## 1.0.138 (2024-07-10)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
## 1.0.137 (2024-07-05)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
## 1.0.136 (2024-07-03)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
## 1.0.135 (2024-07-03)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
## 1.0.134 (2024-07-03)
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
## 1.0.133 (2024-06-28)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
## 1.0.132 (2024-06-27)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
## 1.0.131 (2024-06-27)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
## 1.0.130 (2024-06-26)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
## 1.0.129 (2024-06-17)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
## 1.0.128 (2024-06-17)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
## 1.0.127 (2024-06-10)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
## 1.0.126 (2024-05-29)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
## 1.0.125 (2024-05-29)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
## 1.0.124 (2024-05-29)
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
## 1.0.123 (2024-05-28)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
## 1.0.122 (2024-05-27)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
## 1.0.121 (2024-05-27)
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
## 1.0.120 (2024-05-24)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
## 1.0.119 (2024-05-17)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
## 1.0.118 (2024-05-09)
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
## 1.0.117 (2024-05-07)
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
## 1.0.116 (2024-04-23)
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
## 1.0.115 (2024-04-22)
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
## 1.0.114 (2024-04-19)
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
## 1.0.113 (2024-04-19)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
## 1.0.112 (2024-04-15)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
## 1.0.111 (2024-04-11)
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
## 1.0.110 (2024-04-05)
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
## 1.0.109 (2024-04-05)
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
## 1.0.108 (2024-04-04)
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
## 1.0.107 (2024-04-03)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
## 1.0.106 (2024-03-29)
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
## 1.0.105 (2024-03-28)
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
## 1.0.104 (2024-03-21)
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
## 1.0.103 (2024-03-20)
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
## 1.0.102 (2024-03-20)
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
## 1.0.101 (2024-03-13)
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
## 1.0.100 (2024-03-12)
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
## 1.0.99 (2024-03-11)
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
## 1.0.98 (2024-03-07)
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
## 1.0.97 (2024-03-06)
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
## 1.0.96 (2024-03-06)
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
## 1.0.95 (2024-03-04)
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
## 1.0.94 (2024-02-29)
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
## 1.0.93 (2024-02-28)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
## 1.0.92 (2024-02-28)
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
## 1.0.91 (2024-02-23)
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
## 1.0.90 (2024-02-23)
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
## 1.0.89 (2024-02-21)
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
## 1.0.88 (2024-02-21)
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
## 1.0.87 (2024-02-20)
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
## 1.0.86 (2024-02-20)
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
## 1.0.85 (2024-02-13)
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
## 1.0.84 (2024-02-13)
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
## 1.0.83 (2024-02-09)
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
## 1.0.82 (2024-02-05)
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
## 1.0.81 (2024-02-05)
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
## 1.0.80 (2024-02-05)
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
## 1.0.79 (2024-02-05)
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
## 1.0.78 (2024-01-30)
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
## 1.0.77 (2024-01-25)
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
## 1.0.76 (2024-01-25)
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
## 1.0.75 (2024-01-22)
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
## 1.0.74 (2024-01-22)
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
## 1.0.73 (2024-01-22)
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
## 1.0.72 (2024-01-19)
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
## 1.0.71 (2024-01-18)
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
## 1.0.70 (2024-01-17)
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
## 1.0.69 (2024-01-17)
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
## 1.0.68 (2024-01-15)
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
## 1.0.67 (2024-01-15)
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
## 1.0.66 (2024-01-12)
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
## 1.0.65 (2024-01-11)
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
## 1.0.64 (2024-01-11)
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
## 1.0.63 (2024-01-11)
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
## 1.0.62 (2024-01-10)
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
## 1.0.61 (2024-01-09)
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
## 1.0.60 (2024-01-05)
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
## 1.0.59 (2023-12-27)
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
## 1.0.58 (2023-12-22)
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
## 1.0.57 (2023-12-22)
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
## 1.0.56 (2023-12-21)
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
## 1.0.55 (2023-12-19)
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
## 1.0.54 (2023-12-15)
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
## 1.0.53 (2023-12-13)
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
## 1.0.52 (2023-12-13)
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
## 1.0.51 (2023-12-07)
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
## 1.0.50 (2023-12-04)
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
## 1.0.49 (2023-12-01)
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
## 1.0.48 (2023-12-01)
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
## 1.0.47 (2023-11-29)
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
## 1.0.46 (2023-11-28)
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
## 1.0.45 (2023-11-23)
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
## 1.0.44 (2023-11-22)
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
## 1.0.43 (2023-11-15)
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
## 1.0.42 (2023-11-10)
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
## 1.0.41 (2023-11-03)
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
## 1.0.40 (2023-11-02)
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
## 1.0.39 (2023-11-02)
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
## 1.0.38 (2023-10-26)
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
## 1.0.37 (2023-10-26)
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
## 1.0.36 (2023-10-25)
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
## 1.0.35 (2023-10-24)
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
## 1.0.34 (2023-10-23)
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
## 1.0.33 (2023-10-23)
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
## 1.0.32 (2023-10-23)
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
## 1.0.31 (2023-10-20)
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
## 1.0.30 (2023-10-19)
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
## 1.0.29 (2023-10-19)
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
## 1.0.28 (2023-10-19)
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
## 1.0.27 (2023-10-18)
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
## 1.0.26 (2023-10-18)
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
## 1.0.25 (2023-10-17)
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
## 1.0.24 (2023-10-13)
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
## 1.0.23 (2023-10-13)
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
## 1.0.22 (2023-10-11)
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
## 1.0.21 (2023-10-10)
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
## 1.0.20 (2023-10-06)
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
## 1.0.19 (2023-10-06)
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
## 1.0.18 (2023-10-05)
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
## 1.0.17 (2023-10-04)
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
## 1.0.16 (2023-10-04)
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
## 1.0.15 (2023-10-04)
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
## 1.0.14 (2023-10-03)
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
## 1.0.13 (2023-10-03)
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
## 1.0.12 (2023-10-03)
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
## 1.0.11 (2023-10-02)
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
## 1.0.10 (2023-09-29)
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
## 1.0.9 (2023-09-28)
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
## 1.0.8 (2023-09-27)
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
## 1.0.7 (2023-09-26)
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
## 1.0.6 (2023-09-21)
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
## 1.0.5 (2023-09-13)
|
|
667
|
+
|
|
668
|
+
**Note:** Version bump only for package @oanda/labs-sentiment-widget
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
|
|
6
674
|
## 1.0.169 (2024-11-20)
|
|
7
675
|
|
|
8
676
|
|
|
@@ -20,7 +20,8 @@ const SentimentWidget = _ref => {
|
|
|
20
20
|
locale,
|
|
21
21
|
theme,
|
|
22
22
|
includeDescriptionLabels,
|
|
23
|
-
isParamError
|
|
23
|
+
isParamError,
|
|
24
|
+
logoLink
|
|
24
25
|
} = _ref;
|
|
25
26
|
const client = new _client.ApolloClient({
|
|
26
27
|
uri: graphqlUrl,
|
|
@@ -35,13 +36,17 @@ const SentimentWidget = _ref => {
|
|
|
35
36
|
client: client
|
|
36
37
|
}, isParamError ? _react.default.createElement("div", {
|
|
37
38
|
className: "lw-flex lw-h-[425px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary"
|
|
38
|
-
}, _react.default.createElement(_labsWidgetCommon.ChartError, null)) :
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
}, _react.default.createElement(_labsWidgetCommon.ChartError, null)) : (0, _labsWidgetCommon.renderComponent)({
|
|
40
|
+
logoLink,
|
|
41
|
+
linkArea: 'logo',
|
|
42
|
+
Component: instrument ? _react.default.createElement(_Widget.Widget, {
|
|
43
|
+
division: division,
|
|
44
|
+
instrument: instrument,
|
|
45
|
+
includeDescriptionLabels: includeDescriptionLabels
|
|
46
|
+
}) : _react.default.createElement(_Tool.Tool, {
|
|
47
|
+
division: division
|
|
48
|
+
})
|
|
49
|
+
}))));
|
|
45
50
|
};
|
|
46
51
|
exports.SentimentWidget = SentimentWidget;
|
|
47
52
|
//# sourceMappingURL=SentimentWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SentimentWidget.js","names":["_react","_interopRequireDefault","require","_client","_monoI18n","_labsWidgetCommon","_Widget","_Tool","_translations","e","__esModule","default","SentimentWidget","_ref","graphqlUrl","division","instrument","locale","theme","includeDescriptionLabels","isParamError","client","ApolloClient","uri","cache","InMemoryCache","createElement","ThemeProvider","LocaleProvider","getLocale","translations","ApolloProvider","className","ChartError","
|
|
1
|
+
{"version":3,"file":"SentimentWidget.js","names":["_react","_interopRequireDefault","require","_client","_monoI18n","_labsWidgetCommon","_Widget","_Tool","_translations","e","__esModule","default","SentimentWidget","_ref","graphqlUrl","division","instrument","locale","theme","includeDescriptionLabels","isParamError","logoLink","client","ApolloClient","uri","cache","InMemoryCache","createElement","ThemeProvider","LocaleProvider","getLocale","translations","ApolloProvider","className","ChartError","renderComponent","linkArea","Component","Widget","Tool","exports"],"sources":["../../../src/SentimentWidget/SentimentWidget.tsx"],"sourcesContent":["import React from 'react';\nimport { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';\nimport { LocaleProvider } from '@oanda/mono-i18n';\nimport {\n ChartError, ThemeProvider, getLocale, renderComponent,\n} from '@oanda/labs-widget-common';\nimport { Widget } from './Widget';\nimport { Tool } from './Tool';\nimport { SentimentConfig } from './types';\nimport { translations } from '../translations';\n\nconst SentimentWidget = ({\n graphqlUrl,\n division,\n instrument,\n locale,\n theme,\n includeDescriptionLabels,\n isParamError,\n logoLink,\n}: SentimentConfig) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n return (\n <ThemeProvider theme={theme}>\n <LocaleProvider locale={getLocale(locale)} translations={translations}>\n <ApolloProvider client={client}>\n {isParamError ? (\n <div className=\"lw-flex lw-h-[425px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary\">\n <ChartError />\n </div>\n ) : (\n renderComponent({\n logoLink,\n linkArea: 'logo',\n Component: instrument\n ? (\n <Widget\n division={division}\n instrument={instrument}\n includeDescriptionLabels={includeDescriptionLabels}\n />\n )\n : <Tool division={division} />,\n })\n )}\n </ApolloProvider>\n </LocaleProvider>\n </ThemeProvider>\n );\n};\n\nexport { SentimentWidget };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG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;MACnBC,UAAU,EAAEA,UAAW;MACvBG,wBAAwB,EAAEA;IAAyB,CACpD,CAAC,GAEFnB,MAAA,CAAAW,OAAA,CAAAgB,aAAA,CAACpB,KAAA,CAAAgC,IAAI;MAACxB,QAAQ,EAAEA;IAAS,CAAE;EACjC,CAAC,CAEW,CACF,CACH,CAAC;AAEpB,CAAC;AAACyB,OAAA,CAAA5B,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -26,7 +26,8 @@ if (sentimentParamsElements.length > 0) {
|
|
|
26
26
|
instrument,
|
|
27
27
|
division,
|
|
28
28
|
locale,
|
|
29
|
-
includeDescriptionLabels
|
|
29
|
+
includeDescriptionLabels,
|
|
30
|
+
logoLink
|
|
30
31
|
} = JSON.parse(params);
|
|
31
32
|
const isParamError = (0, _labsWidgetCommon.validateToolParams)({
|
|
32
33
|
division,
|
|
@@ -48,7 +49,8 @@ if (sentimentParamsElements.length > 0) {
|
|
|
48
49
|
locale: locale,
|
|
49
50
|
theme: mode,
|
|
50
51
|
includeDescriptionLabels: includeDescriptionLabels,
|
|
51
|
-
isParamError: isParamError
|
|
52
|
+
isParamError: isParamError,
|
|
53
|
+
logoLink: logoLink
|
|
52
54
|
}));
|
|
53
55
|
});
|
|
54
56
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","names":["_react","_interopRequireDefault","require","_client","_labsWidgetCommon","_SentimentWidget","_graphql","e","__esModule","default","graphqlUrl","configGraphQl","division","configDivision","instrument","configInstrument","renderElementId","configRenderElementId","locale","configLocale","window","sentimentWidgetConfig","widgetsConfig","sentimentParamsElements","document","querySelectorAll","length","forEach","element","root","createRoot","params","getAttribute","mode","includeDescriptionLabels","JSON","parse","isParamError","validateToolParams","name","valueCheck","value","validateLocale","Object","values","Division","includes","render","createElement","SentimentWidget","theme","container","getElementById"],"sources":["../../../src/SentimentWidget/render.tsx"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { Theme, validateLocale, validateToolParams } from '@oanda/labs-widget-common';\nimport { SentimentWidget } from './SentimentWidget';\nimport { Division } from '../gql/types/graphql';\n\nconst {\n graphqlUrl: configGraphQl,\n division: configDivision,\n instrument: configInstrument,\n renderElementId: configRenderElementId,\n locale: configLocale,\n} = window.sentimentWidgetConfig || {};\n\nconst {\n graphqlUrl,\n} = window.widgetsConfig || {};\n\nconst sentimentParamsElements = document.querySelectorAll('div[data-sentiment-params]');\n\nif (sentimentParamsElements.length > 0) {\n sentimentParamsElements.forEach((element) => {\n const root = createRoot(element);\n const params = element.getAttribute('data-sentiment-params');\n const mode = element.getAttribute('data-mode');\n const {\n instrument, division, locale, includeDescriptionLabels,\n } = JSON.parse(params as string);\n\n const isParamError = validateToolParams({
|
|
1
|
+
{"version":3,"file":"render.js","names":["_react","_interopRequireDefault","require","_client","_labsWidgetCommon","_SentimentWidget","_graphql","e","__esModule","default","graphqlUrl","configGraphQl","division","configDivision","instrument","configInstrument","renderElementId","configRenderElementId","locale","configLocale","window","sentimentWidgetConfig","widgetsConfig","sentimentParamsElements","document","querySelectorAll","length","forEach","element","root","createRoot","params","getAttribute","mode","includeDescriptionLabels","logoLink","JSON","parse","isParamError","validateToolParams","name","valueCheck","value","validateLocale","Object","values","Division","includes","render","createElement","SentimentWidget","theme","container","getElementById"],"sources":["../../../src/SentimentWidget/render.tsx"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { Theme, validateLocale, validateToolParams } from '@oanda/labs-widget-common';\nimport { SentimentWidget } from './SentimentWidget';\nimport { Division } from '../gql/types/graphql';\n\nconst {\n graphqlUrl: configGraphQl,\n division: configDivision,\n instrument: configInstrument,\n renderElementId: configRenderElementId,\n locale: configLocale,\n} = window.sentimentWidgetConfig || {};\n\nconst {\n graphqlUrl,\n} = window.widgetsConfig || {};\n\nconst sentimentParamsElements = document.querySelectorAll('div[data-sentiment-params]');\n\nif (sentimentParamsElements.length > 0) {\n sentimentParamsElements.forEach((element) => {\n const root = createRoot(element);\n const params = element.getAttribute('data-sentiment-params');\n const mode = element.getAttribute('data-mode');\n const {\n instrument, division, locale, includeDescriptionLabels, logoLink,\n } = JSON.parse(params as string);\n\n const isParamError = validateToolParams({\n division, locale, graphqlUrl,\n }, [\n {\n name: 'locale',\n valueCheck: (value) => validateLocale(value),\n }, {\n name: 'division',\n valueCheck: (value) => Object.values(Division).includes(value),\n }, {\n name: 'graphqlUrl',\n },\n ]);\n root.render(\n <SentimentWidget\n graphqlUrl={graphqlUrl}\n division={division}\n instrument={instrument}\n locale={locale}\n theme={mode as Theme}\n includeDescriptionLabels={includeDescriptionLabels}\n isParamError={isParamError}\n logoLink={logoLink}\n />,\n );\n });\n} else {\n const container = document.getElementById(configRenderElementId);\n const root = createRoot(container!);\n root.render(\n <SentimentWidget\n graphqlUrl={configGraphQl}\n division={configDivision}\n instrument={configInstrument}\n locale={configLocale}\n />,\n );\n}\n"],"mappings":";;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAAgD,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhD,MAAM;EACJG,UAAU,EAAEC,aAAa;EACzBC,QAAQ,EAAEC,cAAc;EACxBC,UAAU,EAAEC,gBAAgB;EAC5BC,eAAe,EAAEC,qBAAqB;EACtCC,MAAM,EAAEC;AACV,CAAC,GAAGC,MAAM,CAACC,qBAAqB,IAAI,CAAC,CAAC;AAEtC,MAAM;EACJX;AACF,CAAC,GAAGU,MAAM,CAACE,aAAa,IAAI,CAAC,CAAC;AAE9B,MAAMC,uBAAuB,GAAGC,QAAQ,CAACC,gBAAgB,CAAC,4BAA4B,CAAC;AAEvF,IAAIF,uBAAuB,CAAC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AAMY,IAAI,GAAG,IAAAC,kBAAU,EAACsB,SAAU,CAAC;EACnCvB,IAAI,CAACmB,MAAM,CACThD,MAAA,CAAAS,OAAA,CAAAwC,aAAA,CAAC5C,gBAAA,CAAA6C,eAAe;IACdxC,UAAU,EAAEC,aAAc;IAC1BC,QAAQ,EAAEC,cAAe;IACzBC,UAAU,EAAEC,gBAAiB;IAC7BG,MAAM,EAAEC;EAAa,CACtB,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/SentimentWidget/types.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/SentimentWidget/types.ts"],"sourcesContent":["import { WidgetConfig } from '@oanda/labs-widget-common';\nimport { Division } from '../gql/types/graphql';\n\nexport interface SentimentConfig extends WidgetConfig {\n division: Division;\n instrument?: string;\n includeDescriptionLabels?: boolean;\n}\nexport interface SentimentWrapperConfig extends SentimentConfig {\n renderElementId: string;\n}\nexport interface SentimentWidgetConfig {\n division: Division;\n instrument: string;\n includeDescriptionLabels?: boolean;\n}\n\nexport interface SentimentToolConfig {\n division: Division;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';
|
|
3
3
|
import { LocaleProvider } from '@oanda/mono-i18n';
|
|
4
|
-
import { ChartError, ThemeProvider, getLocale } from '@oanda/labs-widget-common';
|
|
4
|
+
import { ChartError, ThemeProvider, getLocale, renderComponent } from '@oanda/labs-widget-common';
|
|
5
5
|
import { Widget } from './Widget';
|
|
6
6
|
import { Tool } from './Tool';
|
|
7
7
|
import { translations } from '../translations';
|
|
@@ -13,7 +13,8 @@ const SentimentWidget = _ref => {
|
|
|
13
13
|
locale,
|
|
14
14
|
theme,
|
|
15
15
|
includeDescriptionLabels,
|
|
16
|
-
isParamError
|
|
16
|
+
isParamError,
|
|
17
|
+
logoLink
|
|
17
18
|
} = _ref;
|
|
18
19
|
const client = new ApolloClient({
|
|
19
20
|
uri: graphqlUrl,
|
|
@@ -28,13 +29,17 @@ const SentimentWidget = _ref => {
|
|
|
28
29
|
client: client
|
|
29
30
|
}, isParamError ? React.createElement("div", {
|
|
30
31
|
className: "lw-flex lw-h-[425px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary"
|
|
31
|
-
}, React.createElement(ChartError, null)) :
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
}, React.createElement(ChartError, null)) : renderComponent({
|
|
33
|
+
logoLink,
|
|
34
|
+
linkArea: 'logo',
|
|
35
|
+
Component: instrument ? React.createElement(Widget, {
|
|
36
|
+
division: division,
|
|
37
|
+
instrument: instrument,
|
|
38
|
+
includeDescriptionLabels: includeDescriptionLabels
|
|
39
|
+
}) : React.createElement(Tool, {
|
|
40
|
+
division: division
|
|
41
|
+
})
|
|
42
|
+
}))));
|
|
38
43
|
};
|
|
39
44
|
export { SentimentWidget };
|
|
40
45
|
//# sourceMappingURL=SentimentWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SentimentWidget.js","names":["React","ApolloClient","InMemoryCache","ApolloProvider","LocaleProvider","ChartError","ThemeProvider","getLocale","Widget","Tool","translations","SentimentWidget","_ref","graphqlUrl","division","instrument","locale","theme","includeDescriptionLabels","isParamError","client","uri","cache","createElement","className","
|
|
1
|
+
{"version":3,"file":"SentimentWidget.js","names":["React","ApolloClient","InMemoryCache","ApolloProvider","LocaleProvider","ChartError","ThemeProvider","getLocale","renderComponent","Widget","Tool","translations","SentimentWidget","_ref","graphqlUrl","division","instrument","locale","theme","includeDescriptionLabels","isParamError","logoLink","client","uri","cache","createElement","className","linkArea","Component"],"sources":["../../../src/SentimentWidget/SentimentWidget.tsx"],"sourcesContent":["import React from 'react';\nimport { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';\nimport { LocaleProvider } from '@oanda/mono-i18n';\nimport {\n ChartError, ThemeProvider, getLocale, renderComponent,\n} from '@oanda/labs-widget-common';\nimport { Widget } from './Widget';\nimport { Tool } from './Tool';\nimport { SentimentConfig } from './types';\nimport { translations } from '../translations';\n\nconst SentimentWidget = ({\n graphqlUrl,\n division,\n instrument,\n locale,\n theme,\n includeDescriptionLabels,\n isParamError,\n logoLink,\n}: SentimentConfig) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n return (\n <ThemeProvider theme={theme}>\n <LocaleProvider locale={getLocale(locale)} translations={translations}>\n <ApolloProvider client={client}>\n {isParamError ? (\n <div className=\"lw-flex lw-h-[425px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary\">\n <ChartError />\n </div>\n ) : (\n renderComponent({\n logoLink,\n linkArea: 'logo',\n Component: instrument\n ? (\n <Widget\n division={division}\n instrument={instrument}\n includeDescriptionLabels={includeDescriptionLabels}\n />\n )\n : <Tool division={division} />,\n })\n )}\n </ApolloProvider>\n </LocaleProvider>\n </ThemeProvider>\n );\n};\n\nexport { SentimentWidget };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,EAAEC,aAAa,EAAEC,cAAc,QAAQ,gBAAgB;AAC5E,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SACEC,UAAU,EAAEC,aAAa,EAAEC,SAAS,EAAEC,eAAe,QAChD,2BAA2B;AAClC,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,IAAI,QAAQ,QAAQ;AAE7B,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAMC,eAAe,GAAGC,IAAA,IASD;EAAA,IATE;IACvBC,UAAU;IACVC,QAAQ;IACRC,UAAU;IACVC,MAAM;IACNC,KAAK;IACLC,wBAAwB;IACxBC,YAAY;IACZC;EACe,CAAC,GAAAR,IAAA;EAChB,MAAMS,MAAM,GAAG,IAAIrB,YAAY,CAAC;IAC9BsB,GAAG,EAAET,UAAU;IACfU,KAAK,EAAE,IAAItB,aAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,OACEF,KAAA,CAAAyB,aAAA,CAACnB,aAAa;IAACY,KAAK,EAAEA;EAAM,GAC1BlB,KAAA,CAAAyB,aAAA,CAACrB,cAAc;IAACa,MAAM,EAAEV,SAAS,CAACU,MAAM,CAAE;IAACN,YAAY,EAAEA;EAAa,GACpEX,KAAA,CAAAyB,aAAA,CAACtB,cAAc;IAACmB,MAAM,EAAEA;EAAO,GAC5BF,YAAY,GACXpB,KAAA,CAAAyB,aAAA;IAAKC,SAAS,EAAC;EAAmG,GAChH1B,KAAA,CAAAyB,aAAA,CAACpB,UAAU,MAAE,CACV,CAAC,GAENG,eAAe,CAAC;IACda,QAAQ;IACRM,QAAQ,EAAE,MAAM;IAChBC,SAAS,EAAEZ,UAAU,GAEjBhB,KAAA,CAAAyB,aAAA,CAAChB,MAAM;MACLM,QAAQ,EAAEA,QAAS;MACnBC,UAAU,EAAEA,UAAW;MACvBG,wBAAwB,EAAEA;IAAyB,CACpD,CAAC,GAEFnB,KAAA,CAAAyB,aAAA,CAACf,IAAI;MAACK,QAAQ,EAAEA;IAAS,CAAE;EACjC,CAAC,CAEW,CACF,CACH,CAAC;AAEpB,CAAC;AAED,SAASH,eAAe","ignoreList":[]}
|
|
@@ -23,7 +23,8 @@ if (sentimentParamsElements.length > 0) {
|
|
|
23
23
|
instrument,
|
|
24
24
|
division,
|
|
25
25
|
locale,
|
|
26
|
-
includeDescriptionLabels
|
|
26
|
+
includeDescriptionLabels,
|
|
27
|
+
logoLink
|
|
27
28
|
} = JSON.parse(params);
|
|
28
29
|
const isParamError = validateToolParams({
|
|
29
30
|
division,
|
|
@@ -45,7 +46,8 @@ if (sentimentParamsElements.length > 0) {
|
|
|
45
46
|
locale: locale,
|
|
46
47
|
theme: mode,
|
|
47
48
|
includeDescriptionLabels: includeDescriptionLabels,
|
|
48
|
-
isParamError: isParamError
|
|
49
|
+
isParamError: isParamError,
|
|
50
|
+
logoLink: logoLink
|
|
49
51
|
}));
|
|
50
52
|
});
|
|
51
53
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","names":["React","createRoot","validateLocale","validateToolParams","SentimentWidget","Division","graphqlUrl","configGraphQl","division","configDivision","instrument","configInstrument","renderElementId","configRenderElementId","locale","configLocale","window","sentimentWidgetConfig","widgetsConfig","sentimentParamsElements","document","querySelectorAll","length","forEach","element","root","params","getAttribute","mode","includeDescriptionLabels","JSON","parse","isParamError","name","valueCheck","value","Object","values","includes","render","createElement","theme","container","getElementById"],"sources":["../../../src/SentimentWidget/render.tsx"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { Theme, validateLocale, validateToolParams } from '@oanda/labs-widget-common';\nimport { SentimentWidget } from './SentimentWidget';\nimport { Division } from '../gql/types/graphql';\n\nconst {\n graphqlUrl: configGraphQl,\n division: configDivision,\n instrument: configInstrument,\n renderElementId: configRenderElementId,\n locale: configLocale,\n} = window.sentimentWidgetConfig || {};\n\nconst {\n graphqlUrl,\n} = window.widgetsConfig || {};\n\nconst sentimentParamsElements = document.querySelectorAll('div[data-sentiment-params]');\n\nif (sentimentParamsElements.length > 0) {\n sentimentParamsElements.forEach((element) => {\n const root = createRoot(element);\n const params = element.getAttribute('data-sentiment-params');\n const mode = element.getAttribute('data-mode');\n const {\n instrument, division, locale, includeDescriptionLabels,\n } = JSON.parse(params as string);\n\n const isParamError = validateToolParams({
|
|
1
|
+
{"version":3,"file":"render.js","names":["React","createRoot","validateLocale","validateToolParams","SentimentWidget","Division","graphqlUrl","configGraphQl","division","configDivision","instrument","configInstrument","renderElementId","configRenderElementId","locale","configLocale","window","sentimentWidgetConfig","widgetsConfig","sentimentParamsElements","document","querySelectorAll","length","forEach","element","root","params","getAttribute","mode","includeDescriptionLabels","logoLink","JSON","parse","isParamError","name","valueCheck","value","Object","values","includes","render","createElement","theme","container","getElementById"],"sources":["../../../src/SentimentWidget/render.tsx"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { Theme, validateLocale, validateToolParams } from '@oanda/labs-widget-common';\nimport { SentimentWidget } from './SentimentWidget';\nimport { Division } from '../gql/types/graphql';\n\nconst {\n graphqlUrl: configGraphQl,\n division: configDivision,\n instrument: configInstrument,\n renderElementId: configRenderElementId,\n locale: configLocale,\n} = window.sentimentWidgetConfig || {};\n\nconst {\n graphqlUrl,\n} = window.widgetsConfig || {};\n\nconst sentimentParamsElements = document.querySelectorAll('div[data-sentiment-params]');\n\nif (sentimentParamsElements.length > 0) {\n sentimentParamsElements.forEach((element) => {\n const root = createRoot(element);\n const params = element.getAttribute('data-sentiment-params');\n const mode = element.getAttribute('data-mode');\n const {\n instrument, division, locale, includeDescriptionLabels, logoLink,\n } = JSON.parse(params as string);\n\n const isParamError = validateToolParams({\n division, locale, graphqlUrl,\n }, [\n {\n name: 'locale',\n valueCheck: (value) => validateLocale(value),\n }, {\n name: 'division',\n valueCheck: (value) => Object.values(Division).includes(value),\n }, {\n name: 'graphqlUrl',\n },\n ]);\n root.render(\n <SentimentWidget\n graphqlUrl={graphqlUrl}\n division={division}\n instrument={instrument}\n locale={locale}\n theme={mode as Theme}\n includeDescriptionLabels={includeDescriptionLabels}\n isParamError={isParamError}\n logoLink={logoLink}\n />,\n );\n });\n} else {\n const container = document.getElementById(configRenderElementId);\n const root = createRoot(container!);\n root.render(\n <SentimentWidget\n graphqlUrl={configGraphQl}\n division={configDivision}\n instrument={configInstrument}\n locale={configLocale}\n />,\n );\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAAgBC,cAAc,EAAEC,kBAAkB,QAAQ,2BAA2B;AACrF,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,QAAQ,QAAQ,sBAAsB;AAE/C,MAAM;E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Q,EAAEA,QAAS;MACnBE,UAAU,EAAEA,UAAW;MACvBI,MAAM,EAAEA,MAAO;MACf4B,KAAK,EAAEd,IAAc;MACrBC,wBAAwB,EAAEA,wBAAyB;MACnDI,YAAY,EAAEA,YAAa;MAC3BH,QAAQ,EAAEA;IAAS,CACpB,CACH,CAAC;EACH,CAAC,CAAC;AACJ,CAAC,MAAM;EACL,MAAMa,SAAS,GAAGvB,QAAQ,CAACwB,cAAc,CAAC/B,qBAAqB,CAAC;EAChE,MAAMY,IAAI,GAAGxB,UAAU,CAAC0C,SAAU,CAAC;EACnClB,IAAI,CAACe,MAAM,CACTxC,KAAA,CAAAyC,aAAA,CAACrC,eAAe;IACdE,UAAU,EAAEC,aAAc;IAC1BC,QAAQ,EAAEC,cAAe;IACzBC,UAAU,EAAEC,gBAAiB;IAC7BG,MAAM,EAAEC;EAAa,CACtB,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/SentimentWidget/types.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/SentimentWidget/types.ts"],"sourcesContent":["import { WidgetConfig } from '@oanda/labs-widget-common';\nimport { Division } from '../gql/types/graphql';\n\nexport interface SentimentConfig extends WidgetConfig {\n division: Division;\n instrument?: string;\n includeDescriptionLabels?: boolean;\n}\nexport interface SentimentWrapperConfig extends SentimentConfig {\n renderElementId: string;\n}\nexport interface SentimentWidgetConfig {\n division: Division;\n instrument: string;\n includeDescriptionLabels?: boolean;\n}\n\nexport interface SentimentToolConfig {\n division: Division;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SentimentConfig } from './types';
|
|
3
|
-
declare const SentimentWidget: ({ graphqlUrl, division, instrument, locale, theme, includeDescriptionLabels, isParamError, }: SentimentConfig) => React.JSX.Element;
|
|
3
|
+
declare const SentimentWidget: ({ graphqlUrl, division, instrument, locale, theme, includeDescriptionLabels, isParamError, logoLink, }: SentimentConfig) => React.JSX.Element;
|
|
4
4
|
export { SentimentWidget };
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Theme } from '@oanda/labs-widget-common';
|
|
1
|
+
import { WidgetConfig } from '@oanda/labs-widget-common';
|
|
3
2
|
import { Division } from '../gql/types/graphql';
|
|
4
|
-
export interface SentimentConfig {
|
|
5
|
-
graphqlUrl: string;
|
|
3
|
+
export interface SentimentConfig extends WidgetConfig {
|
|
6
4
|
division: Division;
|
|
7
5
|
instrument?: string;
|
|
8
|
-
locale: Locale;
|
|
9
|
-
theme?: Theme;
|
|
10
6
|
includeDescriptionLabels?: boolean;
|
|
11
|
-
isParamError?: boolean;
|
|
12
7
|
}
|
|
13
8
|
export interface SentimentWrapperConfig extends SentimentConfig {
|
|
14
9
|
renderElementId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oanda/labs-sentiment-widget",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.170",
|
|
4
4
|
"description": "Labs Sentiment Widget",
|
|
5
5
|
"main": "dist/main/index.js",
|
|
6
6
|
"module": "dist/module/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"author": "OANDA",
|
|
13
13
|
"license": "UNLICENSED",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@oanda/labs-widget-common": "^1.0.
|
|
15
|
+
"@oanda/labs-widget-common": "^1.0.170",
|
|
16
16
|
"@oanda/mono-i18n": "10.0.1",
|
|
17
17
|
"graphql": "16.8.1"
|
|
18
18
|
},
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"@graphql-codegen/cli": "5.0.0",
|
|
21
21
|
"@graphql-codegen/client-preset": "4.1.0"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "cfcc2eb4d59e16d25ec3da37e01767b476477125"
|
|
24
24
|
}
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';
|
|
3
3
|
import { LocaleProvider } from '@oanda/mono-i18n';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
ChartError, ThemeProvider, getLocale, renderComponent,
|
|
6
|
+
} from '@oanda/labs-widget-common';
|
|
5
7
|
import { Widget } from './Widget';
|
|
6
8
|
import { Tool } from './Tool';
|
|
7
9
|
import { SentimentConfig } from './types';
|
|
8
10
|
import { translations } from '../translations';
|
|
9
11
|
|
|
10
12
|
const SentimentWidget = ({
|
|
11
|
-
graphqlUrl,
|
|
13
|
+
graphqlUrl,
|
|
14
|
+
division,
|
|
15
|
+
instrument,
|
|
16
|
+
locale,
|
|
17
|
+
theme,
|
|
18
|
+
includeDescriptionLabels,
|
|
19
|
+
isParamError,
|
|
20
|
+
logoLink,
|
|
12
21
|
}: SentimentConfig) => {
|
|
13
22
|
const client = new ApolloClient({
|
|
14
23
|
uri: graphqlUrl,
|
|
@@ -24,17 +33,19 @@ const SentimentWidget = ({
|
|
|
24
33
|
<ChartError />
|
|
25
34
|
</div>
|
|
26
35
|
) : (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
renderComponent({
|
|
37
|
+
logoLink,
|
|
38
|
+
linkArea: 'logo',
|
|
39
|
+
Component: instrument
|
|
40
|
+
? (
|
|
41
|
+
<Widget
|
|
42
|
+
division={division}
|
|
43
|
+
instrument={instrument}
|
|
44
|
+
includeDescriptionLabels={includeDescriptionLabels}
|
|
45
|
+
/>
|
|
46
|
+
)
|
|
47
|
+
: <Tool division={division} />,
|
|
48
|
+
})
|
|
38
49
|
)}
|
|
39
50
|
</ApolloProvider>
|
|
40
51
|
</LocaleProvider>
|
|
@@ -24,10 +24,12 @@ if (sentimentParamsElements.length > 0) {
|
|
|
24
24
|
const params = element.getAttribute('data-sentiment-params');
|
|
25
25
|
const mode = element.getAttribute('data-mode');
|
|
26
26
|
const {
|
|
27
|
-
instrument, division, locale, includeDescriptionLabels,
|
|
27
|
+
instrument, division, locale, includeDescriptionLabels, logoLink,
|
|
28
28
|
} = JSON.parse(params as string);
|
|
29
29
|
|
|
30
|
-
const isParamError = validateToolParams({
|
|
30
|
+
const isParamError = validateToolParams({
|
|
31
|
+
division, locale, graphqlUrl,
|
|
32
|
+
}, [
|
|
31
33
|
{
|
|
32
34
|
name: 'locale',
|
|
33
35
|
valueCheck: (value) => validateLocale(value),
|
|
@@ -36,7 +38,8 @@ if (sentimentParamsElements.length > 0) {
|
|
|
36
38
|
valueCheck: (value) => Object.values(Division).includes(value),
|
|
37
39
|
}, {
|
|
38
40
|
name: 'graphqlUrl',
|
|
39
|
-
}
|
|
41
|
+
},
|
|
42
|
+
]);
|
|
40
43
|
root.render(
|
|
41
44
|
<SentimentWidget
|
|
42
45
|
graphqlUrl={graphqlUrl}
|
|
@@ -46,6 +49,7 @@ if (sentimentParamsElements.length > 0) {
|
|
|
46
49
|
theme={mode as Theme}
|
|
47
50
|
includeDescriptionLabels={includeDescriptionLabels}
|
|
48
51
|
isParamError={isParamError}
|
|
52
|
+
logoLink={logoLink}
|
|
49
53
|
/>,
|
|
50
54
|
);
|
|
51
55
|
});
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Theme } from '@oanda/labs-widget-common';
|
|
1
|
+
import { WidgetConfig } from '@oanda/labs-widget-common';
|
|
3
2
|
import { Division } from '../gql/types/graphql';
|
|
4
3
|
|
|
5
|
-
export interface SentimentConfig {
|
|
6
|
-
graphqlUrl: string;
|
|
4
|
+
export interface SentimentConfig extends WidgetConfig {
|
|
7
5
|
division: Division;
|
|
8
6
|
instrument?: string;
|
|
9
|
-
locale: Locale;
|
|
10
|
-
theme?: Theme;
|
|
11
7
|
includeDescriptionLabels?: boolean;
|
|
12
|
-
isParamError?: boolean;
|
|
13
8
|
}
|
|
14
9
|
export interface SentimentWrapperConfig extends SentimentConfig {
|
|
15
10
|
renderElementId: string;
|