@oanda/labs-currency-strength-widget 1.0.91 → 1.0.93

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 +748 -0
  2. package/dist/main/CurrencyStrengthWidget/ChartsWithData.js +20 -16
  3. package/dist/main/CurrencyStrengthWidget/ChartsWithData.js.map +1 -1
  4. package/dist/main/CurrencyStrengthWidget/CurrencyStrengthWidget.js +6 -6
  5. package/dist/main/CurrencyStrengthWidget/CurrencyStrengthWidget.js.map +1 -1
  6. package/dist/main/CurrencyStrengthWidget/Main.js +4 -4
  7. package/dist/main/CurrencyStrengthWidget/Main.js.map +1 -1
  8. package/dist/main/CurrencyStrengthWidget/components/Chart/Chart.js +14 -14
  9. package/dist/main/CurrencyStrengthWidget/components/Chart/Chart.js.map +1 -1
  10. package/dist/main/CurrencyStrengthWidget/components/Chart/constants.js.map +1 -1
  11. package/dist/main/CurrencyStrengthWidget/components/Chart/formatters.js +1 -5
  12. package/dist/main/CurrencyStrengthWidget/components/Chart/formatters.js.map +1 -1
  13. package/dist/main/CurrencyStrengthWidget/components/Chart/getOption.js +3 -3
  14. package/dist/main/CurrencyStrengthWidget/components/Chart/getOption.js.map +1 -1
  15. package/dist/main/CurrencyStrengthWidget/components/Chart/types.js.map +1 -1
  16. package/dist/main/CurrencyStrengthWidget/render.js +5 -5
  17. package/dist/main/CurrencyStrengthWidget/render.js.map +1 -1
  18. package/dist/main/CurrencyStrengthWidget/types.js.map +1 -1
  19. package/dist/main/gql/getCurrencyStrength.js +3 -12
  20. package/dist/main/gql/getCurrencyStrength.js.map +1 -1
  21. package/dist/main/gql/types/fragment-masking.js +3 -2
  22. package/dist/main/gql/types/fragment-masking.js.map +1 -1
  23. package/dist/main/gql/types/gql.js +3 -2
  24. package/dist/main/gql/types/gql.js.map +1 -1
  25. package/dist/main/gql/types/graphql.js +40 -40
  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/CurrencyStrengthWidget/ChartsWithData.js +20 -16
  32. package/dist/module/CurrencyStrengthWidget/ChartsWithData.js.map +1 -1
  33. package/dist/module/CurrencyStrengthWidget/CurrencyStrengthWidget.js +6 -6
  34. package/dist/module/CurrencyStrengthWidget/CurrencyStrengthWidget.js.map +1 -1
  35. package/dist/module/CurrencyStrengthWidget/Main.js +4 -4
  36. package/dist/module/CurrencyStrengthWidget/Main.js.map +1 -1
  37. package/dist/module/CurrencyStrengthWidget/components/Chart/Chart.js +12 -12
  38. package/dist/module/CurrencyStrengthWidget/components/Chart/Chart.js.map +1 -1
  39. package/dist/module/CurrencyStrengthWidget/components/Chart/constants.js.map +1 -1
  40. package/dist/module/CurrencyStrengthWidget/components/Chart/formatters.js +2 -6
  41. package/dist/module/CurrencyStrengthWidget/components/Chart/formatters.js.map +1 -1
  42. package/dist/module/CurrencyStrengthWidget/components/Chart/getOption.js +4 -4
  43. package/dist/module/CurrencyStrengthWidget/components/Chart/getOption.js.map +1 -1
  44. package/dist/module/CurrencyStrengthWidget/components/Chart/types.js.map +1 -1
  45. package/dist/module/CurrencyStrengthWidget/render.js +5 -5
  46. package/dist/module/CurrencyStrengthWidget/render.js.map +1 -1
  47. package/dist/module/CurrencyStrengthWidget/types.js.map +1 -1
  48. package/dist/module/gql/getCurrencyStrength.js +3 -12
  49. package/dist/module/gql/getCurrencyStrength.js.map +1 -1
  50. package/dist/module/gql/types/fragment-masking.js +3 -2
  51. package/dist/module/gql/types/fragment-masking.js.map +1 -1
  52. package/dist/module/gql/types/gql.js +3 -2
  53. package/dist/module/gql/types/gql.js.map +1 -1
  54. package/dist/module/gql/types/graphql.js +40 -40
  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/CurrencyStrengthWidget/ChartsWithData.d.ts +1 -1
  62. package/dist/types/CurrencyStrengthWidget/CurrencyStrengthWidget.d.ts +1 -1
  63. package/dist/types/CurrencyStrengthWidget/Main.d.ts +1 -1
  64. package/dist/types/CurrencyStrengthWidget/components/Chart/Chart.d.ts +1 -1
  65. package/dist/types/CurrencyStrengthWidget/components/Chart/formatters.d.ts +2 -2
  66. package/dist/types/CurrencyStrengthWidget/components/Chart/getOption.d.ts +1 -1
  67. package/dist/types/CurrencyStrengthWidget/components/Chart/types.d.ts +5 -5
  68. package/dist/types/CurrencyStrengthWidget/types.d.ts +1 -1
  69. package/dist/types/gql/types/gql.d.ts +2 -2
  70. package/dist/types/gql/types/index.d.ts +2 -2
  71. package/dist/types/translations/index.d.ts +2 -2
  72. package/package.json +3 -3
  73. package/src/CurrencyStrengthWidget/ChartsWithData.tsx +47 -28
  74. package/src/CurrencyStrengthWidget/CurrencyStrengthWidget.tsx +13 -7
  75. package/src/CurrencyStrengthWidget/Main.tsx +9 -8
  76. package/src/CurrencyStrengthWidget/components/Chart/Chart.tsx +24 -15
  77. package/src/CurrencyStrengthWidget/components/Chart/constants.tsx +1 -0
  78. package/src/CurrencyStrengthWidget/components/Chart/formatters.ts +4 -7
  79. package/src/CurrencyStrengthWidget/components/Chart/getOption.ts +22 -18
  80. package/src/CurrencyStrengthWidget/components/Chart/types.ts +8 -8
  81. package/src/CurrencyStrengthWidget/render.tsx +17 -15
  82. package/src/CurrencyStrengthWidget/types.ts +1 -1
  83. package/src/gql/types/fragment-masking.ts +41 -21
  84. package/src/gql/types/gql.ts +7 -3
  85. package/src/gql/types/graphql.ts +98 -45
  86. package/src/gql/types/index.ts +2 -2
  87. package/src/translations/index.ts +4 -4
  88. package/src/translations/translations.ts +1 -3
  89. package/test/Main.test.tsx +23 -11
  90. package/test/chartOptions.test.ts +9 -7
  91. package/test/mocks/currencyStrengthMock.ts +1 -3
  92. package/test/mocks/responsesMocks.ts +2 -4
  93. package/test/sortData.test.ts +10 -12
@@ -118,57 +118,57 @@ let VolatilityChartTimeUnit = exports.VolatilityChartTimeUnit = function (Volati
118
118
  return VolatilityChartTimeUnit;
119
119
  }({});
