@oanda/labs-instruments-table-widget 1.0.64 → 1.0.66

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 (26) hide show
  1. package/CHANGELOG.md +532 -0
  2. package/dist/main/InstrumentsTableWidget/InstrumentsTableWidget.js +1 -1
  3. package/dist/main/InstrumentsTableWidget/InstrumentsTableWidget.js.map +1 -1
  4. package/dist/main/InstrumentsTableWidget/Main.js +13 -17
  5. package/dist/main/InstrumentsTableWidget/Main.js.map +1 -1
  6. package/dist/main/InstrumentsTableWidget/config.js +6 -9
  7. package/dist/main/InstrumentsTableWidget/config.js.map +1 -1
  8. package/dist/main/gql/resolveInstrumentsWithFilters.js +33 -3
  9. package/dist/main/gql/resolveInstrumentsWithFilters.js.map +1 -1
  10. package/dist/main/gql/types/fragment-masking.js +2 -3
  11. package/dist/main/gql/types/fragment-masking.js.map +1 -1
  12. package/dist/main/gql/types/gql.js +1 -2
  13. package/dist/main/gql/types/gql.js.map +1 -1
  14. package/dist/module/InstrumentsTableWidget/InstrumentsTableWidget.js +1 -1
  15. package/dist/module/InstrumentsTableWidget/InstrumentsTableWidget.js.map +1 -1
  16. package/dist/module/InstrumentsTableWidget/Main.js +13 -17
  17. package/dist/module/InstrumentsTableWidget/Main.js.map +1 -1
  18. package/dist/module/InstrumentsTableWidget/config.js +6 -9
  19. package/dist/module/InstrumentsTableWidget/config.js.map +1 -1
  20. package/dist/module/gql/resolveInstrumentsWithFilters.js +33 -3
  21. package/dist/module/gql/resolveInstrumentsWithFilters.js.map +1 -1
  22. package/dist/module/gql/types/fragment-masking.js +2 -3
  23. package/dist/module/gql/types/fragment-masking.js.map +1 -1
  24. package/dist/module/gql/types/gql.js +1 -2
  25. package/dist/module/gql/types/gql.js.map +1 -1
  26. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -3,6 +3,538 @@
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.66 (2026-01-08)
7
+
8
+
9
+
10
+ ## 1.0.245 (2026-01-07)
11
+
12
+
13
+
14
+ ## 1.0.244 (2026-01-02)
15
+
16
+
17
+
18
+ ## 1.0.243 (2025-12-30)
19
+
20
+
21
+
22
+ ## 1.0.242 (2025-12-16)
23
+
24
+
25
+
26
+ ## 1.0.241 (2025-12-16)
27
+
28
+
29
+
30
+ ## 1.0.240 (2025-12-15)
31
+
32
+
33
+
34
+ ## 1.0.239 (2025-12-12)
35
+
36
+
37
+
38
+ ## 1.0.238 (2025-12-11)
39
+
40
+
41
+
42
+ ## 1.0.237 (2025-12-09)
43
+
44
+
45
+
46
+ ## 1.0.236 (2025-12-05)
47
+
48
+
49
+
50
+ ## 1.0.235 (2025-12-04)
51
+
52
+
53
+
54
+ ## 1.0.234 (2025-11-27)
55
+
56
+
57
+
58
+ ## 1.0.233 (2025-11-27)
59
+
60
+
61
+
62
+ ## 1.0.232 (2025-11-27)
63
+
64
+
65
+
66
+ ## 1.0.231 (2025-11-07)
67
+
68
+
69
+
70
+ ## 1.0.230 (2025-11-05)
71
+
72
+
73
+
74
+ ## 1.0.229 (2025-11-05)
75
+
76
+
77
+
78
+ ## 1.0.228 (2025-11-05)
79
+
80
+
81
+
82
+ ## 1.0.227 (2025-10-31)
83
+
84
+
85
+
86
+ ## 1.0.226 (2025-10-29)
87
+
88
+
89
+
90
+ ## 1.0.225 (2025-10-09)
91
+
92
+
93
+
94
+ ## 1.0.224 (2025-09-29)
95
+
96
+
97
+
98
+ ## 1.0.223 (2025-09-29)
99
+
100
+
101
+
102
+ ## 1.0.222 (2025-09-17)
103
+
104
+
105
+
106
+ ## 1.0.221 (2025-09-11)
107
+
108
+
109
+
110
+ ## 1.0.220 (2025-09-09)
111
+
112
+
113
+
114
+ ## 1.0.219 (2025-09-02)
115
+
116
+
117
+
118
+ ## 1.0.218 (2025-09-01)
119
+
120
+
121
+
122
+ ## 1.0.217 (2025-08-25)
123
+
124
+
125
+
126
+ ## 1.0.216 (2025-08-18)
127
+
128
+
129
+
130
+ ## 1.0.215 (2025-08-18)
131
+
132
+
133
+
134
+ ## 1.0.214 (2025-08-14)
135
+
136
+
137
+
138
+ ## 1.0.213 (2025-08-12)
139
+
140
+
141
+
142
+ ## 1.0.212 (2025-08-05)
143
+
144
+
145
+
146
+ ## 1.0.211 (2025-08-05)
147
+
148
+
149
+
150
+ ## 1.0.210 (2025-07-31)
151
+
152
+
153
+
154
+ ## 1.0.209 (2025-07-31)
155
+
156
+
157
+
158
+ ## 1.0.208 (2025-07-24)
159
+
160
+
161
+
162
+ ## 1.0.207 (2025-07-18)
163
+
164
+
165
+
166
+ ## 1.0.206 (2025-07-18)
167
+
168
+
169
+
170
+ ## 1.0.205 (2025-07-17)
171
+
172
+
173
+
174
+ ## 1.0.204 (2025-07-09)
175
+
176
+
177
+
178
+ ## 1.0.203 (2025-06-16)
179
+
180
+
181
+
182
+ ## 1.0.202 (2025-06-04)
183
+
184
+
185
+
186
+ ## 1.0.201 (2025-06-02)
187
+
188
+
189
+
190
+ ## 1.0.200 (2025-05-30)
191
+
192
+
193
+
194
+ ## 1.0.199 (2025-05-29)
195
+
196
+
197
+
198
+ ## 1.0.198 (2025-05-26)
199
+
200
+
201
+
202
+ ## 1.0.197 (2025-05-23)
203
+
204
+
205
+
206
+ ## 1.0.196 (2025-05-22)
207
+
208
+
209
+
210
+ ## 1.0.195 (2025-05-21)
211
+
212
+
213
+
214
+ ## 1.0.194 (2025-05-21)
215
+
216
+
217
+
218
+ ## 1.0.193 (2025-05-15)
219
+
220
+
221
+
222
+ ## 1.0.192 (2025-05-14)
223
+
224
+
225
+
226
+ ## 1.0.191 (2025-04-30)
227
+
228
+
229
+
230
+ ## 1.0.190 (2025-04-28)
231
+
232
+
233
+
234
+ ## 1.0.189 (2025-04-23)
235
+
236
+
237
+
238
+ ## 1.0.188 (2025-04-22)
239
+
240
+
241
+
242
+ ## 1.0.187 (2025-04-18)
243
+
244
+
245
+
246
+ ## 1.0.186 (2025-04-10)
247
+
248
+
249
+
250
+ ## 1.0.185 (2025-04-09)
251
+
252
+
253
+
254
+ ## 1.0.184 (2025-04-08)
255
+
256
+
257
+
258
+ ## 1.0.183 (2025-04-04)
259
+
260
+
261
+
262
+ ## 1.0.182 (2025-03-21)
263
+
264
+
265
+
266
+ ## 1.0.181 (2025-03-13)
267
+
268
+ **Note:** Version bump only for package @oanda/labs-instruments-table-widget
269
+
270
+
271
+
272
+
273
+
274
+ ## 1.0.65 (2026-01-07)
275
+
276
+
277
+
278
+ ## 1.0.244 (2026-01-02)
279
+
280
+
281
+
282
+ ## 1.0.243 (2025-12-30)
283
+
284
+
285
+
286
+ ## 1.0.242 (2025-12-16)
287
+
288
+
289
+
290
+ ## 1.0.241 (2025-12-16)
291
+
292
+
293
+
294
+ ## 1.0.240 (2025-12-15)
295
+
296
+
297
+
298
+ ## 1.0.239 (2025-12-12)
299
+
300
+
301
+
302
+ ## 1.0.238 (2025-12-11)
303
+
304
+
305
+
306
+ ## 1.0.237 (2025-12-09)
307
+
308
+
309
+
310
+ ## 1.0.236 (2025-12-05)
311
+
312
+
313
+
314
+ ## 1.0.235 (2025-12-04)
315
+
316
+
317
+
318
+ ## 1.0.234 (2025-11-27)
319
+
320
+
321
+
322
+ ## 1.0.233 (2025-11-27)
323
+
324
+
325
+
326
+ ## 1.0.232 (2025-11-27)
327
+
328
+
329
+
330
+ ## 1.0.231 (2025-11-07)
331
+
332
+
333
+
334
+ ## 1.0.230 (2025-11-05)
335
+
336
+
337
+
338
+ ## 1.0.229 (2025-11-05)
339
+
340
+
341
+
342
+ ## 1.0.228 (2025-11-05)
343
+
344
+
345
+
346
+ ## 1.0.227 (2025-10-31)
347
+
348
+
349
+
350
+ ## 1.0.226 (2025-10-29)
351
+
352
+
353
+
354
+ ## 1.0.225 (2025-10-09)
355
+
356
+
357
+
358
+ ## 1.0.224 (2025-09-29)
359
+
360
+
361
+
362
+ ## 1.0.223 (2025-09-29)
363
+
364
+
365
+
366
+ ## 1.0.222 (2025-09-17)
367
+
368
+
369
+
370
+ ## 1.0.221 (2025-09-11)
371
+
372
+
373
+
374
+ ## 1.0.220 (2025-09-09)
375
+
376
+
377
+
378
+ ## 1.0.219 (2025-09-02)
379
+
380
+
381
+
382
+ ## 1.0.218 (2025-09-01)
383
+
384
+
385
+
386
+ ## 1.0.217 (2025-08-25)
387
+
388
+
389
+
390
+ ## 1.0.216 (2025-08-18)
391
+
392
+
393
+
394
+ ## 1.0.215 (2025-08-18)
395
+
396
+
397
+
398
+ ## 1.0.214 (2025-08-14)
399
+
400
+
401
+
402
+ ## 1.0.213 (2025-08-12)
403
+
404
+
405
+
406
+ ## 1.0.212 (2025-08-05)
407
+
408
+
409
+
410
+ ## 1.0.211 (2025-08-05)
411
+
412
+
413
+
414
+ ## 1.0.210 (2025-07-31)
415
+
416
+
417
+
418
+ ## 1.0.209 (2025-07-31)
419
+
420
+
421
+
422
+ ## 1.0.208 (2025-07-24)
423
+
424
+
425
+
426
+ ## 1.0.207 (2025-07-18)
427
+
428
+
429
+
430
+ ## 1.0.206 (2025-07-18)
431
+
432
+
433
+
434
+ ## 1.0.205 (2025-07-17)
435
+
436
+
437
+
438
+ ## 1.0.204 (2025-07-09)
439
+
440
+
441
+
442
+ ## 1.0.203 (2025-06-16)
443
+
444
+
445
+
446
+ ## 1.0.202 (2025-06-04)
447
+
448
+
449
+
450
+ ## 1.0.201 (2025-06-02)
451
+
452
+
453
+
454
+ ## 1.0.200 (2025-05-30)
455
+
456
+
457
+
458
+ ## 1.0.199 (2025-05-29)
459
+
460
+
461
+
462
+ ## 1.0.198 (2025-05-26)
463
+
464
+
465
+
466
+ ## 1.0.197 (2025-05-23)
467
+
468
+
469
+
470
+ ## 1.0.196 (2025-05-22)
471
+
472
+
473
+
474
+ ## 1.0.195 (2025-05-21)
475
+
476
+
477
+
478
+ ## 1.0.194 (2025-05-21)
479
+
480
+
481
+
482
+ ## 1.0.193 (2025-05-15)
483
+
484
+
485
+
486
+ ## 1.0.192 (2025-05-14)
487
+
488
+
489
+
490
+ ## 1.0.191 (2025-04-30)
491
+
492
+
493
+
494
+ ## 1.0.190 (2025-04-28)
495
+
496
+
497
+
498
+ ## 1.0.189 (2025-04-23)
499
+
500
+
501
+
502
+ ## 1.0.188 (2025-04-22)
503
+
504
+
505
+
506
+ ## 1.0.187 (2025-04-18)
507
+
508
+
509
+
510
+ ## 1.0.186 (2025-04-10)
511
+
512
+
513
+
514
+ ## 1.0.185 (2025-04-09)
515
+
516
+
517
+
518
+ ## 1.0.184 (2025-04-08)
519
+
520
+
521
+
522
+ ## 1.0.183 (2025-04-04)
523
+
524
+
525
+
526
+ ## 1.0.182 (2025-03-21)
527
+
528
+
529
+
530
+ ## 1.0.181 (2025-03-13)
531
+
532
+ **Note:** Version bump only for package @oanda/labs-instruments-table-widget
533
+
534
+
535
+
536
+
537
+
6
538
  ## 1.0.64 (2026-01-02)
