@oanda/labs-ticker-tape-widget 1.0.29 → 1.0.30

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 (93) hide show
  1. package/CHANGELOG.md +124 -0
  2. package/dist/main/TickerTapeWidget/Main.js +11 -11
  3. package/dist/main/TickerTapeWidget/Main.js.map +1 -1
  4. package/dist/main/TickerTapeWidget/TickerTapeWidget.js +15 -15
  5. package/dist/main/TickerTapeWidget/TickerTapeWidget.js.map +1 -1
  6. package/dist/main/TickerTapeWidget/ValidationWrapper.js +4 -4
  7. package/dist/main/TickerTapeWidget/ValidationWrapper.js.map +1 -1
  8. package/dist/main/TickerTapeWidget/components/InstrumentRateWithData/InstrumentRateWithData.js +5 -5
  9. package/dist/main/TickerTapeWidget/components/InstrumentRateWithData/InstrumentRateWithData.js.map +1 -1
  10. package/dist/main/TickerTapeWidget/components/InstrumentRateWithData/types.js.map +1 -1
  11. package/dist/main/TickerTapeWidget/components/MarqueeWrapper/MarqueeWrapper.js +1 -1
  12. package/dist/main/TickerTapeWidget/components/MarqueeWrapper/MarqueeWrapper.js.map +1 -1
  13. package/dist/main/TickerTapeWidget/constant.js.map +1 -1
  14. package/dist/main/TickerTapeWidget/index.js +8 -8
  15. package/dist/main/TickerTapeWidget/index.js.map +1 -1
  16. package/dist/main/TickerTapeWidget/render.js +7 -7
  17. package/dist/main/TickerTapeWidget/render.js.map +1 -1
  18. package/dist/main/TickerTapeWidget/types.js +1 -1
  19. package/dist/main/TickerTapeWidget/types.js.map +1 -1
  20. package/dist/main/TickerTapeWidget/utils.js +1 -1
  21. package/dist/main/TickerTapeWidget/utils.js.map +1 -1
  22. package/dist/main/gql/types/fragment-masking.js.map +1 -1
  23. package/dist/main/gql/types/gql.js +2 -2
  24. package/dist/main/gql/types/gql.js.map +1 -1
  25. package/dist/main/gql/types/graphql.js +142 -142
  26. package/dist/main/gql/types/graphql.js.map +1 -1
  27. package/dist/main/gql/types/index.js.map +1 -1
  28. package/dist/main/translations/index.js +1 -1
  29. package/dist/main/translations/index.js.map +1 -1
  30. package/dist/main/translations/translations.js.map +1 -1
  31. package/dist/module/TickerTapeWidget/Main.js +10 -10
  32. package/dist/module/TickerTapeWidget/Main.js.map +1 -1
  33. package/dist/module/TickerTapeWidget/TickerTapeWidget.js +15 -15
  34. package/dist/module/TickerTapeWidget/TickerTapeWidget.js.map +1 -1
  35. package/dist/module/TickerTapeWidget/ValidationWrapper.js +4 -4
  36. package/dist/module/TickerTapeWidget/ValidationWrapper.js.map +1 -1
  37. package/dist/module/TickerTapeWidget/components/InstrumentRateWithData/InstrumentRateWithData.js +5 -5
  38. package/dist/module/TickerTapeWidget/components/InstrumentRateWithData/InstrumentRateWithData.js.map +1 -1
  39. package/dist/module/TickerTapeWidget/components/InstrumentRateWithData/types.js.map +1 -1
  40. package/dist/module/TickerTapeWidget/components/MarqueeWrapper/MarqueeWrapper.js +1 -1
  41. package/dist/module/TickerTapeWidget/components/MarqueeWrapper/MarqueeWrapper.js.map +1 -1
  42. package/dist/module/TickerTapeWidget/constant.js.map +1 -1
  43. package/dist/module/TickerTapeWidget/index.js +1 -1
  44. package/dist/module/TickerTapeWidget/index.js.map +1 -1
  45. package/dist/module/TickerTapeWidget/render.js +7 -7
  46. package/dist/module/TickerTapeWidget/render.js.map +1 -1
  47. package/dist/module/TickerTapeWidget/types.js +1 -1
  48. package/dist/module/TickerTapeWidget/types.js.map +1 -1
  49. package/dist/module/TickerTapeWidget/utils.js +1 -1
  50. package/dist/module/TickerTapeWidget/utils.js.map +1 -1
  51. package/dist/module/gql/types/fragment-masking.js.map +1 -1
  52. package/dist/module/gql/types/gql.js +2 -2
  53. package/dist/module/gql/types/gql.js.map +1 -1
  54. package/dist/module/gql/types/graphql.js +142 -142
  55. package/dist/module/gql/types/graphql.js.map +1 -1
  56. package/dist/module/gql/types/index.js +2 -2
  57. package/dist/module/gql/types/index.js.map +1 -1
  58. package/dist/module/translations/index.js +1 -1
  59. package/dist/module/translations/index.js.map +1 -1
  60. package/dist/module/translations/translations.js.map +1 -1
  61. package/dist/types/TickerTapeWidget/Main.d.ts +1 -1
  62. package/dist/types/TickerTapeWidget/TickerTapeWidget.d.ts +1 -1
  63. package/dist/types/TickerTapeWidget/ValidationWrapper.d.ts +1 -1
  64. package/dist/types/TickerTapeWidget/components/InstrumentRateWithData/InstrumentRateWithData.d.ts +1 -1
  65. package/dist/types/TickerTapeWidget/components/InstrumentRateWithData/types.d.ts +2 -2
  66. package/dist/types/TickerTapeWidget/components/MarqueeWrapper/MarqueeWrapper.d.ts +1 -1
  67. package/dist/types/TickerTapeWidget/constant.d.ts +1 -1
  68. package/dist/types/TickerTapeWidget/index.d.ts +1 -1
  69. package/dist/types/TickerTapeWidget/types.d.ts +3 -3
  70. package/dist/types/TickerTapeWidget/utils.d.ts +3 -3
  71. package/dist/types/gql/types/gql.d.ts +4 -4
  72. package/dist/types/gql/types/index.d.ts +2 -2
  73. package/dist/types/translations/index.d.ts +2 -2
  74. package/package.json +3 -3
  75. package/src/TickerTapeWidget/Main.tsx +23 -14
  76. package/src/TickerTapeWidget/TickerTapeWidget.tsx +16 -14
  77. package/src/TickerTapeWidget/ValidationWrapper.tsx +23 -15
  78. package/src/TickerTapeWidget/components/InstrumentRateWithData/InstrumentRateWithData.tsx +12 -8
  79. package/src/TickerTapeWidget/components/InstrumentRateWithData/types.ts +4 -3
  80. package/src/TickerTapeWidget/components/MarqueeWrapper/MarqueeWrapper.tsx +6 -8
  81. package/src/TickerTapeWidget/constant.ts +1 -3
  82. package/src/TickerTapeWidget/index.ts +1 -1
  83. package/src/TickerTapeWidget/render.tsx +47 -32
  84. package/src/TickerTapeWidget/types.ts +8 -3
  85. package/src/TickerTapeWidget/utils.ts +16 -16
  86. package/src/gql/types/fragment-masking.ts +41 -21
  87. package/src/gql/types/gql.ts +12 -5
  88. package/src/gql/types/graphql.ts +214 -50
  89. package/src/gql/types/index.ts +2 -2
  90. package/src/translations/index.ts +4 -4
  91. package/src/translations/translations.ts +2 -1
  92. package/test/Main.test.tsx +15 -9
  93. package/test/mocks.ts +1 -3