120
120
  const GetCurrencyStrengthDocument = exports.GetCurrencyStrengthDocument = {
121
- "kind": "Document",
122
- "definitions": [{
123
- "kind": "OperationDefinition",
124
- "operation": "query",
125
- "name": {
126
- "kind": "Name",
127
- "value": "GetCurrencyStrength"
121
+ kind: 'Document',
122
+ definitions: [{
123
+ kind: 'OperationDefinition',
124
+ operation: 'query',
125
+ name: {
126
+ kind: 'Name',
127
+ value: 'GetCurrencyStrength'
128
128
  },
129
- "selectionSet": {
130
- "kind": "SelectionSet",
131
- "selections": [{
132
- "kind": "Field",
133
- "name": {
134
- "kind": "Name",
135
- "value": "currencyStrength"
129
+ selectionSet: {
130
+ kind: 'SelectionSet',
131
+ selections: [{
132
+ kind: 'Field',
133
+ name: {
134
+ kind: 'Name',
135
+ value: 'currencyStrength'
136
136
  },
137
- "selectionSet": {
138
- "kind": "SelectionSet",
139
- "selections": [{
140
- "kind": "Field",
141
- "name": {
142
- "kind": "Name",
143
- "value": "currency"
137
+ selectionSet: {
138
+ kind: 'SelectionSet',
139
+ selections: [{
140
+ kind: 'Field',
141
+ name: {
142
+ kind: 'Name',
143
+ value: 'currency'
144
144
  }
145
145
  }, {
146
- "kind": "Field",
147
- "name": {
148
- "kind": "Name",
149
- "value": "strengthRelation"
146
+ kind: 'Field',
147
+ name: {
148
+ kind: 'Name',
149
+ value: 'strengthRelation'
150
150
  },
151
- "selectionSet": {
152
- "kind": "SelectionSet",
153
- "selections": [{
154
- "kind": "Field",
155
- "name": {
156
- "kind": "Name",
157
- "value": "currency"
151
+ selectionSet: {
152
+ kind: 'SelectionSet',
153
+ selections: [{
154
+ kind: 'Field',
155
+ name: {
156
+ kind: 'Name',
157
+ value: 'currency'
158
158
  }
159
159
  }, {
160
- "kind": "Field",
161
- "name": {
162
- "kind": "Name",
163
- "value": "percentage"
160
+ kind: 'Field',
161
+ name: {
162
+ kind: 'Name',
163
+ value: 'percentage'
164
164
  }
165
165
  }]
166
166
  }
167
167
  }, {
168
- "kind": "Field",
169
- "name": {
170
- "kind": "Name",
171
- "value": "updatedAt"
168
+ kind: 'Field',
169
+ name: {
170
+ kind: 'Name',
171
+ value: 'updatedAt'
172
172
  }
173
173
  }]
174
174
  }
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.js","names":["AssetClassName","exports","BookType","CorrelationTimeUnit","CurrencyName","CurrencyPowerBalanceTimeUnit","DataSource","Division","Region","Sort","TopicalSort","ValueAtRiskBars","ValueAtRiskDuration","VolatilityChartTimeSpan","VolatilityChartTimeUnit","GetCurrencyStrengthDocument"],"sources":["../../../../src/gql/types/graphql.ts"],"sourcesContent":["/* eslint-disable */\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: number; }\n};\n\nexport type AssetClass = {\n __typename?: 'AssetClass';\n instruments: Array<Instrument>;\n name: Scalars['String']['output'];\n};\n\nexport enum AssetClassName {\n Commodities = 'COMMODITIES',\n Cryptocurrency = 'CRYPTOCURRENCY',\n Currency = 'CURRENCY',\n EquityShares = 'EQUITY_SHARES',\n Indices = 'INDICES',\n Rates = 'RATES'\n}\n\nexport enum BookType {\n Order = 'ORDER',\n Position = 'POSITION'\n}\n\nexport type CorrelationHeatmap = {\n __typename?: 'CorrelationHeatmap';\n baseInstrument: Instrument;\n heatmap: Array<Heatmap>;\n};\n\nexport type CorrelationMatrix = {\n __typename?: 'CorrelationMatrix';\n baseTimeUnit: CorrelationTimeUnit;\n matrix: Array<Matrix>;\n};\n\nexport enum CorrelationTimeUnit {\n H1 = 'H1',\n H4 = 'H4',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n M6 = 'M6',\n W1 = 'W1',\n Y1 = 'Y1'\n}\n\nexport enum CurrencyName {\n Aud = 'AUD',\n Cad = 'CAD',\n Chf = 'CHF',\n Eur = 'EUR',\n Gbp = 'GBP',\n Jpy = 'JPY',\n Nzd = 'NZD',\n Usd = 'USD'\n}\n\nexport type CurrencyPower = {\n __typename?: 'CurrencyPower';\n /** UTC Timestamp */\n point: Scalars['String']['output'];\n price: Scalars['Float']['output'];\n};\n\nexport type CurrencyPowerBalance = {\n __typename?: 'CurrencyPowerBalance';\n currency: CurrencyName;\n power: Array<CurrencyPower>;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum CurrencyPowerBalanceTimeUnit {\n CurrentDay = 'CURRENT_DAY',\n H4 = 'H4',\n H8 = 'H8',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n PreviousDay = 'PREVIOUS_DAY',\n W1 = 'W1'\n}\n\nexport type CurrencyStrength = {\n __typename?: 'CurrencyStrength';\n currency: CurrencyName;\n strengthRelation?: Maybe<Array<StrengthRelation>>;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum DataSource {\n Ny4 = 'NY4',\n Ty3 = 'TY3'\n}\n\nexport enum Division {\n Oap = 'OAP',\n Oau = 'OAU',\n Oc = 'OC',\n Ocan = 'OCAN',\n Oel = 'OEL',\n Ogm = 'OGM',\n Oj = 'OJ',\n Opt = 'OPT',\n Otms = 'OTMS'\n}\n\nexport type Heatmap = {\n __typename?: 'Heatmap';\n instrument: Instrument;\n timeCorrelation: Array<TimeCorrelation>;\n};\n\nexport type Instrument = {\n __typename?: 'Instrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n};\n\nexport type InstrumentCorrelation = {\n __typename?: 'InstrumentCorrelation';\n instrument: Instrument;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type Matrix = {\n __typename?: 'Matrix';\n instrument: Instrument;\n instrumentCorrelation: Array<InstrumentCorrelation>;\n};\n\nexport type OrderPositionBucket = {\n __typename?: 'OrderPositionBucket';\n longCountPercent: Scalars['Float']['output'];\n price: Scalars['Float']['output'];\n shortCountPercent: Scalars['Float']['output'];\n};\n\nexport type OrderPositionData = {\n __typename?: 'OrderPositionData';\n bucketWidth: Scalars['Float']['output'];\n buckets: Array<Maybe<OrderPositionBucket>>;\n dataSource?: Maybe<Scalars['String']['output']>;\n instrument: Scalars['String']['output'];\n price?: Maybe<Scalars['Float']['output']>;\n region?: Maybe<Scalars['String']['output']>;\n time: Scalars['String']['output'];\n unixTime: Scalars['Int']['output'];\n};\n\nexport type Query = {\n __typename?: 'Query';\n assetClasses?: Maybe<Array<Maybe<AssetClass>>>;\n correlationHeatmap: CorrelationHeatmap;\n correlationMatrix: CorrelationMatrix;\n currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;\n currencyStrength?: Maybe<Array<CurrencyStrength>>;\n mapInstrumentNames?: Maybe<Array<Maybe<Instrument>>>;\n orderPositionBooks: Array<Maybe<OrderPositionData>>;\n sentiment?: Maybe<Array<SentimentInstrument>>;\n sentimentList?: Maybe<Array<SentimentInstrument>>;\n topicalInstruments?: Maybe<Array<TopicalInstrument>>;\n topicalInstrumentsCharts?: Maybe<Array<TopicalInstrumentChart>>;\n topicalInstrumentsTotalCount: Scalars['Int']['output'];\n valueAtRiskAssetClasses?: Maybe<Array<AssetClass>>;\n valueAtRiskChart?: Maybe<ValueAtRiskChart>;\n volatilityChart?: Maybe<Array<Maybe<VolatilityChart>>>;\n volatilityChartAssetClasses?: Maybe<Array<AssetClass>>;\n};\n\n\nexport type QueryAssetClassesArgs = {\n division: Division;\n};\n\n\nexport type QueryCorrelationHeatmapArgs = {\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n timeSpans?: InputMaybe<Array<InputMaybe<CorrelationTimeUnit>>>;\n};\n\n\nexport type QueryCorrelationMatrixArgs = {\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n};\n\n\nexport type QueryCurrencyPowerBalanceArgs = {\n timeUnit: CurrencyPowerBalanceTimeUnit;\n};\n\n\nexport type QueryMapInstrumentNamesArgs = {\n division?: InputMaybe<Division>;\n instruments: Array<InputMaybe<Scalars['String']['input']>>;\n};\n\n\nexport type QueryOrderPositionBooksArgs = {\n bookType: BookType;\n dataSource?: InputMaybe<DataSource>;\n instrument: Scalars['String']['input'];\n recentHours?: InputMaybe<Scalars['Int']['input']>;\n region?: InputMaybe<Region>;\n};\n\n\nexport type QuerySentimentArgs = {\n division?: InputMaybe<Division>;\n name: Scalars['String']['input'];\n};\n\n\nexport type QuerySentimentListArgs = {\n division?: InputMaybe<Division>;\n sort?: InputMaybe<Sort>;\n};\n\n\nexport type QueryTopicalInstrumentsArgs = {\n assetClass?: InputMaybe<AssetClassName>;\n count?: InputMaybe<Scalars['Int']['input']>;\n division?: InputMaybe<Division>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n sort: TopicalSort;\n};\n\n\nexport type QueryTopicalInstrumentsChartsArgs = {\n division?: InputMaybe<Division>;\n instruments?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\n\nexport type QueryTopicalInstrumentsTotalCountArgs = {\n assetClass?: InputMaybe<AssetClassName>;\n division?: InputMaybe<Division>;\n sort: TopicalSort;\n};\n\n\nexport type QueryValueAtRiskAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\n\nexport type QueryValueAtRiskChartArgs = {\n bars: ValueAtRiskBars;\n division?: InputMaybe<Division>;\n duration: ValueAtRiskDuration;\n instrument: Scalars['String']['input'];\n};\n\n\nexport type QueryVolatilityChartArgs = {\n division?: InputMaybe<Division>;\n instrument: Scalars['String']['input'];\n timeSpan: VolatilityChartTimeSpan;\n timeUnit: VolatilityChartTimeUnit;\n};\n\n\nexport type QueryVolatilityChartAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\nexport enum Region {\n Amer = 'AMER',\n Apac = 'APAC',\n Emea = 'EMEA'\n}\n\nexport type Sentiment = {\n __typename?: 'Sentiment';\n longPercent: Scalars['Float']['output'];\n shortPercent: Scalars['Float']['output'];\n};\n\nexport type SentimentInstrument = {\n __typename?: 'SentimentInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum Sort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH'\n}\n\nexport type StrengthRelation = {\n __typename?: 'StrengthRelation';\n currency: CurrencyName;\n percentage: Scalars['Float']['output'];\n};\n\nexport type TimeCorrelation = {\n __typename?: 'TimeCorrelation';\n timeUnit: CorrelationTimeUnit;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type TopicalInstrument = {\n __typename?: 'TopicalInstrument';\n assetClass?: Maybe<AssetClassName>;\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport type TopicalInstrumentChart = {\n __typename?: 'TopicalInstrumentChart';\n chart?: Maybe<Array<Scalars['Float']['output']>>;\n name: Scalars['String']['output'];\n};\n\nexport enum TopicalSort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH',\n Hot = 'HOT',\n Popular = 'POPULAR',\n Volatile = 'VOLATILE'\n}\n\nexport enum ValueAtRiskBars {\n C100 = 'C100',\n C200 = 'C200',\n C300 = 'C300'\n}\n\nexport type ValueAtRiskChart = {\n __typename?: 'ValueAtRiskChart';\n down: ValueAtRiskChartData;\n up: ValueAtRiskChartData;\n};\n\nexport type ValueAtRiskChartData = {\n __typename?: 'ValueAtRiskChartData';\n average: Scalars['Float']['output'];\n max: Scalars['Float']['output'];\n median: Scalars['Float']['output'];\n points?: Maybe<Array<ValueAtRiskChartPoint>>;\n threshold: Scalars['Float']['output'];\n};\n\nexport type ValueAtRiskChartPoint = {\n __typename?: 'ValueAtRiskChartPoint';\n percent: Scalars['Float']['output'];\n pips: Scalars['Float']['output'];\n};\n\nexport enum ValueAtRiskDuration {\n C1 = 'C1',\n C2 = 'C2',\n C3 = 'C3',\n C4 = 'C4',\n C5 = 'C5',\n C10 = 'C10'\n}\n\nexport type VolatilityChart = {\n __typename?: 'VolatilityChart';\n pips: Scalars['Float']['output'];\n /** Time point - hour in format hh:mm, Date in UTC, Week in format 'Mo' */\n point: Scalars['String']['output'];\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum VolatilityChartTimeSpan {\n /** Valid for: H */\n D5 = 'D5',\n /** Valid for: H */\n D10 = 'D10',\n /** Valid for: D */\n M1 = 'M1',\n /** Valid for: D */\n M3 = 'M3',\n /** Valid for: W */\n W5 = 'W5',\n /** Valid for: W */\n W10 = 'W10'\n}\n\nexport enum VolatilityChartTimeUnit {\n D = 'D',\n H = 'H',\n W = 'W'\n}\n\nexport type GetCurrencyStrengthQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type GetCurrencyStrengthQuery = { __typename?: 'Query', currencyStrength?: Array<{ __typename?: 'CurrencyStrength', currency: CurrencyName, updatedAt: string, strengthRelation?: Array<{ __typename?: 'StrengthRelation', currency: CurrencyName, percentage: number }> | null }> | null };\n\n\nexport const GetCurrencyStrengthDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"GetCurrencyStrength\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"currencyStrength\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"currency\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"strengthRelation\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"currency\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"percentage\"}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"updatedAt\"}}]}}]}}]} as unknown as DocumentNode<GetCurrencyStrengthQuery, GetCurrencyStrengthQueryVariables>;"],"mappings":";;;;;;IAwBYA,cAAc,GAAAC,OAAA,CAAAD,cAAA,aAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAAA,IASdE,QAAQ,GAAAD,OAAA,CAAAC,QAAA,aAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAAA,IAiBRC,mBAAmB,GAAAF,OAAA,CAAAE,mBAAA,aAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAAA,IAWnBC,YAAY,GAAAH,OAAA,CAAAG,YAAA,aAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OA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AAC,MAAM,EAAC,OAAO;gBAAC,MAAM,EAAC;kBAAC,MAAM,EAAC,MAAM;kBAAC,OAAO,EAAC;gBAAY;cAAC,CAAC;YAAC;UAAC,CAAC,EAAC;YAAC,MAAM,EAAC,OAAO;YAAC,MAAM,EAAC;cAAC,MAAM,EAAC,MAAM;cAAC,OAAO,EAAC;YAAW;UAAC,CAAC;QAAC;MAAC,CAAC;IAAC;EAAC,CAAC;AAAC,CAAyF","ignoreList":[]}
1
+ {"version":3,"file":"graphql.js","names":["AssetClassName","exports","BookType","CorrelationTimeUnit","CurrencyName","CurrencyPowerBalanceTimeUnit","DataSource","Division","Region","Sort","TopicalSort","ValueAtRiskBars","ValueAtRiskDuration","VolatilityChartTimeSpan","VolatilityChartTimeUnit","GetCurrencyStrengthDocument","kind","definitions","operation","name","value","selectionSet","selections"],"sources":["../../../../src/gql/types/graphql.ts"],"sourcesContent":["/* eslint-disable */\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = {\n [K in keyof T]: T[K];\n};\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & {\n [SubKey in K]?: Maybe<T[SubKey]>;\n};\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {\n [SubKey in K]: Maybe<T[SubKey]>;\n};\nexport type MakeEmpty<\n T extends { [key: string]: unknown },\n K extends keyof T,\n> = { [_ in K]?: never };\nexport type Incremental<T> =\n | T\n | {\n [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;\n };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string };\n String: { input: string; output: string };\n Boolean: { input: boolean; output: boolean };\n Int: { input: number; output: number };\n Float: { input: number; output: number };\n};\n\nexport type AssetClass = {\n __typename?: 'AssetClass';\n instruments: Array<Instrument>;\n name: Scalars['String']['output'];\n};\n\nexport enum AssetClassName {\n Commodities = 'COMMODITIES',\n Cryptocurrency = 'CRYPTOCURRENCY',\n Currency = 'CURRENCY',\n EquityShares = 'EQUITY_SHARES',\n Indices = 'INDICES',\n Rates = 'RATES',\n}\n\nexport enum BookType {\n Order = 'ORDER',\n Position = 'POSITION',\n}\n\nexport type CorrelationHeatmap = {\n __typename?: 'CorrelationHeatmap';\n baseInstrument: Instrument;\n heatmap: Array<Heatmap>;\n};\n\nexport type CorrelationMatrix = {\n __typename?: 'CorrelationMatrix';\n baseTimeUnit: CorrelationTimeUnit;\n matrix: Array<Matrix>;\n};\n\nexport enum CorrelationTimeUnit {\n H1 = 'H1',\n H4 = 'H4',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n M6 = 'M6',\n W1 = 'W1',\n Y1 = 'Y1',\n}\n\nexport enum CurrencyName {\n Aud = 'AUD',\n Cad = 'CAD',\n Chf = 'CHF',\n Eur = 'EUR',\n Gbp = 'GBP',\n Jpy = 'JPY',\n Nzd = 'NZD',\n Usd = 'USD',\n}\n\nexport type CurrencyPower = {\n __typename?: 'CurrencyPower';\n /** UTC Timestamp */\n point: Scalars['String']['output'];\n price: Scalars['Float']['output'];\n};\n\nexport type CurrencyPowerBalance = {\n __typename?: 'CurrencyPowerBalance';\n currency: CurrencyName;\n power: Array<CurrencyPower>;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum CurrencyPowerBalanceTimeUnit {\n CurrentDay = 'CURRENT_DAY',\n H4 = 'H4',\n H8 = 'H8',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n PreviousDay = 'PREVIOUS_DAY',\n W1 = 'W1',\n}\n\nexport type CurrencyStrength = {\n __typename?: 'CurrencyStrength';\n currency: CurrencyName;\n strengthRelation?: Maybe<Array<StrengthRelation>>;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum DataSource {\n Ny4 = 'NY4',\n Ty3 = 'TY3',\n}\n\nexport enum Division {\n Oap = 'OAP',\n Oau = 'OAU',\n Oc = 'OC',\n Ocan = 'OCAN',\n Oel = 'OEL',\n Ogm = 'OGM',\n Oj = 'OJ',\n Opt = 'OPT',\n Otms = 'OTMS',\n}\n\nexport type Heatmap = {\n __typename?: 'Heatmap';\n instrument: Instrument;\n timeCorrelation: Array<TimeCorrelation>;\n};\n\nexport type Instrument = {\n __typename?: 'Instrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n};\n\nexport type InstrumentCorrelation = {\n __typename?: 'InstrumentCorrelation';\n instrument: Instrument;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type Matrix = {\n __typename?: 'Matrix';\n instrument: Instrument;\n instrumentCorrelation: Array<InstrumentCorrelation>;\n};\n\nexport type OrderPositionBucket = {\n __typename?: 'OrderPositionBucket';\n longCountPercent: Scalars['Float']['output'];\n price: Scalars['Float']['output'];\n shortCountPercent: Scalars['Float']['output'];\n};\n\nexport type OrderPositionData = {\n __typename?: 'OrderPositionData';\n bucketWidth: Scalars['Float']['output'];\n buckets: Array<Maybe<OrderPositionBucket>>;\n dataSource?: Maybe<Scalars['String']['output']>;\n instrument: Scalars['String']['output'];\n price?: Maybe<Scalars['Float']['output']>;\n region?: Maybe<Scalars['String']['output']>;\n time: Scalars['String']['output'];\n unixTime: Scalars['Int']['output'];\n};\n\nexport type Query = {\n __typename?: 'Query';\n assetClasses?: Maybe<Array<Maybe<AssetClass>>>;\n correlationHeatmap: CorrelationHeatmap;\n correlationMatrix: CorrelationMatrix;\n currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;\n currencyStrength?: Maybe<Array<CurrencyStrength>>;\n mapInstrumentNames?: Maybe<Array<Maybe<Instrument>>>;\n orderPositionBooks: Array<Maybe<OrderPositionData>>;\n sentiment?: Maybe<Array<SentimentInstrument>>;\n sentimentList?: Maybe<Array<SentimentInstrument>>;\n topicalInstruments?: Maybe<Array<TopicalInstrument>>;\n topicalInstrumentsCharts?: Maybe<Array<TopicalInstrumentChart>>;\n topicalInstrumentsTotalCount: Scalars['Int']['output'];\n valueAtRiskAssetClasses?: Maybe<Array<AssetClass>>;\n valueAtRiskChart?: Maybe<ValueAtRiskChart>;\n volatilityChart?: Maybe<Array<Maybe<VolatilityChart>>>;\n volatilityChartAssetClasses?: Maybe<Array<AssetClass>>;\n};\n\nexport type QueryAssetClassesArgs = {\n division: Division;\n};\n\nexport type QueryCorrelationHeatmapArgs = {\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n timeSpans?: InputMaybe<Array<InputMaybe<CorrelationTimeUnit>>>;\n};\n\nexport type QueryCorrelationMatrixArgs = {\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n};\n\nexport type QueryCurrencyPowerBalanceArgs = {\n timeUnit: CurrencyPowerBalanceTimeUnit;\n};\n\nexport type QueryMapInstrumentNamesArgs = {\n division?: InputMaybe<Division>;\n instruments: Array<InputMaybe<Scalars['String']['input']>>;\n};\n\nexport type QueryOrderPositionBooksArgs = {\n bookType: BookType;\n dataSource?: InputMaybe<DataSource>;\n instrument: Scalars['String']['input'];\n recentHours?: InputMaybe<Scalars['Int']['input']>;\n region?: InputMaybe<Region>;\n};\n\nexport type QuerySentimentArgs = {\n division?: InputMaybe<Division>;\n name: Scalars['String']['input'];\n};\n\nexport type QuerySentimentListArgs = {\n division?: InputMaybe<Division>;\n sort?: InputMaybe<Sort>;\n};\n\nexport type QueryTopicalInstrumentsArgs = {\n assetClass?: InputMaybe<AssetClassName>;\n count?: InputMaybe<Scalars['Int']['input']>;\n division?: InputMaybe<Division>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n sort: TopicalSort;\n};\n\nexport type QueryTopicalInstrumentsChartsArgs = {\n division?: InputMaybe<Division>;\n instruments?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\nexport type QueryTopicalInstrumentsTotalCountArgs = {\n assetClass?: InputMaybe<AssetClassName>;\n division?: InputMaybe<Division>;\n sort: TopicalSort;\n};\n\nexport type QueryValueAtRiskAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\nexport type QueryValueAtRiskChartArgs = {\n bars: ValueAtRiskBars;\n division?: InputMaybe<Division>;\n duration: ValueAtRiskDuration;\n instrument: Scalars['String']['input'];\n};\n\nexport type QueryVolatilityChartArgs = {\n division?: InputMaybe<Division>;\n instrument: Scalars['String']['input'];\n timeSpan: VolatilityChartTimeSpan;\n timeUnit: VolatilityChartTimeUnit;\n};\n\nexport type QueryVolatilityChartAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\nexport enum Region {\n Amer = 'AMER',\n Apac = 'APAC',\n Emea = 'EMEA',\n}\n\nexport type Sentiment = {\n __typename?: 'Sentiment';\n longPercent: Scalars['Float']['output'];\n shortPercent: Scalars['Float']['output'];\n};\n\nexport type SentimentInstrument = {\n __typename?: 'SentimentInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum Sort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH',\n}\n\nexport type StrengthRelation = {\n __typename?: 'StrengthRelation';\n currency: CurrencyName;\n percentage: Scalars['Float']['output'];\n};\n\nexport type TimeCorrelation = {\n __typename?: 'TimeCorrelation';\n timeUnit: CorrelationTimeUnit;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type TopicalInstrument = {\n __typename?: 'TopicalInstrument';\n assetClass?: Maybe<AssetClassName>;\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport type TopicalInstrumentChart = {\n __typename?: 'TopicalInstrumentChart';\n chart?: Maybe<Array<Scalars['Float']['output']>>;\n name: Scalars['String']['output'];\n};\n\nexport enum TopicalSort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH',\n Hot = 'HOT',\n Popular = 'POPULAR',\n Volatile = 'VOLATILE',\n}\n\nexport enum ValueAtRiskBars {\n C100 = 'C100',\n C200 = 'C200',\n C300 = 'C300',\n}\n\nexport type ValueAtRiskChart = {\n __typename?: 'ValueAtRiskChart';\n down: ValueAtRiskChartData;\n up: ValueAtRiskChartData;\n};\n\nexport type ValueAtRiskChartData = {\n __typename?: 'ValueAtRiskChartData';\n average: Scalars['Float']['output'];\n max: Scalars['Float']['output'];\n median: Scalars['Float']['output'];\n points?: Maybe<Array<ValueAtRiskChartPoint>>;\n threshold: Scalars['Float']['output'];\n};\n\nexport type ValueAtRiskChartPoint = {\n __typename?: 'ValueAtRiskChartPoint';\n percent: Scalars['Float']['output'];\n pips: Scalars['Float']['output'];\n};\n\nexport enum ValueAtRiskDuration {\n C1 = 'C1',\n C2 = 'C2',\n C3 = 'C3',\n C4 = 'C4',\n C5 = 'C5',\n C10 = 'C10',\n}\n\nexport type VolatilityChart = {\n __typename?: 'VolatilityChart';\n pips: Scalars['Float']['output'];\n /** Time point - hour in format hh:mm, Date in UTC, Week in format 'Mo' */\n point: Scalars['String']['output'];\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum VolatilityChartTimeSpan {\n /** Valid for: H */\n D5 = 'D5',\n /** Valid for: H */\n D10 = 'D10',\n /** Valid for: D */\n M1 = 'M1',\n /** Valid for: D */\n M3 = 'M3',\n /** Valid for: W */\n W5 = 'W5',\n /** Valid for: W */\n W10 = 'W10',\n}\n\nexport enum VolatilityChartTimeUnit {\n D = 'D',\n H = 'H',\n W = 'W',\n}\n\nexport type GetCurrencyStrengthQueryVariables = Exact<{ [key: string]: never }>;\n\nexport type GetCurrencyStrengthQuery = {\n __typename?: 'Query';\n currencyStrength?: Array<{\n __typename?: 'CurrencyStrength';\n currency: CurrencyName;\n updatedAt: string;\n strengthRelation?: Array<{\n __typename?: 'StrengthRelation';\n currency: CurrencyName;\n percentage: number;\n }> | null;\n }> | null;\n};\n\nexport const GetCurrencyStrengthDocument = {\n kind: 'Document',\n definitions: [\n {\n kind: 'OperationDefinition',\n operation: 'query',\n name: { kind: 'Name', value: 'GetCurrencyStrength' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'currencyStrength' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'currency' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'strengthRelation' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'currency' },\n },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'percentage' },\n },\n ],\n },\n },\n { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<\n GetCurrencyStrengthQuery,\n GetCurrencyStrengthQueryVariables\n>;\n"],"mappings":";;;;;;IAqCYA,cAAc,GAAAC,OAAA,CAAAD,cAAA,aAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAAA,IASdE,QAAQ,GAAAD,OAAA,CAAAC,QAAA,aAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAAA,IAiBRC,mBAAmB,GAAAF,OAAA,CAAAE,mBAAA,aAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAAA,IAWnBC,YAAY,GAAAH,OAAA,CAAAG,YAAA,aAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAAA,IAyBZC,4BAA4B,GAAAJ,OAAA,CAAAI,4BAA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E;kBAAEH,IAAI,EAAE,MAAM;kBAAEI,KAAK,EAAE;gBAAa;cAC5C,CAAC;YAEL;UACF,CAAC,EACD;YAAEJ,IAAI,EAAE,OAAO;YAAEG,IAAI,EAAE;cAAEH,IAAI,EAAE,MAAM;cAAEI,KAAK,EAAE;YAAY;UAAE,CAAC;QAEjE;MACF,CAAC;IAEL;EACF,CAAC;AAEL,CAGC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_fragmentMasking","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_gql"],"sources":["../../../../src/gql/types/index.ts"],"sourcesContent":["export * from \"./fragment-masking\";\nexport * from \"./gql\";"],"mappings":";;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,gBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,gBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,gBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,IAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,IAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,IAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,IAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_fragmentMasking","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_gql"],"sources":["../../../../src/gql/types/index.ts"],"sourcesContent":["export * from './fragment-masking';\nexport * from './gql';\n"],"mappings":";;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,gBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,gBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,gBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,IAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,IAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,IAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,IAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.translations = void 0;
7
7
  var _monoI18n = require("@oanda/mono-i18n");
8
8
  var _en = _interopRequireDefault(require("./sources/en.json"));
9
- var _zh_TW = _interopRequireDefault(require("./sources/zh_TW.json"));
10
9
  var _es = _interopRequireDefault(require("./sources/es.json"));
11
10
  var _th = _interopRequireDefault(require("./sources/th.json"));
11
+ var _zh_TW = _interopRequireDefault(require("./sources/zh_TW.json"));
12
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
13
  const translations = exports.translations = {
14
14
  [_monoI18n.Locale.en]: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_monoI18n","require","_en","_interopRequireDefault","_zh_TW","_es","_th","e","__esModule","default","translations","exports","Locale","en","translation","zhTW","es","th"],"sources":["../../../src/translations/index.ts"],"sourcesContent":["import { Locale, Translations } from '@oanda/mono-i18n';\n\nimport en from './sources/en.json';\nimport zhTW from './sources/zh_TW.json';\nimport es from './sources/es.json';\nimport th from './sources/th.json';\n\nimport { defaultTranslations } from './translations';\n\nexport type TranslationKey = keyof typeof defaultTranslations;\n\nexport const translations: Translations = {\n [Locale.en]: { translation: en },\n [Locale.zhTW]: { translation: zhTW },\n [Locale.es]: { translation: es },\n [Locale.th]: { translation: th },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,GAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,GAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,GAAA,GAAAH,sBAAA,CAAAF,OAAA;AAAmC,SAAAE,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAM5B,MAAMG,YAA0B,GAAAC,OAAA,CAAAD,YAAA,GAAG;EACxC,CAACE,gBAAM,CAACC,EAAE,GAAG;IAAEC,WAAW,EAAED;EAAG,CAAC;EAChC,CAACD,gBAAM,CAACG,IAAI,GAAG;IAAED,WAAW,EAAEC;EAAK,CAAC;EACpC,CAACH,gBAAM,CAACI,EAAE,GAAG;IAAEF,WAAW,EAAEE;EAAG,CAAC;EAChC,CAACJ,gBAAM,CAACK,EAAE,GAAG;IAAEH,WAAW,EAAEG;EAAG;AACjC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_monoI18n","require","_en","_interopRequireDefault","_es","_th","_zh_TW","e","__esModule","default","translations","exports","Locale","en","translation","zhTW","es","th"],"sources":["../../../src/translations/index.ts"],"sourcesContent":["import type { Translations } from '@oanda/mono-i18n';\nimport { Locale } from '@oanda/mono-i18n';\n\nimport en from './sources/en.json';\nimport es from './sources/es.json';\nimport th from './sources/th.json';\nimport zhTW from './sources/zh_TW.json';\nimport type { defaultTranslations } from './translations';\n\nexport type TranslationKey = keyof typeof defaultTranslations;\n\nexport const translations: Translations = {\n [Locale.en]: { translation: en },\n [Locale.zhTW]: { translation: zhTW },\n [Locale.es]: { translation: es },\n [Locale.th]: { translation: th },\n};\n"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,GAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,GAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,GAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAH,sBAAA,CAAAF,OAAA;AAAwC,SAAAE,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAKjC,MAAMG,YAA0B,GAAAC,OAAA,CAAAD,YAAA,GAAG;EACxC,CAACE,gBAAM,CAACC,EAAE,GAAG;IAAEC,WAAW,EAAED;EAAG,CAAC;EAChC,CAACD,gBAAM,CAACG,IAAI,GAAG;IAAED,WAAW,EAAEC;EAAK,CAAC;EACpC,CAACH,gBAAM,CAACI,EAAE,GAAG;IAAEF,WAAW,EAAEE;EAAG,CAAC;EAChC,CAACJ,gBAAM,CAACK,EAAE,GAAG;IAAEH,WAAW,EAAEG;EAAG;AACjC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"translations.js","names":["defaultTranslations","exports"],"sources":["../../../src/translations/translations.ts"],"sourcesContent":["export const defaultTranslations = {\n\n};\n"],"mappings":";;;;;;AAAO,MAAMA,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG,CAEnC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"translations.js","names":["defaultTranslations","exports"],"sources":["../../../src/translations/translations.ts"],"sourcesContent":["export const defaultTranslations = {};\n"],"mappings":";;;;;;AAAO,MAAMA,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG,CAAC,CAAC","ignoreList":[]}
@@ -1,12 +1,13 @@
1
- import React from 'react';
2
1
  import { useQuery } from '@apollo/client';
3
- import { useLocale } from '@oanda/mono-i18n';
4
2
  import { ChartError, LastUpdated, Size, Spinner, SpinnerSize, useLayoutProvider } from '@oanda/labs-widget-common';
3
+ import { useLocale } from '@oanda/mono-i18n';
5
4
  import classnames from 'classnames';
5
+ import React from 'react';
6
6
  import { getCurrencyStrength } from '../gql/getCurrencyStrength';
7
7
  import { Chart } from './components/Chart';
8
8
  import { sortCurrencies } from './components/Chart/formatters';
9
9
  const ChartWithData = _ref => {
10
+ var _data$currencyStrengt, _data$currencyStrengt2, _data$currencyStrengt3, _data$currencyStrengt4, _;
10
11
  let {
11
12
  currency
12
13
  } = _ref;
@@ -24,9 +25,9 @@ const ChartWithData = _ref => {
24
25
  } = useQuery(getCurrencyStrength, {
25
26
  fetchPolicy: 'cache-and-network'
26
27
  });
27
- const showChart = data?.currencyStrength && data?.currencyStrength?.length > 0;
28
- const showError = data?.currencyStrength?.length === 0 || error;
29
- const currencyData = currency ? data?.currencyStrength?.filter(item => item.currency === currency) : data?.currencyStrength?.slice().sort(sortCurrencies);
28
+ const showChart = (data === null || data === void 0 ? void 0 : data.currencyStrength) && (data === null || data === void 0 || (_data$currencyStrengt = data.currencyStrength) === null || _data$currencyStrengt === void 0 ? void 0 : _data$currencyStrengt.length) > 0;
29
+ const showError = (data === null || data === void 0 || (_data$currencyStrengt2 = data.currencyStrength) === null || _data$currencyStrengt2 === void 0 ? void 0 : _data$currencyStrengt2.length) === 0 || error;
30
+ const currencyData = currency ? data === null || data === void 0 || (_data$currencyStrengt3 = data.currencyStrength) === null || _data$currencyStrengt3 === void 0 ? void 0 : _data$currencyStrengt3.filter(item => item.currency === currency) : data === null || data === void 0 || (_data$currencyStrengt4 = data.currencyStrength) === null || _data$currencyStrengt4 === void 0 ? void 0 : _data$currencyStrengt4.slice().sort(sortCurrencies);
30
31
  return React.createElement(React.Fragment, null, loading && React.createElement("div", {
31
32
  className: classnames('lw-flex lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary', {
32
33
  'lw-h-[461px]': !currency,
@@ -35,18 +36,21 @@ const ChartWithData = _ref => {
35
36
  }, React.createElement(Spinner, {
36
37
  size: SpinnerSize.lg
37
38
  })), !loading && showChart && React.createElement("div", {
38
- "data-testid": "currency-strength-chart-wrapper",
39
39
  className: classnames('lw-grid lw-place-content-center lw-gap-7', {
40
40
  'lw-grid-cols-3 ': isDesktop && !currency,
41
41
  'lw-grid-cols-1': !isDesktop || currency
42
- })
43
- }, currencyData && currencyData.map(item => React.createElement("div", {
44
- key: item.currency,
45
- className: "lw-flex lw-h-[135px] lw-flex-1 lw-items-center lw-justify-center"
46
- }, React.createElement(Chart, {
47
- currency: item.currency,
48
- values: item.strengthRelation?.slice().sort(sortCurrencies)
49
- })))), !loading && showError && React.createElement("div", {
42
+ }),
43
+ "data-testid": "currency-strength-chart-wrapper"
44
+ }, currencyData && currencyData.map(item => {
45
+ var _item$strengthRelatio;
46
+ return React.createElement("div", {
47
+ key: item.currency,
48
+ className: "lw-flex lw-h-[135px] lw-flex-1 lw-items-center lw-justify-center"
49
+ }, React.createElement(Chart, {
50
+ currency: item.currency,
51
+ values: (_item$strengthRelatio = item.strengthRelation) === null || _item$strengthRelatio === void 0 ? void 0 : _item$strengthRelatio.slice().sort(sortCurrencies)
52
+ }));
53
+ })), !loading && showError && React.createElement("div", {
50
54
  className: classnames('lw-flex lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary', {
51
55
  'lw-h-[425px]': !currency,
52
56
  'lw-h-[135px]': currency
@@ -54,8 +58,8 @@ const ChartWithData = _ref => {
54
58
  }, React.createElement(ChartError, null)), !loading && !showError && React.createElement("div", {
55
59
  className: "lw-mt-2 lw-h-8"
56
60
  }, React.createElement(LastUpdated, {
57
- timestamp: data?.currencyStrength[0]?.updatedAt,
58
- labelCallback: lang
61
+ labelCallback: lang,
62
+ timestamp: data === null || data === void 0 || (_ = data.currencyStrength[0]) === null || _ === void 0 ? void 0 : _.updatedAt
59
63
  })));
60
64
  };
61
65
  export { ChartWithData };
@@ -1 +1 @@
1
- {"version":3,"file":"ChartsWithData.js","names":["React","useQuery","useLocale","ChartError","LastUpdated","Size","Spinner","SpinnerSize","useLayoutProvider","classnames","getCurrencyStrength","Chart","sortCurrencies","ChartWithData","_ref","currency","size","isDesktop","DESKTOP","lang","loading","data","error","fetchPolicy","showChart","currencyStrength","length","showError","currencyData","filter","item","slice","sort","createElement","Fragment","className","lg","map","key","values","strengthRelation","timestamp","updatedAt","labelCallback"],"sources":["../../../src/CurrencyStrengthWidget/ChartsWithData.tsx"],"sourcesContent":["import React from 'react';\nimport { useQuery } from '@apollo/client';\nimport { useLocale } from '@oanda/mono-i18n';\nimport {\n ChartError,\n LastUpdated,\n Size,\n Spinner,\n SpinnerSize,\n useLayoutProvider,\n} from '@oanda/labs-widget-common';\nimport classnames from 'classnames';\nimport { getCurrencyStrength } from '../gql/getCurrencyStrength';\nimport { GetCurrencyStrengthQuery } from '../gql/types/graphql';\nimport { Chart } from './components/Chart';\nimport { sortCurrencies } from './components/Chart/formatters';\nimport { WidgetProps } from './types';\n\nconst ChartWithData = ({ currency }: WidgetProps) => {\n const { size } = useLayoutProvider();\n const isDesktop = size === Size.DESKTOP;\n const { lang } = useLocale();\n const { loading, data, error } = useQuery<GetCurrencyStrengthQuery>(getCurrencyStrength, {\n fetchPolicy: 'cache-and-network',\n });\n\n const showChart = data?.currencyStrength && data?.currencyStrength?.length > 0;\n const showError = data?.currencyStrength?.length === 0 || error;\n\n const currencyData = currency\n ? data?.currencyStrength?.filter((item) => item.currency === currency)\n : data?.currencyStrength?.slice().sort(sortCurrencies);\n\n return (\n <>\n {loading\n && (\n <div className={classnames('lw-flex lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary', {\n 'lw-h-[461px]': !currency,\n 'lw-h-[135px]': currency,\n })}\n >\n <Spinner size={SpinnerSize.lg} />\n </div>\n )}\n {!loading && showChart && (\n <div\n data-testid=\"currency-strength-chart-wrapper\"\n className={classnames('lw-grid lw-place-content-center lw-gap-7', {\n 'lw-grid-cols-3 ': isDesktop && !currency,\n 'lw-grid-cols-1': !isDesktop || currency,\n })}\n >\n {currencyData && currencyData.map((item) => (\n <div key={item.currency} className=\"lw-flex lw-h-[135px] lw-flex-1 lw-items-center lw-justify-center\">\n <Chart\n currency={item.currency}\n values={item.strengthRelation?.slice().sort(sortCurrencies)!}\n />\n </div>\n ))}\n </div>\n )}\n {!loading && showError && (\n <div className={classnames('lw-flex lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary', {\n 'lw-h-[425px]': !currency,\n 'lw-h-[135px]': currency,\n })}\n >\n <ChartError />\n </div>\n )}\n {!loading && !showError && (\n <div className=\"lw-mt-2 lw-h-8\">\n <LastUpdated timestamp={data?.currencyStrength![0]?.updatedAt} labelCallback={lang} />\n </div>\n )}\n </>\n );\n};\n\nexport { ChartWithData };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SACEC,UAAU,EACVC,WAAW,EACXC,IAAI,EACJC,OAAO,EACPC,WAAW,EACXC,iBAAiB,QACZ,2BAA2B;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,mBAAmB,QAAQ,4BAA4B;AAEhE,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,cAAc,QAAQ,+BAA+B;AAG9D,MAAMC,aAAa,GAAGC,IAAA,IAA+B;EAAA,IAA9B;IAAEC;EAAsB,CAAC,GAAAD,IAAA;EAC9C,MAAM;IAAEE;EAAK,CAAC,GAAGR,iBAAiB,CAA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YAAY,IAAIA,YAAY,CAACS,GAAG,CAAEP,IAAI,IACrC9B,KAAA,CAAAiC,aAAA;IAAKK,GAAG,EAAER,IAAI,CAACf,QAAS;IAACoB,SAAS,EAAC;EAAkE,GACnGnC,KAAA,CAAAiC,aAAA,CAACtB,KAAK;IACJI,QAAQ,EAAEe,IAAI,CAACf,QAAS;IACxBwB,MAAM,EAAET,IAAI,CAACU,gBAAgB,EAAET,KAAK,CAAC,CAAC,CAACC,IAAI,CAACpB,cAAc;EAAG,CAC9D,CACE,CACN,CACE,CACN,EACA,CAACQ,OAAO,IAAIO,SAAS,IACpB3B,KAAA,CAAAiC,aAAA;IAAKE,SAAS,EAAE1B,UAAU,CAAC,sFAAsF,EAAE;MACjH,cAAc,EAAE,CAACM,QAAQ;MACzB,cAAc,EAAEA;IAClB,CAAC;EAAE,GAEDf,KAAA,CAAAiC,aAAA,CAAC9B,UAAU,MAAE,CACV,CACN,EACA,CAACiB,OAAO,IAAI,CAACO,SAAS,IACrB3B,KAAA,CAAAiC,aAAA;IAAKE,SAAS,EAAC;EAAgB,GAC7BnC,KAAA,CAAAiC,aAAA,CAAC7B,WAAW;IAACqC,SAAS,EAAEpB,IAAI,EAAEI,gBAAgB,CAAE,CAAC,CAAC,EAAEiB,SAAU;IAACC,aAAa,EAAExB;EAAK,CAAE,CAClF,CAEP,CAAC;AAEP,CAAC;AAED,SAASN,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"ChartsWithData.js","names":["useQuery","ChartError","LastUpdated","Size","Spinner","SpinnerSize","useLayoutProvider","useLocale","classnames","React","getCurrencyStrength","Chart","sortCurrencies","ChartWithData","_ref","_data$currencyStrengt","_data$currencyStrengt2","_data$currencyStrengt3","_data$currencyStrengt4","_","currency","size","isDesktop","DESKTOP","lang","loading","data","error","fetchPolicy","showChart","currencyStrength","length","showError","currencyData","filter","item","slice","sort","createElement","Fragment","className","lg","map","_item$strengthRelatio","key","values","strengthRelation","labelCallback","timestamp","updatedAt"],"sources":["../../../src/CurrencyStrengthWidget/ChartsWithData.tsx"],"sourcesContent":["import { useQuery } from '@apollo/client';\nimport {\n ChartError,\n LastUpdated,\n Size,\n Spinner,\n SpinnerSize,\n useLayoutProvider,\n} from '@oanda/labs-widget-common';\nimport { useLocale } from '@oanda/mono-i18n';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { getCurrencyStrength } from '../gql/getCurrencyStrength';\nimport type { GetCurrencyStrengthQuery } from '../gql/types/graphql';\nimport { Chart } from './components/Chart';\nimport { sortCurrencies } from './components/Chart/formatters';\nimport type { WidgetProps } from './types';\n\nconst ChartWithData = ({ currency }: WidgetProps) => {\n const { size } = useLayoutProvider();\n const isDesktop = size === Size.DESKTOP;\n const { lang } = useLocale();\n const { loading, data, error } = useQuery<GetCurrencyStrengthQuery>(\n getCurrencyStrength,\n {\n fetchPolicy: 'cache-and-network',\n }\n );\n\n const showChart =\n data?.currencyStrength && data?.currencyStrength?.length > 0;\n const showError = data?.currencyStrength?.length === 0 || error;\n\n const currencyData = currency\n ? data?.currencyStrength?.filter((item) => item.currency === currency)\n : data?.currencyStrength?.slice().sort(sortCurrencies);\n\n return (\n <>\n {loading && (\n <div\n className={classnames(\n 'lw-flex lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary',\n {\n 'lw-h-[461px]': !currency,\n 'lw-h-[135px]': currency,\n }\n )}\n >\n <Spinner size={SpinnerSize.lg} />\n </div>\n )}\n {!loading && showChart && (\n <div\n className={classnames('lw-grid lw-place-content-center lw-gap-7', {\n 'lw-grid-cols-3 ': isDesktop && !currency,\n 'lw-grid-cols-1': !isDesktop || currency,\n })}\n data-testid=\"currency-strength-chart-wrapper\"\n >\n {currencyData &&\n currencyData.map((item) => (\n <div\n key={item.currency}\n className=\"lw-flex lw-h-[135px] lw-flex-1 lw-items-center lw-justify-center\"\n >\n <Chart\n currency={item.currency}\n values={item.strengthRelation?.slice().sort(sortCurrencies)!}\n />\n </div>\n ))}\n </div>\n )}\n {!loading && showError && (\n <div\n className={classnames(\n 'lw-flex lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary',\n {\n 'lw-h-[425px]': !currency,\n 'lw-h-[135px]': currency,\n }\n )}\n >\n <ChartError />\n </div>\n )}\n {!loading && !showError && (\n <div className=\"lw-mt-2 lw-h-8\">\n <LastUpdated\n labelCallback={lang}\n timestamp={data?.currencyStrength![0]?.updatedAt}\n />\n </div>\n )}\n </>\n );\n};\n\nexport { ChartWithData };\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAgB;AACzC,SACEC,UAAU,EACVC,WAAW,EACXC,IAAI,EACJC,OAAO,EACPC,WAAW,EACXC,iBAAiB,QACZ,2BAA2B;AAClC,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,mBAAmB,QAAQ,4BAA4B;AAEhE,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,cAAc,QAAQ,+BAA+B;AAG9D,MAAMC,aAAa,GAAGC,IAAA,IAA+B;EAAA,IAAAC,qBAAA,EAAAC,sBAAA,EAAAC,sBAAA,EAAAC,sBAAA,EAAAC,CAAA;EAAA,IAA9B;IAAEC;EAAsB,CAAC,GAAAN,IAAA;EAC9C,MAAM;IAAEO;EAAK,CAAC,GAAGf,iBAAiB,CAAC,CAAC;EACpC,MAAMgB,SAAS,GAAGD,IAAI,KAAKlB,IAAI,CAACoB,OAAO;EACvC,MAAM;IAAEC;EAAK,CAAC,GAAGjB,SAAS,CAAC,CAAC;EAC5B,MAAM;IAAEkB,OAAO;IAAEC,IAAI;IAAEC;EAAM,CAAC,GAAG3B,QAAQ,CACvCU,mBAAmB,EACnB;IACEkB,WAAW,EAAE;EACf,CACF,CAAC;EAED,MAAMC,SAAS,GACb,CAAAH,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEI,gBAAgB,KAAI,CAAAJ,IAAI,aAAJA,IAAI,gBAAAX,qBAAA,G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A,IAAAQ,qBAAA;IAAA,OACpBlC,KAAA,CAAA6B,aAAA;MACEM,GAAG,EAAET,IAAI,CAACf,QAAS;MACnBoB,SAAS,EAAC;IAAkE,GAE5E/B,KAAA,CAAA6B,aAAA,CAAC3B,KAAK;MACJS,QAAQ,EAAEe,IAAI,CAACf,QAAS;MACxByB,MAAM,GAAAF,qBAAA,GAAER,IAAI,CAACW,gBAAgB,cAAAH,qBAAA,uBAArBA,qBAAA,CAAuBP,KAAK,CAAC,CAAC,CAACC,IAAI,CAACzB,cAAc;IAAG,CAC9D,CACE,CAAC;EAAA,CACP,CACA,CACN,EACA,CAACa,OAAO,IAAIO,SAAS,IACpBvB,KAAA,CAAA6B,aAAA;IACEE,SAAS,EAAEhC,UAAU,CACnB,sFAAsF,EACtF;MACE,cAAc,EAAE,CAACY,QAAQ;MACzB,cAAc,EAAEA;IAClB,CACF;EAAE,GAEFX,KAAA,CAAA6B,aAAA,CAACrC,UAAU,MAAE,CACV,CACN,EACA,CAACwB,OAAO,IAAI,CAACO,SAAS,IACrBvB,KAAA,CAAA6B,aAAA;IAAKE,SAAS,EAAC;EAAgB,GAC7B/B,KAAA,CAAA6B,aAAA,CAACpC,WAAW;IACV6C,aAAa,EAAEvB,IAAK;IACpBwB,SAAS,EAAEtB,IAAI,aAAJA,IAAI,gBAAAP,CAAA,GAAJO,IAAI,CAAEI,gBAAgB,CAAE,CAAC,CAAC,cAAAX,CAAA,uBAA1BA,CAAA,CAA4B8B;EAAU,CAClD,CACE,CAEP,CAAC;AAEP,CAAC;AAED,SAASpC,aAAa","ignoreList":[]}
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
1
  import { ApolloClient, InMemoryCache } from '@apollo/client';
3
2
  import { WidgetProvider, WidgetWrapper } from '@oanda/labs-widget-common';
3
+ import React from 'react';
4
4
  import { translations } from '../translations';
5
5
  import { Main } from './Main';
6
6
  const CurrencyStrengthWidget = _ref => {
@@ -17,14 +17,14 @@ const CurrencyStrengthWidget = _ref => {
17
17
  cache: new InMemoryCache()
18
18
  });
19
19
  return React.createElement(WidgetProvider, {
20
- locale: locale,
21
- translations: translations,
22
20
  client: client,
23
- theme: theme
21
+ locale: locale,
22
+ theme: theme,
23
+ translations: translations
24
24
  }, React.createElement(WidgetWrapper, {
25
- logoLink: logoLink,
25
+ isParamError: isParamError,
26
26
  linkArea: "logo",
27
- isParamError: isParamError
27
+ logoLink: logoLink
28
28
  }, React.createElement(Main, {
29
29
  currency: currency,
30
30
  theme: theme
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyStrengthWidget.js","names":["React","ApolloClient","InMemoryCache","WidgetProvider","WidgetWrapper","translations","Main","CurrencyStrengthWidget","_ref","graphqlUrl","currency","locale","theme","isParamError","logoLink","client","uri","cache","createElement","linkArea"],"sources":["../../../src/CurrencyStrengthWidget/CurrencyStrengthWidget.tsx"],"sourcesContent":["import React from 'react';\nimport { ApolloClient, InMemoryCache } from '@apollo/client';\nimport { WidgetProvider, WidgetWrapper } from '@oanda/labs-widget-common';\nimport { CurrencyStrengthConfig } from './types';\nimport { translations } from '../translations';\nimport { Main } from './Main';\n\nconst CurrencyStrengthWidget = ({\n graphqlUrl, currency, locale, theme, isParamError, logoLink,\n}: CurrencyStrengthConfig) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n return (\n <WidgetProvider\n locale={locale}\n translations={translations}\n client={client}\n theme={theme}\n >\n <WidgetWrapper\n logoLink={logoLink}\n linkArea=\"logo\"\n isParamError={isParamError}\n >\n <Main currency={currency} theme={theme} />\n </WidgetWrapper>\n </WidgetProvider>\n );\n};\n\nexport { CurrencyStrengthWidget };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,EAAEC,aAAa,QAAQ,gBAAgB;AAC5D,SAASC,cAAc,EAAEC,aAAa,QAAQ,2BAA2B;AAEzE,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,IAAI,QAAQ,QAAQ;AAE7B,MAAMC,sBAAsB,GAAGC,IAAA,IAED;EAAA,IAFE;IAC9BC,UAAU;IAAEC,QAAQ;IAAEC,MAAM;IAAEC,KAAK;IAAEC,YAAY;IAAEC;EAC7B,CAAC,GAAAN,IAAA;EACvB,MAAMO,MAAM,GAAG,IAAId,YAAY,CAAC;IAC9Be,GAAG,EAAEP,UAAU;IACfQ,KAAK,EAAE,IAAIf,aAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,OACEF,KAAA,CAAAkB,aAAA,CAACf,cAAc;IACbQ,MAAM,EAAEA,MAAO;IACfN,YAAY,EAAEA,YAAa;IAC3BU,MAAM,EAAEA,MAAO;IACfH,KAAK,EAAEA;EAAM,GAEbZ,KAAA,CAAAkB,aAAA,CAACd,aAAa;IACZU,QAAQ,EAAEA,QAAS;IACnBK,QAAQ,EAAC,MAAM;IACfN,YAAY,EAAEA;EAAa,GAE3Bb,KAAA,CAAAkB,aAAA,CAACZ,IAAI;IAACI,QAAQ,EAAEA,QAAS;IAACE,KAAK,EAAEA;EAAM,CAAE,CAC5B,CACD,CAAC;AAErB,CAAC;AAED,SAASL,sBAAsB","ignoreList":[]}
1
+ {"version":3,"file":"CurrencyStrengthWidget.js","names":["ApolloClient","InMemoryCache","WidgetProvider","WidgetWrapper","React","translations","Main","CurrencyStrengthWidget","_ref","graphqlUrl","currency","locale","theme","isParamError","logoLink","client","uri","cache","createElement","linkArea"],"sources":["../../../src/CurrencyStrengthWidget/CurrencyStrengthWidget.tsx"],"sourcesContent":["import { ApolloClient, InMemoryCache } from '@apollo/client';\nimport { WidgetProvider, WidgetWrapper } from '@oanda/labs-widget-common';\nimport React from 'react';\n\nimport { translations } from '../translations';\nimport { Main } from './Main';\nimport type { CurrencyStrengthConfig } from './types';\n\nconst CurrencyStrengthWidget = ({\n graphqlUrl,\n currency,\n locale,\n theme,\n isParamError,\n logoLink,\n}: CurrencyStrengthConfig) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n return (\n <WidgetProvider\n client={client}\n locale={locale}\n theme={theme}\n translations={translations}\n >\n <WidgetWrapper\n isParamError={isParamError}\n linkArea=\"logo\"\n logoLink={logoLink}\n >\n <Main currency={currency} theme={theme} />\n </WidgetWrapper>\n </WidgetProvider>\n );\n};\n\nexport { CurrencyStrengthWidget };\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,aAAa,QAAQ,gBAAgB;AAC5D,SAASC,cAAc,EAAEC,aAAa,QAAQ,2BAA2B;AACzE,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,IAAI,QAAQ,QAAQ;AAG7B,MAAMC,sBAAsB,GAAGC,IAAA,IAOD;EAAA,IAPE;IAC9BC,UAAU;IACVC,QAAQ;IACRC,MAAM;IACNC,KAAK;IACLC,YAAY;IACZC;EACsB,CAAC,GAAAN,IAAA;EACvB,MAAMO,MAAM,GAAG,IAAIf,YAAY,CAAC;IAC9BgB,GAAG,EAAEP,UAAU;IACfQ,KAAK,EAAE,IAAIhB,aAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,OACEG,KAAA,CAAAc,aAAA,CAAChB,cAAc;IACba,MAAM,EAAEA,MAAO;IACfJ,MAAM,EAAEA,MAAO;IACfC,KAAK,EAAEA,KAAM;IACbP,YAAY,EAAEA;EAAa,GAE3BD,KAAA,CAAAc,aAAA,CAACf,aAAa;IACZU,YAAY,EAAEA,YAAa;IAC3BM,QAAQ,EAAC,MAAM;IACfL,QAAQ,EAAEA;EAAS,GAEnBV,KAAA,CAAAc,aAAA,CAACZ,IAAI;IAACI,QAAQ,EAAEA,QAAS;IAACE,KAAK,EAAEA;EAAM,CAAE,CAC5B,CACD,CAAC;AAErB,CAAC;AAED,SAASL,sBAAsB","ignoreList":[]}
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { useLocale } from '@oanda/mono-i18n';
3
1
  import { useLayoutProvider } from '@oanda/labs-widget-common';
2
+ import { useLocale } from '@oanda/mono-i18n';
3
+ import React from 'react';
4
4
  import { ChartWithData } from './ChartsWithData';
5
5
  const Main = _ref => {
6
6
  let {
@@ -16,9 +16,9 @@ const Main = _ref => {
16
16
  "data-testid": "currency-strength-wrapper"
17
17
  }, React.createElement("div", {
18
18
  className: "lw-mb-8 lw-flex lw-justify-center lw-font-sans lw-text-lg lw-font-bold"
19
- }, React.createElement("span", null, `${lang('daily')} (${lang('minute', {
19
+ }, React.createElement("span", null, "".concat(lang('daily'), " (").concat(lang('minute', {
20
20
  count: 5
21
- })})`)), React.createElement(ChartWithData, {
21
+ }), ")"))), React.createElement(ChartWithData, {
22
22
  currency: currency
23
23
  })));
24
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Main.js","names":["React","useLocale","useLayoutProvider","ChartWithData","Main","_ref","currency","lang","size","createElement","Fragment","className","count"],"sources":["../../../src/CurrencyStrengthWidget/Main.tsx"],"sourcesContent":["import React from 'react';\nimport { useLocale } from '@oanda/mono-i18n';\nimport { useLayoutProvider } from '@oanda/labs-widget-common';\nimport { ChartWithData } from './ChartsWithData';\nimport { WidgetProps } from './types';\n\nconst Main = ({ currency }: WidgetProps) => {\n const { lang } = useLocale();\n const { size } = useLayoutProvider();\n\n return (\n <>\n {size && (\n <div data-testid=\"currency-strength-wrapper\">\n <div className=\"lw-mb-8 lw-flex lw-justify-center lw-font-sans lw-text-lg lw-font-bold\">\n <span>{`${lang('daily')} (${lang('minute', { count: 5 })})`}</span>\n </div>\n <ChartWithData currency={currency} />\n </div>\n )}\n </>\n );\n};\n\nexport { Main };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SAASC,iBAAiB,QAAQ,2BAA2B;AAC7D,SAASC,aAAa,QAAQ,kBAAkB;AAGhD,MAAMC,IAAI,GAAGC,IAAA,IAA+B;EAAA,IAA9B;IAAEC;EAAsB,CAAC,GAAAD,IAAA;EACrC,MAAM;IAAEE;EAAK,CAAC,GAAGN,SAAS,CAAC,CAAC;EAC5B,MAAM;IAAEO;EAAK,CAAC,GAAGN,iBAAiB,CAAC,CAAC;EAEpC,OACEF,KAAA,CAAAS,aAAA,CAAAT,KAAA,CAAAU,QAAA,QACGF,IAAI,IACLR,KAAA,CAAAS,aAAA;IAAK,eAAY;EAA2B,GAC1CT,KAAA,CAAAS,aAAA;IAAKE,SAAS,EAAC;EAAwE,GACrFX,KAAA,CAAAS,aAAA,eAAO,GAAGF,IAAI,CAAC,OAAO,CAAC,KAAKA,IAAI,CAAC,QAAQ,EAAE;IAAEK,KAAK,EAAE;EAAE,CAAC,CAAC,GAAU,CAC/D,CAAC,EACNZ,KAAA,CAAAS,aAAA,CAACN,aAAa;IAACG,QAAQ,EAAEA;EAAS,CAAE,CACjC,CAEL,CAAC;AAEP,CAAC;AAED,SAASF,IAAI","ignoreList":[]}
1
+ {"version":3,"file":"Main.js","names":["useLayoutProvider","useLocale","React","ChartWithData","Main","_ref","currency","lang","size","createElement","Fragment","className","concat","count"],"sources":["../../../src/CurrencyStrengthWidget/Main.tsx"],"sourcesContent":["import { useLayoutProvider } from '@oanda/labs-widget-common';\nimport { useLocale } from '@oanda/mono-i18n';\nimport React from 'react';\n\nimport { ChartWithData } from './ChartsWithData';\nimport type { WidgetProps } from './types';\n\nconst Main = ({ currency }: WidgetProps) => {\n const { lang } = useLocale();\n const { size } = useLayoutProvider();\n\n return (\n <>\n {size && (\n <div data-testid=\"currency-strength-wrapper\">\n <div className=\"lw-mb-8 lw-flex lw-justify-center lw-font-sans lw-text-lg lw-font-bold\">\n <span>{`${lang('daily')} (${lang('minute', { count: 5 })})`}</span>\n </div>\n <ChartWithData currency={currency} />\n </div>\n )}\n </>\n );\n};\n\nexport { Main };\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,2BAA2B;AAC7D,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,aAAa,QAAQ,kBAAkB;AAGhD,MAAMC,IAAI,GAAGC,IAAA,IAA+B;EAAA,IAA9B;IAAEC;EAAsB,CAAC,GAAAD,IAAA;EACrC,MAAM;IAAEE;EAAK,CAAC,GAAGN,SAAS,CAAC,CAAC;EAC5B,MAAM;IAAEO;EAAK,CAAC,GAAGR,iBAAiB,CAAC,CAAC;EAEpC,OACEE,KAAA,CAAAO,aAAA,CAAAP,KAAA,CAAAQ,QAAA,QACGF,IAAI,IACHN,KAAA,CAAAO,aAAA;IAAK,eAAY;EAA2B,GAC1CP,KAAA,CAAAO,aAAA;IAAKE,SAAS,EAAC;EAAwE,GACrFT,KAAA,CAAAO,aAAA,kBAAAG,MAAA,CAAUL,IAAI,CAAC,OAAO,CAAC,QAAAK,MAAA,CAAKL,IAAI,CAAC,QAAQ,EAAE;IAAEM,KAAK,EAAE;EAAE,CAAC,CAAC,MAAU,CAC/D,CAAC,EACNX,KAAA,CAAAO,aAAA,CAACN,aAAa;IAACG,QAAQ,EAAEA;EAAS,CAAE,CACjC,CAEP,CAAC;AAEP,CAAC;AAED,SAASF,IAAI","ignoreList":[]}
@@ -1,11 +1,11 @@
1
- import React from 'react';
2
- import ReactEChartsCore from 'echarts-for-react/lib/core';
3
- import * as echarts from 'echarts/core';
1
+ import { getChartTheme, Theme, useLayoutProvider } from '@oanda/labs-widget-common';
2
+ import { useLocale } from '@oanda/mono-i18n';
4
3
  import { BarChart } from 'echarts/charts';
4
+ import { GraphicComponent, GridSimpleComponent, TitleComponent, TooltipComponent } from 'echarts/components';
5
+ import * as echarts from 'echarts/core';
5
6
  import { CanvasRenderer } from 'echarts/renderers';
6
- import { GridSimpleComponent, GraphicComponent, TooltipComponent, TitleComponent } from 'echarts/components';
7
- import { useLocale } from '@oanda/mono-i18n';
8
- import { Theme, useLayoutProvider, getChartTheme } from '@oanda/labs-widget-common';
7
+ import ReactEChartsCore from 'echarts-for-react/lib/core';
8
+ import React from 'react';
9
9
  import { CHART_HEIGHT } from './constants';
10
10
  import { getOption } from './getOption';
11
11
  echarts.use([GridSimpleComponent, GraphicComponent, TooltipComponent, TitleComponent, BarChart, CanvasRenderer]);
@@ -24,17 +24,17 @@ const Chart = _ref => {
24
24
  } = useLayoutProvider();
25
25
  return React.createElement(ReactEChartsCore, {
26
26
  echarts: echarts,
27
- theme: isDark ? 'dark_theme' : 'light_theme',
28
- style: {
29
- height: `${CHART_HEIGHT}px`,
30
- width: '100%'
31
- },
32
27
  option: getOption({
33
28
  values,
34
29
  currency,
35
30
  lang,
36
31
  isDark
37
- })
32
+ }),
33
+ style: {
34
+ height: "".concat(CHART_HEIGHT, "px"),
35
+ width: '100%'
36
+ },
37
+ theme: isDark ? 'dark_theme' : 'light_theme'
38
38
  });
39
39
  };
40
40
  export { Chart };
@@ -1 +1 @@
1
- {"version":3,"file":"Chart.js","names":["React","ReactEChartsCore","echarts","BarChart","CanvasRenderer","GridSimpleComponent","GraphicComponent","TooltipComponent","TitleComponent","useLocale","Theme","useLayoutProvider","getChartTheme","CHART_HEIGHT","getOption","use","registerTheme","Dark","Light","Chart","_ref","values","currency","lang","isDark","createElement","theme","style","height","width","option"],"sources":["../../../../../src/CurrencyStrengthWidget/components/Chart/Chart.tsx"],"sourcesContent":["import React from 'react';\nimport ReactEChartsCore from 'echarts-for-react/lib/core';\nimport * as echarts from 'echarts/core';\nimport { BarChart } from 'echarts/charts';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport {\n GridSimpleComponent, GraphicComponent, TooltipComponent, TitleComponent,\n} from 'echarts/components';\nimport { useLocale } from '@oanda/mono-i18n';\nimport { Theme, useLayoutProvider, getChartTheme } from '@oanda/labs-widget-common';\nimport {\n CHART_HEIGHT,\n} from './constants';\nimport { getOption } from './getOption';\nimport { ChartProps } from './types';\n\necharts.use([\n GridSimpleComponent,\n GraphicComponent,\n TooltipComponent,\n TitleComponent,\n BarChart,\n CanvasRenderer,\n]);\n\necharts.registerTheme('dark_theme', getChartTheme(Theme.Dark));\necharts.registerTheme('light_theme', getChartTheme(Theme.Light));\n\nconst Chart = ({ values, currency }: ChartProps) => {\n const { lang } = useLocale();\n const { isDark } = useLayoutProvider();\n\n return (\n <ReactEChartsCore\n echarts={echarts}\n theme={isDark ? 'dark_theme' : 'light_theme'}\n style={{\n height: `${CHART_HEIGHT}px`,\n width: '100%',\n }}\n option={getOption({\n values, currency, lang, isDark,\n })}\n />\n );\n};\n\nexport { Chart };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,gBAAgB,MAAM,4BAA4B;AACzD,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SACEC,mBAAmB,EAAEC,gBAAgB,EAAEC,gBAAgB,EAAEC,cAAc,QAClE,oBAAoB;AAC3B,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SAASC,KAAK,EAAEC,iBAAiB,EAAEC,aAAa,QAAQ,2BAA2B;AACnF,SACEC,YAAY,QACP,aAAa;AACpB,SAASC,SAAS,QAAQ,aAAa;AAGvCZ,OAAO,CAACa,GAAG,CAAC,CACVV,mBAAmB,EACnBC,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAc,EACdL,QAAQ,EACRC,cAAc,CACf,CAAC;AAEFF,OAAO,CAACc,aAAa,CAAC,YAAY,EAAEJ,aAAa,CAACF,KAAK,CAACO,IAAI,CAAC,CAAC;AAC9Df,OAAO,CAACc,aAAa,CAAC,aAAa,EAAEJ,aAAa,CAACF,KAAK,CAACQ,KAAK,CAAC,CAAC;AAEhE,MAAMC,KAAK,GAAGC,IAAA,IAAsC;EAAA,IAArC;IAAEC,MAAM;IAAEC;EAAqB,CAAC,GAAAF,IAAA;EAC7C,MAAM;IAAEG;EAAK,CAAC,GAAGd,SAAS,CAAC,CAAC;EAC5B,MAAM;IAAEe;EAAO,CAAC,GAAGb,iBAAiB,CAAC,CAAC;EAEtC,OACEX,KAAA,CAAAyB,aAAA,CAACxB,gBAAgB;IACfC,OAAO,EAAEA,OAAQ;IACjBwB,KAAK,EAAEF,MAAM,GAAG,YAAY,GAAG,aAAc;IAC7CG,KAAK,EAAE;MACLC,MAAM,EAAE,GAAGf,YAAY,IAAI;MAC3BgB,KAAK,EAAE;IACT,CAAE;IACFC,MAAM,EAAEhB,SAAS,CAAC;MAChBO,MAAM;MAAEC,QAAQ;MAAEC,IAAI;MAAEC;IAC1B,CAAC;EAAE,CACJ,CAAC;AAEN,CAAC;AAED,SAASL,KAAK","ignoreList":[]}
1
+ {"version":3,"file":"Chart.js","names":["getChartTheme","Theme","useLayoutProvider","useLocale","BarChart","GraphicComponent","GridSimpleComponent","TitleComponent","TooltipComponent","echarts","CanvasRenderer","ReactEChartsCore","React","CHART_HEIGHT","getOption","use","registerTheme","Dark","Light","Chart","_ref","values","currency","lang","isDark","createElement","option","style","height","concat","width","theme"],"sources":["../../../../../src/CurrencyStrengthWidget/components/Chart/Chart.tsx"],"sourcesContent":["import {\n getChartTheme,\n Theme,\n useLayoutProvider,\n} from '@oanda/labs-widget-common';\nimport { useLocale } from '@oanda/mono-i18n';\nimport { BarChart } from 'echarts/charts';\nimport {\n GraphicComponent,\n GridSimpleComponent,\n TitleComponent,\n TooltipComponent,\n} from 'echarts/components';\nimport * as echarts from 'echarts/core';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport ReactEChartsCore from 'echarts-for-react/lib/core';\nimport React from 'react';\n\nimport { CHART_HEIGHT } from './constants';\nimport { getOption } from './getOption';\nimport type { ChartProps } from './types';\n\necharts.use([\n GridSimpleComponent,\n GraphicComponent,\n TooltipComponent,\n TitleComponent,\n BarChart,\n CanvasRenderer,\n]);\n\necharts.registerTheme('dark_theme', getChartTheme(Theme.Dark));\necharts.registerTheme('light_theme', getChartTheme(Theme.Light));\n\nconst Chart = ({ values, currency }: ChartProps) => {\n const { lang } = useLocale();\n const { isDark } = useLayoutProvider();\n\n return (\n <ReactEChartsCore\n echarts={echarts}\n option={getOption({\n values,\n currency,\n lang,\n isDark,\n })}\n style={{\n height: `${CHART_HEIGHT}px`,\n width: '100%',\n }}\n theme={isDark ? 'dark_theme' : 'light_theme'}\n />\n );\n};\n\nexport { Chart };\n"],"mappings":"AAAA,SACEA,aAAa,EACbC,KAAK,EACLC,iBAAiB,QACZ,2BAA2B;AAClC,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SACEC,gBAAgB,EAChBC,mBAAmB,EACnBC,cAAc,EACdC,gBAAgB,QACX,oBAAoB;AAC3B,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,SAASC,cAAc,QAAQ,mBAAmB;AAClD,OAAOC,gBAAgB,MAAM,4BAA4B;AACzD,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,YAAY,QAAQ,aAAa;AAC1C,SAASC,SAAS,QAAQ,aAAa;AAGvCL,OAAO,CAACM,GAAG,CAAC,CACVT,mBAAmB,EACnBD,gBAAgB,EAChBG,gBAAgB,EAChBD,cAAc,EACdH,QAAQ,EACRM,cAAc,CACf,CAAC;AAEFD,OAAO,CAACO,aAAa,CAAC,YAAY,EAAEhB,aAAa,CAACC,KAAK,CAACgB,IAAI,CAAC,CAAC;AAC9DR,OAAO,CAACO,aAAa,CAAC,aAAa,EAAEhB,aAAa,CAACC,KAAK,CAACiB,KAAK,CAAC,CAAC;AAEhE,MAAMC,KAAK,GAAGC,IAAA,IAAsC;EAAA,IAArC;IAAEC,MAAM;IAAEC;EAAqB,CAAC,GAAAF,IAAA;EAC7C,MAAM;IAAEG;EAAK,CAAC,GAAGpB,SAAS,CAAC,CAAC;EAC5B,MAAM;IAAEqB;EAAO,CAAC,GAAGtB,iBAAiB,CAAC,CAAC;EAEtC,OACEU,KAAA,CAAAa,aAAA,CAACd,gBAAgB;IACfF,OAAO,EAAEA,OAAQ;IACjBiB,MAAM,EAAEZ,SAAS,CAAC;MAChBO,MAAM;MACNC,QAAQ;MACRC,IAAI;MACJC;IACF,CAAC,CAAE;IACHG,KAAK,EAAE;MACLC,MAAM,KAAAC,MAAA,CAAKhB,YAAY,OAAI;MAC3BiB,KAAK,EAAE;IACT,CAAE;IACFC,KAAK,EAAEP,MAAM,GAAG,YAAY,GAAG;EAAc,CAC9C,CAAC;AAEN,CAAC;AAED,SAASL,KAAK","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":["colorPalette","CurrencyName","X_LABEL_SIZE","Y_LABEL_SIZE","CHART_WIDTH","CHART_HEIGHT","darkBarColors","positive","bottleGreenLight","negative","orange","zero","grayLight","lightBarColors","raspberryDark","instrumentsConfig","Usd","Eur","Gbp","Cad","Aud","Chf","Jpy","Nzd"],"sources":["../../../../../src/CurrencyStrengthWidget/components/Chart/constants.tsx"],"sourcesContent":["import { colorPalette } from '@oanda/labs-widget-common';\nimport { CurrencyName } from '../../../gql/types/graphql';\n\nexport const X_LABEL_SIZE = 24;\nexport const Y_LABEL_SIZE = 30;\nexport const CHART_WIDTH = 9999;\nexport const CHART_HEIGHT = 135;\n\nexport const darkBarColors = {\n positive: colorPalette.bottleGreenLight,\n negative: colorPalette.orange,\n zero: colorPalette.grayLight,\n};\n\nexport const lightBarColors = {\n positive: colorPalette.bottleGreenLight,\n negative: colorPalette.raspberryDark,\n zero: colorPalette.grayLight,\n};\n\nexport const instrumentsConfig = [\n CurrencyName.Usd,\n CurrencyName.Eur,\n CurrencyName.Gbp,\n CurrencyName.Cad,\n CurrencyName.Aud,\n CurrencyName.Chf,\n CurrencyName.Jpy,\n CurrencyName.Nzd,\n];\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,2BAA2B;AACxD,SAASC,YAAY,QAAQ,4BAA4B;AAEzD,OAAO,MAAMC,YAAY,GAAG,EAAE;AAC9B,OAAO,MAAMC,YAAY,GAAG,EAAE;AAC9B,OAAO,MAAMC,WAAW,GAAG,IAAI;AAC/B,OAAO,MAAMC,YAAY,GAAG,GAAG;AAE/B,OAAO,MAAMC,aAAa,GAAG;EAC3BC,QAAQ,EAAEP,YAAY,CAACQ,gBAAgB;EACvCC,QAAQ,EAAET,YAAY,CAACU,MAAM;EAC7BC,IAAI,EAAEX,YAAY,CAACY;AACrB,CAAC;AAED,OAAO,MAAMC,cAAc,GAAG;EAC5BN,QAAQ,EAAEP,YAAY,CAACQ,gBAAgB;EACvCC,QAAQ,EAAET,YAAY,CAACc,aAAa;EACpCH,IAAI,EAAEX,YAAY,CAACY;AACrB,CAAC;AAED,OAAO,MAAMG,iBAAiB,GAAG,CAC/Bd,YAAY,CAACe,GAAG,EAChBf,YAAY,CAACgB,GAAG,EAChBhB,YAAY,CAACiB,GAAG,EAChBjB,YAAY,CAACkB,GAAG,EAChBlB,YAAY,CAACmB,GAAG,EAChBnB,YAAY,CAACoB,GAAG,EAChBpB,YAAY,CAACqB,GAAG,EAChBrB,YAAY,CAACsB,GAAG,CACjB","ignoreList":[]}
1
+ {"version":3,"file":"constants.js","names":["colorPalette","CurrencyName","X_LABEL_SIZE","Y_LABEL_SIZE","CHART_WIDTH","CHART_HEIGHT","darkBarColors","positive","bottleGreenLight","negative","orange","zero","grayLight","lightBarColors","raspberryDark","instrumentsConfig","Usd","Eur","Gbp","Cad","Aud","Chf","Jpy","Nzd"],"sources":["../../../../../src/CurrencyStrengthWidget/components/Chart/constants.tsx"],"sourcesContent":["import { colorPalette } from '@oanda/labs-widget-common';\n\nimport { CurrencyName } from '../../../gql/types/graphql';\n\nexport const X_LABEL_SIZE = 24;\nexport const Y_LABEL_SIZE = 30;\nexport const CHART_WIDTH = 9999;\nexport const CHART_HEIGHT = 135;\n\nexport const darkBarColors = {\n positive: colorPalette.bottleGreenLight,\n negative: colorPalette.orange,\n zero: colorPalette.grayLight,\n};\n\nexport const lightBarColors = {\n positive: colorPalette.bottleGreenLight,\n negative: colorPalette.raspberryDark,\n zero: colorPalette.grayLight,\n};\n\nexport const instrumentsConfig = [\n CurrencyName.Usd,\n CurrencyName.Eur,\n CurrencyName.Gbp,\n CurrencyName.Cad,\n CurrencyName.Aud,\n CurrencyName.Chf,\n CurrencyName.Jpy,\n CurrencyName.Nzd,\n];\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,2BAA2B;AAExD,SAASC,YAAY,QAAQ,4BAA4B;AAEzD,OAAO,MAAMC,YAAY,GAAG,EAAE;AAC9B,OAAO,MAAMC,YAAY,GAAG,EAAE;AAC9B,OAAO,MAAMC,WAAW,GAAG,IAAI;AAC/B,OAAO,MAAMC,YAAY,GAAG,GAAG;AAE/B,OAAO,MAAMC,aAAa,GAAG;EAC3BC,QAAQ,EAAEP,YAAY,CAACQ,gBAAgB;EACvCC,QAAQ,EAAET,YAAY,CAACU,MAAM;EAC7BC,IAAI,EAAEX,YAAY,CAACY;AACrB,CAAC;AAED,OAAO,MAAMC,cAAc,GAAG;EAC5BN,QAAQ,EAAEP,YAAY,CAACQ,gBAAgB;EACvCC,QAAQ,EAAET,YAAY,CAACc,aAAa;EACpCH,IAAI,EAAEX,YAAY,CAACY;AACrB,CAAC;AAED,OAAO,MAAMG,iBAAiB,GAAG,CAC/Bd,YAAY,CAACe,GAAG,EAChBf,YAAY,CAACgB,GAAG,EAChBhB,YAAY,CAACiB,GAAG,EAChBjB,YAAY,CAACkB,GAAG,EAChBlB,YAAY,CAACmB,GAAG,EAChBnB,YAAY,CAACoB,GAAG,EAChBpB,YAAY,CAACqB,GAAG,EAChBrB,YAAY,CAACsB,GAAG,CACjB","ignoreList":[]}
@@ -7,12 +7,8 @@ const tooltipFormatter = _ref => {
7
7
  currency,
8
8
  lang
9
9
  } = _ref;
10
- return `
11
- <div>
12
- <div style="margin-bottom:5px;">${currency} ${lang('vs')} ${name}</div>
13
- <div style="display:flex;align-items:center;">${marker} ${value}%</div>
14
- </div>`;
10
+ return "\n<div>\n <div style=\"margin-bottom:5px;\">".concat(currency, " ").concat(lang('vs'), " ").concat(name, "</div>\n <div style=\"display:flex;align-items:center;\">").concat(marker, " ").concat(value, "%</div>\n</div>");
15
11
  };
16
12
  const sortCurrencies = (a, b) => instrumentsConfig.indexOf(a.currency) - instrumentsConfig.indexOf(b.currency);
17
- export { tooltipFormatter, sortCurrencies };
13
+ export { sortCurrencies, tooltipFormatter };
18
14
  //# sourceMappingURL=formatters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatters.js","names":["instrumentsConfig","tooltipFormatter","_ref","marker","name","value","currency","lang","sortCurrencies","a","b","indexOf"],"sources":["../../../../../src/CurrencyStrengthWidget/components/Chart/formatters.ts"],"sourcesContent":["import { instrumentsConfig } from './constants';\nimport { SortingParams, TooltipFormatterParams } from './types';\n\nconst tooltipFormatter = ({\n marker,\n name,\n value,\n currency,\n lang,\n}: TooltipFormatterParams) => `\n<div>\n <div style=\"margin-bottom:5px;\">${currency} ${lang('vs')} ${name}</div>\n <div style=\"display:flex;align-items:center;\">${marker} ${value}%</div>\n</div>`;\n\nconst sortCurrencies = (a: SortingParams, b: SortingParams) => instrumentsConfig\n .indexOf(a.currency) - instrumentsConfig.indexOf(b.currency);\n\nexport {\n tooltipFormatter,\n sortCurrencies,\n};\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,aAAa;AAG/C,MAAMC,gBAAgB,GAAGC,IAAA;EAAA,IAAC;IACxBC,MAAM;IACNC,IAAI;IACJC,KAAK;IACLC,QAAQ;IACRC;EACsB,CAAC,GAAAL,IAAA;EAAA,OAAK;AAC9B;AACA,oCAAoCI,QAAQ,IAAIC,IAAI,CAAC,IAAI,CAAC,IAAIH,IAAI;AAClE,kDAAkDD,MAAM,IAAIE,KAAK;AACjE,OAAO;AAAA;AAEP,MAAMG,cAAc,GAAGA,CAACC,CAAgB,EAAEC,CAAgB,KAAKV,iBAAiB,CAC7EW,OAAO,CAACF,CAAC,CAACH,QAAQ,CAAC,GAAGN,iBAAiB,CAACW,OAAO,CAACD,CAAC,CAACJ,QAAQ,CAAC;AAE9D,SACEL,gBAAgB,EAChBO,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"formatters.js","names":["instrumentsConfig","tooltipFormatter","_ref","marker","name","value","currency","lang","concat","sortCurrencies","a","b","indexOf"],"sources":["../../../../../src/CurrencyStrengthWidget/components/Chart/formatters.ts"],"sourcesContent":["import { instrumentsConfig } from './constants';\nimport type { SortingParams, TooltipFormatterParams } from './types';\n\nconst tooltipFormatter = ({\n marker,\n name,\n value,\n currency,\n lang,\n}: TooltipFormatterParams) => `\n<div>\n <div style=\"margin-bottom:5px;\">${currency} ${lang('vs')} ${name}</div>\n <div style=\"display:flex;align-items:center;\">${marker} ${value}%</div>\n</div>`;\n\nconst sortCurrencies = (a: SortingParams, b: SortingParams) =>\n instrumentsConfig.indexOf(a.currency) - instrumentsConfig.indexOf(b.currency);\n\nexport { sortCurrencies, tooltipFormatter };\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,aAAa;AAG/C,MAAMC,gBAAgB,GAAGC,IAAA;EAAA,IAAC;IACxBC,MAAM;IACNC,IAAI;IACJC,KAAK;IACLC,QAAQ;IACRC;EACsB,CAAC,GAAAL,IAAA;EAAA,uDAAAM,MAAA,CAEWF,QAAQ,OAAAE,MAAA,CAAID,IAAI,CAAC,IAAI,CAAC,OAAAC,MAAA,CAAIJ,IAAI,gEAAAI,MAAA,CAChBL,MAAM,OAAAK,MAAA,CAAIH,KAAK;AAAA,CAC1D;AAEP,MAAMI,cAAc,GAAGA,CAACC,CAAgB,EAAEC,CAAgB,KACxDX,iBAAiB,CAACY,OAAO,CAACF,CAAC,CAACJ,QAAQ,CAAC,GAAGN,iBAAiB,CAACY,OAAO,CAACD,CAAC,CAACL,QAAQ,CAAC;AAE/E,SAASG,cAAc,EAAER,gBAAgB","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import { getGridLines } from '@oanda/labs-widget-common';
2
- import { CHART_HEIGHT, CHART_WIDTH, X_LABEL_SIZE, Y_LABEL_SIZE, darkBarColors, lightBarColors } from './constants';
2
+ import { CHART_HEIGHT, CHART_WIDTH, darkBarColors, lightBarColors, X_LABEL_SIZE, Y_LABEL_SIZE } from './constants';
3
3
  import { tooltipFormatter } from './formatters';
4
4
  export const getOption = _ref => {
5
5
  let {
@@ -22,7 +22,7 @@ export const getOption = _ref => {
22
22
  animation: false,
23
23
  title: {
24
24
  left: 'center',
25
- text: `${currency} vs`,
25
+ text: "".concat(currency, " vs"),
26
26
  textStyle: {
27
27
  fontSize: 12,
28
28
  lineHeight: 20,
@@ -33,8 +33,8 @@ export const getOption = _ref => {
33
33
  name: 'main-grid',
34
34
  top: '30px',
35
35
  right: '0px',
36
- left: `${Y_LABEL_SIZE}px`,
37
- bottom: `${X_LABEL_SIZE}px`
36
+ left: "".concat(Y_LABEL_SIZE, "px"),
37
+ bottom: "".concat(X_LABEL_SIZE, "px")
38
38
  }],
39
39
  graphic: [...gridLines],
40
40
  tooltip: {
@@ -1 +1 @@
1
- {"version":3,"file":"getOption.js","names":["getGridLines","CHART_HEIGHT","CHART_WIDTH","X_LABEL_SIZE","Y_LABEL_SIZE","darkBarColors","lightBarColors","tooltipFormatter","getOption","_ref","values","currency","isDark","lang","currencies","map","item","percentages","percentage","barColors","gridLines","chartWidth","chartHeight","xLabelsSize","yLabelSize","animation","title","left","text","textStyle","fontSize","lineHeight","fontWeight","grid","name","top","right","bottom","graphic","tooltip","trigger","formatter","_ref2","marker","value","axisPointer","axis","extraCssText","xAxis","type","data","axisTick","show","axisLine","splitLine","axisLabel","yAxis","position","min","Math","floor","max","ceil","interval","series","emphasis","disabled","itemStyle","opacity","color","_ref3","positive","negative","zero"],"sources":["../../../../../src/CurrencyStrengthWidget/components/Chart/getOption.ts"],"sourcesContent":["import { getGridLines } from '@oanda/labs-widget-common';\nimport {\n CHART_HEIGHT,\n CHART_WIDTH,\n X_LABEL_SIZE,\n Y_LABEL_SIZE,\n darkBarColors,\n lightBarColors,\n} from './constants';\nimport { GetOptionProps } from './types';\nimport { tooltipFormatter } from './formatters';\n\nexport const getOption = ({\n values, currency, isDark, lang,\n}: GetOptionProps) => {\n const currencies = values.map((item) => item.currency);\n const percentages = values.map((item) => item.percentage);\n const barColors = isDark ? darkBarColors : lightBarColors;\n\n const gridLines = getGridLines({\n isDark,\n chartWidth: CHART_WIDTH,\n chartHeight: CHART_HEIGHT,\n xLabelsSize: -2,\n yLabelSize: -3,\n });\n\n return {\n animation: false,\n title: {\n left: 'center',\n text: `${currency} vs`,\n textStyle: {\n fontSize: 12,\n lineHeight: 20,\n fontWeight: 400,\n },\n },\n grid: [\n {\n name: 'main-grid',\n top: '30px',\n right: '0px',\n left: `${Y_LABEL_SIZE}px`,\n bottom: `${X_LABEL_SIZE}px`,\n },\n ],\n graphic: [\n ...gridLines,\n ],\n tooltip: {\n trigger: 'axis',\n formatter: (\n [{ marker, name, value }]\n : { marker: string, name: string, value: number }[],\n ) => tooltipFormatter({\n lang,\n currency,\n marker,\n name,\n value,\n }),\n axisPointer: {\n axis: 'x',\n },\n extraCssText: 'z-index: 1',\n },\n xAxis: {\n type: 'category',\n data: currencies,\n axisTick: { show: false },\n axisLine: { show: false },\n splitLine: { show: false },\n axisLabel: {\n fontSize: 10,\n },\n },\n yAxis: {\n type: 'value',\n position: 'left',\n min: Math.floor(Math.min(...percentages)),\n max: Math.ceil(Math.max(...percentages)),\n interval: 1,\n axisLine: { show: false },\n axisTick: { show: false },\n axisLabel: {\n formatter: '{value}%',\n fontSize: 10,\n },\n },\n series: [\n {\n data: percentages,\n type: 'bar',\n emphasis: {\n disabled: true,\n },\n itemStyle: {\n opacity: 1,\n color: ({ data } : { data: number }) => {\n if (data > 0) {\n return barColors.positive;\n }\n if (data < 0) {\n return barColors.negative;\n }\n return barColors.zero;\n },\n },\n },\n ],\n };\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,2BAA2B;AACxD,SACEC,YAAY,EACZC,WAAW,EACXC,YAAY,EACZC,YAAY,EACZC,aAAa,EACbC,cAAc,QACT,aAAa;AAEpB,SAASC,gBAAgB,QAAQ,cAAc;AAE/C,OAAO,MAAMC,SAAS,GAAGC,IAAA,IAEH;EAAA,IAFI;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,SAAS,CAACsD,IAAI;QACvB;MACF;IACF,CAAC;EAEL,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"getOption.js","names":["getGridLines","CHART_HEIGHT","CHART_WIDTH","darkBarColors","lightBarColors","X_LABEL_SIZE","Y_LABEL_SIZE","tooltipFormatter","getOption","_ref","values","currency","isDark","lang","currencies","map","item","percentages","percentage","barColors","gridLines","chartWidth","chartHeight","xLabelsSize","yLabelSize","animation","title","left","text","concat","textStyle","fontSize","lineHeight","fontWeight","grid","name","top","right","bottom","graphic","tooltip","trigger","formatter","_ref2","marker","value","axisPointer","axis","extraCssText","xAxis","type","data","axisTick","show","axisLine","splitLine","axisLabel","yAxis","position","min","Math","floor","max","ceil","interval","series","emphasis","disabled","itemStyle","opacity","color","_ref3","positive","negative","zero"],"sources":["../../../../../src/CurrencyStrengthWidget/components/Chart/getOption.ts"],"sourcesContent":["import { getGridLines } from '@oanda/labs-widget-common';\n\nimport {\n CHART_HEIGHT,\n CHART_WIDTH,\n darkBarColors,\n lightBarColors,\n X_LABEL_SIZE,\n Y_LABEL_SIZE,\n} from './constants';\nimport { tooltipFormatter } from './formatters';\nimport type { GetOptionProps } from './types';\n\nexport const getOption = ({\n values,\n currency,\n isDark,\n lang,\n}: GetOptionProps) => {\n const currencies = values.map((item) => item.currency);\n const percentages = values.map((item) => item.percentage);\n const barColors = isDark ? darkBarColors : lightBarColors;\n\n const gridLines = getGridLines({\n isDark,\n chartWidth: CHART_WIDTH,\n chartHeight: CHART_HEIGHT,\n xLabelsSize: -2,\n yLabelSize: -3,\n });\n\n return {\n animation: false,\n title: {\n left: 'center',\n text: `${currency} vs`,\n textStyle: {\n fontSize: 12,\n lineHeight: 20,\n fontWeight: 400,\n },\n },\n grid: [\n {\n name: 'main-grid',\n top: '30px',\n right: '0px',\n left: `${Y_LABEL_SIZE}px`,\n bottom: `${X_LABEL_SIZE}px`,\n },\n ],\n graphic: [...gridLines],\n tooltip: {\n trigger: 'axis',\n formatter: ([{ marker, name, value }]: {\n marker: string;\n name: string;\n value: number;\n }[]) =>\n tooltipFormatter({\n lang,\n currency,\n marker,\n name,\n value,\n }),\n axisPointer: {\n axis: 'x',\n },\n extraCssText: 'z-index: 1',\n },\n xAxis: {\n type: 'category',\n data: currencies,\n axisTick: { show: false },\n axisLine: { show: false },\n splitLine: { show: false },\n axisLabel: {\n fontSize: 10,\n },\n },\n yAxis: {\n type: 'value',\n position: 'left',\n min: Math.floor(Math.min(...percentages)),\n max: Math.ceil(Math.max(...percentages)),\n interval: 1,\n axisLine: { show: false },\n axisTick: { show: false },\n axisLabel: {\n formatter: '{value}%',\n fontSize: 10,\n },\n },\n series: [\n {\n data: percentages,\n type: 'bar',\n emphasis: {\n disabled: true,\n },\n itemStyle: {\n opacity: 1,\n color: ({ data }: { data: number }) => {\n if (data > 0) {\n return barColors.positive;\n }\n if (data < 0) {\n return barColors.negative;\n }\n return barColors.zero;\n },\n },\n },\n ],\n };\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,2BAA2B;AAExD,SACEC,YAAY,EACZC,WAAW,EACXC,aAAa,EACbC,cAAc,EACdC,YAAY,EACZC,YAAY,QACP,aAAa;AACpB,SAASC,gBAAgB,QAAQ,cAAc;AAG/C,OAAO,MAAMC,SAAS,GAAGC,IAAA,IAKH;EAAA,IALI;IACxBC,MAAM;IACNC,QAAQ;IACRC,MAAM;IACNC;EACc,CAAC,GAAAJ,IAAA;EACf,MAAMK,UAAU,GAAGJ,MAAM,CAACK,GAAG,CAAEC,IAAI,IAAKA,IAAI,CAACL,QAAQ,CAAC;EACtD,MAAMM,WAAW,GAAGP,MAAM,CAACK,GAAG,CAAEC,IAAI,IAAKA,IAAI,CAACE,UAAU,CAAC;EACzD,MAAMC,SAAS,GAAGP,MAAM,GAAGT,aAAa,GAAGC,cAAc;EAEzD,MAAMgB,SAAS,GAAGpB,YAAY,CAAC;IAC7BY,MAAM;IACNS,UAAU,EAAEnB,WAAW;IACvBoB,WAAW,EAAErB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