@oanda/labs-spread-cost-calculator-widget 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +68 -0
- package/dist/main/SpreadCostCalculatorWidget/Main.js +23 -23
- package/dist/main/SpreadCostCalculatorWidget/Main.js.map +1 -1
- package/dist/main/SpreadCostCalculatorWidget/SpreadCostCalculatorWidget.js +12 -12
- package/dist/main/SpreadCostCalculatorWidget/SpreadCostCalculatorWidget.js.map +1 -1
- package/dist/main/SpreadCostCalculatorWidget/ValidationWrapper.js +5 -4
- package/dist/main/SpreadCostCalculatorWidget/ValidationWrapper.js.map +1 -1
- package/dist/main/SpreadCostCalculatorWidget/render.js +4 -4
- package/dist/main/SpreadCostCalculatorWidget/render.js.map +1 -1
- package/dist/main/SpreadCostCalculatorWidget/types.js.map +1 -1
- package/dist/main/SpreadCostCalculatorWidget/useCalculateSpread.js +3 -3
- package/dist/main/SpreadCostCalculatorWidget/useCalculateSpread.js.map +1 -1
- package/dist/main/SpreadCostCalculatorWidget/useInstrumentChange.js +1 -1
- package/dist/main/SpreadCostCalculatorWidget/useInstrumentChange.js.map +1 -1
- package/dist/main/SpreadCostCalculatorWidget/utils.js.map +1 -1
- package/dist/main/gql/types/fragment-masking.js +3 -2
- package/dist/main/gql/types/fragment-masking.js.map +1 -1
- package/dist/main/gql/types/gql.js +3 -2
- package/dist/main/gql/types/gql.js.map +1 -1
- package/dist/main/gql/types/graphql.js +71 -71
- package/dist/main/gql/types/graphql.js.map +1 -1
- package/dist/main/gql/types/index.js.map +1 -1
- package/dist/main/gql/validateInstruments.js +3 -8
- package/dist/main/gql/validateInstruments.js.map +1 -1
- package/dist/main/index.js +8 -8
- package/dist/main/index.js.map +1 -1
- package/dist/main/translations/index.js +1 -1
- package/dist/main/translations/index.js.map +1 -1
- package/dist/module/SpreadCostCalculatorWidget/Main.js +23 -23
- package/dist/module/SpreadCostCalculatorWidget/Main.js.map +1 -1
- package/dist/module/SpreadCostCalculatorWidget/SpreadCostCalculatorWidget.js +12 -12
- package/dist/module/SpreadCostCalculatorWidget/SpreadCostCalculatorWidget.js.map +1 -1
- package/dist/module/SpreadCostCalculatorWidget/ValidationWrapper.js +5 -4
- package/dist/module/SpreadCostCalculatorWidget/ValidationWrapper.js.map +1 -1
- package/dist/module/SpreadCostCalculatorWidget/render.js +4 -4
- package/dist/module/SpreadCostCalculatorWidget/render.js.map +1 -1
- package/dist/module/SpreadCostCalculatorWidget/types.js.map +1 -1
- package/dist/module/SpreadCostCalculatorWidget/useCalculateSpread.js +3 -3
- package/dist/module/SpreadCostCalculatorWidget/useCalculateSpread.js.map +1 -1
- package/dist/module/SpreadCostCalculatorWidget/useInstrumentChange.js +1 -1
- package/dist/module/SpreadCostCalculatorWidget/useInstrumentChange.js.map +1 -1
- package/dist/module/SpreadCostCalculatorWidget/utils.js.map +1 -1
- package/dist/module/gql/types/fragment-masking.js +3 -2
- package/dist/module/gql/types/fragment-masking.js.map +1 -1
- package/dist/module/gql/types/gql.js +3 -2
- package/dist/module/gql/types/gql.js.map +1 -1
- package/dist/module/gql/types/graphql.js +71 -71
- package/dist/module/gql/types/graphql.js.map +1 -1
- package/dist/module/gql/types/index.js +2 -2
- package/dist/module/gql/types/index.js.map +1 -1
- package/dist/module/gql/validateInstruments.js +3 -8
- package/dist/module/gql/validateInstruments.js.map +1 -1
- package/dist/module/index.js +1 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/translations/index.js +1 -1
- package/dist/module/translations/index.js.map +1 -1
- package/dist/types/SpreadCostCalculatorWidget/Main.d.ts +2 -2
- package/dist/types/SpreadCostCalculatorWidget/SpreadCostCalculatorWidget.d.ts +2 -2
- package/dist/types/SpreadCostCalculatorWidget/ValidationWrapper.d.ts +1 -1
- package/dist/types/SpreadCostCalculatorWidget/types.d.ts +6 -6
- package/dist/types/SpreadCostCalculatorWidget/useCalculateSpread.d.ts +3 -3
- package/dist/types/SpreadCostCalculatorWidget/useInstrumentChange.d.ts +3 -3
- package/dist/types/gql/types/gql.d.ts +2 -2
- package/dist/types/gql/types/index.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/translations/index.d.ts +2 -2
- package/package.json +3 -3
- package/src/SpreadCostCalculatorWidget/Main.tsx +32 -26
- package/src/SpreadCostCalculatorWidget/SpreadCostCalculatorWidget.tsx +12 -14
- package/src/SpreadCostCalculatorWidget/ValidationWrapper.tsx +24 -19
- package/src/SpreadCostCalculatorWidget/render.tsx +12 -12
- package/src/SpreadCostCalculatorWidget/types.ts +7 -6
- package/src/SpreadCostCalculatorWidget/useCalculateSpread.ts +25 -18
- package/src/SpreadCostCalculatorWidget/useInstrumentChange.ts +13 -7
- package/src/SpreadCostCalculatorWidget/utils.ts +2 -1
- package/src/gql/types/fragment-masking.ts +41 -21
- package/src/gql/types/gql.ts +7 -3
- package/src/gql/types/graphql.ts +126 -47
- package/src/gql/types/index.ts +2 -2
- package/src/index.ts +1 -1
- package/src/translations/index.ts +4 -4
- package/test/SpreadCostCalculator.test.tsx +8 -8
- package/test/useCalculateSpread.test.tsx +41 -34
- package/test/useInstrumentChange.test.tsx +11 -4
|
@@ -118,101 +118,101 @@ let VolatilityChartTimeUnit = exports.VolatilityChartTimeUnit = function (Volati
|
|
|
118
118
|
return VolatilityChartTimeUnit;
|
|
119
119
|
}({});
|
|
120
120
|
const ValidateInstrumentsDocument = exports.ValidateInstrumentsDocument = {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
121
|
+
kind: 'Document',
|
|
122
|
+
definitions: [{
|
|
123
|
+
kind: 'OperationDefinition',
|
|
124
|
+
operation: 'query',
|
|
125
|
+
name: {
|
|
126
|
+
kind: 'Name',
|
|
127
|
+
value: 'validateInstruments'
|
|
128
128
|
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
variableDefinitions: [{
|
|
130
|
+
kind: 'VariableDefinition',
|
|
131
|
+
variable: {
|
|
132
|
+
kind: 'Variable',
|
|
133
|
+
name: {
|
|
134
|
+
kind: 'Name',
|
|
135
|
+
value: 'instruments'
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
138
|
+
type: {
|
|
139
|
+
kind: 'NonNullType',
|
|
140
|
+
type: {
|
|
141
|
+
kind: 'ListType',
|
|
142
|
+
type: {
|
|
143
|
+
kind: 'NamedType',
|
|
144
|
+
name: {
|
|
145
|
+
kind: 'Name',
|
|
146
|
+
value: 'String'
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
}, {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
152
|
+
kind: 'VariableDefinition',
|
|
153
|
+
variable: {
|
|
154
|
+
kind: 'Variable',
|
|
155
|
+
name: {
|
|
156
|
+
kind: 'Name',
|
|
157
|
+
value: 'division'
|
|
158
158
|
}
|
|
159
159
|
},
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
160
|
+
type: {
|
|
161
|
+
kind: 'NamedType',
|
|
162
|
+
name: {
|
|
163
|
+
kind: 'Name',
|
|
164
|
+
value: 'Division'
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
}],
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
168
|
+
selectionSet: {
|
|
169
|
+
kind: 'SelectionSet',
|
|
170
|
+
selections: [{
|
|
171
|
+
kind: 'Field',
|
|
172
|
+
name: {
|
|
173
|
+
kind: 'Name',
|
|
174
|
+
value: 'mapInstrumentNames'
|
|
175
175
|
},
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
176
|
+
arguments: [{
|
|
177
|
+
kind: 'Argument',
|
|
178
|
+
name: {
|
|
179
|
+
kind: 'Name',
|
|
180
|
+
value: 'instruments'
|
|
181
181
|
},
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
182
|
+
value: {
|
|
183
|
+
kind: 'Variable',
|
|
184
|
+
name: {
|
|
185
|
+
kind: 'Name',
|
|
186
|
+
value: 'instruments'
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
}, {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
190
|
+
kind: 'Argument',
|
|
191
|
+
name: {
|
|
192
|
+
kind: 'Name',
|
|
193
|
+
value: 'division'
|
|
194
194
|
},
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
195
|
+
value: {
|
|
196
|
+
kind: 'Variable',
|
|
197
|
+
name: {
|
|
198
|
+
kind: 'Name',
|
|
199
|
+
value: 'division'
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
}],
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
203
|
+
selectionSet: {
|
|
204
|
+
kind: 'SelectionSet',
|
|
205
|
+
selections: [{
|
|
206
|
+
kind: 'Field',
|
|
207
|
+
name: {
|
|
208
|
+
kind: 'Name',
|
|
209
|
+
value: 'name'
|
|
210
210
|
}
|
|
211
211
|
}, {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
212
|
+
kind: 'Field',
|
|
213
|
+
name: {
|
|
214
|
+
kind: 'Name',
|
|
215
|
+
value: 'displayName'
|
|
216
216
|
}
|
|
217
217
|
}]
|
|
218
218
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.js","names":["AssetClassName","exports","BookType","CorrelationTimeUnit","CurrencyName","CurrencyPowerBalanceTimeUnit","DataSource","Division","Region","Sort","TopicalSort","ValueAtRiskBars","ValueAtRiskDuration","VolatilityChartTimeSpan","VolatilityChartTimeUnit","ValidateInstrumentsDocument"],"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 isAllowedPartner?: Maybe<Scalars['Boolean']['output']>;\n mapInstrumentNames?: Maybe<Array<Maybe<Instrument>>>;\n orderPositionBooks: Array<Maybe<OrderPositionData>>;\n resolveInstrumentsByDivision?: Maybe<Array<Instrument>>;\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 QueryIsAllowedPartnerArgs = {\n url: Scalars['String']['input'];\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 QueryResolveInstrumentsByDivisionArgs = {\n division: Division;\n instruments: Array<InputMaybe<Scalars['String']['input']>>;\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 ValidateInstrumentsQueryVariables = Exact<{\n instruments: Array<InputMaybe<Scalars['String']['input']>> | InputMaybe<Scalars['String']['input']>;\n division?: InputMaybe<Division>;\n}>;\n\n\nexport type ValidateInstrumentsQuery = { __typename?: 'Query', mapInstrumentNames?: Array<{ __typename?: 'Instrument', name: string, displayName: string } | null> | null };\n\n\nexport 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>;"],"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,mB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OAAO,EAAC;YAAa;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","ValidateInstrumentsDocument","kind","definitions","operation","name","value","variableDefinitions","variable","type","selectionSet","selections","arguments"],"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 isAllowedPartner?: Maybe<Scalars['Boolean']['output']>;\n mapInstrumentNames?: Maybe<Array<Maybe<Instrument>>>;\n orderPositionBooks: Array<Maybe<OrderPositionData>>;\n resolveInstrumentsByDivision?: Maybe<Array<Instrument>>;\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 QueryIsAllowedPartnerArgs = {\n url: Scalars['String']['input'];\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 QueryResolveInstrumentsByDivisionArgs = {\n division: Division;\n instruments: Array<InputMaybe<Scalars['String']['input']>>;\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 ValidateInstrumentsQueryVariables = Exact<{\n instruments:\n | Array<InputMaybe<Scalars['String']['input']>>\n | InputMaybe<Scalars['String']['input']>;\n division?: InputMaybe<Division>;\n}>;\n\nexport type ValidateInstrumentsQuery = {\n __typename?: 'Query';\n mapInstrumentNames?: Array<{\n __typename?: 'Instrument';\n name: string;\n displayName: string;\n } | null> | null;\n};\n\nexport const ValidateInstrumentsDocument = {\n kind: 'Document',\n definitions: [\n {\n kind: 'OperationDefinition',\n operation: 'query',\n name: { kind: 'Name', value: 'validateInstruments' },\n variableDefinitions: [\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'instruments' },\n },\n type: {\n kind: 'NonNullType',\n type: {\n kind: 'ListType',\n type: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'String' },\n },\n },\n },\n },\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'division' },\n },\n type: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'Division' },\n },\n },\n ],\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'mapInstrumentNames' },\n arguments: [\n {\n kind: 'Argument',\n name: { kind: 'Name', value: 'instruments' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'instruments' },\n },\n },\n {\n kind: 'Argument',\n name: { kind: 'Name', value: 'division' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'division' },\n },\n },\n ],\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n { kind: 'Field', name: { kind: 'Name', value: 'displayName' } },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<\n ValidateInstrumentsQuery,\n ValidateInstrumentsQueryVariables\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;E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AAI,EAAE,OAAO;YAAEG,IAAI,EAAE;cAAEH,IAAI,EAAE,MAAM;cAAEI,KAAK,EAAE;YAAc;UAAE,CAAC;QAEnE;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
|
|
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":[]}
|
|
@@ -5,12 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.validateInstruments = void 0;
|
|
7
7
|
var _client = require("@apollo/client");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
mapInstrumentNames(instruments: $instruments, division: $division) {
|
|
11
|
-
name
|
|
12
|
-
displayName
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
`;
|
|
8
|
+
var _templateObject;
|
|
9
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
10
|
+
const validateInstruments = exports.validateInstruments = (0, _client.gql)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query validateInstruments($instruments: [String]!, $division: Division) {\n mapInstrumentNames(instruments: $instruments, division: $division) {\n name\n displayName\n }\n }\n"])));
|
|
16
11
|
//# sourceMappingURL=validateInstruments.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateInstruments.js","names":["_client","require","validateInstruments","exports","gql"],"sources":["../../../src/gql/validateInstruments.ts"],"sourcesContent":["import { gql } from '@apollo/client';\n\nexport const validateInstruments = gql`\n query validateInstruments($instruments: [String]!, $division: Division) {\n mapInstrumentNames(instruments: $instruments, division: $division) {\n name\n displayName\n }\n }\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"file":"validateInstruments.js","names":["_client","require","_templateObject","_taggedTemplateLiteral","e","t","slice","Object","freeze","defineProperties","raw","value","validateInstruments","exports","gql"],"sources":["../../../src/gql/validateInstruments.ts"],"sourcesContent":["import { gql } from '@apollo/client';\n\nexport const validateInstruments = gql`\n query validateInstruments($instruments: [String]!, $division: Division) {\n mapInstrumentNames(instruments: $instruments, division: $division) {\n name\n displayName\n }\n }\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAqC,IAAAC,eAAA;AAAA,SAAAC,uBAAAC,CAAA,EAAAC,CAAA,WAAAA,CAAA,KAAAA,CAAA,GAAAD,CAAA,CAAAE,KAAA,MAAAC,MAAA,CAAAC,MAAA,CAAAD,MAAA,CAAAE,gBAAA,CAAAL,CAAA,IAAAM,GAAA,IAAAC,KAAA,EAAAJ,MAAA,CAAAC,MAAA,CAAAH,CAAA;AAE9B,MAAMO,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,OAAGE,WAAG,EAAAZ,eAAA,KAAAA,eAAA,GAAAC,sBAAA,4MAOrC","ignoreList":[]}
|
package/dist/main/index.js
CHANGED
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var
|
|
7
|
-
Object.keys(
|
|
6
|
+
var _SpreadCostCalculatorWidget = require("./SpreadCostCalculatorWidget/SpreadCostCalculatorWidget");
|
|
7
|
+
Object.keys(_SpreadCostCalculatorWidget).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] ===
|
|
9
|
+
if (key in exports && exports[key] === _SpreadCostCalculatorWidget[key]) return;
|
|
10
10
|
Object.defineProperty(exports, key, {
|
|
11
11
|
enumerable: true,
|
|
12
12
|
get: function () {
|
|
13
|
-
return
|
|
13
|
+
return _SpreadCostCalculatorWidget[key];
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
-
var
|
|
18
|
-
Object.keys(
|
|
17
|
+
var _types = require("./SpreadCostCalculatorWidget/types");
|
|
18
|
+
Object.keys(_types).forEach(function (key) {
|
|
19
19
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] ===
|
|
20
|
+
if (key in exports && exports[key] === _types[key]) return;
|
|
21
21
|
Object.defineProperty(exports, key, {
|
|
22
22
|
enumerable: true,
|
|
23
23
|
get: function () {
|
|
24
|
-
return
|
|
24
|
+
return _types[key];
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
});
|
package/dist/main/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["_SpreadCostCalculatorWidget","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_types"],"sources":["../../src/index.ts"],"sourcesContent":["export * from './SpreadCostCalculatorWidget/SpreadCostCalculatorWidget';\nexport * from './SpreadCostCalculatorWidget/types';\n"],"mappings":";;;;;AAAA,IAAAA,2BAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,2BAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,2BAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,2BAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,MAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,MAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,MAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,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","
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
2
|
-
import { useLocale } from '@oanda/mono-i18n';
|
|
3
1
|
import { ChartError, cn, Label, NumberInput, Select, Size, useLayoutProvider, useNumberFormat } from '@oanda/labs-widget-common';
|
|
2
|
+
import { useLocale } from '@oanda/mono-i18n';
|
|
3
|
+
import React, { useEffect } from 'react';
|
|
4
4
|
import { useCalculateSpread } from './useCalculateSpread';
|
|
5
5
|
import { useInstrumentChange } from './useInstrumentChange';
|
|
6
6
|
const Main = _ref => {
|
|
@@ -46,8 +46,8 @@ const Main = _ref => {
|
|
|
46
46
|
useEffect(() => {
|
|
47
47
|
onSpreadChange({
|
|
48
48
|
floatValue: initialSpread,
|
|
49
|
-
formattedValue: initialSpread
|
|
50
|
-
value: initialSpread
|
|
49
|
+
formattedValue: (initialSpread === null || initialSpread === void 0 ? void 0 : initialSpread.toString()) || '',
|
|
50
|
+
value: (initialSpread === null || initialSpread === void 0 ? void 0 : initialSpread.toString()) || ''
|
|
51
51
|
});
|
|
52
52
|
}, [initialSpread]);
|
|
53
53
|
const {
|
|
@@ -62,41 +62,41 @@ const Main = _ref => {
|
|
|
62
62
|
return React.createElement(React.Fragment, null, error ? React.createElement("div", {
|
|
63
63
|
className: "lw-flex lw-h-[300px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary"
|
|
64
64
|
}, React.createElement(ChartError, null)) : React.createElement("div", {
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
className: "lw-mx-auto lw-flex lw-w-full lw-max-w-full lw-flex-col lw-content-center lw-justify-center lw-gap-8 lw-p-4",
|
|
66
|
+
"data-testid": "spread-cost-calculator"
|
|
67
67
|
}, React.createElement("div", {
|
|
68
68
|
className: "lw-flex lw-flex-col lw-gap-2"
|
|
69
69
|
}, React.createElement(Label, {
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
className: "lw-text-text-primary",
|
|
71
|
+
htmlFor: lang('instrument')
|
|
72
72
|
}, lang('instrument')), React.createElement(Select, {
|
|
73
|
-
|
|
73
|
+
className: "lw-grow-0",
|
|
74
|
+
maxHeight: isDesktop ? 190 : 220,
|
|
74
75
|
options: selectOptions,
|
|
76
|
+
searchPlaceholder: lang('search'),
|
|
75
77
|
selectedOption: selectedInstrument,
|
|
76
|
-
|
|
77
|
-
setSelectedOption: setSelectedInstrument,
|
|
78
|
-
maxHeight: isDesktop ? 190 : 220
|
|
78
|
+
setSelectedOption: setSelectedInstrument
|
|
79
79
|
})), React.createElement("div", {
|
|
80
80
|
className: "lw-flex lw-max-w-full lw-flex-col lw-content-center lw-justify-center lw-gap-3"
|
|
81
81
|
}, React.createElement("div", {
|
|
82
82
|
className: cn('lw-flex lw-max-w-full lw-flex-row lw-gap-3', !isDesktop && 'lw-flex-col lw-gap-8')
|
|
83
83
|
}, React.createElement(NumberInput, {
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
withoutArrows: true,
|
|
85
|
+
disabled: loading,
|
|
86
86
|
label: lang('units_traded'),
|
|
87
|
-
onIncrement: incrementTradedUnits,
|
|
88
|
-
onDecrement: decrementTradedUnits,
|
|
89
87
|
placeholder: lang('volume'),
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
value: unitsTraded,
|
|
89
|
+
onDecrement: decrementTradedUnits,
|
|
90
|
+
onIncrement: incrementTradedUnits,
|
|
91
|
+
onValueChange: onUnitChange
|
|
92
92
|
}), React.createElement(NumberInput, {
|
|
93
|
-
|
|
94
|
-
value: spread,
|
|
93
|
+
disabled: loading,
|
|
95
94
|
label: lang('spread'),
|
|
96
|
-
onIncrement: incrementSpread,
|
|
97
|
-
onDecrement: decrementSpread,
|
|
98
95
|
placeholder: lang('pips'),
|
|
99
|
-
|
|
96
|
+
value: spread,
|
|
97
|
+
onDecrement: decrementSpread,
|
|
98
|
+
onIncrement: incrementSpread,
|
|
99
|
+
onValueChange: onSpreadChange
|
|
100
100
|
})), React.createElement("div", {
|
|
101
101
|
className: "lw-pt-4 lw-text-text-primary"
|
|
102
102
|
}, React.createElement("div", null, lang('absolute_spread_cost')), React.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Main.js","names":["
|
|
1
|
+
{"version":3,"file":"Main.js","names":["ChartError","cn","Label","NumberInput","Select","Size","useLayoutProvider","useNumberFormat","useLocale","React","useEffect","useCalculateSpread","useInstrumentChange","Main","_ref","instruments","size","isDesktop","DESKTOP","selectOptions","map","instrument","id","name","label","displayName","value","unitsTraded","handleValueChange","onUnitChange","increment","incrementTradedUnits","decrement","decrementTradedUnits","spread","onSpreadChange","incrementSpread","decrementSpread","step","selectedInstrument","setSelectedInstrument","pipLocation","initialSpread","loading","error","currency","initialInstrument","floatValue","formattedValue","toString","lang","spreadCost","createElement","Fragment","className","htmlFor","maxHeight","options","searchPlaceholder","selectedOption","setSelectedOption","withoutArrows","disabled","placeholder","onDecrement","onIncrement","onValueChange"],"sources":["../../../src/SpreadCostCalculatorWidget/Main.tsx"],"sourcesContent":["import {\n ChartError,\n cn,\n Label,\n NumberInput,\n Select,\n Size,\n useLayoutProvider,\n useNumberFormat,\n} from '@oanda/labs-widget-common';\nimport { useLocale } from '@oanda/mono-i18n';\nimport type { FC } from 'react';\nimport React, { useEffect } from 'react';\n\nimport type { MainProps } from './types';\nimport { useCalculateSpread } from './useCalculateSpread';\nimport { useInstrumentChange } from './useInstrumentChange';\n\nconst Main: FC<MainProps> = ({ instruments }) => {\n const { size } = useLayoutProvider();\n const isDesktop = size === Size.DESKTOP;\n\n const selectOptions = instruments.map((instrument) => ({\n id: instrument.name,\n label: instrument.displayName,\n }));\n\n const {\n value: unitsTraded,\n handleValueChange: onUnitChange,\n increment: incrementTradedUnits,\n decrement: decrementTradedUnits,\n } = useNumberFormat({});\n\n const {\n value: spread,\n handleValueChange: onSpreadChange,\n increment: incrementSpread,\n decrement: decrementSpread,\n } = useNumberFormat({\n step: 0.1,\n });\n\n const {\n selectedInstrument,\n setSelectedInstrument,\n pipLocation,\n initialSpread,\n loading,\n error,\n currency,\n } = useInstrumentChange({\n initialInstrument: {\n id: instruments[0].name,\n label: instruments[0].displayName,\n },\n });\n\n useEffect(() => {\n onSpreadChange({\n floatValue: initialSpread,\n formattedValue: initialSpread?.toString() || '',\n value: initialSpread?.toString() || '',\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [initialSpread]);\n\n const { lang } = useLocale();\n\n const spreadCost = useCalculateSpread({\n spread,\n unitsTraded,\n pipLocation,\n currency,\n });\n\n return (\n <>\n {error ? (\n <div className=\"lw-flex lw-h-[300px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary\">\n <ChartError />\n </div>\n ) : (\n <div\n className=\"lw-mx-auto lw-flex lw-w-full lw-max-w-full lw-flex-col lw-content-center lw-justify-center lw-gap-8 lw-p-4\"\n data-testid=\"spread-cost-calculator\"\n >\n <div className=\"lw-flex lw-flex-col lw-gap-2\">\n <Label\n className=\"lw-text-text-primary\"\n htmlFor={lang('instrument')}\n >\n {lang('instrument')}\n </Label>\n <Select\n className=\"lw-grow-0\"\n maxHeight={isDesktop ? 190 : 220}\n options={selectOptions}\n searchPlaceholder={lang('search')}\n selectedOption={selectedInstrument}\n setSelectedOption={setSelectedInstrument}\n />\n </div>\n <div className=\"lw-flex lw-max-w-full lw-flex-col lw-content-center lw-justify-center lw-gap-3\">\n <div\n className={cn(\n 'lw-flex lw-max-w-full lw-flex-row lw-gap-3',\n !isDesktop && 'lw-flex-col lw-gap-8'\n )}\n >\n <NumberInput\n withoutArrows\n disabled={loading}\n label={lang('units_traded')}\n placeholder={lang('volume')}\n value={unitsTraded}\n onDecrement={decrementTradedUnits}\n onIncrement={incrementTradedUnits}\n onValueChange={onUnitChange}\n />\n <NumberInput\n disabled={loading}\n label={lang('spread')}\n placeholder={lang('pips')}\n value={spread}\n onDecrement={decrementSpread}\n onIncrement={incrementSpread}\n onValueChange={onSpreadChange}\n />\n </div>\n <div className=\"lw-pt-4 lw-text-text-primary\">\n <div>{lang('absolute_spread_cost')}</div>\n <div className=\"lw-pt-2 lw-text-3xl lw-font-bold\">\n {spreadCost}\n </div>\n </div>\n </div>\n </div>\n )}\n </>\n );\n};\n\nexport { Main };\n"],"mappings":"AAAA,SACEA,UAAU,EACVC,EAAE,EACFC,KAAK,EACLC,WAAW,EACXC,MAAM,EACNC,IAAI,EACJC,iBAAiB,EACjBC,eAAe,QACV,2BAA2B;AAClC,SAASC,SAAS,QAAQ,kBAAkB;AAE5C,OAAOC,KAAK,IAAIC,SAAS,QAAQ,OAAO;AAGxC,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,mBAAmB,QAAQ,uBAAuB;AAE3D,MAAMC,IAAmB,GAAGC,IAAA,IAAqB;EAAA,IAApB;IAAEC;EAAY,CAAC,GAAAD,IAAA;EAC1C,MAAM;IAAEE;EAAK,CAAC,GAAGV,iBAAiB,CAAC,CAAC;EACpC,MAAMW,SAAS,GAAGD,IAAI,KAAKX,IAAI,CAACa,OAAO;EAEvC,MAAMC,aAAa,GAAGJ,WAAW,CAACK,GAAG,CAAEC,UAAU,KAAM;IACrDC,EAAE,EAAED,UAAU,CAACE,IAAI;IACnBC,KAAK,EAAEH,UAAU,CAACI;EACpB,CAAC,CAAC,CAAC;EAEH,MAAM;IACJC,KAAK,EAAEC,WAAW;IAClBC,iBAAiB,EAAEC,YAAY;IAC/BC,SAAS,EAAEC,oBAAoB;IAC/BC,SAAS,EAAEC;EACb,CAAC,GAAG1B,eAAe,CAAC,CAAC,CAAC,CAAC;EAEvB,MAAM;IACJmB,KA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B,KAAA,CAAA2C,aAAA;IAAKE,SAAS,EAAC;EAA8B,GAC3C7C,KAAA,CAAA2C,aAAA,cAAMF,IAAI,CAAC,sBAAsB,CAAO,CAAC,EACzCzC,KAAA,CAAA2C,aAAA;IAAKE,SAAS,EAAC;EAAkC,GAC9CH,UACE,CACF,CACF,CACF,CAEP,CAAC;AAEP,CAAC;AAED,SAAStC,IAAI","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { ApolloClient, InMemoryCache } from '@apollo/client';
|
|
3
|
-
import { WidgetProvider, WidgetWrapper } from '@oanda/labs-widget-common';
|
|
4
2
|
import { Division } from '@oanda/labs-live-rates-table-widget';
|
|
3
|
+
import { WidgetProvider, WidgetWrapper } from '@oanda/labs-widget-common';
|
|
4
|
+
import React from 'react';
|
|
5
5
|
import { translations } from '../translations';
|
|
6
6
|
import { ValidationWrapper } from './ValidationWrapper';
|
|
7
7
|
const SpreadCostCalculatorWidget = _ref => {
|
|
@@ -24,26 +24,26 @@ const SpreadCostCalculatorWidget = _ref => {
|
|
|
24
24
|
const dataSource = divisionCode === Division.Ogm ? 'MT5' : 'V20';
|
|
25
25
|
return React.createElement(WidgetProvider, {
|
|
26
26
|
withSuspense: true,
|
|
27
|
-
locale: locale,
|
|
28
|
-
translations: translations,
|
|
29
27
|
client: client,
|
|
30
|
-
theme: theme,
|
|
31
|
-
styling: {
|
|
32
|
-
removePadding
|
|
33
|
-
},
|
|
34
28
|
liveRates: {
|
|
35
29
|
url: liveRatesUrl,
|
|
36
30
|
options: {
|
|
37
31
|
divisionCode,
|
|
38
32
|
dataSource
|
|
39
33
|
}
|
|
40
|
-
}
|
|
34
|
+
},
|
|
35
|
+
locale: locale,
|
|
36
|
+
styling: {
|
|
37
|
+
removePadding
|
|
38
|
+
},
|
|
39
|
+
theme: theme,
|
|
40
|
+
translations: translations
|
|
41
41
|
}, React.createElement(WidgetWrapper, {
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
linkArea: "logo",
|
|
43
|
+
logoLink: logoLink
|
|
44
44
|
}, React.createElement(ValidationWrapper, {
|
|
45
|
-
instruments: instruments,
|
|
46
45
|
division: division,
|
|
46
|
+
instruments: instruments,
|
|
47
47
|
isParamError: isParamError
|
|
48
48
|
})));
|
|
49
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpreadCostCalculatorWidget.js","names":["
|
|
1
|
+
{"version":3,"file":"SpreadCostCalculatorWidget.js","names":["ApolloClient","InMemoryCache","Division","WidgetProvider","WidgetWrapper","React","translations","ValidationWrapper","SpreadCostCalculatorWidget","_ref","graphqlUrl","liveRatesUrl","theme","locale","isParamError","removePadding","division","instruments","logoLink","client","uri","cache","divisionCode","Opt","Ogm","dataSource","createElement","withSuspense","liveRates","url","options","styling","linkArea"],"sources":["../../../src/SpreadCostCalculatorWidget/SpreadCostCalculatorWidget.tsx"],"sourcesContent":["import { ApolloClient, InMemoryCache } from '@apollo/client';\nimport { Division } from '@oanda/labs-live-rates-table-widget';\nimport { WidgetProvider, WidgetWrapper } from '@oanda/labs-widget-common';\nimport type { FC } from 'react';\nimport React from 'react';\n\nimport { translations } from '../translations';\nimport type { SpreadCostCalculatorWidgetConfig } from './types';\nimport { ValidationWrapper } from './ValidationWrapper';\n\nconst SpreadCostCalculatorWidget: FC<SpreadCostCalculatorWidgetConfig> = ({\n graphqlUrl,\n liveRatesUrl,\n theme,\n locale,\n isParamError,\n removePadding,\n division,\n instruments,\n logoLink,\n}) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n const divisionCode = division === Division.Opt ? Division.Ogm : division;\n const dataSource = divisionCode === Division.Ogm ? 'MT5' : 'V20';\n\n return (\n <WidgetProvider\n withSuspense\n client={client}\n liveRates={{\n url: liveRatesUrl,\n options: { divisionCode, dataSource },\n }}\n locale={locale}\n styling={{\n removePadding,\n }}\n theme={theme}\n translations={translations}\n >\n <WidgetWrapper linkArea=\"logo\" logoLink={logoLink}>\n <ValidationWrapper\n division={division}\n instruments={instruments}\n isParamError={isParamError}\n />\n </WidgetWrapper>\n </WidgetProvider>\n );\n};\n\nexport { SpreadCostCalculatorWidget };\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,aAAa,QAAQ,gBAAgB;AAC5D,SAASC,QAAQ,QAAQ,qCAAqC;AAC9D,SAASC,cAAc,EAAEC,aAAa,QAAQ,2BAA2B;AAEzE,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,SAASC,iBAAiB,QAAQ,qBAAqB;AAEvD,MAAMC,0BAAgE,GAAGC,IAAA,IAUnE;EAAA,IAVoE;IACxEC,UAAU;IACVC,YAAY;IACZC,KAAK;IACLC,MAAM;IACNC,YAAY;IACZC,aAAa;IACbC,QAAQ;IACRC,WAAW;IACXC;EACF,CAAC,GAAAT,IAAA;EACC,MAAMU,MAAM,GAAG,IAAInB,YAAY,CAAC;IAC9BoB,GAAG,EAAEV,UAAU;IACfW,KAAK,EAAE,IAAIpB,aAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,MAAMqB,YAAY,GAAGN,QAAQ,KAAKd,QAAQ,CAACqB,GAAG,GAAGrB,QAAQ,CAACsB,GAAG,GAAGR,QAAQ;EACxE,MAAMS,UAAU,GAAGH,YAAY,KAAKpB,QAAQ,CAACsB,GAAG,GAAG,KAAK,GAAG,KAAK;EAEhE,OACEnB,KAAA,CAAAqB,aAAA,CAACvB,cAAc;IACbwB,YAAY;IACZR,MAAM,EAAEA,MAAO;IACfS,SAAS,EAAE;MACTC,GAAG,EAAElB,YAAY;MACjBmB,OAAO,EAAE;QAAER,YAAY;QAAEG;MAAW;IACtC,CAAE;IACFZ,MAAM,EAAEA,MAAO;IACfkB,OAAO,EAAE;MACPhB;IACF,CAAE;IACFH,KAAK,EAAEA,KAAM;IACbN,YAAY,EAAEA;EAAa,GAE3BD,KAAA,CAAAqB,aAAA,CAACtB,aAAa;IAAC4B,QAAQ,EAAC,MAAM;IAACd,QAAQ,EAAEA;EAAS,GAChDb,KAAA,CAAAqB,aAAA,CAACnB,iBAAiB;IAChBS,QAAQ,EAAEA,QAAS;IACnBC,WAAW,EAAEA,WAAY;IACzBH,YAAY,EAAEA;EAAa,CAC5B,CACY,CACD,CAAC;AAErB,CAAC;AAED,SAASN,0BAA0B","ignoreList":[]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { useSuspenseQuery } from '@apollo/client';
|
|
3
2
|
import { ChartError, useLayoutProvider } from '@oanda/labs-widget-common';
|
|
4
|
-
import
|
|
3
|
+
import React from 'react';
|
|
5
4
|
import { validateInstruments } from '../gql/validateInstruments';
|
|
5
|
+
import { Main } from './Main';
|
|
6
6
|
const ValidationWrapper = _ref => {
|
|
7
|
+
var _data$mapInstrumentNa;
|
|
7
8
|
let {
|
|
8
9
|
division,
|
|
9
10
|
instruments,
|
|
@@ -23,10 +24,10 @@ const ValidationWrapper = _ref => {
|
|
|
23
24
|
fetchPolicy: 'network-only',
|
|
24
25
|
errorPolicy: 'all'
|
|
25
26
|
});
|
|
26
|
-
const instrumentsData = data
|
|
27
|
+
const instrumentsData = (data === null || data === void 0 || (_data$mapInstrumentNa = data.mapInstrumentNames) === null || _data$mapInstrumentNa === void 0 ? void 0 : _data$mapInstrumentNa.map(instrument => ({
|
|
27
28
|
name: instrument.name,
|
|
28
29
|
displayName: instrument.displayName
|
|
29
|
-
})) || [];
|
|
30
|
+
}))) || [];
|
|
30
31
|
const showError = !!error || isParamError;
|
|
31
32
|
return React.createElement(React.Fragment, null, size && React.createElement(React.Fragment, null, showError ? React.createElement("div", {
|
|
32
33
|
className: "lw-flex lw-h-[300px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary"
|