@@ -2,18 +2,31 @@
2
2
  import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
3
3
  export type Maybe<T> = T | null;
4
4
  export type InputMaybe<T> = Maybe<T>;
5
- export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
6
- export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
7
- export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
8
- export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
9
- export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
5
+ export type Exact<T extends { [key: string]: unknown }> = {
6
+ [K in keyof T]: T[K];
7
+ };
8
+ export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
9
+ [SubKey in K]?: Maybe<T[SubKey]>;
10
+ };
11
+ export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
12
+ [SubKey in K]: Maybe<T[SubKey]>;
13
+ };
14
+ export type MakeEmpty<
15
+ T extends { [key: string]: unknown },
16
+ K extends keyof T,
17
+ > = { [_ in K]?: never };
18
+ export type Incremental<T> =
19
+ | T
20
+ | {
21
+ [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
22
+ };
10
23
  /** All built-in and custom scalars, mapped to their actual values */
11
24
  export type Scalars = {
12
- ID: { input: string; output: string; }
13
- String: { input: string; output: string; }
14
- Boolean: { input: boolean; output: boolean; }
15
- Int: { input: number; output: number; }
16
- Float: { input: number; output: number; }
25
+ ID: { input: string; output: string };
26
+ String: { input: string; output: string };
27
+ Boolean: { input: boolean; output: boolean };
28
+ Int: { input: number; output: number };
29
+ Float: { input: number; output: number };
17
30
  };
18
31
 
19
32
  export type AssetClass = {
@@ -28,12 +41,12 @@ export enum AssetClassName {
28
41
  Currency = 'CURRENCY',
29
42
  EquityShares = 'EQUITY_SHARES',
30
43
  Indices = 'INDICES',
31
- Rates = 'RATES'
44
+ Rates = 'RATES',
32
45
  }
33
46
 
34
47
  export enum BookType {
35
48
  Order = 'ORDER',
36
- Position = 'POSITION'
49
+ Position = 'POSITION',
37
50
  }
38
51
 
39
52
  export type CorrelationHeatmap = {
@@ -56,7 +69,7 @@ export enum CorrelationTimeUnit {
56
69
  M3 = 'M3',
57
70
  M6 = 'M6',
58
71
  W1 = 'W1',
59
- Y1 = 'Y1'
72
+ Y1 = 'Y1',
60
73
  }
61
74
 
62
75
  export enum CurrencyName {
@@ -67,7 +80,7 @@ export enum CurrencyName {
67
80
  Gbp = 'GBP',
68
81
  Jpy = 'JPY',
69
82
  Nzd = 'NZD',
70
- Usd = 'USD'
83
+ Usd = 'USD',
71
84
  }
72
85
 
73
86
  export type CurrencyPower = {
@@ -92,7 +105,7 @@ export enum CurrencyPowerBalanceTimeUnit {
92
105
  M1 = 'M1',
93
106
  M3 = 'M3',
94
107
  PreviousDay = 'PREVIOUS_DAY',
95
- W1 = 'W1'
108
+ W1 = 'W1',
96
109
  }
97
110
 
98
111
  export type CurrencyStrength = {
@@ -104,7 +117,7 @@ export type CurrencyStrength = {
104
117
 
105
118
  export enum DataSource {
106
119
  Ny4 = 'NY4',
107
- Ty3 = 'TY3'
120
+ Ty3 = 'TY3',
108
121
  }
109
122
 
110
123
  export enum Division {
@@ -116,7 +129,7 @@ export enum Division {
116
129
  Ogm = 'OGM',
117
130
  Oj = 'OJ',
118
131
  Opt = 'OPT',
119
- Otms = 'OTMS'
132
+ Otms = 'OTMS',
120
133
  }
121
134
 
122
135
  export type Heatmap = {
@@ -183,41 +196,34 @@ export type Query = {
183
196
  volatilityChartAssetClasses?: Maybe<Array<AssetClass>>;
184
197
  };
185
198
 
186
-
187
199
  export type QueryAssetClassesArgs = {
188
200
  division: Division;
189
201
  };
190
202
 
191
-
192
203
  export type QueryCorrelationHeatmapArgs = {
193
204
  division: Division;
194
205
  instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
195
206
  timeSpans?: InputMaybe<Array<InputMaybe<CorrelationTimeUnit>>>;
196
207
  };
197
208
 
198
-
199
209
  export type QueryCorrelationMatrixArgs = {
200
210
  division: Division;
201
211
  instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
202
212
  };
203
213
 
204
-
205
214
  export type QueryCurrencyPowerBalanceArgs = {
206
215
  timeUnit: CurrencyPowerBalanceTimeUnit;
207
216
  };
208
217
 
209
-
210
218
  export type QueryIsAllowedPartnerArgs = {
211
219
  url: Scalars['String']['input'];
212
220
  };
213
221
 
214
-
215
222
  export type QueryMapInstrumentNamesArgs = {
216
223
  division?: InputMaybe<Division>;
217
224
  instruments: Array<InputMaybe<Scalars['String']['input']>>;
218
225
  };
219
226
 
220
-
221
227
  export type QueryOrderPositionBooksArgs = {
222
228
  bookType: BookType;
223
229
  dataSource?: InputMaybe<DataSource>;
@@ -226,19 +232,16 @@ export type QueryOrderPositionBooksArgs = {
226
232
  region?: InputMaybe<Region>;
227
233
  };
228
234
 
229
-
230
235
  export type QuerySentimentArgs = {
231
236
  division?: InputMaybe<Division>;
232
237
  name: Scalars['String']['input'];
233
238
  };
234
239
 
235
-
236
240
  export type QuerySentimentListArgs = {
237
241
  division?: InputMaybe<Division>;
238
242
  sort?: InputMaybe<Sort>;
239
243
  };
240
244
 
241
-
242
245
  export type QueryTopicalInstrumentsArgs = {
243
246
  assetClass?: InputMaybe<AssetClassName>;
244
247
  count?: InputMaybe<Scalars['Int']['input']>;
@@ -247,25 +250,21 @@ export type QueryTopicalInstrumentsArgs = {
247
250
  sort: TopicalSort;
248
251
  };
249
252
 
250
-
251
253
  export type QueryTopicalInstrumentsChartsArgs = {
252
254
  division?: InputMaybe<Division>;
253
255
  instruments?: InputMaybe<Array<Scalars['String']['input']>>;
254
256
  };
255
257
 
256
-
257
258
  export type QueryTopicalInstrumentsTotalCountArgs = {
258
259
  assetClass?: InputMaybe<AssetClassName>;
259
260
  division?: InputMaybe<Division>;
260
261
  sort: TopicalSort;
261
262
  };
262
263
 
263
-
264
264
  export type QueryValueAtRiskAssetClassesArgs = {
265
265
  division?: InputMaybe<Division>;
266
266
  };
267
267
 
268
-
269
268
  export type QueryValueAtRiskChartArgs = {
270
269
  bars: ValueAtRiskBars;
271
270
  division?: InputMaybe<Division>;
@@ -273,7 +272,6 @@ export type QueryValueAtRiskChartArgs = {
273
272
  instrument: Scalars['String']['input'];
274
273
  };
275
274
 
276
-
277
275
  export type QueryVolatilityChartArgs = {
278
276
  division?: InputMaybe<Division>;
279
277
  instrument: Scalars['String']['input'];
@@ -281,7 +279,6 @@ export type QueryVolatilityChartArgs = {
281
279
  timeUnit: VolatilityChartTimeUnit;
282
280
  };
283
281
 
284
-
285
282
  export type QueryVolatilityChartAssetClassesArgs = {
286
283
  division?: InputMaybe<Division>;
287
284
  };
@@ -289,7 +286,7 @@ export type QueryVolatilityChartAssetClassesArgs = {
289
286
  export enum Region {
290
287
  Amer = 'AMER',
291
288
  Apac = 'APAC',
292
- Emea = 'EMEA'
289
+ Emea = 'EMEA',
293
290
  }
294
291
 
295
292
  export type Sentiment = {
@@ -308,7 +305,7 @@ export type SentimentInstrument = {
308
305
 
309
306
  export enum Sort {
310
307
  Bearish = 'BEARISH',
311
- Bullish = 'BULLISH'
308
+ Bullish = 'BULLISH',
312
309
  }
313
310
 
314
311
  export type StrengthRelation = {
@@ -343,13 +340,13 @@ export enum TopicalSort {
343
340
  Bullish = 'BULLISH',
344
341
  Hot = 'HOT',
345
342
  Popular = 'POPULAR',
346
- Volatile = 'VOLATILE'
343
+ Volatile = 'VOLATILE',
347
344
  }
348
345
 
349
346
  export enum ValueAtRiskBars {
350
347
  C100 = 'C100',
351
348
  C200 = 'C200',
352
- C300 = 'C300'
349
+ C300 = 'C300',
353
350
  }
354
351
 
355
352
  export type ValueAtRiskChart = {
@@ -379,7 +376,7 @@ export enum ValueAtRiskDuration {
379
376
  C3 = 'C3',
380
377
  C4 = 'C4',
381
378
  C5 = 'C5',
382
- C10 = 'C10'
379
+ C10 = 'C10',
383
380
  }
384
381
 
385
382
  export type VolatilityChart = {
@@ -402,31 +399,198 @@ export enum VolatilityChartTimeSpan {
402
399
  /** Valid for: W */
403
400
  W5 = 'W5',
404
401
  /** Valid for: W */
405
- W10 = 'W10'
402
+ W10 = 'W10',
406
403
  }
407
404
 
408
405
  export enum VolatilityChartTimeUnit {
409
406
  D = 'D',
410
407
  H = 'H',
411
- W = 'W'
408
+ W = 'W',
412
409
  }
413
410
 
414
411
  export type GetInstrumentsChartQueryVariables = Exact<{
415
- instruments?: InputMaybe<Array<Scalars['String']['input']> | Scalars['String']['input']>;
412
+ instruments?: InputMaybe<
413
+ Array<Scalars['String']['input']> | Scalars['String']['input']
414
+ >;
416
415
  division?: InputMaybe<Division>;
417
416
  }>;
418
417
 
419
-
420
- export type GetInstrumentsChartQuery = { __typename?: 'Query', topicalInstrumentsCharts?: Array<{ __typename?: 'TopicalInstrumentChart', name: string, chart?: Array<number> | null }> | null };
418
+ export type GetInstrumentsChartQuery = {
419
+ __typename?: 'Query';
420
+ topicalInstrumentsCharts?: Array<{
421
+ __typename?: 'TopicalInstrumentChart';
422
+ name: string;
423
+ chart?: Array<number> | null;
424
+ }> | null;
425
+ };
421
426
 
422
427
  export type ValidateInstrumentsQueryVariables = Exact<{
423
- instruments: Array<InputMaybe<Scalars['String']['input']>> | InputMaybe<Scalars['String']['input']>;
428
+ instruments:
429
+ | Array<InputMaybe<Scalars['String']['input']>>
430
+ | InputMaybe<Scalars['String']['input']>;
424
431
  division?: InputMaybe<Division>;
425
432
  }>;
426
433
 
427
-
428
- export type ValidateInstrumentsQuery = { __typename?: 'Query', mapInstrumentNames?: Array<{ __typename?: 'Instrument', name: string, displayName: string } | null> | null };
429
-
430
-
431
- export const GetInstrumentsChartDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetInstrumentsChart"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"instruments"}},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"division"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Division"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"topicalInstrumentsCharts"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"instruments"},"value":{"kind":"Variable","name":{"kind":"Name","value":"instruments"}}},{"kind":"Argument","name":{"kind":"Name","value":"division"},"value":{"kind":"Variable","name":{"kind":"Name","value":"division"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"chart"}}]}}]}}]} as unknown as DocumentNode<GetInstrumentsChartQuery, GetInstrumentsChartQueryVariables>;
432
- export const ValidateInstrumentsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"validateInstruments"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"instruments"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"division"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Division"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"mapInstrumentNames"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"instruments"},"value":{"kind":"Variable","name":{"kind":"Name","value":"instruments"}}},{"kind":"Argument","name":{"kind":"Name","value":"division"},"value":{"kind":"Variable","name":{"kind":"Name","value":"division"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}}]}}]} as unknown as DocumentNode<ValidateInstrumentsQuery, ValidateInstrumentsQueryVariables>;
434
+ export type ValidateInstrumentsQuery = {
435
+ __typename?: 'Query';
436
+ mapInstrumentNames?: Array<{
437
+ __typename?: 'Instrument';
438
+ name: string;
439
+ displayName: string;
440
+ } | null> | null;
441
+ };
442
+
443
+ export const GetInstrumentsChartDocument = {
444
+ kind: 'Document',
445
+ definitions: [
446
+ {
447
+ kind: 'OperationDefinition',
448
+ operation: 'query',
449
+ name: { kind: 'Name', value: 'GetInstrumentsChart' },
450
+ variableDefinitions: [
451
+ {
452
+ kind: 'VariableDefinition',
453
+ variable: {
454
+ kind: 'Variable',
455
+ name: { kind: 'Name', value: 'instruments' },
456
+ },
457
+ type: {
458
+ kind: 'ListType',
459
+ type: {
460
+ kind: 'NonNullType',
461
+ type: {
462
+ kind: 'NamedType',
463
+ name: { kind: 'Name', value: 'String' },
464
+ },
465
+ },
466
+ },
467
+ },
468
+ {
469
+ kind: 'VariableDefinition',
470
+ variable: {
471
+ kind: 'Variable',
472
+ name: { kind: 'Name', value: 'division' },
473
+ },
474
+ type: {
475
+ kind: 'NamedType',
476
+ name: { kind: 'Name', value: 'Division' },
477
+ },
478
+ },
479
+ ],
480
+ selectionSet: {
481
+ kind: 'SelectionSet',
482
+ selections: [
483
+ {
484
+ kind: 'Field',
485
+ name: { kind: 'Name', value: 'topicalInstrumentsCharts' },
486
+ arguments: [
487
+ {
488
+ kind: 'Argument',
489
+ name: { kind: 'Name', value: 'instruments' },
490
+ value: {
491
+ kind: 'Variable',
492
+ name: { kind: 'Name', value: 'instruments' },
493
+ },
494
+ },
495
+ {
496
+ kind: 'Argument',
497
+ name: { kind: 'Name', value: 'division' },
498
+ value: {
499
+ kind: 'Variable',
500
+ name: { kind: 'Name', value: 'division' },
501
+ },
502
+ },
503
+ ],
504
+ selectionSet: {
505
+ kind: 'SelectionSet',
506
+ selections: [
507
+ { kind: 'Field', name: { kind: 'Name', value: 'name' } },
508
+ { kind: 'Field', name: { kind: 'Name', value: 'chart' } },
509
+ ],
510
+ },
511
+ },
512
+ ],
513
+ },
514
+ },
515
+ ],
516
+ } as unknown as DocumentNode<
517
+ GetInstrumentsChartQuery,
518
+ GetInstrumentsChartQueryVariables
519
+ >;
520
+ export const ValidateInstrumentsDocument = {
521
+ kind: 'Document',
522
+ definitions: [
523
+ {
524
+ kind: 'OperationDefinition',
525
+ operation: 'query',
526
+ name: { kind: 'Name', value: 'validateInstruments' },
527
+ variableDefinitions: [
528
+ {
529
+ kind: 'VariableDefinition',
530
+ variable: {
531
+ kind: 'Variable',
532
+ name: { kind: 'Name', value: 'instruments' },
533
+ },
534
+ type: {
535
+ kind: 'NonNullType',
536
+ type: {
537
+ kind: 'ListType',
538
+ type: {
539
+ kind: 'NamedType',
540
+ name: { kind: 'Name', value: 'String' },
541
+ },
542
+ },
543
+ },
544
+ },
545
+ {
546
+ kind: 'VariableDefinition',
547
+ variable: {
548
+ kind: 'Variable',
549
+ name: { kind: 'Name', value: 'division' },
550
+ },
551
+ type: {
552
+ kind: 'NamedType',
553
+ name: { kind: 'Name', value: 'Division' },
554
+ },
555
+ },
556
+ ],
557
+ selectionSet: {
558
+ kind: 'SelectionSet',
559
+ selections: [
560
+ {
561
+ kind: 'Field',
562
+ name: { kind: 'Name', value: 'mapInstrumentNames' },
563
+ arguments: [
564
+ {
565
+ kind: 'Argument',
566
+ name: { kind: 'Name', value: 'instruments' },
567
+ value: {
568
+ kind: 'Variable',
569
+ name: { kind: 'Name', value: 'instruments' },
570
+ },
571
+ },
572
+ {
573
+ kind: 'Argument',
574
+ name: { kind: 'Name', value: 'division' },
575
+ value: {
576
+ kind: 'Variable',
577
+ name: { kind: 'Name', value: 'division' },
578
+ },
579
+ },
580
+ ],
581
+ selectionSet: {
582
+ kind: 'SelectionSet',
583
+ selections: [
584
+ { kind: 'Field', name: { kind: 'Name', value: 'name' } },
585
+ { kind: 'Field', name: { kind: 'Name', value: 'displayName' } },
586
+ ],
587
+ },
588
+ },
589
+ ],
590
+ },
591
+ },
592
+ ],
593
+ } as unknown as DocumentNode<
594
+ ValidateInstrumentsQuery,
595
+ ValidateInstrumentsQueryVariables
596
+ >;
@@ -1,2 +1,2 @@
1
- export * from "./fragment-masking";
2
- export * from "./gql";
1
+ export * from './fragment-masking';
2
+ export * from './gql';
@@ -1,11 +1,11 @@
1
- import { Locale, Translations } from '@oanda/mono-i18n';
1
+ import type { Translations } from '@oanda/mono-i18n';
2
+ import { Locale } from '@oanda/mono-i18n';
2
3
 
3
4
  import en from './sources/en.json';
4
- import zhTW from './sources/zh_TW.json';
5
5
  import es from './sources/es.json';
6
6
  import th from './sources/th.json';
7
-
8
- import { defaultTranslations } from './translations';
7
+ import zhTW from './sources/zh_TW.json';
8
+ import type { defaultTranslations } from './translations';
9
9
 
10
10
  export type TranslationKey = keyof typeof defaultTranslations;
11
11
 
@@ -1,4 +1,5 @@
1
1
  export const defaultTranslations = {
2
2
  data_unavailable: 'Data unavailable',
3
- pagination_entries_range: '{{firstItemOnPage}}-{{lastItemOnPage}} of {{itemCount}} entries',
3
+ pagination_entries_range:
4
+ '{{firstItemOnPage}}-{{lastItemOnPage}} of {{itemCount}} entries',
4
5
  };
@@ -1,13 +1,17 @@
1
1
  /**
2
2
  * @jest-environment jsdom
3
3
  */
4
- import React from 'react';
5
- import { render } from '@testing-library/react';
6
4
  import { MockedProvider } from '@apollo/client/testing';
7
- import { MockLayoutProvider, LiveRatesProvider } from '@oanda/labs-widget-common';
5
+ import {
6
+ LiveRatesProvider,
7
+ MockLayoutProvider,
8
+ } from '@oanda/labs-widget-common';
9
+ import { render } from '@testing-library/react';
10
+ import React from 'react';
11
+
8
12
  import { Division } from '../src/gql/types/graphql';
9
- import { widgetMocks } from './mocks';
10
13
  import { Main } from '../src/TickerTapeWidget/Main';
14
+ import { widgetMocks } from './mocks';
11
15
 
12
16
  jest.mock('../src/TickerTapeWidget/components/InstrumentRateWithData', () => ({
13
17
  InstrumentRateWithData: () => <div>Test</div>,
@@ -21,14 +25,16 @@ describe('Main component', () => {
21
25
  <MockLayoutProvider>
22
26
  <Main
23
27
  division={Division.Oc}
24
- records={[{
25
- instrument: 'EUR_USD',
26
- displayName: 'EUR/USD',
27
- }]}
28
+ records={[
29
+ {
30
+ instrument: 'EUR_USD',
31
+ displayName: 'EUR/USD',
32
+ },
33
+ ]}
28
34
  />
29
35
  </MockLayoutProvider>
30
36
  </LiveRatesProvider>
31
- </MockedProvider>,
37
+ </MockedProvider>
32
38
  );
33
39
 
34
40
  expect(await findByTestId('ticker-tape-wrapper')).toBeInTheDocument();
package/test/mocks.ts CHANGED
@@ -47,6 +47,4 @@ const widgetMocks = [
47
47
  },
48
48
  ];
49
49
 
50
- export {
51
- widgetMocks,
52
- };
50
+ export { widgetMocks };