@oanda/labs-currency-power-balance-widget 1.0.108 → 1.0.109
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 +440 -0
- package/dist/main/CurrencyPowerBalanceWidget/CurrencyPowerBalance.js +9 -4
- package/dist/main/CurrencyPowerBalanceWidget/CurrencyPowerBalance.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/render.js +4 -2
- package/dist/main/CurrencyPowerBalanceWidget/render.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/types.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/CurrencyPowerBalance.js +10 -5
- package/dist/module/CurrencyPowerBalanceWidget/CurrencyPowerBalance.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/render.js +4 -2
- package/dist/module/CurrencyPowerBalanceWidget/render.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/types.js.map +1 -1
- package/dist/types/CurrencyPowerBalanceWidget/CurrencyPowerBalance.d.ts +1 -1
- package/dist/types/CurrencyPowerBalanceWidget/types.d.ts +2 -8
- package/package.json +3 -3
- package/src/CurrencyPowerBalanceWidget/CurrencyPowerBalance.tsx +9 -3
- package/src/CurrencyPowerBalanceWidget/render.tsx +4 -1
- package/src/CurrencyPowerBalanceWidget/types.ts +2 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,446 @@
|
|
|
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.109 (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
|
+
**Note:** Version bump only for package @oanda/labs-currency-power-balance-widget
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
|
|
6
446
|
## 1.0.108 (2024-11-20)
|
|
7
447
|
|
|
8
448
|
|
|
@@ -18,7 +18,8 @@ const CurrencyPowerBalance = _ref => {
|
|
|
18
18
|
locale,
|
|
19
19
|
timeUnit,
|
|
20
20
|
currencies,
|
|
21
|
-
isParamError
|
|
21
|
+
isParamError,
|
|
22
|
+
logoLink
|
|
22
23
|
} = _ref;
|
|
23
24
|
const client = new _client.ApolloClient({
|
|
24
25
|
uri: graphqlUrl,
|
|
@@ -33,9 +34,13 @@ const CurrencyPowerBalance = _ref => {
|
|
|
33
34
|
client: client
|
|
34
35
|
}, isParamError ? _react.default.createElement("div", {
|
|
35
36
|
className: "lw-flex lw-h-[425px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary"
|
|
36
|
-
}, _react.default.createElement(_labsWidgetCommon.ChartError, null)) :
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
}, _react.default.createElement(_labsWidgetCommon.ChartError, null)) : (0, _labsWidgetCommon.renderComponent)({
|
|
38
|
+
Component: _react.default.createElement(_Main.Main, {
|
|
39
|
+
timeUnit: timeUnit,
|
|
40
|
+
currencies: currencies
|
|
41
|
+
}),
|
|
42
|
+
logoLink,
|
|
43
|
+
linkArea: 'logo'
|
|
39
44
|
}))));
|
|
40
45
|
};
|
|
41
46
|
exports.CurrencyPowerBalance = CurrencyPowerBalance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencyPowerBalance.js","names":["_react","_interopRequireDefault","require","_client","_labsWidgetCommon","_monoI18n","_Main","_translations","e","__esModule","default","CurrencyPowerBalance","_ref","graphqlUrl","theme","locale","timeUnit","currencies","isParamError","client","ApolloClient","uri","cache","InMemoryCache","createElement","ThemeProvider","LocaleProvider","getLocale","translations","ApolloProvider","className","ChartError","Main","exports"],"sources":["../../../src/CurrencyPowerBalanceWidget/CurrencyPowerBalance.tsx"],"sourcesContent":["import React from 'react';\nimport { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';\nimport {
|
|
1
|
+
{"version":3,"file":"CurrencyPowerBalance.js","names":["_react","_interopRequireDefault","require","_client","_labsWidgetCommon","_monoI18n","_Main","_translations","e","__esModule","default","CurrencyPowerBalance","_ref","graphqlUrl","theme","locale","timeUnit","currencies","isParamError","logoLink","client","ApolloClient","uri","cache","InMemoryCache","createElement","ThemeProvider","LocaleProvider","getLocale","translations","ApolloProvider","className","ChartError","renderComponent","Component","Main","linkArea","exports"],"sources":["../../../src/CurrencyPowerBalanceWidget/CurrencyPowerBalance.tsx"],"sourcesContent":["import React from 'react';\nimport { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';\nimport {\n ChartError, ThemeProvider, getLocale, renderComponent,\n} from '@oanda/labs-widget-common';\nimport { LocaleProvider } from '@oanda/mono-i18n';\nimport { Main } from './Main';\nimport { CurrencyPowerBalanceConfig } from './types';\nimport { translations } from '../translations';\n\nconst CurrencyPowerBalance = ({\n graphqlUrl, theme, locale, timeUnit, currencies, isParamError, logoLink,\n}: CurrencyPowerBalanceConfig) => {\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 ) : renderComponent({\n Component: <Main timeUnit={timeUnit} currencies={currencies} />,\n logoLink,\n linkArea: 'logo',\n })}\n </ApolloProvider>\n </LocaleProvider>\n </ThemeProvider>\n );\n};\n\nexport { CurrencyPowerBalance };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AAGA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAEA,IAAAK,aAAA,GAAAL,OAAA;AAA+C,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA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
|
23
23
|
timeUnit,
|
|
24
24
|
currencies,
|
|
25
|
-
locale
|
|
25
|
+
locale,
|
|
26
|
+
logoLink
|
|
26
27
|
} = JSON.parse(params);
|
|
27
28
|
const isParamError = (0, _labsWidgetCommon.validateToolParams)({
|
|
28
29
|
locale,
|
|
@@ -39,7 +40,8 @@ if (currencyPowerBalanceParamsElements.length > 0) {
|
|
|
39
40
|
theme: mode,
|
|
40
41
|
isParamError: isParamError,
|
|
41
42
|
timeUnit: timeUnit,
|
|
42
|
-
currencies: currencies
|
|
43
|
+
currencies: currencies,
|
|
44
|
+
logoLink: logoLink
|
|
43
45
|
}));
|
|
44
46
|
});
|
|
45
47
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","names":["_react","_interopRequireDefault","require","_client","_labsWidgetCommon","_CurrencyPowerBalance","e","__esModule","default","graphqlUrl","configGraphQl","renderElementId","configRenderElementId","locale","configLocale","window","currencyPowerBalanceWidgetConfig","widgetsConfig","currencyPowerBalanceParamsElements","document","querySelectorAll","length","forEach","element","root","createRoot","params","getAttribute","mode","timeUnit","currencies","JSON","parse","isParamError","validateToolParams","name","valueCheck","value","validateLocale","render","createElement","CurrencyPowerBalance","theme","container","getElementById"],"sources":["../../../src/CurrencyPowerBalanceWidget/render.tsx"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { Theme, validateLocale, validateToolParams } from '@oanda/labs-widget-common';\nimport { CurrencyPowerBalance } from './CurrencyPowerBalance';\n\nconst {\n graphqlUrl: configGraphQl,\n renderElementId: configRenderElementId,\n locale: configLocale,\n} = window.currencyPowerBalanceWidgetConfig || {};\n\nconst {\n graphqlUrl,\n} = window.widgetsConfig || {};\n\nconst currencyPowerBalanceParamsElements = document.querySelectorAll('div[data-currency-power-balance-params]');\n\nif (currencyPowerBalanceParamsElements.length > 0) {\n currencyPowerBalanceParamsElements.forEach((element) => {\n const root = createRoot(element);\n const params = element.getAttribute('data-currency-power-balance-params');\n const mode = element.getAttribute('data-mode');\n const {
|
|
1
|
+
{"version":3,"file":"render.js","names":["_react","_interopRequireDefault","require","_client","_labsWidgetCommon","_CurrencyPowerBalance","e","__esModule","default","graphqlUrl","configGraphQl","renderElementId","configRenderElementId","locale","configLocale","window","currencyPowerBalanceWidgetConfig","widgetsConfig","currencyPowerBalanceParamsElements","document","querySelectorAll","length","forEach","element","root","createRoot","params","getAttribute","mode","timeUnit","currencies","logoLink","JSON","parse","isParamError","validateToolParams","name","valueCheck","value","validateLocale","render","createElement","CurrencyPowerBalance","theme","container","getElementById"],"sources":["../../../src/CurrencyPowerBalanceWidget/render.tsx"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { Theme, validateLocale, validateToolParams } from '@oanda/labs-widget-common';\nimport { CurrencyPowerBalance } from './CurrencyPowerBalance';\n\nconst {\n graphqlUrl: configGraphQl,\n renderElementId: configRenderElementId,\n locale: configLocale,\n} = window.currencyPowerBalanceWidgetConfig || {};\n\nconst {\n graphqlUrl,\n} = window.widgetsConfig || {};\n\nconst currencyPowerBalanceParamsElements = document.querySelectorAll('div[data-currency-power-balance-params]');\n\nif (currencyPowerBalanceParamsElements.length > 0) {\n currencyPowerBalanceParamsElements.forEach((element) => {\n const root = createRoot(element);\n const params = element.getAttribute('data-currency-power-balance-params');\n const mode = element.getAttribute('data-mode');\n const {\n timeUnit, currencies, locale, logoLink,\n } = JSON.parse(params as string);\n\n const isParamError = validateToolParams({ locale, graphqlUrl }, [\n {\n name: 'locale',\n valueCheck: (value) => validateLocale(value),\n }, {\n name: 'graphqlUrl',\n }]);\n root.render(\n <CurrencyPowerBalance\n graphqlUrl={graphqlUrl}\n locale={locale}\n theme={mode as Theme}\n isParamError={isParamError}\n timeUnit={timeUnit}\n currencies={currencies}\n logoLink={logoLink}\n />,\n );\n });\n} else {\n const container = document.getElementById(configRenderElementId);\n const root = createRoot(container!);\n\n root.render(\n <CurrencyPowerBalance\n locale={configLocale}\n graphqlUrl={configG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CAACgB,MAAM,CACTxC,MAAA,CAAAQ,OAAA,CAAAiC,aAAA,CAACpC,qBAAA,CAAAqC,oBAAoB;MACnBjC,UAAU,EAAEA,UAAW;MACvBI,MAAM,EAAEA,MAAO;MACf8B,KAAK,EAAEf,IAAc;MACrBM,YAAY,EAAEA,YAAa;MAC3BL,QAAQ,EAAEA,QAAS;MACnBC,UAAU,EAAEA,UAAW;MACvBC,QAAQ,EAAEA;IAAS,CACpB,CACH,CAAC;EACH,CAAC,CAAC;AACJ,CAAC,MAAM;EACL,MAAMa,SAAS,GAAGzB,QAAQ,CAAC0B,cAAc,CAACjC,qBAAqB,CAAC;EAChE,MAAMY,IAAI,GAAG,IAAAC,kBAAU,EAACmB,SAAU,CAAC;EAEnCpB,IAAI,CAACgB,MAAM,CACTxC,MAAA,CAAAQ,OAAA,CAAAiC,aAAA,CAACpC,qBAAA,CAAAqC,oBAAoB;IACnB7B,MAAM,EAAEC,YAAa;IACrBL,UAAU,EAAEC;EAAc,CAC3B,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/CurrencyPowerBalanceWidget/types.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/CurrencyPowerBalanceWidget/types.ts"],"sourcesContent":["import { WidgetConfig } from '@oanda/labs-widget-common';\nimport { CurrencyPowerBalanceTimeUnit } from '../gql/types/graphql';\n\nexport interface CurrencyPowerBalanceConfig extends WidgetConfig {\n timeUnit?: CurrencyPowerBalanceTimeUnit;\n currencies?: string[];\n}\n\nexport interface CurrencyPowerBalanceWrapperConfig extends CurrencyPowerBalanceConfig {\n renderElementId: string;\n}\n\nexport interface MainProps {\n timeUnit?: CurrencyPowerBalanceTimeUnit;\n currencies?: string[];\n}\n\nexport interface ChartWithDataProps {\n timeUnit: CurrencyPowerBalanceTimeUnit;\n currencies?: string[];\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';
|
|
3
|
-
import { ChartError, ThemeProvider, getLocale } from '@oanda/labs-widget-common';
|
|
3
|
+
import { ChartError, ThemeProvider, getLocale, renderComponent } from '@oanda/labs-widget-common';
|
|
4
4
|
import { LocaleProvider } from '@oanda/mono-i18n';
|
|
5
5
|
import { Main } from './Main';
|
|
6
6
|
import { translations } from '../translations';
|
|
@@ -11,7 +11,8 @@ const CurrencyPowerBalance = _ref => {
|
|
|
11
11
|
locale,
|
|
12
12
|
timeUnit,
|
|
13
13
|
currencies,
|
|
14
|
-
isParamError
|
|
14
|
+
isParamError,
|
|
15
|
+
logoLink
|
|
15
16
|
} = _ref;
|
|
16
17
|
const client = new ApolloClient({
|
|
17
18
|
uri: graphqlUrl,
|
|
@@ -26,9 +27,13 @@ const CurrencyPowerBalance = _ref => {
|
|
|
26
27
|
client: client
|
|
27
28
|
}, isParamError ? React.createElement("div", {
|
|
28
29
|
className: "lw-flex lw-h-[425px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary"
|
|
29
|
-
}, React.createElement(ChartError, null)) :
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
}, React.createElement(ChartError, null)) : renderComponent({
|
|
31
|
+
Component: React.createElement(Main, {
|
|
32
|
+
timeUnit: timeUnit,
|
|
33
|
+
currencies: currencies
|
|
34
|
+
}),
|
|
35
|
+
logoLink,
|
|
36
|
+
linkArea: 'logo'
|
|
32
37
|
}))));
|
|
33
38
|
};
|
|
34
39
|
export { CurrencyPowerBalance };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencyPowerBalance.js","names":["React","ApolloClient","InMemoryCache","ApolloProvider","ChartError","ThemeProvider","getLocale","LocaleProvider","Main","translations","CurrencyPowerBalance","_ref","graphqlUrl","theme","locale","timeUnit","currencies","isParamError","client","uri","cache","createElement","className"],"sources":["../../../src/CurrencyPowerBalanceWidget/CurrencyPowerBalance.tsx"],"sourcesContent":["import React from 'react';\nimport { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';\nimport {
|
|
1
|
+
{"version":3,"file":"CurrencyPowerBalance.js","names":["React","ApolloClient","InMemoryCache","ApolloProvider","ChartError","ThemeProvider","getLocale","renderComponent","LocaleProvider","Main","translations","CurrencyPowerBalance","_ref","graphqlUrl","theme","locale","timeUnit","currencies","isParamError","logoLink","client","uri","cache","createElement","className","Component","linkArea"],"sources":["../../../src/CurrencyPowerBalanceWidget/CurrencyPowerBalance.tsx"],"sourcesContent":["import React from 'react';\nimport { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';\nimport {\n ChartError, ThemeProvider, getLocale, renderComponent,\n} from '@oanda/labs-widget-common';\nimport { LocaleProvider } from '@oanda/mono-i18n';\nimport { Main } from './Main';\nimport { CurrencyPowerBalanceConfig } from './types';\nimport { translations } from '../translations';\n\nconst CurrencyPowerBalance = ({\n graphqlUrl, theme, locale, timeUnit, currencies, isParamError, logoLink,\n}: CurrencyPowerBalanceConfig) => {\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 ) : renderComponent({\n Component: <Main timeUnit={timeUnit} currencies={currencies} />,\n logoLink,\n linkArea: 'logo',\n })}\n </ApolloProvider>\n </LocaleProvider>\n </ThemeProvider>\n );\n};\n\nexport { CurrencyPowerBalance };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,EAAEC,aAAa,EAAEC,cAAc,QAAQ,gBAAgB;AAC5E,SACEC,UAAU,EAAEC,aAAa,EAAEC,SAAS,EAAEC,eAAe,QAChD,2BAA2B;AAClC,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,IAAI,QAAQ,QAAQ;AAE7B,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,MAAMC,oBAAoB,GAAGC,IAAA,IAEK;EAAA,IAFJ;IAC5BC,UAAU;IAAEC,KAAK;IAAEC,MAAM;IAAEC,QAAQ;IAAEC,UAAU;IAAEC,YAAY;IAAEC;EACrC,CAAC,GAAAP,IAAA;EAC3B,MAAMQ,MAAM,GAAG,IAAInB,YAAY,CAAC;IAC9BoB,GAAG,EAAER,UAAU;IACfS,KAAK,EAAE,IAAIpB,aAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,OACEF,KAAA,CAAAuB,aAAA,CAAClB,aAAa;IAACS,KAAK,EAAEA;EAAM,GAC1Bd,KAAA,CAAAuB,aAAA,CAACf,cAAc;IAACO,MAAM,EAAET,SAAS,CAACS,MAAM,CAAE;IAACL,YAAY,EAAEA;EAAa,GACpEV,KAAA,CAAAuB,aAAA,CAACpB,cAAc;IAACiB,MAAM,EAAEA;EAAO,GAC5BF,YAAY,GACXlB,KAAA,CAAAuB,aAAA;IAAKC,SAAS,EAAC;EAAmG,GAChHxB,KAAA,CAAAuB,aAAA,CAACnB,UAAU,MAAE,CACV,CAAC,GACJG,eAAe,CAAC;IAClBkB,SAAS,EAAEzB,KAAA,CAAAuB,aAAA,CAACd,IAAI;MAACO,QAAQ,EAAEA,QAAS;MAACC,UAAU,EAAEA;IAAW,CAAE,CAAC;IAC/DE,QAAQ;IACRO,QAAQ,EAAE;EACZ,CAAC,CACa,CACF,CACH,CAAC;AAEpB,CAAC;AAED,SAASf,oBAAoB","ignoreList":[]}
|
|
@@ -19,7 +19,8 @@ if (currencyPowerBalanceParamsElements.length > 0) {
|
|
|
19
19
|
const {
|
|
20
20
|
timeUnit,
|
|
21
21
|
currencies,
|
|
22
|
-
locale
|
|
22
|
+
locale,
|
|
23
|
+
logoLink
|
|
23
24
|
} = JSON.parse(params);
|
|
24
25
|
const isParamError = validateToolParams({
|
|
25
26
|
locale,
|
|
@@ -36,7 +37,8 @@ if (currencyPowerBalanceParamsElements.length > 0) {
|
|
|
36
37
|
theme: mode,
|
|
37
38
|
isParamError: isParamError,
|
|
38
39
|
timeUnit: timeUnit,
|
|
39
|
-
currencies: currencies
|
|
40
|
+
currencies: currencies,
|
|
41
|
+
logoLink: logoLink
|
|
40
42
|
}));
|
|
41
43
|
});
|
|
42
44
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","names":["React","createRoot","validateLocale","validateToolParams","CurrencyPowerBalance","graphqlUrl","configGraphQl","renderElementId","configRenderElementId","locale","configLocale","window","currencyPowerBalanceWidgetConfig","widgetsConfig","currencyPowerBalanceParamsElements","document","querySelectorAll","length","forEach","element","root","params","getAttribute","mode","timeUnit","currencies","JSON","parse","isParamError","name","valueCheck","value","render","createElement","theme","container","getElementById"],"sources":["../../../src/CurrencyPowerBalanceWidget/render.tsx"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { Theme, validateLocale, validateToolParams } from '@oanda/labs-widget-common';\nimport { CurrencyPowerBalance } from './CurrencyPowerBalance';\n\nconst {\n graphqlUrl: configGraphQl,\n renderElementId: configRenderElementId,\n locale: configLocale,\n} = window.currencyPowerBalanceWidgetConfig || {};\n\nconst {\n graphqlUrl,\n} = window.widgetsConfig || {};\n\nconst currencyPowerBalanceParamsElements = document.querySelectorAll('div[data-currency-power-balance-params]');\n\nif (currencyPowerBalanceParamsElements.length > 0) {\n currencyPowerBalanceParamsElements.forEach((element) => {\n const root = createRoot(element);\n const params = element.getAttribute('data-currency-power-balance-params');\n const mode = element.getAttribute('data-mode');\n const {
|
|
1
|
+
{"version":3,"file":"render.js","names":["React","createRoot","validateLocale","validateToolParams","CurrencyPowerBalance","graphqlUrl","configGraphQl","renderElementId","configRenderElementId","locale","configLocale","window","currencyPowerBalanceWidgetConfig","widgetsConfig","currencyPowerBalanceParamsElements","document","querySelectorAll","length","forEach","element","root","params","getAttribute","mode","timeUnit","currencies","logoLink","JSON","parse","isParamError","name","valueCheck","value","render","createElement","theme","container","getElementById"],"sources":["../../../src/CurrencyPowerBalanceWidget/render.tsx"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { Theme, validateLocale, validateToolParams } from '@oanda/labs-widget-common';\nimport { CurrencyPowerBalance } from './CurrencyPowerBalance';\n\nconst {\n graphqlUrl: configGraphQl,\n renderElementId: configRenderElementId,\n locale: configLocale,\n} = window.currencyPowerBalanceWidgetConfig || {};\n\nconst {\n graphqlUrl,\n} = window.widgetsConfig || {};\n\nconst currencyPowerBalanceParamsElements = document.querySelectorAll('div[data-currency-power-balance-params]');\n\nif (currencyPowerBalanceParamsElements.length > 0) {\n currencyPowerBalanceParamsElements.forEach((element) => {\n const root = createRoot(element);\n const params = element.getAttribute('data-currency-power-balance-params');\n const mode = element.getAttribute('data-mode');\n const {\n timeUnit, currencies, locale, logoLink,\n } = JSON.parse(params as string);\n\n const isParamError = validateToolParams({ locale, graphqlUrl }, [\n {\n name: 'locale',\n valueCheck: (value) => validateLocale(value),\n }, {\n name: 'graphqlUrl',\n }]);\n root.render(\n <CurrencyPowerBalance\n graphqlUrl={graphqlUrl}\n locale={locale}\n theme={mode as Theme}\n isParamError={isParamError}\n timeUnit={timeUnit}\n currencies={currencies}\n logoLink={logoLink}\n />,\n );\n });\n} else {\n const container = document.getElementById(configRenderElementId);\n const root = createRoot(container!);\n\n root.render(\n <CurrencyPowerBalance\n locale={configLocale}\n graphqlUrl={configGraphQl}\n />,\n );\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAAgBC,cAAc,EAAEC,kBAAkB,QAAQ,2BAA2B;AACrF,SAASC,oBAAoB,QAAQ,wBAAwB;AAE7D,MAAM;EACJC,UAAU,EAAEC,aAAa;EACzBC,eAAe,EAAEC,qBAAqB;EACtCC,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,MAAMY,IAAI,GAAGnB,UAAU,CAACmC,SAAU,CAAC;EAEnChB,IAAI,CAACa,MAAM,CACTjC,KAAA,CAAAkC,aAAA,CAAC9B,oBAAoB;IACnBK,MAAM,EAAEC,YAAa;IACrBL,UAAU,EAAEC;EAAc,CAC3B,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/CurrencyPowerBalanceWidget/types.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/CurrencyPowerBalanceWidget/types.ts"],"sourcesContent":["import { WidgetConfig } from '@oanda/labs-widget-common';\nimport { CurrencyPowerBalanceTimeUnit } from '../gql/types/graphql';\n\nexport interface CurrencyPowerBalanceConfig extends WidgetConfig {\n timeUnit?: CurrencyPowerBalanceTimeUnit;\n currencies?: string[];\n}\n\nexport interface CurrencyPowerBalanceWrapperConfig extends CurrencyPowerBalanceConfig {\n renderElementId: string;\n}\n\nexport interface MainProps {\n timeUnit?: CurrencyPowerBalanceTimeUnit;\n currencies?: string[];\n}\n\nexport interface ChartWithDataProps {\n timeUnit: CurrencyPowerBalanceTimeUnit;\n currencies?: string[];\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CurrencyPowerBalanceConfig } from './types';
|
|
3
|
-
declare const CurrencyPowerBalance: ({ graphqlUrl, theme, locale, timeUnit, currencies, isParamError, }: CurrencyPowerBalanceConfig) => React.JSX.Element;
|
|
3
|
+
declare const CurrencyPowerBalance: ({ graphqlUrl, theme, locale, timeUnit, currencies, isParamError, logoLink, }: CurrencyPowerBalanceConfig) => React.JSX.Element;
|
|
4
4
|
export { CurrencyPowerBalance };
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Theme } from '@oanda/labs-widget-common';
|
|
1
|
+
import { WidgetConfig } from '@oanda/labs-widget-common';
|
|
3
2
|
import { CurrencyPowerBalanceTimeUnit } from '../gql/types/graphql';
|
|
4
|
-
export interface CurrencyPowerBalanceConfig {
|
|
5
|
-
graphqlUrl: string;
|
|
6
|
-
locale: Locale;
|
|
7
|
-
theme?: Theme;
|
|
8
|
-
isParamError?: boolean;
|
|
3
|
+
export interface CurrencyPowerBalanceConfig extends WidgetConfig {
|
|
9
4
|
timeUnit?: CurrencyPowerBalanceTimeUnit;
|
|
10
5
|
currencies?: string[];
|
|
11
6
|
}
|
|
12
7
|
export interface CurrencyPowerBalanceWrapperConfig extends CurrencyPowerBalanceConfig {
|
|
13
8
|
renderElementId: string;
|
|
14
|
-
locale: Locale;
|
|
15
9
|
}
|
|
16
10
|
export interface MainProps {
|
|
17
11
|
timeUnit?: CurrencyPowerBalanceTimeUnit;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oanda/labs-currency-power-balance-widget",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.109",
|
|
4
4
|
"description": "Labs Currency Power Balance 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
|
"echarts": "5.5.0",
|
|
18
18
|
"echarts-for-react": "3.0.2",
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"@graphql-codegen/cli": "5.0.0",
|
|
23
23
|
"@graphql-codegen/client-preset": "4.1.0"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "cfcc2eb4d59e16d25ec3da37e01767b476477125"
|
|
26
26
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
ChartError, ThemeProvider, getLocale, renderComponent,
|
|
5
|
+
} from '@oanda/labs-widget-common';
|
|
4
6
|
import { LocaleProvider } from '@oanda/mono-i18n';
|
|
5
7
|
import { Main } from './Main';
|
|
6
8
|
import { CurrencyPowerBalanceConfig } from './types';
|
|
7
9
|
import { translations } from '../translations';
|
|
8
10
|
|
|
9
11
|
const CurrencyPowerBalance = ({
|
|
10
|
-
graphqlUrl, theme, locale, timeUnit, currencies, isParamError,
|
|
12
|
+
graphqlUrl, theme, locale, timeUnit, currencies, isParamError, logoLink,
|
|
11
13
|
}: CurrencyPowerBalanceConfig) => {
|
|
12
14
|
const client = new ApolloClient({
|
|
13
15
|
uri: graphqlUrl,
|
|
@@ -22,7 +24,11 @@ const CurrencyPowerBalance = ({
|
|
|
22
24
|
<div className="lw-flex lw-h-[425px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary">
|
|
23
25
|
<ChartError />
|
|
24
26
|
</div>
|
|
25
|
-
) :
|
|
27
|
+
) : renderComponent({
|
|
28
|
+
Component: <Main timeUnit={timeUnit} currencies={currencies} />,
|
|
29
|
+
logoLink,
|
|
30
|
+
linkArea: 'logo',
|
|
31
|
+
})}
|
|
26
32
|
</ApolloProvider>
|
|
27
33
|
</LocaleProvider>
|
|
28
34
|
</ThemeProvider>
|
|
@@ -20,7 +20,9 @@ if (currencyPowerBalanceParamsElements.length > 0) {
|
|
|
20
20
|
const root = createRoot(element);
|
|
21
21
|
const params = element.getAttribute('data-currency-power-balance-params');
|
|
22
22
|
const mode = element.getAttribute('data-mode');
|
|
23
|
-
const {
|
|
23
|
+
const {
|
|
24
|
+
timeUnit, currencies, locale, logoLink,
|
|
25
|
+
} = JSON.parse(params as string);
|
|
24
26
|
|
|
25
27
|
const isParamError = validateToolParams({ locale, graphqlUrl }, [
|
|
26
28
|
{
|
|
@@ -37,6 +39,7 @@ if (currencyPowerBalanceParamsElements.length > 0) {
|
|
|
37
39
|
isParamError={isParamError}
|
|
38
40
|
timeUnit={timeUnit}
|
|
39
41
|
currencies={currencies}
|
|
42
|
+
logoLink={logoLink}
|
|
40
43
|
/>,
|
|
41
44
|
);
|
|
42
45
|
});
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Theme } from '@oanda/labs-widget-common';
|
|
1
|
+
import { WidgetConfig } from '@oanda/labs-widget-common';
|
|
3
2
|
import { CurrencyPowerBalanceTimeUnit } from '../gql/types/graphql';
|
|
4
3
|
|
|
5
|
-
export interface CurrencyPowerBalanceConfig {
|
|
6
|
-
graphqlUrl: string;
|
|
7
|
-
locale: Locale;
|
|
8
|
-
theme?: Theme;
|
|
9
|
-
isParamError?: boolean;
|
|
4
|
+
export interface CurrencyPowerBalanceConfig extends WidgetConfig {
|
|
10
5
|
timeUnit?: CurrencyPowerBalanceTimeUnit;
|
|
11
6
|
currencies?: string[];
|
|
12
7
|
}
|
|
13
8
|
|
|
14
9
|
export interface CurrencyPowerBalanceWrapperConfig extends CurrencyPowerBalanceConfig {
|
|
15
10
|
renderElementId: string;
|
|
16
|
-
locale: Locale;
|
|
17
11
|
}
|
|
18
12
|
|
|
19
13
|
export interface MainProps {
|