7
539
 
8
540
 
@@ -36,7 +36,7 @@ const InstrumentsTableWidget = _ref => {
36
36
  });
37
37
  const liveRatesDataSource = dataSource === _graphql.DataSource.All ? undefined : dataSource;
38
38
  const divisionCode = priceType === _types.PriceType.Division ? division : undefined;
39
- const liveRates = !columns || columns !== null && columns !== void 0 && columns.some(column => column === _labsWidgetCommon.DataRecordType.BUY || column === _labsWidgetCommon.DataRecordType.SELL || column === _labsWidgetCommon.DataRecordType.DAILY_CHANGE || column === _labsWidgetCommon.DataRecordType.SPREAD || column === _labsWidgetCommon.DataRecordType.HIGH || column === _labsWidgetCommon.DataRecordType.LOW) ? {
39
+ const liveRates = !columns || columns?.some(column => column === _labsWidgetCommon.DataRecordType.BUY || column === _labsWidgetCommon.DataRecordType.SELL || column === _labsWidgetCommon.DataRecordType.DAILY_CHANGE || column === _labsWidgetCommon.DataRecordType.SPREAD || column === _labsWidgetCommon.DataRecordType.HIGH || column === _labsWidgetCommon.DataRecordType.LOW) ? {
40
40
  url: liveRatesUrl,
41
41
  options: {
42
42
  divisionCode,
@@ -1 +1 @@
1
- {"version":3,"file":"InstrumentsTableWidget.js","names":["_client","require","_labsWidgetCommon","_react","_interopRequireDefault","_graphql","_translations","_Main","_types","e","__esModule","default","InstrumentsTableWidget","_ref","division","instruments","columns","graphqlUrl","locale","theme","isParamError","logoLink","liveRatesUrl","assetClasses","isAssetClassFilterEnabled","isInstrumentSearchEnabled","recordsPerPage","dataSource","priceType","PriceType","Division","client","ApolloClient","uri","cache","InMemoryCache","liveRatesDataSource","DataSource","All","undefined","divisionCode","liveRates","some","column","DataRecordType","BUY","SELL","DAILY_CHANGE","SPREAD","HIGH","LOW","url","options","multipleDataSources","createElement","WidgetProvider","translations","WidgetWrapper","linkArea","Main","isLiveRatesDisabled","exports"],"sources":["../../../src/InstrumentsTableWidget/InstrumentsTableWidget.tsx"],"sourcesContent":["import { ApolloClient, InMemoryCache } from '@apollo/client';\nimport {\n DataRecordType,\n WidgetProvider,\n WidgetWrapper,\n} from '@oanda/labs-widget-common';\nimport React from 'react';\n\nimport { DataSource } from '../gql/types/graphql';\nimport { translations } from '../translations';\nimport { Main } from './Main';\nimport { type InstrumentsTableConfig, PriceType } from './types';\n\nconst InstrumentsTableWidget = ({\n division,\n instruments,\n columns,\n graphqlUrl,\n locale,\n theme,\n isParamError,\n logoLink,\n liveRatesUrl,\n assetClasses,\n isAssetClassFilterEnabled,\n isInstrumentSearchEnabled,\n recordsPerPage,\n dataSource,\n priceType = PriceType.Division,\n}: InstrumentsTableConfig) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n const liveRatesDataSource =\n dataSource === DataSource.All ? undefined : dataSource;\n\n const divisionCode = priceType === PriceType.Division ? division : undefined;\n\n const liveRates =\n !columns ||\n columns?.some(\n (column) =>\n column === DataRecordType.BUY ||\n column === DataRecordType.SELL ||\n column === DataRecordType.DAILY_CHANGE ||\n column === DataRecordType.SPREAD ||\n column === DataRecordType.HIGH ||\n column === DataRecordType.LOW\n )\n ? {\n url: liveRatesUrl,\n options: { divisionCode, dataSource: liveRatesDataSource },\n multipleDataSources: dataSource === DataSource.All,\n }\n : undefined;\n\n return (\n <WidgetProvider\n client={client}\n liveRates={liveRates}\n locale={locale}\n theme={theme}\n translations={translations}\n >\n <WidgetWrapper\n isParamError={isParamError}\n linkArea=\"logo\"\n logoLink={logoLink}\n >\n <Main\n assetClasses={assetClasses}\n columns={columns}\n dataSource={dataSource}\n division={division}\n instruments={instruments}\n isAssetClassFilterEnabled={isAssetClassFilterEnabled}\n isInstrumentSearchEnabled={isInstrumentSearchEnabled}\n isLiveRatesDisabled={liveRates === undefined}\n priceType={priceType}\n recordsPerPage={recordsPerPage}\n />\n </WidgetWrapper>\n </WidgetProvider>\n );\n};\n\nexport { InstrumentsTableWidget };\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAAiE,SAAAG,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEjE,MAAMG,sBAAsB,GAAGC,IAAA,IAgBD;EAAA,IAhBE;IAC9BC,QAAQ;IACRC,WAAW;IACXC,OAAO;IACPC,UAAU;IACVC,MAAM;IACNC,KAAK;IACLC,YAAY;IACZC,QAAQ;IACRC,YAAY;IACZC,YAAY;IACZC,yBAAyB;IACzBC,yBAAyB;IACzBC,cAAc;IACdC,UAAU;IACVC,SAAS,GAAGC,gBAAS,CAACC;EACA,CAAC,GAAAjB,IAAA;EACvB,MAAMkB,MAAM,GAAG,IAAIC,oBAAY,CAAC;IAC9BC,GAAG,EAAEhB,UAAU;IACfiB,KAAK,EAAE,I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OAAQ;IACjBW,UAAU,EAAEA,UAAW;IACvBb,QAAQ,EAAEA,QAAS;IACnBC,WAAW,EAAEA,WAAY;IACzBS,yBAAyB,EAAEA,yBAA0B;IACrDC,yBAAyB,EAAEA,yBAA0B;IACrDmC,mBAAmB,EAAEnB,SAAS,KAAKF,SAAU;IAC7CX,SAAS,EAAEA,SAAU;IACrBF,cAAc,EAAEA;EAAe,CAChC,CACY,CACD,CAAC;AAErB,CAAC;AAACmC,OAAA,CAAAjD,sBAAA,GAAAA,sBAAA","ignoreList":[]}
1
+ {"version":3,"file":"InstrumentsTableWidget.js","names":["_client","require","_labsWidgetCommon","_react","_interopRequireDefault","_graphql","_translations","_Main","_types","e","__esModule","default","InstrumentsTableWidget","_ref","division","instruments","columns","graphqlUrl","locale","theme","isParamError","logoLink","liveRatesUrl","assetClasses","isAssetClassFilterEnabled","isInstrumentSearchEnabled","recordsPerPage","dataSource","priceType","PriceType","Division","client","ApolloClient","uri","cache","InMemoryCache","liveRatesDataSource","DataSource","All","undefined","divisionCode","liveRates","some","column","DataRecordType","BUY","SELL","DAILY_CHANGE","SPREAD","HIGH","LOW","url","options","multipleDataSources","createElement","WidgetProvider","translations","WidgetWrapper","linkArea","Main","isLiveRatesDisabled","exports"],"sources":["../../../src/InstrumentsTableWidget/InstrumentsTableWidget.tsx"],"sourcesContent":["import { ApolloClient, InMemoryCache } from '@apollo/client';\nimport {\n DataRecordType,\n WidgetProvider,\n WidgetWrapper,\n} from '@oanda/labs-widget-common';\nimport React from 'react';\n\nimport { DataSource } from '../gql/types/graphql';\nimport { translations } from '../translations';\nimport { Main } from './Main';\nimport { type InstrumentsTableConfig, PriceType } from './types';\n\nconst InstrumentsTableWidget = ({\n division,\n instruments,\n columns,\n graphqlUrl,\n locale,\n theme,\n isParamError,\n logoLink,\n liveRatesUrl,\n assetClasses,\n isAssetClassFilterEnabled,\n isInstrumentSearchEnabled,\n recordsPerPage,\n dataSource,\n priceType = PriceType.Division,\n}: InstrumentsTableConfig) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n const liveRatesDataSource =\n dataSource === DataSource.All ? undefined : dataSource;\n\n const divisionCode = priceType === PriceType.Division ? division : undefined;\n\n const liveRates =\n !columns ||\n columns?.some(\n (column) =>\n column === DataRecordType.BUY ||\n column === DataRecordType.SELL ||\n column === DataRecordType.DAILY_CHANGE ||\n column === DataRecordType.SPREAD ||\n column === DataRecordType.HIGH ||\n column === DataRecordType.LOW\n )\n ? {\n url: liveRatesUrl,\n options: { divisionCode, dataSource: liveRatesDataSource },\n multipleDataSources: dataSource === DataSource.All,\n }\n : undefined;\n\n return (\n <WidgetProvider\n client={client}\n liveRates={liveRates}\n locale={locale}\n theme={theme}\n translations={translations}\n >\n <WidgetWrapper\n isParamError={isParamError}\n linkArea=\"logo\"\n logoLink={logoLink}\n >\n <Main\n assetClasses={assetClasses}\n columns={columns}\n dataSource={dataSource}\n division={division}\n instruments={instruments}\n isAssetClassFilterEnabled={isAssetClassFilterEnabled}\n isInstrumentSearchEnabled={isInstrumentSearchEnabled}\n isLiveRatesDisabled={liveRates === undefined}\n priceType={priceType}\n recordsPerPage={recordsPerPage}\n />\n </WidgetWrapper>\n </WidgetProvider>\n );\n};\n\nexport { InstrumentsTableWidget };\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAAiE,SAAAG,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEjE,MAAMG,sBAAsB,GAAGC,IAAA,IAgBD;EAAA,IAhBE;IAC9BC,QAAQ;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,EAAEA;EAAa,GAE3BrD,MAAA,CAAAQ,OAAA,CAAA2C,aAAA,CAACpD,iBAAA,CAAAuD,aAAa;IACZrC,YAAY,EAAEA,YAAa;IAC3BsC,QAAQ,EAAC,MAAM;IACfrC,QAAQ,EAAEA;EAAS,GAEnBlB,MAAA,CAAAQ,OAAA,CAAA2C,aAAA,CAAC/C,KAAA,CAAAoD,IAAI;IACHpC,YAAY,EAAEA,YAAa;IAC3BP,OAAO,EAAEA,OAAQ;IACjBW,UAAU,EAAEA,UAAW;IACvBb,QAAQ,EAAEA,QAAS;IACnBC,WAAW,EAAEA,WAAY;IACzBS,yBAAyB,EAAEA,yBAA0B;IACrDC,yBAAyB,EAAEA,yBAA0B;IACrDmC,mBAAmB,EAAEnB,SAAS,KAAKF,SAAU;IAC7CX,SAAS,EAAEA,SAAU;IACrBF,cAAc,EAAEA;EAAe,CAChC,CACY,CACD,CAAC;AAErB,CAAC;AAACmC,OAAA,CAAAjD,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -17,13 +17,7 @@ var _constant = require("./constant");
17
17
  var _types = require("./types");
18
18
  var _utils = require("./utils");
19
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
20
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
21
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
22
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
23
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
24
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
25
20
  const Main = _ref => {
26
- var _headerConfig$instrum, _data$resolveInstrume2;
27
21
  let {
28
22
  instruments = [],
29
23
  division,
@@ -74,16 +68,15 @@ const Main = _ref => {
74
68
  errorPolicy: 'all'
75
69
  });
76
70
  (0, _react.useEffect)(() => {
77
- var _data$resolveInstrume;
78
71
  if (loading) {
79
72
  setRecords(new Array(recordsPerPage).fill({}));
80
73
  }
81
- if (!loading && data !== null && data !== void 0 && (_data$resolveInstrume = data.resolveInstrumentsWithFilters) !== null && _data$resolveInstrume !== void 0 && _data$resolveInstrume.instruments) {
74
+ if (!loading && data?.resolveInstrumentsWithFilters?.instruments) {
82
75
  const newRecords = data.resolveInstrumentsWithFilters.instruments.map(record => ({
83
- instrument: (record === null || record === void 0 ? void 0 : record.name) || '',
84
- displayName: (record === null || record === void 0 ? void 0 : record.displayName) || '',
85
- dataSource: record === null || record === void 0 ? void 0 : record.dataSource,
86
- tradeMode: lang(_config.tradeModeLabels[(record === null || record === void 0 ? void 0 : record.tradeMode) || ''])
76
+ instrument: record?.name || '',
77
+ displayName: record?.displayName || '',
78
+ dataSource: record?.dataSource,
79
+ tradeMode: lang(_config.tradeModeLabels[record?.tradeMode || ''])
87
80
  }));
88
81
  setRecords(newRecords);
89
82
  setTotalRecords(data.resolveInstrumentsWithFilters.totalCount);
@@ -130,7 +123,8 @@ const Main = _ref => {
130
123
  recordsPerPage: recordsPerPage,
131
124
  totalRecords: totalRecords,
132
125
  onPageChange: numb => {
133
- setQueryVariables(prev => _objectSpread(_objectSpread({}, prev), {}, {
126
+ setQueryVariables(prev => ({
127
+ ...prev,
134
128
  offset: numb * recordsPerPage
135
129
  }));
136
130
  }
@@ -146,14 +140,16 @@ const Main = _ref => {
146
140
  isAssetClassFilterEnabled: isAssetClassFilterEnabled,
147
141
  isInstrumentSearchEnabled: isInstrumentSearchEnabled,
148
142
  onAssetClassChange: assetClass => {
149
- setQueryVariables(prev => _objectSpread(_objectSpread({}, prev), {}, {
143
+ setQueryVariables(prev => ({
144
+ ...prev,
150
145
  offset: 0,
151
146
  searchPattern: '',
152
147
  assetClass: assetClass[0] === 'ALL' ? assetClasses || [] : assetClass
153
148
  }));
154
149
  },
155
150
  onSearchChange: searchPattern => {
156
- setQueryVariables(prev => _objectSpread(_objectSpread({}, prev), {}, {
151
+ setQueryVariables(prev => ({
152
+ ...prev,
157
153
  offset: 0,
158
154
  searchPattern
159
155
  }));
@@ -163,7 +159,7 @@ const Main = _ref => {
163
159
  count: totalRecords,
164
160
  hasError: showError,
165
161
  headerColumns: (0, _labsWidgetCommon.getHeaderConfig)(columns, headerConfig),
166
- instrumentColumnWidth: (_headerConfig$instrum = headerConfig.instrument) === null || _headerConfig$instrum === void 0 ? void 0 : _headerConfig$instrum.additionalStyles.minWidth,
162
+ instrumentColumnWidth: headerConfig.instrument?.additionalStyles.minWidth,
167
163
  isLoading: loading,
168
164
  pageNumber: pageNumber,
169
165
  records: records,
@@ -175,7 +171,7 @@ const Main = _ref => {
175
171
  className: "lw-mt-2 lw-h-8"
176
172
  }, _react.default.createElement(_labsWidgetCommon.LastUpdated, {
177
173
  labelCallback: lang,
178
- timestamp: data === null || data === void 0 || (_data$resolveInstrume2 = data.resolveInstrumentsWithFilters) === null || _data$resolveInstrume2 === void 0 ? void 0 : _data$resolveInstrume2.updatedAt
174
+ timestamp: data?.resolveInstrumentsWithFilters?.updatedAt
179
175
  })));
180
176
  };
181
177
  exports.Main = Main;