@oanda/labs-live-rates-table-widget 1.0.39 → 1.0.41
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 +332 -0
- package/dist/main/LiveRatesTableWidget/LiveRatesTableWidget.js +14 -14
- package/dist/main/LiveRatesTableWidget/LiveRatesTableWidget.js.map +1 -1
- package/dist/main/LiveRatesTableWidget/Main.js +15 -15
- package/dist/main/LiveRatesTableWidget/Main.js.map +1 -1
- package/dist/main/LiveRatesTableWidget/components/CardWithData/CardWithData.js +22 -20
- package/dist/main/LiveRatesTableWidget/components/CardWithData/CardWithData.js.map +1 -1
- package/dist/main/LiveRatesTableWidget/components/Cards/Cards.js +7 -7
- package/dist/main/LiveRatesTableWidget/components/Cards/Cards.js.map +1 -1
- package/dist/main/LiveRatesTableWidget/components/Cards/types.js.map +1 -1
- package/dist/main/LiveRatesTableWidget/components/LineChartWithData/LineChartWithData.js +6 -5
- package/dist/main/LiveRatesTableWidget/components/LineChartWithData/LineChartWithData.js.map +1 -1
- package/dist/main/LiveRatesTableWidget/components/LineChartWithData/types.js.map +1 -1
- package/dist/main/LiveRatesTableWidget/components/LineChartWithData/utils.js +1 -1
- package/dist/main/LiveRatesTableWidget/components/LineChartWithData/utils.js.map +1 -1
- package/dist/main/LiveRatesTableWidget/components/RowWithData/RowWithData.js +29 -27
- package/dist/main/LiveRatesTableWidget/components/RowWithData/RowWithData.js.map +1 -1
- package/dist/main/LiveRatesTableWidget/components/index.js +12 -12
- package/dist/main/LiveRatesTableWidget/components/index.js.map +1 -1
- package/dist/main/LiveRatesTableWidget/config.js.map +1 -1
- package/dist/main/LiveRatesTableWidget/constant.js.map +1 -1
- package/dist/main/LiveRatesTableWidget/render.js +6 -6
- package/dist/main/LiveRatesTableWidget/render.js.map +1 -1
- package/dist/main/LiveRatesTableWidget/types.js +1 -1
- package/dist/main/LiveRatesTableWidget/types.js.map +1 -1
- package/dist/main/LiveRatesTableWidget/utils.js +17 -14
- package/dist/main/LiveRatesTableWidget/utils.js.map +1 -1
- package/dist/main/gql/getInstrumentsChart.js +3 -8
- package/dist/main/gql/getInstrumentsChart.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 +4 -3
- package/dist/main/gql/types/gql.js.map +1 -1
- package/dist/main/gql/types/graphql.js +142 -142
- 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/main/translations/translations.js.map +1 -1
- package/dist/module/LiveRatesTableWidget/LiveRatesTableWidget.js +14 -14
- package/dist/module/LiveRatesTableWidget/LiveRatesTableWidget.js.map +1 -1
- package/dist/module/LiveRatesTableWidget/Main.js +17 -17
- package/dist/module/LiveRatesTableWidget/Main.js.map +1 -1
- package/dist/module/LiveRatesTableWidget/components/CardWithData/CardWithData.js +23 -21
- package/dist/module/LiveRatesTableWidget/components/CardWithData/CardWithData.js.map +1 -1
- package/dist/module/LiveRatesTableWidget/components/Cards/Cards.js +7 -7
- package/dist/module/LiveRatesTableWidget/components/Cards/Cards.js.map +1 -1
- package/dist/module/LiveRatesTableWidget/components/Cards/types.js.map +1 -1
- package/dist/module/LiveRatesTableWidget/components/LineChartWithData/LineChartWithData.js +6 -5
- package/dist/module/LiveRatesTableWidget/components/LineChartWithData/LineChartWithData.js.map +1 -1
- package/dist/module/LiveRatesTableWidget/components/LineChartWithData/types.js.map +1 -1
- package/dist/module/LiveRatesTableWidget/components/LineChartWithData/utils.js +2 -2
- package/dist/module/LiveRatesTableWidget/components/LineChartWithData/utils.js.map +1 -1
- package/dist/module/LiveRatesTableWidget/components/RowWithData/RowWithData.js +29 -27
- package/dist/module/LiveRatesTableWidget/components/RowWithData/RowWithData.js.map +1 -1
- package/dist/module/LiveRatesTableWidget/components/index.js +2 -2
- package/dist/module/LiveRatesTableWidget/components/index.js.map +1 -1
- package/dist/module/LiveRatesTableWidget/config.js.map +1 -1
- package/dist/module/LiveRatesTableWidget/constant.js +1 -1
- package/dist/module/LiveRatesTableWidget/constant.js.map +1 -1
- package/dist/module/LiveRatesTableWidget/render.js +6 -6
- package/dist/module/LiveRatesTableWidget/render.js.map +1 -1
- package/dist/module/LiveRatesTableWidget/types.js +1 -1
- package/dist/module/LiveRatesTableWidget/types.js.map +1 -1
- package/dist/module/LiveRatesTableWidget/utils.js +18 -15
- package/dist/module/LiveRatesTableWidget/utils.js.map +1 -1
- package/dist/module/gql/getInstrumentsChart.js +3 -8
- package/dist/module/gql/getInstrumentsChart.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 +4 -3
- package/dist/module/gql/types/gql.js.map +1 -1
- package/dist/module/gql/types/graphql.js +142 -142
- 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/module/translations/translations.js.map +1 -1
- package/dist/types/LiveRatesTableWidget/LiveRatesTableWidget.d.ts +1 -1
- package/dist/types/LiveRatesTableWidget/Main.d.ts +1 -1
- package/dist/types/LiveRatesTableWidget/components/CardWithData/CardWithData.d.ts +1 -1
- package/dist/types/LiveRatesTableWidget/components/Cards/Cards.d.ts +1 -1
- package/dist/types/LiveRatesTableWidget/components/Cards/types.d.ts +2 -2
- package/dist/types/LiveRatesTableWidget/components/LineChartWithData/LineChartWithData.d.ts +1 -1
- package/dist/types/LiveRatesTableWidget/components/LineChartWithData/types.d.ts +3 -3
- package/dist/types/LiveRatesTableWidget/components/RowWithData/RowWithData.d.ts +1 -1
- package/dist/types/LiveRatesTableWidget/components/index.d.ts +2 -2
- package/dist/types/LiveRatesTableWidget/config.d.ts +1 -1
- package/dist/types/LiveRatesTableWidget/constant.d.ts +1 -1
- package/dist/types/LiveRatesTableWidget/types.d.ts +4 -4
- package/dist/types/LiveRatesTableWidget/utils.d.ts +5 -4
- package/dist/types/gql/types/gql.d.ts +4 -4
- 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/LiveRatesTableWidget/LiveRatesTableWidget.tsx +14 -17
- package/src/LiveRatesTableWidget/Main.tsx +49 -43
- package/src/LiveRatesTableWidget/components/CardWithData/CardWithData.tsx +43 -28
- package/src/LiveRatesTableWidget/components/Cards/Cards.tsx +15 -8
- package/src/LiveRatesTableWidget/components/Cards/types.tsx +2 -2
- package/src/LiveRatesTableWidget/components/LineChartWithData/LineChartWithData.tsx +12 -10
- package/src/LiveRatesTableWidget/components/LineChartWithData/types.tsx +4 -3
- package/src/LiveRatesTableWidget/components/LineChartWithData/utils.ts +1 -1
- package/src/LiveRatesTableWidget/components/RowWithData/RowWithData.tsx +63 -30
- package/src/LiveRatesTableWidget/components/index.ts +2 -2
- package/src/LiveRatesTableWidget/config.ts +2 -4
- package/src/LiveRatesTableWidget/constant.ts +4 -1
- package/src/LiveRatesTableWidget/render.tsx +52 -34
- package/src/LiveRatesTableWidget/types.tsx +5 -4
- package/src/LiveRatesTableWidget/utils.ts +20 -17
- package/src/gql/types/fragment-masking.ts +41 -21
- package/src/gql/types/gql.ts +12 -5
- package/src/gql/types/graphql.ts +214 -49
- package/src/gql/types/index.ts +2 -2
- package/src/index.ts +1 -1
- package/src/translations/index.ts +4 -4
- package/src/translations/translations.ts +2 -1
- package/test/CardWithData.test.tsx +8 -7
- package/test/Cards.test.tsx +32 -29
- package/test/LineChartWithData.test.tsx +77 -32
- package/test/Main.test.tsx +10 -9
- package/test/RowWithData.test.tsx +9 -8
- package/test/mocks.ts +1 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.js","names":["AssetClassName","exports","BookType","CorrelationTimeUnit","CurrencyName","CurrencyPowerBalanceTimeUnit","DataSource","Division","Region","Sort","TopicalSort","ValueAtRiskBars","ValueAtRiskDuration","VolatilityChartTimeSpan","VolatilityChartTimeUnit","GetInstrumentsChartDocument","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 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 GetInstrumentsChartQueryVariables = Exact<{\n instruments?: InputMaybe<Array<Scalars['String']['input']> | Scalars['String']['input']>;\n division?: InputMaybe<Division>;\n}>;\n\n\nexport type GetInstrumentsChartQuery = { __typename?: 'Query', topicalInstrumentsCharts?: Array<{ __typename?: 'TopicalInstrumentChart', name: string, chart?: Array<number> | null }> | null };\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 GetInstrumentsChartDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"GetInstrumentsChart\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"}},\"type\":{\"kind\":\"ListType\",\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Division\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"topicalInstrumentsCharts\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"chart\"}}]}}]}}]} as unknown as DocumentNode<GetInstrumentsChartQuery, GetInstrumentsChartQueryVariables>;\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,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAA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,CAAC;UAAC,OAAO,EAAC;YAAC,MAAM,EAAC,UAAU;YAAC,MAAM,EAAC;cAAC,MAAM,EAAC,MAAM;cAAC,OAAO,EAAC;YAAa;UAAC;QAAC,CAAC,EAAC;UAAC,MAAM,EAAC,UAAU;UAAC,MAAM,EAAC;YAAC,MAAM,EAAC,MAAM;YAAC,OAAO,EAAC;UAAU,CAAC;UAAC,OAAO,EAAC;YAAC,MAAM,EAAC,UAAU;YAAC,MAAM,EAAC;cAAC,MAAM,EAAC,MAAM;cAAC,OAAO,EAAC;YAAU;UAAC;QAAC,CAAC,CAAC;QAAC,cAAc,EAAC;UAAC,MAAM,EAAC,cAAc;UAAC,YAAY,EAAC,CAAC;YAAC,MAAM,EAAC,OAAO;YAAC,MAAM,EAAC;cAAC,MAAM,EAAC,MAAM;cAAC,OAAO,EAAC;YAAM;UAAC,CAAC,EAAC;YAAC,MAAM,EAAC,OAAO;YAAC,MAAM,EAAC;cAAC,MAAM,EAAC,MAAM;cAAC,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","GetInstrumentsChartDocument","kind","definitions","operation","name","value","variableDefinitions","variable","type","selectionSet","selections","arguments","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 }> = {\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 GetInstrumentsChartQueryVariables = Exact<{\n instruments?: InputMaybe<\n Array<Scalars['String']['input']> | Scalars['String']['input']\n >;\n division?: InputMaybe<Division>;\n}>;\n\nexport type GetInstrumentsChartQuery = {\n __typename?: 'Query';\n topicalInstrumentsCharts?: Array<{\n __typename?: 'TopicalInstrumentChart';\n name: string;\n chart?: Array<number> | null;\n }> | null;\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 GetInstrumentsChartDocument = {\n kind: 'Document',\n definitions: [\n {\n kind: 'OperationDefinition',\n operation: 'query',\n name: { kind: 'Name', value: 'GetInstrumentsChart' },\n variableDefinitions: [\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'instruments' },\n },\n type: {\n kind: 'ListType',\n type: {\n kind: 'NonNullType',\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: 'topicalInstrumentsCharts' },\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: 'chart' } },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<\n GetInstrumentsChartQuery,\n GetInstrumentsChartQueryVariables\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,aAA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|
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 _LiveRatesTableWidget = require("./LiveRatesTableWidget/LiveRatesTableWidget");
|
|
7
|
+
Object.keys(_LiveRatesTableWidget).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] === _LiveRatesTableWidget[key]) return;
|
|
10
10
|
Object.defineProperty(exports, key, {
|
|
11
11
|
enumerable: true,
|
|
12
12
|
get: function () {
|
|
13
|
-
return
|
|
13
|
+
return _LiveRatesTableWidget[key];
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
-
var
|
|
18
|
-
Object.keys(
|
|
17
|
+
var _types = require("./LiveRatesTableWidget/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":["_LiveRatesTableWidget","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_types"],"sources":["../../src/index.ts"],"sourcesContent":["export * from './LiveRatesTableWidget/LiveRatesTableWidget';\nexport * from './LiveRatesTableWidget/types';\n"],"mappings":";;;;;AAAA,IAAAA,qBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,qBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,qBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,qBAAA,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.js","names":["defaultTranslations","exports","bearish","bullish","buy","buy_orders","buy_price","daily_change","data_unavailable","hot","instrument","pagination_entries_range","popular","sell","sell_price","sentiment","spread","volatile"],"sources":["../../../src/translations/translations.ts"],"sourcesContent":["export const defaultTranslations = {\n '24h_chart': '24h Chart',\n bearish: 'Bearish',\n bullish: 'Bullish',\n buy: 'Buy',\n buy_orders: 'Buy Orders',\n buy_price: 'Buy Price',\n daily_change: 'Daily Change (%)',\n data_unavailable: 'Data unavailable',\n hot: 'Hot',\n instrument: 'Instrument',\n pagination_entries_range
|
|
1
|
+
{"version":3,"file":"translations.js","names":["defaultTranslations","exports","bearish","bullish","buy","buy_orders","buy_price","daily_change","data_unavailable","hot","instrument","pagination_entries_range","popular","sell","sell_price","sentiment","spread","volatile"],"sources":["../../../src/translations/translations.ts"],"sourcesContent":["export const defaultTranslations = {\n '24h_chart': '24h Chart',\n bearish: 'Bearish',\n bullish: 'Bullish',\n buy: 'Buy',\n buy_orders: 'Buy Orders',\n buy_price: 'Buy Price',\n daily_change: 'Daily Change (%)',\n data_unavailable: 'Data unavailable',\n hot: 'Hot',\n instrument: 'Instrument',\n pagination_entries_range:\n '{{firstItemOnPage}}-{{lastItemOnPage}} of {{itemCount}} entries',\n popular: 'Popular',\n sell: 'Sell',\n sell_price: 'Sell Price',\n sentiment: 'Sentiment',\n spread: 'Spread',\n volatile: 'Volatile',\n};\n"],"mappings":";;;;;;AAAO,MAAMA,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG;EACjC,WAAW,EAAE,WAAW;EACxBE,OAAO,EAAE,SAAS;EAClBC,OAAO,EAAE,SAAS;EAClBC,GAAG,EAAE,KAAK;EACVC,UAAU,EAAE,YAAY;EACxBC,SAAS,EAAE,WAAW;EACtBC,YAAY,EAAE,kBAAkB;EAChCC,gBAAgB,EAAE,kBAAkB;EACpCC,GAAG,EAAE,KAAK;EACVC,UAAU,EAAE,YAAY;EACxBC,wBAAwB,EACtB,iEAAiE;EACnEC,OAAO,EAAE,SAAS;EAClBC,IAAI,EAAE,MAAM;EACZC,UAAU,EAAE,YAAY;EACxBC,SAAS,EAAE,WAAW;EACtBC,MAAM,EAAE,QAAQ;EAChBC,QAAQ,EAAE;AACZ,CAAC","ignoreList":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
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
|
+
import { sizeConfig } from './config';
|
|
5
6
|
import { Main } from './Main';
|
|
6
7
|
import { Division } from './types';
|
|
7
|
-
import { sizeConfig } from './config';
|
|
8
8
|
const LiveRatesTableWidget = _ref => {
|
|
9
9
|
let {
|
|
10
10
|
graphqlUrl,
|
|
@@ -26,29 +26,29 @@ const LiveRatesTableWidget = _ref => {
|
|
|
26
26
|
const divisionCode = division === Division.Opt ? Division.Ogm : division;
|
|
27
27
|
const dataSource = divisionCode === Division.Ogm ? 'MT5' : 'V20';
|
|
28
28
|
return React.createElement(WidgetProvider, {
|
|
29
|
-
locale: locale,
|
|
30
|
-
translations: translations,
|
|
31
29
|
client: client,
|
|
32
|
-
theme: theme,
|
|
33
|
-
styling: {
|
|
34
|
-
removePadding,
|
|
35
|
-
size: view && sizeConfig[view]
|
|
36
|
-
},
|
|
37
30
|
liveRates: {
|
|
38
31
|
url: liveRatesUrl,
|
|
39
32
|
options: {
|
|
40
33
|
divisionCode,
|
|
41
34
|
dataSource
|
|
42
35
|
}
|
|
43
|
-
}
|
|
36
|
+
},
|
|
37
|
+
locale: locale,
|
|
38
|
+
styling: {
|
|
39
|
+
removePadding,
|
|
40
|
+
size: view && sizeConfig[view]
|
|
41
|
+
},
|
|
42
|
+
theme: theme,
|
|
43
|
+
translations: translations
|
|
44
44
|
}, React.createElement(WidgetWrapper, {
|
|
45
|
-
|
|
45
|
+
isParamError: isParamError,
|
|
46
46
|
linkArea: "logo",
|
|
47
|
-
|
|
47
|
+
logoLink: logoLink
|
|
48
48
|
}, React.createElement(Main, {
|
|
49
|
-
|
|
49
|
+
columns: columns,
|
|
50
50
|
division: division,
|
|
51
|
-
|
|
51
|
+
instruments: instruments
|
|
52
52
|
})));
|
|
53
53
|
};
|
|
54
54
|
export { LiveRatesTableWidget };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveRatesTableWidget.js","names":["
|
|
1
|
+
{"version":3,"file":"LiveRatesTableWidget.js","names":["ApolloClient","InMemoryCache","WidgetProvider","WidgetWrapper","React","translations","sizeConfig","Main","Division","LiveRatesTableWidget","_ref","graphqlUrl","liveRatesUrl","instruments","division","columns","locale","theme","isParamError","removePadding","view","logoLink","client","uri","cache","divisionCode","Opt","Ogm","dataSource","createElement","liveRates","url","options","styling","size","linkArea"],"sources":["../../../src/LiveRatesTableWidget/LiveRatesTableWidget.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 { sizeConfig } from './config';\nimport { Main } from './Main';\nimport type { LiveRatesTableConfig } from './types';\nimport { Division } from './types';\n\nconst LiveRatesTableWidget = ({\n graphqlUrl,\n liveRatesUrl,\n instruments,\n division,\n columns,\n locale,\n theme,\n isParamError,\n removePadding,\n view,\n logoLink,\n}: LiveRatesTableConfig) => {\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 client={client}\n liveRates={{\n url: liveRatesUrl,\n options: { divisionCode, dataSource },\n }}\n locale={locale}\n styling={{\n removePadding,\n size: view && sizeConfig[view],\n }}\n theme={theme}\n translations={translations}\n >\n <WidgetWrapper\n isParamError={isParamError}\n linkArea=\"logo\"\n logoLink={logoLink}\n >\n <Main columns={columns} division={division} instruments={instruments} />\n </WidgetWrapper>\n </WidgetProvider>\n );\n};\n\nexport { LiveRatesTableWidget };\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,UAAU,QAAQ,UAAU;AACrC,SAASC,IAAI,QAAQ,QAAQ;AAE7B,SAASC,QAAQ,QAAQ,SAAS;AAElC,MAAMC,oBAAoB,GAAGC,IAAA,IAYD;EAAA,IAZE;IAC5BC,UAAU;IACVC,YAAY;IACZC,WAAW;IACXC,QAAQ;IACRC,OAAO;IACPC,MAAM;IACNC,KAAK;IACLC,YAAY;IACZC,aAAa;IACbC,IAAI;IACJC;EACoB,CAAC,GAAAX,IAAA;EACrB,MAAMY,MAAM,GAAG,IAAItB,YAAY,CAAC;IAC9BuB,GAAG,EAAEZ,UAAU;IACfa,KAAK,EAAE,IAAIvB,aAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,MAAMwB,YAAY,GAAGX,QAAQ,KAAKN,QAAQ,CAACkB,GAAG,GAAGlB,QAAQ,CAACmB,GAAG,GAAGb,QAAQ;EACxE,MAAMc,UAAU,GAAGH,YAAY,KAAKjB,QAAQ,CAACmB,GAAG,GAAG,KAAK,GAAG,KAAK;EAEhE,OACEvB,KAAA,CAAAyB,aAAA,CAAC3B,cAAc;IACboB,MAAM,EAAEA,MAAO;IACfQ,SAAS,EAAE;MACTC,GAAG,EAAEnB,YAAY;MACjBoB,OAAO,EAAE;QAAEP,YAAY;QAAEG;MAAW;IACtC,CAAE;IACFZ,MAAM,EAAEA,MAAO;IACfiB,OAAO,EAAE;MACPd,aAAa;MACbe,IAAI,EAAEd,IAAI,IAAId,UAAU,CAACc,IAAI;IAC/B,CAAE;IACFH,KAAK,EAAEA,KAAM;IACbZ,YAAY,EAAEA;EAAa,GAE3BD,KAAA,CAAAyB,aAAA,CAAC1B,aAAa;IACZe,YAAY,EAAEA,YAAa;IAC3BiB,QAAQ,EAAC,MAAM;IACfd,QAAQ,EAAEA;EAAS,GAEnBjB,KAAA,CAAAyB,aAAA,CAACtB,IAAI;IAACQ,OAAO,EAAEA,OAAQ;IAACD,QAAQ,EAAEA,QAAS;IAACD,WAAW,EAAEA;EAAY,CAAE,CAC1D,CACD,CAAC;AAErB,CAAC;AAED,SAASJ,oBAAoB","ignoreList":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
1
|
import { useQuery } from '@apollo/client';
|
|
3
|
-
import { Size, Table,
|
|
4
|
-
import {
|
|
5
|
-
import { RowWithData, Cards } from './components';
|
|
6
|
-
import { DEFAULT_COLUMNS, INSTRUMENT_TOOLTIP_ID } from './constant';
|
|
2
|
+
import { Size, Table, Tooltip, useLayoutProvider, useLiveRatesQuery } from '@oanda/labs-widget-common';
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
7
4
|
import { validateInstruments } from '../gql/validateInstruments';
|
|
5
|
+
import { Cards, RowWithData } from './components';
|
|
6
|
+
import { DEFAULT_COLUMNS, INSTRUMENT_TOOLTIP_ID } from './constant';
|
|
7
|
+
import { getHeaderConfig, getRecords } from './utils';
|
|
8
8
|
const Main = _ref => {
|
|
9
9
|
let {
|
|
10
10
|
instruments,
|
|
@@ -51,31 +51,31 @@ const Main = _ref => {
|
|
|
51
51
|
}, [records, isDesktop]);
|
|
52
52
|
const showError = !loading && !!error || !loading && !data;
|
|
53
53
|
return React.createElement(React.Fragment, null, size && React.createElement("div", {
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
className: "lw-relative lw-text-sm lw-tracking-normal lw-text-text-primary",
|
|
55
|
+
"data-testid": "live-rates-table-wrapper"
|
|
56
56
|
}, isDesktop ? React.createElement("div", {
|
|
57
57
|
className: "lw-border lw-border-solid lw-border-border-primary"
|
|
58
58
|
}, React.createElement(Table, {
|
|
59
|
+
headerConfig: getHeaderConfig(columns),
|
|
59
60
|
isError: showError,
|
|
60
61
|
records: records,
|
|
61
|
-
headerConfig: getHeaderConfig(columns),
|
|
62
62
|
renderRow: (record, index, isScrolled) => React.createElement(RowWithData, {
|
|
63
|
+
key: "row_".concat(index),
|
|
64
|
+
activeColumns: columns,
|
|
65
|
+
division: division,
|
|
66
|
+
hasBackgroundColor: index % 2 === 0,
|
|
63
67
|
isScrolled: isScrolled,
|
|
64
68
|
loading: loading,
|
|
65
|
-
key: `row_${index}`,
|
|
66
69
|
record: record,
|
|
67
|
-
target: target
|
|
68
|
-
hasBackgroundColor: index % 2 === 0,
|
|
69
|
-
activeColumns: columns,
|
|
70
|
-
division: division
|
|
70
|
+
target: target
|
|
71
71
|
})
|
|
72
72
|
})) : React.createElement(Cards, {
|
|
73
|
-
records: records,
|
|
74
|
-
division: division,
|
|
75
|
-
target: target,
|
|
76
73
|
columns: columns,
|
|
74
|
+
division: division,
|
|
77
75
|
isError: showError,
|
|
78
|
-
isLoading: loading
|
|
76
|
+
isLoading: loading,
|
|
77
|
+
records: records,
|
|
78
|
+
target: target
|
|
79
79
|
}), React.createElement(Tooltip, {
|
|
80
80
|
id: INSTRUMENT_TOOLTIP_ID
|
|
81
81
|
})));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Main.js","names":["
|
|
1
|
+
{"version":3,"file":"Main.js","names":["useQuery","Size","Table","Tooltip","useLayoutProvider","useLiveRatesQuery","React","useEffect","useState","validateInstruments","Cards","RowWithData","DEFAULT_COLUMNS","INSTRUMENT_TOOLTIP_ID","getHeaderConfig","getRecords","Main","_ref","instruments","division","columns","size","isDesktop","DESKTOP","target","setQuery","records","setRecords","Array","length","fill","loading","data","error","variables","fetchPolicy","instrumentsNames","map","_ref2","instrument","showError","createElement","Fragment","className","headerConfig","isError","renderRow","record","index","isScrolled","key","concat","activeColumns","hasBackgroundColor","isLoading","id"],"sources":["../../../src/LiveRatesTableWidget/Main.tsx"],"sourcesContent":["import { useQuery } from '@apollo/client';\nimport {\n Size,\n Table,\n Tooltip,\n useLayoutProvider,\n useLiveRatesQuery,\n} from '@oanda/labs-widget-common';\nimport React, { useEffect, useState } from 'react';\n\nimport type {\n ValidateInstrumentsQuery,\n ValidateInstrumentsQueryVariables,\n} from '../gql/types/graphql';\nimport { validateInstruments } from '../gql/validateInstruments';\nimport { Cards, RowWithData } from './components';\nimport { DEFAULT_COLUMNS, INSTRUMENT_TOOLTIP_ID } from './constant';\nimport type { DataRecord, MainProps } from './types';\nimport { getHeaderConfig, getRecords } from './utils';\n\nconst Main = ({\n instruments,\n division,\n columns = DEFAULT_COLUMNS,\n}: MainProps) => {\n const { size } = useLayoutProvider();\n const isDesktop = size === Size.DESKTOP;\n const { target, setQuery } = useLiveRatesQuery();\n const [records, setRecords] = useState<DataRecord[]>(\n new Array(instruments.length).fill({})\n );\n\n const { loading, data, error } = useQuery<\n ValidateInstrumentsQuery,\n ValidateInstrumentsQueryVariables\n >(validateInstruments, {\n variables: {\n instruments,\n division,\n },\n fetchPolicy: 'network-only',\n });\n\n useEffect(() => {\n if (!loading && data) {\n setRecords(getRecords(data)!);\n }\n }, [loading, data]);\n\n const instrumentsNames = records.map(({ instrument }) => instrument);\n\n useEffect(() => {\n if (instrumentsNames[0]) {\n setQuery({ instruments: instrumentsNames });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [records, isDesktop]);\n\n const showError = (!loading && !!error) || (!loading && !data);\n\n return (\n <>\n {size && (\n <div\n className=\"lw-relative lw-text-sm lw-tracking-normal lw-text-text-primary\"\n data-testid=\"live-rates-table-wrapper\"\n >\n {isDesktop ? (\n <div className=\"lw-border lw-border-solid lw-border-border-primary\">\n <Table<DataRecord>\n headerConfig={getHeaderConfig(columns)}\n isError={showError}\n records={records}\n renderRow={(record, index, isScrolled) => (\n <RowWithData\n key={`row_${index}`}\n activeColumns={columns}\n division={division}\n hasBackgroundColor={index % 2 === 0}\n isScrolled={isScrolled}\n loading={loading}\n record={record}\n target={target}\n />\n )}\n />\n </div>\n ) : (\n <Cards\n columns={columns}\n division={division}\n isError={showError}\n isLoading={loading}\n records={records}\n target={target}\n />\n )}\n <Tooltip id={INSTRUMENT_TOOLTIP_ID} />\n </div>\n )}\n </>\n );\n};\n\nexport { Main };\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAgB;AACzC,SACEC,IAAI,EACJC,KAAK,EACLC,OAAO,EACPC,iBAAiB,EACjBC,iBAAiB,QACZ,2BAA2B;AAClC,OAAOC,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAMlD,SAASC,mBAAmB,QAAQ,4BAA4B;AAChE,SAASC,KAAK,EAAEC,WAAW,QAAQ,cAAc;AACjD,SAASC,eAAe,EAAEC,qBAAqB,QAAQ,YAAY;AAEnE,SAASC,eAAe,EAAEC,UAAU,QAAQ,SAAS;AAErD,MAAMC,IAAI,GAAGC,IAAA,IAII;EAAA,IAJH;IACZC,WAAW;IACXC,QAAQ;IACRC,OAAO,GAAGR;EACD,CAAC,GAAAK,IAAA;EACV,MAAM;IAAEI;EAAK,CAAC,GAAGjB,iBAAiB,CAAC,CAAC;EACpC,MAAMkB,SAAS,GAAGD,IAAI,KAAKpB,IAAI,CAACsB,OAAO;EACvC,MAAM;IAAEC,MAAM;IAAEC;EAAS,CAAC,GAAGpB,iBAAiB,CAAC,CAAC;EAChD,MAAM,CAACqB,OAAO,EAAEC,UAAU,CAAC,GAAGnB,QAAQ,CACpC,IAAIoB,KAAK,CAACV,WAAW,CAACW,MAAM,CAAC,CAACC,IAAI,CAAC,CAAC,CAAC,CACvC,CAAC;EAED,MAAM;IAAEC,OAAO;IAAEC,IAAI;IAAEC;EAAM,CAAC,GAAGj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AAK,CAAG;MACpBI,aAAa,EAAEhC,OAAQ;MACvBD,QAAQ,EAAEA,QAAS;MACnBkC,kBAAkB,EAAEL,KAAK,GAAG,CAAC,KAAK,CAAE;MACpCC,UAAU,EAAEA,UAAW;MACvBlB,OAAO,EAAEA,OAAQ;MACjBgB,MAAM,EAAEA,MAAO;MACfvB,MAAM,EAAEA;IAAO,CAChB;EACD,CACH,CACE,CAAC,GAENlB,KAAA,CAAAmC,aAAA,CAAC/B,KAAK;IACJU,OAAO,EAAEA,OAAQ;IACjBD,QAAQ,EAAEA,QAAS;IACnB0B,OAAO,EAAEL,SAAU;IACnBc,SAAS,EAAEvB,OAAQ;IACnBL,OAAO,EAAEA,OAAQ;IACjBF,MAAM,EAAEA;EAAO,CAChB,CACF,EACDlB,KAAA,CAAAmC,aAAA,CAACtC,OAAO;IAACoD,EAAE,EAAE1C;EAAsB,CAAE,CAClC,CAEP,CAAC;AAEP,CAAC;AAED,SAASG,IAAI","ignoreList":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Card, CardHeader, CardRow, Price, ArrowPosition, LineChartSize, Truncate } from '@oanda/labs-widget-common';
|
|
1
|
+
import { ArrowPosition, Card, CardHeader, CardRow, LineChartSize, Price, Truncate } from '@oanda/labs-widget-common';
|
|
3
2
|
import { useLocale } from '@oanda/mono-i18n';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { INSTRUMENT_TOOLTIP_ID } from '../../constant';
|
|
4
5
|
import { ColumnsNames } from '../../types';
|
|
5
|
-
import { LineChartWithData } from '../LineChartWithData';
|
|
6
6
|
import { useRecords } from '../../utils';
|
|
7
|
-
import {
|
|
7
|
+
import { LineChartWithData } from '../LineChartWithData';
|
|
8
8
|
const CardWithData = _ref => {
|
|
9
9
|
let {
|
|
10
10
|
isLoading,
|
|
@@ -23,7 +23,7 @@ const CardWithData = _ref => {
|
|
|
23
23
|
const {
|
|
24
24
|
lang
|
|
25
25
|
} = useLocale();
|
|
26
|
-
const checkLoading = id => isLoading || !error && updatedRecord
|
|
26
|
+
const checkLoading = id => isLoading || !error && (updatedRecord === null || updatedRecord === void 0 ? void 0 : updatedRecord[id]) === undefined;
|
|
27
27
|
return React.createElement(Card, {
|
|
28
28
|
ref: ref,
|
|
29
29
|
"data-testid": "card",
|
|
@@ -38,48 +38,50 @@ const CardWithData = _ref => {
|
|
|
38
38
|
}, activeColumns.includes(ColumnsNames.CHART) && React.createElement(LineChartWithData, {
|
|
39
39
|
division: division,
|
|
40
40
|
isLoading: checkLoading('instrument'),
|
|
41
|
-
size: LineChartSize.xs,
|
|
42
41
|
padding: 4,
|
|
43
|
-
record: updatedRecord
|
|
42
|
+
record: updatedRecord,
|
|
43
|
+
size: LineChartSize.xs
|
|
44
44
|
})), activeColumns.map(item => {
|
|
45
45
|
if (item === ColumnsNames.SELL) {
|
|
46
|
+
var _updatedRecord$sell;
|
|
46
47
|
return React.createElement(CardRow, {
|
|
47
48
|
key: ColumnsNames.SELL,
|
|
48
|
-
|
|
49
|
+
isError: !!error,
|
|
49
50
|
isLoading: checkLoading(ColumnsNames.SELL),
|
|
50
|
-
|
|
51
|
+
label: lang('sell_price')
|
|
51
52
|
}, React.createElement(Price, {
|
|
52
53
|
arrowPosition: ArrowPosition.left,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}, React.createElement("span", null, updatedRecord.sell
|
|
54
|
+
movementIndicator: "arrow",
|
|
55
|
+
priceMovement: updatedRecord.sellPriceMovement
|
|
56
|
+
}, React.createElement("span", null, (_updatedRecord$sell = updatedRecord.sell) === null || _updatedRecord$sell === void 0 ? void 0 : _updatedRecord$sell.toFixed(updatedRecord.displayPrecision))));
|
|
56
57
|
}
|
|
57
58
|
if (item === ColumnsNames.BUY) {
|
|
59
|
+
var _updatedRecord$buy;
|
|
58
60
|
return React.createElement(CardRow, {
|
|
59
61
|
key: ColumnsNames.BUY,
|
|
60
|
-
|
|
62
|
+
isError: !!error,
|
|
61
63
|
isLoading: checkLoading(ColumnsNames.BUY),
|
|
62
|
-
|
|
64
|
+
label: lang('buy_price')
|
|
63
65
|
}, React.createElement(Price, {
|
|
64
66
|
arrowPosition: ArrowPosition.left,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}, React.createElement("span", null, updatedRecord.buy
|
|
67
|
+
movementIndicator: "arrow",
|
|
68
|
+
priceMovement: updatedRecord.buyPriceMovement
|
|
69
|
+
}, React.createElement("span", null, (_updatedRecord$buy = updatedRecord.buy) === null || _updatedRecord$buy === void 0 ? void 0 : _updatedRecord$buy.toFixed(updatedRecord.displayPrecision))));
|
|
68
70
|
}
|
|
69
71
|
if (item === ColumnsNames.DAILY_CHANGE) {
|
|
70
72
|
return React.createElement(CardRow, {
|
|
71
73
|
key: ColumnsNames.DAILY_CHANGE,
|
|
72
|
-
|
|
74
|
+
isError: !!error,
|
|
73
75
|
isLoading: checkLoading('dailyPercentChange'),
|
|
74
|
-
|
|
76
|
+
label: lang('daily_percent_change')
|
|
75
77
|
}, React.createElement("span", null, updatedRecord.dailyPercentChange));
|
|
76
78
|
}
|
|
77
79
|
if (item === ColumnsNames.SPREAD) {
|
|
78
80
|
return React.createElement(CardRow, {
|
|
79
81
|
key: ColumnsNames.SPREAD,
|
|
80
|
-
|
|
82
|
+
isError: !!error,
|
|
81
83
|
isLoading: checkLoading(ColumnsNames.SPREAD),
|
|
82
|
-
|
|
84
|
+
label: lang('spread')
|
|
83
85
|
}, React.createElement("span", null, updatedRecord.spread));
|
|
84
86
|
}
|
|
85
87
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardWithData.js","names":["
|
|
1
|
+
{"version":3,"file":"CardWithData.js","names":["ArrowPosition","Card","CardHeader","CardRow","LineChartSize","Price","Truncate","useLocale","React","INSTRUMENT_TOOLTIP_ID","ColumnsNames","useRecords","LineChartWithData","CardWithData","_ref","isLoading","record","target","activeColumns","index","division","isLast","updatedRecord","error","ref","instrument","lang","checkLoading","id","undefined","createElement","withoutBottomBorder","number","title","text","displayName","tooltipId","includes","CHART","padding","size","xs","map","item","SELL","_updatedRecord$sell","key","isError","label","arrowPosition","left","movementIndicator","priceMovement","sellPriceMovement","sell","toFixed","displayPrecision","BUY","_updatedRecord$buy","buyPriceMovement","buy","DAILY_CHANGE","dailyPercentChange","SPREAD","spread"],"sources":["../../../../../src/LiveRatesTableWidget/components/CardWithData/CardWithData.tsx"],"sourcesContent":["import {\n ArrowPosition,\n Card,\n CardHeader,\n CardRow,\n LineChartSize,\n Price,\n Truncate,\n} from '@oanda/labs-widget-common';\nimport { useLocale } from '@oanda/mono-i18n';\nimport React from 'react';\n\nimport { INSTRUMENT_TOOLTIP_ID } from '../../constant';\nimport type { CardWithDataProps } from '../../types';\nimport { ColumnsNames } from '../../types';\nimport { useRecords } from '../../utils';\nimport { LineChartWithData } from '../LineChartWithData';\n\nconst CardWithData = ({\n isLoading,\n record,\n target,\n activeColumns,\n index,\n division,\n isLast,\n}: CardWithDataProps) => {\n const { updatedRecord, error, ref } = useRecords(\n record,\n record.instrument ? target : null\n );\n const { lang } = useLocale();\n\n const checkLoading = (id: string) =>\n isLoading || (!error && updatedRecord?.[id] === undefined);\n\n return (\n <Card ref={ref} data-testid=\"card\" withoutBottomBorder={!isLast}>\n <CardHeader\n isLoading={isLoading}\n number={index}\n title={\n <Truncate\n text={record.displayName}\n tooltipId={INSTRUMENT_TOOLTIP_ID}\n />\n }\n >\n {activeColumns.includes(ColumnsNames.CHART) && (\n <LineChartWithData\n division={division}\n isLoading={checkLoading('instrument')}\n padding={4}\n record={updatedRecord}\n size={LineChartSize.xs}\n />\n )}\n </CardHeader>\n {activeColumns.map((item) => {\n if (item === ColumnsNames.SELL) {\n return (\n <CardRow\n key={ColumnsNames.SELL}\n isError={!!error}\n isLoading={checkLoading(ColumnsNames.SELL)}\n label={lang('sell_price')}\n >\n <Price\n arrowPosition={ArrowPosition.left}\n movementIndicator=\"arrow\"\n priceMovement={updatedRecord.sellPriceMovement}\n >\n <span>\n {updatedRecord.sell?.toFixed(updatedRecord.displayPrecision)}\n </span>\n </Price>\n </CardRow>\n );\n }\n\n if (item === ColumnsNames.BUY) {\n return (\n <CardRow\n key={ColumnsNames.BUY}\n isError={!!error}\n isLoading={checkLoading(ColumnsNames.BUY)}\n label={lang('buy_price')}\n >\n <Price\n arrowPosition={ArrowPosition.left}\n movementIndicator=\"arrow\"\n priceMovement={updatedRecord.buyPriceMovement}\n >\n <span>\n {updatedRecord.buy?.toFixed(updatedRecord.displayPrecision)}\n </span>\n </Price>\n </CardRow>\n );\n }\n\n if (item === ColumnsNames.DAILY_CHANGE) {\n return (\n <CardRow\n key={ColumnsNames.DAILY_CHANGE}\n isError={!!error}\n isLoading={checkLoading('dailyPercentChange')}\n label={lang('daily_percent_change')}\n >\n <span>{updatedRecord.dailyPercentChange}</span>\n </CardRow>\n );\n }\n\n if (item === ColumnsNames.SPREAD) {\n return (\n <CardRow\n key={ColumnsNames.SPREAD}\n isError={!!error}\n isLoading={checkLoading(ColumnsNames.SPREAD)}\n label={lang('spread')}\n >\n <span>{updatedRecord.spread}</span>\n </CardRow>\n );\n }\n return null;\n })}\n </Card>\n );\n};\n\nexport { CardWithData };\n"],"mappings":"AAAA,SACEA,aAAa,EACbC,IAAI,EACJC,UAAU,EACVC,OAAO,EACPC,aAAa,EACbC,KAAK,EACLC,QAAQ,QACH,2BAA2B;AAClC,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,qBAAqB,QAAQ,gBAAgB;AAEtD,SAASC,YAAY,QAAQ,aAAa;AAC1C,SAASC,UAAU,QAAQ,aAAa;AACxC,SAASC,iBAAiB,QAAQ,sBAAsB;AAExD,MAAMC,YAAY,GAAGC,IAAA,IAQI;EAAA,IARH;IACpBC,SAAS;IACTC,MAAM;IACNC,MAAM;IACNC,aAAa;IACbC,KAAK;IACLC,QAAQ;IACRC;EACiB,CAAC,GAAAP,IAAA;EAClB,MAAM;IAAEQ,aA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C,CAACxB,KAAM;QACjBR,SAAS,EAAEY,YAAY,CAAC,oBAAoB,CAAE;QAC9CqB,KAAK,EAAEtB,IAAI,CAAC,sBAAsB;MAAE,GAEpClB,KAAA,CAAAsB,aAAA,eAAOR,aAAa,CAACwC,kBAAyB,CACvC,CAAC;IAEd;IAEA,IAAInB,IAAI,KAAKjC,YAAY,CAACqD,MAAM,EAAE;MAChC,OACEvD,KAAA,CAAAsB,aAAA,CAAC3B,OAAO;QACN2C,GAAG,EAAEpC,YAAY,CAACqD,MAAO;QACzBhB,OAAO,EAAE,CAAC,CAACxB,KAAM;QACjBR,SAAS,EAAEY,YAAY,CAACjB,YAAY,CAACqD,MAAM,CAAE;QAC7Cf,KAAK,EAAEtB,IAAI,CAAC,QAAQ;MAAE,GAEtBlB,KAAA,CAAAsB,aAAA,eAAOR,aAAa,CAAC0C,MAAa,CAC3B,CAAC;IAEd;IACA,OAAO,IAAI;EACb,CAAC,CACG,CAAC;AAEX,CAAC;AAED,SAASnD,YAAY","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Card, ChartError } from '@oanda/labs-widget-common';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { CardWithData } from '../CardWithData/CardWithData';
|
|
4
4
|
const Cards = _ref => {
|
|
5
5
|
let {
|
|
@@ -14,16 +14,16 @@ const Cards = _ref => {
|
|
|
14
14
|
return React.createElement(React.Fragment, null, isError ? React.createElement(Card, null, React.createElement("div", {
|
|
15
15
|
className: "lw-flex lw-h-[150px] lw-w-full lw-items-center lw-justify-center"
|
|
16
16
|
}, React.createElement(ChartError, null))) : React.createElement(React.Fragment, null, records.map((record, index) => React.createElement("div", {
|
|
17
|
-
key:
|
|
17
|
+
key: "card_".concat(startIndex + index)
|
|
18
18
|
}, React.createElement(CardWithData, {
|
|
19
|
-
index: startIndex + index + 1,
|
|
20
|
-
division: division,
|
|
21
|
-
record: record,
|
|
22
|
-
target: target,
|
|
23
19
|
activeColumns: columns,
|
|
20
|
+
division: division,
|
|
21
|
+
index: startIndex + index + 1,
|
|
24
22
|
isError: isError,
|
|
23
|
+
isLast: index + 1 === records.length,
|
|
25
24
|
isLoading: isLoading,
|
|
26
|
-
|
|
25
|
+
record: record,
|
|
26
|
+
target: target
|
|
27
27
|
})))));
|
|
28
28
|
};
|
|
29
29
|
export { Cards };
|