@oanda/labs-instruments-table-widget 1.0.27 → 1.0.29
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 +236 -0
- package/dist/main/InstrumentsTableWidget/Main.js +13 -3
- package/dist/main/InstrumentsTableWidget/Main.js.map +1 -1
- package/dist/main/InstrumentsTableWidget/config.js +6 -1
- package/dist/main/InstrumentsTableWidget/config.js.map +1 -1
- package/dist/main/gql/resolveInstrumentsWithFilters.js +5 -0
- package/dist/main/gql/resolveInstrumentsWithFilters.js.map +1 -1
- package/dist/main/gql/types/gql.js +1 -1
- package/dist/main/gql/types/gql.js.map +1 -1
- package/dist/main/gql/types/graphql.js +115 -1
- package/dist/main/gql/types/graphql.js.map +1 -1
- package/dist/main/translations/sources/en.json +7 -6
- package/dist/module/InstrumentsTableWidget/Main.js +15 -5
- package/dist/module/InstrumentsTableWidget/Main.js.map +1 -1
- package/dist/module/InstrumentsTableWidget/config.js +7 -2
- package/dist/module/InstrumentsTableWidget/config.js.map +1 -1
- package/dist/module/gql/resolveInstrumentsWithFilters.js +5 -0
- package/dist/module/gql/resolveInstrumentsWithFilters.js.map +1 -1
- package/dist/module/gql/types/gql.js +1 -1
- package/dist/module/gql/types/gql.js.map +1 -1
- package/dist/module/gql/types/graphql.js +114 -0
- package/dist/module/gql/types/graphql.js.map +1 -1
- package/dist/module/translations/sources/en.json +7 -6
- package/dist/types/InstrumentsTableWidget/config.d.ts +3 -1
- package/dist/types/gql/types/gql.d.ts +4 -2
- package/dist/types/gql/types/graphql.d.ts +22 -2
- package/package.json +3 -3
- package/src/InstrumentsTableWidget/Main.tsx +28 -1
- package/src/InstrumentsTableWidget/config.ts +10 -2
- package/src/gql/resolveInstrumentsWithFilters.ts +5 -0
- package/src/gql/types/gql.ts +3 -3
- package/src/gql/types/graphql.ts +103 -2
- package/src/translations/sources/en.json +7 -6
- package/test/Main.test.tsx +22 -0
- package/test/mocks.ts +53 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.js","names":["AssetClassName","exports","BookType","CorrelationTimeUnit","CurrencyName","CurrencyPowerBalanceTimeUnit","DataSource","Division","InstrumentDataSource","Region","Sort","TopicalSort","ValueAtRiskBars","ValueAtRiskDuration","VolatilityChartTimeSpan","VolatilityChartTimeUnit","ResolveInstrumentsWithFiltersDocument","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 Etfs = 'ETFS',\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 enum InstrumentDataSource {\n Mt5 = 'MT5',\n V20 = 'V20',\n}\n\nexport type InstrumentTableResult = {\n __typename?: 'InstrumentTableResult';\n instruments: Array<Instrument>;\n totalCount: Scalars['Int']['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 resolveInstrumentsWithFilters?: Maybe<InstrumentTableResult>;\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 QueryResolveInstrumentsWithFiltersArgs = {\n assetClass?: InputMaybe<Array<InputMaybe<AssetClassName>>>;\n count?: InputMaybe<Scalars['Int']['input']>;\n dataSource?: InputMaybe<InstrumentDataSource>;\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n searchPattern?: 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 ResolveInstrumentsWithFiltersQueryVariables = Exact<{\n division: Division;\n assetClass?: InputMaybe<\n Array<InputMaybe<AssetClassName>> | InputMaybe<AssetClassName>\n >;\n dataSource?: InputMaybe<InstrumentDataSource>;\n instruments?: InputMaybe<\n | Array<InputMaybe<Scalars['String']['input']>>\n | InputMaybe<Scalars['String']['input']>\n >;\n searchPattern?: InputMaybe<Scalars['String']['input']>;\n count?: InputMaybe<Scalars['Int']['input']>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n}>;\n\nexport type ResolveInstrumentsWithFiltersQuery = {\n __typename?: 'Query';\n resolveInstrumentsWithFilters?: {\n __typename?: 'InstrumentTableResult';\n totalCount: number;\n instruments: Array<{\n __typename?: 'Instrument';\n name: string;\n displayName: string;\n }>;\n } | null;\n};\n\nexport const ResolveInstrumentsWithFiltersDocument = {\n kind: 'Document',\n definitions: [\n {\n kind: 'OperationDefinition',\n operation: 'query',\n name: { kind: 'Name', value: 'resolveInstrumentsWithFilters' },\n variableDefinitions: [\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'division' },\n },\n type: {\n kind: 'NonNullType',\n type: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'Division' },\n },\n },\n },\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'assetClass' },\n },\n type: {\n kind: 'ListType',\n type: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'AssetClassName' },\n },\n },\n },\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'dataSource' },\n },\n type: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'InstrumentDataSource' },\n },\n },\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: 'NamedType',\n name: { kind: 'Name', value: 'String' },\n },\n },\n },\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'searchPattern' },\n },\n type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } },\n },\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'count' },\n },\n type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } },\n },\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'offset' },\n },\n type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } },\n },\n ],\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'resolveInstrumentsWithFilters' },\n arguments: [\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 kind: 'Argument',\n name: { kind: 'Name', value: 'assetClass' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'assetClass' },\n },\n },\n {\n kind: 'Argument',\n name: { kind: 'Name', value: 'dataSource' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'dataSource' },\n },\n },\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: 'searchPattern' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'searchPattern' },\n },\n },\n {\n kind: 'Argument',\n name: { kind: 'Name', value: 'count' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'count' },\n },\n },\n {\n kind: 'Argument',\n name: { kind: 'Name', value: 'offset' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'offset' },\n },\n },\n ],\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'instruments' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'displayName' },\n },\n ],\n },\n },\n { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<\n ResolveInstrumentsWithFiltersQuery,\n ResolveInstrumentsWithFiltersQueryVariables\n>;\n"],"mappings":";;;;;;IAqCYA,cAAc,GAAAC,OAAA,CAAAD,cAAA,aAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAAA,IAUdE,QAAQ,GAAAD,OAAA,CAAAC,QAAA,aAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAAA,IAiBRC,mBAAmB,GAAAF,OAAA,CAAAE,mBAAA,aAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAAA,IAWnBC,YAAY,GAAAH,OAAA,CAAAG,YAAA,aAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAAA,IAyBZC,4BAA4B,GAAAJ,OAAA,CAAAI,4BAAA,aAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4B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M;kBAAEI,KAAK,EAAE;gBAAO;cAAE,CAAC,EACxD;gBACEJ,IAAI,EAAE,OAAO;gBACbG,IAAI,EAAE;kBAAEH,IAAI,EAAE,MAAM;kBAAEI,KAAK,EAAE;gBAAc;cAC7C,CAAC;YAEL;UACF,CAAC,EACD;YAAEJ,IAAI,EAAE,OAAO;YAAEG,IAAI,EAAE;cAAEH,IAAI,EAAE,MAAM;cAAEI,KAAK,EAAE;YAAa;UAAE,CAAC;QAElE;MACF,CAAC;IAEL;EACF,CAAC;AAEL,CAGC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"graphql.js","names":["AssetClassName","exports","BookType","CorrelationTimeUnit","CurrencyName","CurrencyPowerBalanceTimeUnit","DataSource","Division","InstrumentDataSource","Region","Sort","TopicalSort","TradeMode","ValueAtRiskBars","ValueAtRiskDuration","VolatilityChartTimeSpan","VolatilityChartTimeUnit","ResolveInstrumentsWithFiltersDocument","kind","definitions","operation","name","value","variableDefinitions","variable","type","selectionSet","selections","arguments","directives"],"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 Etfs = 'ETFS',\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 ExtendedInstrument = {\n __typename?: 'ExtendedInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n tradeMode: TradeMode;\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 enum InstrumentDataSource {\n Mt5 = 'MT5',\n V20 = 'V20',\n}\n\nexport type InstrumentTableResult = {\n __typename?: 'InstrumentTableResult';\n instruments: Array<ExtendedInstrument>;\n totalCount: Scalars['Int']['output'];\n updatedAt: Scalars['String']['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 resolveInstrumentsWithFilters?: Maybe<InstrumentTableResult>;\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 QueryResolveInstrumentsWithFiltersArgs = {\n assetClass?: InputMaybe<Array<InputMaybe<AssetClassName>>>;\n count?: InputMaybe<Scalars['Int']['input']>;\n dataSource?: InputMaybe<InstrumentDataSource>;\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n searchPattern?: InputMaybe<Scalars['String']['input']>;\n tradeModes?: InputMaybe<Array<InputMaybe<TradeMode>>>;\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 TradeMode {\n TradeCloseonly = 'TRADE_CLOSEONLY',\n TradeDisabled = 'TRADE_DISABLED',\n TradeFull = 'TRADE_FULL',\n TradeLongonly = 'TRADE_LONGONLY',\n TradeShortonly = 'TRADE_SHORTONLY',\n TradeUndefined = 'TRADE_UNDEFINED',\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 ResolveInstrumentsWithFiltersQueryVariables = Exact<{\n division: Division;\n assetClass?: InputMaybe<\n Array<InputMaybe<AssetClassName>> | InputMaybe<AssetClassName>\n >;\n dataSource?: InputMaybe<InstrumentDataSource>;\n instruments?: InputMaybe<\n | Array<InputMaybe<Scalars['String']['input']>>\n | InputMaybe<Scalars['String']['input']>\n >;\n searchPattern?: InputMaybe<Scalars['String']['input']>;\n tradeModes?: InputMaybe<Array<InputMaybe<TradeMode>> | InputMaybe<TradeMode>>;\n count?: InputMaybe<Scalars['Int']['input']>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n withTradingModes: Scalars['Boolean']['input'];\n}>;\n\nexport type ResolveInstrumentsWithFiltersQuery = {\n __typename?: 'Query';\n resolveInstrumentsWithFilters?: {\n __typename?: 'InstrumentTableResult';\n totalCount: number;\n updatedAt?: string;\n instruments: Array<{\n __typename?: 'ExtendedInstrument';\n name: string;\n displayName: string;\n tradeMode?: TradeMode;\n }>;\n } | null;\n};\n\nexport const ResolveInstrumentsWithFiltersDocument = {\n kind: 'Document',\n definitions: [\n {\n kind: 'OperationDefinition',\n operation: 'query',\n name: { kind: 'Name', value: 'resolveInstrumentsWithFilters' },\n variableDefinitions: [\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'division' },\n },\n type: {\n kind: 'NonNullType',\n type: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'Division' },\n },\n },\n },\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'assetClass' },\n },\n type: {\n kind: 'ListType',\n type: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'AssetClassName' },\n },\n },\n },\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'dataSource' },\n },\n type: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'InstrumentDataSource' },\n },\n },\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: 'NamedType',\n name: { kind: 'Name', value: 'String' },\n },\n },\n },\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'searchPattern' },\n },\n type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } },\n },\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'tradeModes' },\n },\n type: {\n kind: 'ListType',\n type: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'TradeMode' },\n },\n },\n },\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'count' },\n },\n type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } },\n },\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'offset' },\n },\n type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } },\n },\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'withTradingModes' },\n },\n type: {\n kind: 'NonNullType',\n type: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'Boolean' },\n },\n },\n },\n ],\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'resolveInstrumentsWithFilters' },\n arguments: [\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 kind: 'Argument',\n name: { kind: 'Name', value: 'assetClass' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'assetClass' },\n },\n },\n {\n kind: 'Argument',\n name: { kind: 'Name', value: 'dataSource' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'dataSource' },\n },\n },\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: 'searchPattern' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'searchPattern' },\n },\n },\n {\n kind: 'Argument',\n name: { kind: 'Name', value: 'count' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'count' },\n },\n },\n {\n kind: 'Argument',\n name: { kind: 'Name', value: 'offset' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'offset' },\n },\n },\n {\n kind: 'Argument',\n name: { kind: 'Name', value: 'tradeModes' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'tradeModes' },\n },\n },\n ],\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'instruments' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'displayName' },\n },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'tradeMode' },\n directives: [\n {\n kind: 'Directive',\n name: { kind: 'Name', value: 'include' },\n arguments: [\n {\n kind: 'Argument',\n name: { kind: 'Name', value: 'if' },\n value: {\n kind: 'Variable',\n name: {\n kind: 'Name',\n value: 'withTradingModes',\n },\n },\n },\n ],\n },\n ],\n },\n ],\n },\n },\n { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'updatedAt' },\n directives: [\n {\n kind: 'Directive',\n name: { kind: 'Name', value: 'include' },\n arguments: [\n {\n kind: 'Argument',\n name: { kind: 'Name', value: 'if' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'withTradingModes' },\n },\n },\n ],\n },\n ],\n },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<\n ResolveInstrumentsWithFiltersQuery,\n ResolveInstrumentsWithFiltersQueryVariables\n>;\n"],"mappings":";;;;;;IAqCYA,cAAc,GAAAC,OAAA,CAAAD,cAAA,aAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAAA,IAUdE,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;E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UAAU,EAAE,CACV;cACEX,IAAI,EAAE,WAAW;cACjBG,IAAI,EAAE;gBAAEH,IAAI,EAAE,MAAM;gBAAEI,KAAK,EAAE;cAAU,CAAC;cACxCM,SAAS,EAAE,CACT;gBACEV,IAAI,EAAE,UAAU;gBAChBG,IAAI,EAAE;kBAAEH,IAAI,EAAE,MAAM;kBAAEI,KAAK,EAAE;gBAAK,CAAC;gBACnCA,KAAK,EAAE;kBACLJ,IAAI,EAAE,UAAU;kBAChBG,IAAI,EAAE;oBAAEH,IAAI,EAAE,MAAM;oBAAEI,KAAK,EAAE;kBAAmB;gBAClD;cACF,CAAC;YAEL,CAAC;UAEL,CAAC;QAEL;MACF,CAAC;IAEL;EACF,CAAC;AAEL,CAGC","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"asset_class": "Asset class",
|
|
4
4
|
"bond": "Bond",
|
|
5
5
|
"buy": "Buy",
|
|
6
|
-
"close_only": "Close
|
|
6
|
+
"close_only": "Close only",
|
|
7
7
|
"commodity": "Commodity",
|
|
8
8
|
"crypto": "Crypto",
|
|
9
9
|
"currency": "Currency",
|
|
@@ -13,16 +13,17 @@
|
|
|
13
13
|
"index": "Index",
|
|
14
14
|
"instrument": "Instrument",
|
|
15
15
|
"instrument_name": "Instrument name",
|
|
16
|
-
"long_only": "Long
|
|
16
|
+
"long_only": "Long only",
|
|
17
17
|
"no_matching_results": "No matching results",
|
|
18
18
|
"pagination_entries_range": "{{firstItemOnPage}}-{{lastItemOnPage}} of {{itemCount}} entries",
|
|
19
19
|
"search": "Search",
|
|
20
20
|
"sell": "Sell",
|
|
21
21
|
"share_cfds": "Share CFDs",
|
|
22
|
-
"short_only": "Short
|
|
22
|
+
"short_only": "Short only",
|
|
23
23
|
"spread": "Spread",
|
|
24
24
|
"symbol": "Symbol",
|
|
25
|
-
"today_high": "Today
|
|
26
|
-
"today_low": "Today
|
|
27
|
-
"trade_mode": "Trade
|
|
25
|
+
"today_high": "Today high",
|
|
26
|
+
"today_low": "Today low",
|
|
27
|
+
"trade_mode": "Trade mode",
|
|
28
|
+
"last_updated": "Last updated"
|
|
28
29
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { useQuery } from '@apollo/client';
|
|
2
|
-
import { getHeaderConfig, Pagination, Size, TableWidget, useLayoutProvider, useLiveRatesQuery } from '@oanda/labs-widget-common';
|
|
2
|
+
import { DataRecordType, getHeaderConfig, LastUpdated, Pagination, Size, TableWidget, useLayoutProvider, useLiveRatesQuery } from '@oanda/labs-widget-common';
|
|
3
3
|
import { useLocale } from '@oanda/mono-i18n';
|
|
4
4
|
import React, { useEffect, useRef, useState } from 'react';
|
|
5
5
|
import { useEventListener } from 'usehooks-ts';
|
|
6
6
|
import { resolveInstrumentsWithFilters } from '../gql/resolveInstrumentsWithFilters';
|
|
7
|
+
import { TradeMode } from '../gql/types/graphql';
|
|
7
8
|
import { Filters } from './components';
|
|
8
|
-
import { assetClassLabels, headerConfigs } from './config';
|
|
9
|
+
import { assetClassLabels, headerConfigs, tradeModeLabels } from './config';
|
|
9
10
|
import { DEFAULT_COLUMNS, INSTRUMENT_TOOLTIP_ID } from './constant';
|
|
10
11
|
const Main = _ref => {
|
|
11
12
|
let {
|
|
@@ -24,6 +25,7 @@ const Main = _ref => {
|
|
|
24
25
|
size
|
|
25
26
|
} = useLayoutProvider();
|
|
26
27
|
const isDesktop = size === Size.DESKTOP;
|
|
28
|
+
const isTradingMode = columns.includes(DataRecordType.TRADE_MODE) && columns.includes(DataRecordType.SYMBOL);
|
|
27
29
|
const {
|
|
28
30
|
lang
|
|
29
31
|
} = useLocale();
|
|
@@ -41,7 +43,9 @@ const Main = _ref => {
|
|
|
41
43
|
offset: 0,
|
|
42
44
|
assetClass: assetClasses || [],
|
|
43
45
|
instruments,
|
|
44
|
-
dataSource
|
|
46
|
+
dataSource,
|
|
47
|
+
withTradingModes: isTradingMode,
|
|
48
|
+
tradeModes: isTradingMode ? [TradeMode.TradeLongonly, TradeMode.TradeShortonly, TradeMode.TradeCloseonly] : undefined
|
|
45
49
|
});
|
|
46
50
|
const pageNumber = queryVariables.offset ? Math.floor(queryVariables.offset / (recordsPerPage || 1)) : 0;
|
|
47
51
|
const {
|
|
@@ -60,7 +64,8 @@ const Main = _ref => {
|
|
|
60
64
|
if (!loading && data?.resolveInstrumentsWithFilters?.instruments) {
|
|
61
65
|
const newRecords = data.resolveInstrumentsWithFilters.instruments.map(record => ({
|
|
62
66
|
instrument: record?.name || '',
|
|
63
|
-
displayName: record?.displayName || ''
|
|
67
|
+
displayName: record?.displayName || '',
|
|
68
|
+
tradeMode: lang(tradeModeLabels[record?.tradeMode || ''])
|
|
64
69
|
}));
|
|
65
70
|
setRecords(newRecords);
|
|
66
71
|
setTotalRecords(data.resolveInstrumentsWithFilters.totalCount);
|
|
@@ -151,7 +156,12 @@ const Main = _ref => {
|
|
|
151
156
|
testId: "instruments-table-wrapper",
|
|
152
157
|
toolTipId: INSTRUMENT_TOOLTIP_ID,
|
|
153
158
|
viewType: "table"
|
|
154
|
-
})
|
|
159
|
+
}), isTradingMode && React.createElement("div", {
|
|
160
|
+
className: "lw-mt-2 lw-h-8"
|
|
161
|
+
}, React.createElement(LastUpdated, {
|
|
162
|
+
labelCallback: lang,
|
|
163
|
+
timestamp: data?.resolveInstrumentsWithFilters?.updatedAt
|
|
164
|
+
})));
|
|
155
165
|
};
|
|
156
166
|
export { Main };
|
|
157
167
|
//# sourceMappingURL=Main.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Main.js","names":["useQuery","getHeaderConfig","Pagination","Size","TableWidget","useLayoutProvider","useLiveRatesQuery","useLocale","React","useEffect","useRef","useState","useEventListener","resolveInstrumentsWithFilters","Filters","assetClassLabels","headerConfigs","DEFAULT_COLUMNS","INSTRUMENT_TOOLTIP_ID","Main","_ref","instruments","division","assetClasses","columns","isAssetClassFilterEnabled","isInstrumentSearchEnabled","recordsPerPage","dataSource","isLiveRatesDisabled","documentRef","document","size","isDesktop","DESKTOP","lang","target","setQuery","closeQuery","records","setRecords","Array","fill","totalRecords","setTotalRecords","queryVariables","setQueryVariables","count","searchPattern","offset","assetClass","pageNumber","Math","floor","data","error","loading","variables","fetchPolicy","errorPolicy","newRecords","map","record","instrument","name","displayName","totalCount","instrumentsNames","_ref2","showError","onVisibilityChange","current","visibilityState","_ref3","headerConfig","mobile","length","longInstruments","normal","createElement","Fragment","PaginationComponent","currentPage","disabled","onPageChange","numb","prev","TabsComponent","assetClassOptions","id","label","ALL","onAssetClassChange","onSearchChange","activeColumns","hasError","headerColumns","instrumentColumnWidth","additionalStyles","minWidth","isLoading","testId","toolTipId","viewType"],"sources":["../../../src/InstrumentsTableWidget/Main.tsx"],"sourcesContent":["import { useQuery } from '@apollo/client';\nimport type { DataRecord } from '@oanda/labs-widget-common';\nimport {\n getHeaderConfig,\n Pagination,\n Size,\n TableWidget,\n useLayoutProvider,\n useLiveRatesQuery,\n} from '@oanda/labs-widget-common';\nimport { useLocale } from '@oanda/mono-i18n';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { useEventListener } from 'usehooks-ts';\n\nimport { resolveInstrumentsWithFilters } from '../gql/resolveInstrumentsWithFilters';\nimport type { AssetClassName } from '../gql/types/graphql';\nimport {\n type ResolveInstrumentsWithFiltersQuery,\n type ResolveInstrumentsWithFiltersQueryVariables,\n} from '../gql/types/graphql';\nimport { Filters } from './components';\nimport { assetClassLabels, headerConfigs } from './config';\nimport { DEFAULT_COLUMNS, INSTRUMENT_TOOLTIP_ID } from './constant';\nimport type { MainProps } from './types';\n\nconst Main = ({\n instruments = [],\n division,\n assetClasses,\n columns = DEFAULT_COLUMNS,\n isAssetClassFilterEnabled,\n isInstrumentSearchEnabled,\n recordsPerPage,\n dataSource,\n isLiveRatesDisabled,\n}: MainProps) => {\n const documentRef = useRef<Document>(document);\n const { size } = useLayoutProvider();\n const isDesktop = size === Size.DESKTOP;\n\n const { lang } = useLocale();\n const { target, setQuery, closeQuery } =\n useLiveRatesQuery(isLiveRatesDisabled);\n\n const [records, setRecords] = useState<DataRecord[]>(\n new Array(recordsPerPage || 10).fill({})\n );\n\n const [totalRecords, setTotalRecords] = useState<number>(0);\n\n const [queryVariables, setQueryVariables] =\n useState<ResolveInstrumentsWithFiltersQueryVariables>({\n division,\n count: recordsPerPage,\n searchPattern: '',\n offset: 0,\n assetClass: assetClasses || [],\n instruments,\n dataSource,\n });\n\n const pageNumber = queryVariables.offset\n ? Math.floor(queryVariables.offset / (recordsPerPage || 1))\n : 0;\n\n const { data, error, loading } = useQuery<\n ResolveInstrumentsWithFiltersQuery,\n ResolveInstrumentsWithFiltersQueryVariables\n >(resolveInstrumentsWithFilters, {\n variables: queryVariables,\n fetchPolicy: 'network-only',\n errorPolicy: 'all',\n });\n\n useEffect(() => {\n if (loading) {\n setRecords(new Array(recordsPerPage).fill({}));\n }\n if (!loading && data?.resolveInstrumentsWithFilters?.instruments) {\n const newRecords = data.resolveInstrumentsWithFilters.instruments.map(\n (record) => ({\n instrument: record?.name || '',\n displayName: record?.displayName || '',\n })\n );\n setRecords(newRecords);\n setTotalRecords(data.resolveInstrumentsWithFilters.totalCount);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [loading, data]);\n\n useEffect(() => {\n const instrumentsNames = records.map(({ instrument }) => instrument);\n if (instrumentsNames[0]) {\n setQuery({ instruments: instrumentsNames });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [records]);\n\n const showError = (!loading && !!error) || (!loading && !data);\n\n const onVisibilityChange = () => {\n if (documentRef.current.visibilityState === 'hidden') {\n closeQuery();\n }\n if (documentRef.current.visibilityState === 'visible') {\n const instrumentsNames = records.map(({ instrument }) => instrument);\n if (instrumentsNames[0]) {\n setQuery({ instruments: instrumentsNames });\n }\n }\n };\n\n useEventListener('visibilitychange', onVisibilityChange, documentRef);\n\n const headerConfig = !isDesktop\n ? headerConfigs.mobile\n : columns.length < 4\n ? headerConfigs.longInstruments\n : headerConfigs.normal;\n\n return (\n <>\n <TableWidget\n PaginationComponent={\n records.length > 0 && recordsPerPage ? (\n <Pagination\n currentPage={pageNumber}\n disabled={loading}\n recordsPerPage={recordsPerPage}\n totalRecords={totalRecords}\n onPageChange={(numb) => {\n setQueryVariables((prev) => ({\n ...prev,\n offset: numb * recordsPerPage,\n }));\n }}\n />\n ) : (\n <></>\n )\n }\n TabsComponent={\n isInstrumentSearchEnabled || isAssetClassFilterEnabled ? (\n <Filters\n assetClassOptions={[\n {\n id: 'ALL',\n label: lang(assetClassLabels.ALL),\n },\n ...(assetClasses || []).map((assetClass) => ({\n id: assetClass,\n label: lang(assetClassLabels[assetClass]),\n })),\n ]}\n isAssetClassFilterEnabled={isAssetClassFilterEnabled}\n isInstrumentSearchEnabled={isInstrumentSearchEnabled}\n onAssetClassChange={(assetClass) => {\n setQueryVariables((prev) => ({\n ...prev,\n offset: 0,\n searchPattern: '',\n assetClass:\n assetClass[0] === 'ALL'\n ? assetClasses || []\n : (assetClass as AssetClassName[]),\n }));\n }}\n onSearchChange={(searchPattern) => {\n setQueryVariables((prev) => ({\n ...prev,\n offset: 0,\n searchPattern,\n }));\n }}\n />\n ) : (\n <></>\n )\n }\n activeColumns={columns}\n count={totalRecords}\n hasError={showError}\n headerColumns={getHeaderConfig(columns, headerConfig)}\n instrumentColumnWidth={\n headerConfig.instrument?.additionalStyles.minWidth\n }\n isLoading={loading}\n pageNumber={pageNumber}\n records={records}\n target={target}\n testId=\"instruments-table-wrapper\"\n toolTipId={INSTRUMENT_TOOLTIP_ID}\n viewType=\"table\"\n />\n </>\n );\n};\n\nexport { Main };\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAgB;AAEzC,SACEC,eAAe,EACfC,UAAU,EACVC,IAAI,EACJC,WAAW,EACXC,iBAAiB,EACjBC,iBAAiB,QACZ,2BAA2B;AAClC,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,OAAOC,KAAK,IAAIC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,Q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Aa,EAAE/F,eAAe,CAACuB,OAAO,EAAEkD,YAAY,CAAE;IACtDuB,qBAAqB,EACnBvB,YAAY,CAACX,UAAU,EAAEmC,gBAAgB,CAACC,QAC3C;IACDC,SAAS,EAAE5C,OAAQ;IACnBL,UAAU,EAAEA,UAAW;IACvBZ,OAAO,EAAEA,OAAQ;IACjBH,MAAM,EAAEA,MAAO;IACfiE,MAAM,EAAC,2BAA2B;IAClCC,SAAS,EAAEpF,qBAAsB;IACjCqF,QAAQ,EAAC;EAAO,CACjB,CACD,CAAC;AAEP,CAAC;AAED,SAASpF,IAAI","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Main.js","names":["useQuery","DataRecordType","getHeaderConfig","LastUpdated","Pagination","Size","TableWidget","useLayoutProvider","useLiveRatesQuery","useLocale","React","useEffect","useRef","useState","useEventListener","resolveInstrumentsWithFilters","TradeMode","Filters","assetClassLabels","headerConfigs","tradeModeLabels","DEFAULT_COLUMNS","INSTRUMENT_TOOLTIP_ID","Main","_ref","instruments","division","assetClasses","columns","isAssetClassFilterEnabled","isInstrumentSearchEnabled","recordsPerPage","dataSource","isLiveRatesDisabled","documentRef","document","size","isDesktop","DESKTOP","isTradingMode","includes","TRADE_MODE","SYMBOL","lang","target","setQuery","closeQuery","records","setRecords","Array","fill","totalRecords","setTotalRecords","queryVariables","setQueryVariables","count","searchPattern","offset","assetClass","withTradingModes","tradeModes","TradeLongonly","TradeShortonly","TradeCloseonly","undefined","pageNumber","Math","floor","data","error","loading","variables","fetchPolicy","errorPolicy","newRecords","map","record","instrument","name","displayName","tradeMode","totalCount","instrumentsNames","_ref2","showError","onVisibilityChange","current","visibilityState","_ref3","headerConfig","mobile","length","longInstruments","normal","createElement","Fragment","PaginationComponent","currentPage","disabled","onPageChange","numb","prev","TabsComponent","assetClassOptions","id","label","ALL","onAssetClassChange","onSearchChange","activeColumns","hasError","headerColumns","instrumentColumnWidth","additionalStyles","minWidth","isLoading","testId","toolTipId","viewType","className","labelCallback","timestamp","updatedAt"],"sources":["../../../src/InstrumentsTableWidget/Main.tsx"],"sourcesContent":["import { useQuery } from '@apollo/client';\nimport type { DataRecord } from '@oanda/labs-widget-common';\nimport {\n DataRecordType,\n getHeaderConfig,\n LastUpdated,\n Pagination,\n Size,\n TableWidget,\n useLayoutProvider,\n useLiveRatesQuery,\n} from '@oanda/labs-widget-common';\nimport { useLocale } from '@oanda/mono-i18n';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { useEventListener } from 'usehooks-ts';\n\nimport { resolveInstrumentsWithFilters } from '../gql/resolveInstrumentsWithFilters';\nimport type { AssetClassName } from '../gql/types/graphql';\nimport {\n type ResolveInstrumentsWithFiltersQuery,\n type ResolveInstrumentsWithFiltersQueryVariables,\n TradeMode,\n} from '../gql/types/graphql';\nimport { Filters } from './components';\nimport { assetClassLabels, headerConfigs, tradeModeLabels } from './config';\nimport { DEFAULT_COLUMNS, INSTRUMENT_TOOLTIP_ID } from './constant';\nimport type { MainProps } from './types';\n\nconst Main = ({\n instruments = [],\n division,\n assetClasses,\n columns = DEFAULT_COLUMNS,\n isAssetClassFilterEnabled,\n isInstrumentSearchEnabled,\n recordsPerPage,\n dataSource,\n isLiveRatesDisabled,\n}: MainProps) => {\n const documentRef = useRef<Document>(document);\n const { size } = useLayoutProvider();\n const isDesktop = size === Size.DESKTOP;\n const isTradingMode =\n columns.includes(DataRecordType.TRADE_MODE) &&\n columns.includes(DataRecordType.SYMBOL);\n\n const { lang } = useLocale();\n const { target, setQuery, closeQuery } =\n useLiveRatesQuery(isLiveRatesDisabled);\n\n const [records, setRecords] = useState<DataRecord[]>(\n new Array(recordsPerPage || 10).fill({})\n );\n\n const [totalRecords, setTotalRecords] = useState<number>(0);\n\n const [queryVariables, setQueryVariables] =\n useState<ResolveInstrumentsWithFiltersQueryVariables>({\n division,\n count: recordsPerPage,\n searchPattern: '',\n offset: 0,\n assetClass: assetClasses || [],\n instruments,\n dataSource,\n withTradingModes: isTradingMode,\n tradeModes: isTradingMode\n ? [\n TradeMode.TradeLongonly,\n TradeMode.TradeShortonly,\n TradeMode.TradeCloseonly,\n ]\n : undefined,\n });\n\n const pageNumber = queryVariables.offset\n ? Math.floor(queryVariables.offset / (recordsPerPage || 1))\n : 0;\n\n const { data, error, loading } = useQuery<\n ResolveInstrumentsWithFiltersQuery,\n ResolveInstrumentsWithFiltersQueryVariables\n >(resolveInstrumentsWithFilters, {\n variables: queryVariables,\n fetchPolicy: 'network-only',\n errorPolicy: 'all',\n });\n\n useEffect(() => {\n if (loading) {\n setRecords(new Array(recordsPerPage).fill({}));\n }\n if (!loading && data?.resolveInstrumentsWithFilters?.instruments) {\n const newRecords = data.resolveInstrumentsWithFilters.instruments.map(\n (record) => ({\n instrument: record?.name || '',\n displayName: record?.displayName || '',\n tradeMode: lang(\n tradeModeLabels[\n (record?.tradeMode as keyof typeof tradeModeLabels) || ''\n ]\n ),\n })\n );\n setRecords(newRecords);\n setTotalRecords(data.resolveInstrumentsWithFilters.totalCount);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [loading, data]);\n\n useEffect(() => {\n const instrumentsNames = records.map(({ instrument }) => instrument);\n if (instrumentsNames[0]) {\n setQuery({ instruments: instrumentsNames });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [records]);\n\n const showError = (!loading && !!error) || (!loading && !data);\n\n const onVisibilityChange = () => {\n if (documentRef.current.visibilityState === 'hidden') {\n closeQuery();\n }\n if (documentRef.current.visibilityState === 'visible') {\n const instrumentsNames = records.map(({ instrument }) => instrument);\n if (instrumentsNames[0]) {\n setQuery({ instruments: instrumentsNames });\n }\n }\n };\n\n useEventListener('visibilitychange', onVisibilityChange, documentRef);\n\n const headerConfig = !isDesktop\n ? headerConfigs.mobile\n : columns.length < 4\n ? headerConfigs.longInstruments\n : headerConfigs.normal;\n\n return (\n <>\n <TableWidget\n PaginationComponent={\n records.length > 0 && recordsPerPage ? (\n <Pagination\n currentPage={pageNumber}\n disabled={loading}\n recordsPerPage={recordsPerPage}\n totalRecords={totalRecords}\n onPageChange={(numb) => {\n setQueryVariables((prev) => ({\n ...prev,\n offset: numb * recordsPerPage,\n }));\n }}\n />\n ) : (\n <></>\n )\n }\n TabsComponent={\n isInstrumentSearchEnabled || isAssetClassFilterEnabled ? (\n <Filters\n assetClassOptions={[\n {\n id: 'ALL',\n label: lang(assetClassLabels.ALL),\n },\n ...(assetClasses || []).map((assetClass) => ({\n id: assetClass,\n label: lang(assetClassLabels[assetClass]),\n })),\n ]}\n isAssetClassFilterEnabled={isAssetClassFilterEnabled}\n isInstrumentSearchEnabled={isInstrumentSearchEnabled}\n onAssetClassChange={(assetClass) => {\n setQueryVariables((prev) => ({\n ...prev,\n offset: 0,\n searchPattern: '',\n assetClass:\n assetClass[0] === 'ALL'\n ? assetClasses || []\n : (assetClass as AssetClassName[]),\n }));\n }}\n onSearchChange={(searchPattern) => {\n setQueryVariables((prev) => ({\n ...prev,\n offset: 0,\n searchPattern,\n }));\n }}\n />\n ) : (\n <></>\n )\n }\n activeColumns={columns}\n count={totalRecords}\n hasError={showError}\n headerColumns={getHeaderConfig(columns, headerConfig)}\n instrumentColumnWidth={\n headerConfig.instrument?.additionalStyles.minWidth\n }\n isLoading={loading}\n pageNumber={pageNumber}\n records={records}\n target={target}\n testId=\"instruments-table-wrapper\"\n toolTipId={INSTRUMENT_TOOLTIP_ID}\n viewType=\"table\"\n />\n {isTradingMode && (\n <div className=\"lw-mt-2 lw-h-8\">\n <LastUpdated\n labelCallback={lang}\n timestamp={data?.resolveInstrumentsWithFilters?.updatedAt}\n />\n </div>\n )}\n </>\n );\n};\n\nexport { Main };\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAgB;AAEzC,SACEC,cAAc,EACdC,eAAe,EACfC,WAAW,EACXC,UAAU,EACVC,IAAI,EACJC,WAAW,EACXC,iBAAiB,EACjBC,iBAAiB,QACZ,2BAA2B;AAClC,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,OAAOC,KAAK,IAAIC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AAE,CAAC;UACTD,aAAa,EAAE,EAAE;UACjBE,UAAU,EACRA,UAAU,CAAC,CAAC,CAAC,KAAK,KAAK,GACnB/B,YAAY,IAAI,EAAE,GACjB+B;QACT,CAAC,CAAC,CAAC;MACL,CAAE;MACFkD,cAAc,EAAGpD,aAAa,IAAK;QACjCF,iBAAiB,CAAE+C,IAAI,KAAM;UAC3B,GAAGA,IAAI;UACP5C,MAAM,EAAE,CAAC;UACTD;QACF,CAAC,CAAC,CAAC;MACL;IAAE,CACH,CAAC,GAEF9C,KAAA,CAAAoF,aAAA,CAAApF,KAAA,CAAAqF,QAAA,MAAI,CAEP;IACDc,aAAa,EAAEjF,OAAQ;IACvB2B,KAAK,EAAEJ,YAAa;IACpB2D,QAAQ,EAAE1B,SAAU;IACpB2B,aAAa,EAAE7G,eAAe,CAAC0B,OAAO,EAAE6D,YAAY,CAAE;IACtDuB,qBAAqB,EACnBvB,YAAY,CAACZ,UAAU,EAAEoC,gBAAgB,CAACC,QAC3C;IACDC,SAAS,EAAE7C,OAAQ;IACnBL,UAAU,EAAEA,UAAW;IACvBlB,OAAO,EAAEA,OAAQ;IACjBH,MAAM,EAAEA,MAAO;IACfwE,MAAM,EAAC,2BAA2B;IAClCC,SAAS,EAAE/F,qBAAsB;IACjCgG,QAAQ,EAAC;EAAO,CACjB,CAAC,EACD/E,aAAa,IACZ7B,KAAA,CAAAoF,aAAA;IAAKyB,SAAS,EAAC;EAAgB,GAC7B7G,KAAA,CAAAoF,aAAA,CAAC3F,WAAW;IACVqH,aAAa,EAAE7E,IAAK;IACpB8E,SAAS,EAAErD,IAAI,EAAErD,6BAA6B,EAAE2G;EAAU,CAC3D,CACE,CAEP,CAAC;AAEP,CAAC;AAED,SAASnG,IAAI","ignoreList":[]}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { DataRecordType } from '@oanda/labs-widget-common';
|
|
2
|
-
import { AssetClassName } from '../gql/types/graphql';
|
|
2
|
+
import { AssetClassName, TradeMode } from '../gql/types/graphql';
|
|
3
|
+
const tradeModeLabels = {
|
|
4
|
+
[TradeMode.TradeLongonly]: 'long_only',
|
|
5
|
+
[TradeMode.TradeShortonly]: 'short_only',
|
|
6
|
+
[TradeMode.TradeCloseonly]: 'close_only'
|
|
7
|
+
};
|
|
3
8
|
const normal = {
|
|
4
9
|
[DataRecordType.INSTRUMENT]: {
|
|
5
10
|
displayName: 'instrument',
|
|
@@ -103,5 +108,5 @@ const assetClassLabels = {
|
|
|
103
108
|
[AssetClassName.Etfs]: 'etf_cfds',
|
|
104
109
|
[AssetClassName.Indices]: 'index'
|
|
105
110
|
};
|
|
106
|
-
export { assetClassLabels, headerConfigs };
|
|
111
|
+
export { assetClassLabels, headerConfigs, tradeModeLabels };
|
|
107
112
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","names":["DataRecordType","AssetClassName","normal","INSTRUMENT","displayName","additionalStyles","align","minWidth","SELL","paddingRight","BUY","SPREAD","DAILY_CHANGE","HIGH","LOW","TRADE_MODE","SYMBOL","longInstruments","mobile","headerConfigs","assetClassLabels","ALL","Currency","Commodities","Rates","Cryptocurrency","EquityShares","Etfs","Indices"],"sources":["../../../src/InstrumentsTableWidget/config.ts"],"sourcesContent":["import type { HeaderConfigType } from '@oanda/labs-widget-common';\nimport { DataRecordType } from '@oanda/labs-widget-common';\n\nimport { AssetClassName } from '../gql/types/graphql';\nimport type { AssetClassLabels } from './components/Filters/types';\n\nconst normal: HeaderConfigType = {\n [DataRecordType.INSTRUMENT]: {\n displayName: 'instrument',\n additionalStyles: {\n align: 'left',\n minWidth: '200px',\n },\n },\n [DataRecordType.SELL]: {\n displayName: 'sell',\n additionalStyles: {\n align: 'right',\n minWidth: '75px',\n paddingRight: true,\n },\n },\n [DataRecordType.BUY]: {\n displayName: 'buy',\n additionalStyles: {\n align: 'right',\n minWidth: '75px',\n paddingRight: true,\n },\n },\n [DataRecordType.SPREAD]: {\n displayName: 'spread',\n additionalStyles: {\n align: 'right',\n minWidth: '50px',\n },\n },\n [DataRecordType.DAILY_CHANGE]: {\n displayName: 'daily_percent_change',\n additionalStyles: {\n align: 'right',\n minWidth: '80px',\n },\n },\n [DataRecordType.HIGH]: {\n displayName: 'today_high',\n additionalStyles: {\n align: 'right',\n minWidth: '80px',\n },\n },\n [DataRecordType.LOW]: {\n displayName: 'today_low',\n additionalStyles: {\n align: 'right',\n minWidth: '80px',\n },\n },\n [DataRecordType.TRADE_MODE]: {\n displayName: 'trade_mode',\n additionalStyles: {\n align: 'right',\n minWidth: '80px',\n paddingRight: true,\n },\n },\n [DataRecordType.SYMBOL]: {\n displayName: 'symbol',\n additionalStyles: {\n align: 'center',\n minWidth: '80px',\n },\n },\n};\n\nconst longInstruments: HeaderConfigType = {\n ...normal,\n [DataRecordType.INSTRUMENT]: {\n displayName: 'instrument',\n additionalStyles: {\n align: 'left',\n minWidth: '250px',\n },\n },\n};\n\nconst mobile: HeaderConfigType = {\n ...normal,\n [DataRecordType.INSTRUMENT]: {\n displayName: 'instrument',\n additionalStyles: {\n align: 'left',\n minWidth: '150px',\n },\n },\n};\n\nconst headerConfigs = {\n normal,\n longInstruments,\n mobile,\n};\n\nconst assetClassLabels: Record<AssetClassLabels, string> = {\n ALL: 'all',\n [AssetClassName.Currency]: 'currency',\n [AssetClassName.Commodities]: 'commodity',\n [AssetClassName.Rates]: 'bond',\n [AssetClassName.Cryptocurrency]: 'crypto',\n [AssetClassName.EquityShares]: 'share_cfds',\n [AssetClassName.Etfs]: 'etf_cfds',\n [AssetClassName.Indices]: 'index',\n};\n\nexport { assetClassLabels, headerConfigs };\n"],"mappings":"AACA,SAASA,cAAc,QAAQ,2BAA2B;AAE1D,SAASC,cAAc,QAAQ,sBAAsB;
|
|
1
|
+
{"version":3,"file":"config.js","names":["DataRecordType","AssetClassName","TradeMode","tradeModeLabels","TradeLongonly","TradeShortonly","TradeCloseonly","normal","INSTRUMENT","displayName","additionalStyles","align","minWidth","SELL","paddingRight","BUY","SPREAD","DAILY_CHANGE","HIGH","LOW","TRADE_MODE","SYMBOL","longInstruments","mobile","headerConfigs","assetClassLabels","ALL","Currency","Commodities","Rates","Cryptocurrency","EquityShares","Etfs","Indices"],"sources":["../../../src/InstrumentsTableWidget/config.ts"],"sourcesContent":["import type { HeaderConfigType } from '@oanda/labs-widget-common';\nimport { DataRecordType } from '@oanda/labs-widget-common';\n\nimport { AssetClassName, TradeMode } from '../gql/types/graphql';\nimport type { AssetClassLabels } from './components/Filters/types';\n\nconst tradeModeLabels: Record<\n TradeMode.TradeLongonly | TradeMode.TradeShortonly | TradeMode.TradeCloseonly,\n string\n> = {\n [TradeMode.TradeLongonly]: 'long_only',\n [TradeMode.TradeShortonly]: 'short_only',\n [TradeMode.TradeCloseonly]: 'close_only',\n};\nconst normal: HeaderConfigType = {\n [DataRecordType.INSTRUMENT]: {\n displayName: 'instrument',\n additionalStyles: {\n align: 'left',\n minWidth: '200px',\n },\n },\n [DataRecordType.SELL]: {\n displayName: 'sell',\n additionalStyles: {\n align: 'right',\n minWidth: '75px',\n paddingRight: true,\n },\n },\n [DataRecordType.BUY]: {\n displayName: 'buy',\n additionalStyles: {\n align: 'right',\n minWidth: '75px',\n paddingRight: true,\n },\n },\n [DataRecordType.SPREAD]: {\n displayName: 'spread',\n additionalStyles: {\n align: 'right',\n minWidth: '50px',\n },\n },\n [DataRecordType.DAILY_CHANGE]: {\n displayName: 'daily_percent_change',\n additionalStyles: {\n align: 'right',\n minWidth: '80px',\n },\n },\n [DataRecordType.HIGH]: {\n displayName: 'today_high',\n additionalStyles: {\n align: 'right',\n minWidth: '80px',\n },\n },\n [DataRecordType.LOW]: {\n displayName: 'today_low',\n additionalStyles: {\n align: 'right',\n minWidth: '80px',\n },\n },\n [DataRecordType.TRADE_MODE]: {\n displayName: 'trade_mode',\n additionalStyles: {\n align: 'right',\n minWidth: '80px',\n paddingRight: true,\n },\n },\n [DataRecordType.SYMBOL]: {\n displayName: 'symbol',\n additionalStyles: {\n align: 'center',\n minWidth: '80px',\n },\n },\n};\n\nconst longInstruments: HeaderConfigType = {\n ...normal,\n [DataRecordType.INSTRUMENT]: {\n displayName: 'instrument',\n additionalStyles: {\n align: 'left',\n minWidth: '250px',\n },\n },\n};\n\nconst mobile: HeaderConfigType = {\n ...normal,\n [DataRecordType.INSTRUMENT]: {\n displayName: 'instrument',\n additionalStyles: {\n align: 'left',\n minWidth: '150px',\n },\n },\n};\n\nconst headerConfigs = {\n normal,\n longInstruments,\n mobile,\n};\n\nconst assetClassLabels: Record<AssetClassLabels, string> = {\n ALL: 'all',\n [AssetClassName.Currency]: 'currency',\n [AssetClassName.Commodities]: 'commodity',\n [AssetClassName.Rates]: 'bond',\n [AssetClassName.Cryptocurrency]: 'crypto',\n [AssetClassName.EquityShares]: 'share_cfds',\n [AssetClassName.Etfs]: 'etf_cfds',\n [AssetClassName.Indices]: 'index',\n};\n\nexport { assetClassLabels, headerConfigs, tradeModeLabels };\n"],"mappings":"AACA,SAASA,cAAc,QAAQ,2BAA2B;AAE1D,SAASC,cAAc,EAAEC,SAAS,QAAQ,sBAAsB;AAGhE,MAAMC,eAGL,GAAG;EACF,CAACD,SAAS,CAACE,aAAa,GAAG,WAAW;EACtC,CAACF,SAAS,CAACG,cAAc,GAAG,YAAY;EACxC,CAACH,SAAS,CAACI,cAAc,GAAG;AAC9B,CAAC;AACD,MAAMC,MAAwB,GAAG;EAC/B,CAACP,cAAc,CAACQ,UAAU,GAAG;IAC3BC,WAAW,EAAE,YAAY;IACzBC,gBAAgB,EAAE;MAChBC,KAAK,EAAE,MAAM;MACbC,QAAQ,EAAE;IACZ;EACF,CAAC;EACD,CAACZ,cAAc,CAACa,IAAI,GAAG;IACrBJ,WAAW,EAAE,MAAM;IACnBC,gBAAgB,EAAE;MAChBC,KAAK,EAAE,OAAO;MACdC,QAAQ,EAAE,MAAM;MAChBE,YAAY,EAAE;IAChB;EACF,CAAC;EACD,CAACd,cAAc,CAACe,GAAG,GAAG;IACp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AC;AAED,MAAMW,MAAwB,GAAG;EAC/B,GAAGhB,MAAM;EACT,CAACP,cAAc,CAACQ,UAAU,GAAG;IAC3BC,WAAW,EAAE,YAAY;IACzBC,gBAAgB,EAAE;MAChBC,KAAK,EAAE,MAAM;MACbC,QAAQ,EAAE;IACZ;EACF;AACF,CAAC;AAED,MAAMY,aAAa,GAAG;EACpBjB,MAAM;EACNe,eAAe;EACfC;AACF,CAAC;AAED,MAAME,gBAAkD,GAAG;EACzDC,GAAG,EAAE,KAAK;EACV,CAACzB,cAAc,CAAC0B,QAAQ,GAAG,UAAU;EACrC,CAAC1B,cAAc,CAAC2B,WAAW,GAAG,WAAW;EACzC,CAAC3B,cAAc,CAAC4B,KAAK,GAAG,MAAM;EAC9B,CAAC5B,cAAc,CAAC6B,cAAc,GAAG,QAAQ;EACzC,CAAC7B,cAAc,CAAC8B,YAAY,GAAG,YAAY;EAC3C,CAAC9B,cAAc,CAAC+B,IAAI,GAAG,UAAU;EACjC,CAAC/B,cAAc,CAACgC,OAAO,GAAG;AAC5B,CAAC;AAED,SAASR,gBAAgB,EAAED,aAAa,EAAErB,eAAe","ignoreList":[]}
|
|
@@ -6,8 +6,10 @@ export const resolveInstrumentsWithFilters = gql`
|
|
|
6
6
|
$dataSource: InstrumentDataSource
|
|
7
7
|
$instruments: [String]
|
|
8
8
|
$searchPattern: String
|
|
9
|
+
$tradeModes: [TradeMode]
|
|
9
10
|
$count: Int
|
|
10
11
|
$offset: Int
|
|
12
|
+
$withTradingModes: Boolean!
|
|
11
13
|
) {
|
|
12
14
|
resolveInstrumentsWithFilters(
|
|
13
15
|
division: $division
|
|
@@ -17,12 +19,15 @@ export const resolveInstrumentsWithFilters = gql`
|
|
|
17
19
|
searchPattern: $searchPattern
|
|
18
20
|
count: $count
|
|
19
21
|
offset: $offset
|
|
22
|
+
tradeModes: $tradeModes
|
|
20
23
|
) {
|
|
21
24
|
instruments {
|
|
22
25
|
name
|
|
23
26
|
displayName
|
|
27
|
+
tradeMode @include(if: $withTradingModes)
|
|
24
28
|
}
|
|
25
29
|
totalCount
|
|
30
|
+
updatedAt @include(if: $withTradingModes)
|
|
26
31
|
}
|
|
27
32
|
}
|
|
28
33
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveInstrumentsWithFilters.js","names":["gql","resolveInstrumentsWithFilters"],"sources":["../../../src/gql/resolveInstrumentsWithFilters.ts"],"sourcesContent":["import { gql } from '@apollo/client';\n\nexport const resolveInstrumentsWithFilters = gql`\n query resolveInstrumentsWithFilters(\n $division: Division!\n $assetClass: [AssetClassName]\n $dataSource: InstrumentDataSource\n $instruments: [String]\n $searchPattern: String\n $count: Int\n $offset: Int\n ) {\n resolveInstrumentsWithFilters(\n division: $division\n assetClass: $assetClass\n dataSource: $dataSource\n instruments: $instruments\n searchPattern: $searchPattern\n count: $count\n offset: $offset\n ) {\n instruments {\n name\n displayName\n }\n totalCount\n }\n }\n`;\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,OAAO,MAAMC,6BAA6B,GAAGD,GAAG;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"resolveInstrumentsWithFilters.js","names":["gql","resolveInstrumentsWithFilters"],"sources":["../../../src/gql/resolveInstrumentsWithFilters.ts"],"sourcesContent":["import { gql } from '@apollo/client';\n\nexport const resolveInstrumentsWithFilters = gql`\n query resolveInstrumentsWithFilters(\n $division: Division!\n $assetClass: [AssetClassName]\n $dataSource: InstrumentDataSource\n $instruments: [String]\n $searchPattern: String\n $tradeModes: [TradeMode]\n $count: Int\n $offset: Int\n $withTradingModes: Boolean!\n ) {\n resolveInstrumentsWithFilters(\n division: $division\n assetClass: $assetClass\n dataSource: $dataSource\n instruments: $instruments\n searchPattern: $searchPattern\n count: $count\n offset: $offset\n tradeModes: $tradeModes\n ) {\n instruments {\n name\n displayName\n tradeMode @include(if: $withTradingModes)\n }\n totalCount\n updatedAt @include(if: $withTradingModes)\n }\n }\n`;\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,OAAO,MAAMC,6BAA6B,GAAGD,GAAG;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as types from './graphql';
|
|
2
2
|
const documents = {
|
|
3
|
-
'\n query resolveInstrumentsWithFilters(\n $division: Division!\n $assetClass: [AssetClassName]\n $dataSource: InstrumentDataSource\n $instruments: [String]\n $searchPattern: String\n $count: Int\n $offset: Int\n ) {\n resolveInstrumentsWithFilters(\n division: $division\n assetClass: $assetClass\n dataSource: $dataSource\n instruments: $instruments\n searchPattern: $searchPattern\n count: $count\n offset: $offset\n ) {\n instruments {\n name\n displayName\n }\n totalCount\n }\n }\n': types.ResolveInstrumentsWithFiltersDocument
|
|
3
|
+
'\n query resolveInstrumentsWithFilters(\n $division: Division!\n $assetClass: [AssetClassName]\n $dataSource: InstrumentDataSource\n $instruments: [String]\n $searchPattern: String\n $tradeModes: [TradeMode]\n $count: Int\n $offset: Int\n $withTradingModes: Boolean!\n ) {\n resolveInstrumentsWithFilters(\n division: $division\n assetClass: $assetClass\n dataSource: $dataSource\n instruments: $instruments\n searchPattern: $searchPattern\n count: $count\n offset: $offset\n tradeModes: $tradeModes\n ) {\n instruments {\n name\n displayName\n tradeMode @include(if: $withTradingModes)\n }\n totalCount\n updatedAt @include(if: $withTradingModes)\n }\n }\n': types.ResolveInstrumentsWithFiltersDocument
|
|
4
4
|
};
|
|
5
5
|
export function graphql(source) {
|
|
6
6
|
return documents[source] ?? {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gql.js","names":["types","documents","ResolveInstrumentsWithFiltersDocument","graphql","source"],"sources":["../../../../src/gql/types/gql.ts"],"sourcesContent":["/* eslint-disable */\nimport * as types from './graphql';\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n\n/**\n * Map of all GraphQL operations in the project.\n *\n * This map has several performance disadvantages:\n * 1. It is not tree-shakeable, so it will include all operations in the project.\n * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.\n * 3. It does not support dead code elimination, so it will add unused operations.\n *\n * Therefore it is highly recommended to use the babel or swc plugin for production.\n */\nconst documents = {\n '\\n query resolveInstrumentsWithFilters(\\n $division: Division!\\n $assetClass: [AssetClassName]\\n $dataSource: InstrumentDataSource\\n $instruments: [String]\\n $searchPattern: String\\n $count: Int\\n $offset: Int\\n ) {\\n resolveInstrumentsWithFilters(\\n division: $division\\n assetClass: $assetClass\\n dataSource: $dataSource\\n instruments: $instruments\\n searchPattern: $searchPattern\\n count: $count\\n offset: $offset\\n ) {\\n instruments {\\n name\\n displayName\\n }\\n totalCount\\n }\\n }\\n':\n types.ResolveInstrumentsWithFiltersDocument,\n};\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n *\n *\n * @example\n * ```ts\n * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);\n * ```\n *\n * The query argument is unknown!\n * Please regenerate the types.\n */\nexport function graphql(source: string): unknown;\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(\n source: '\\n query resolveInstrumentsWithFilters(\\n $division: Division!\\n $assetClass: [AssetClassName]\\n $dataSource: InstrumentDataSource\\n $instruments: [String]\\n $searchPattern: String\\n $count: Int\\n $offset: Int\\n ) {\\n resolveInstrumentsWithFilters(\\n division: $division\\n assetClass: $assetClass\\n dataSource: $dataSource\\n instruments: $instruments\\n searchPattern: $searchPattern\\n count: $count\\n offset: $offset\\n ) {\\n instruments {\\n name\\n displayName\\n }\\n totalCount\\n }\\n }\\n'\n): (typeof documents)['\\n query resolveInstrumentsWithFilters(\\n $division: Division!\\n $assetClass: [AssetClassName]\\n $dataSource: InstrumentDataSource\\n $instruments: [String]\\n $searchPattern: String\\n $count: Int\\n $offset: Int\\n ) {\\n resolveInstrumentsWithFilters(\\n division: $division\\n assetClass: $assetClass\\n dataSource: $dataSource\\n instruments: $instruments\\n searchPattern: $searchPattern\\n count: $count\\n offset: $offset\\n ) {\\n instruments {\\n name\\n displayName\\n }\\n totalCount\\n }\\n }\\n'];\n\nexport function graphql(source: string) {\n return (documents as any)[source] ?? {};\n}\n\nexport type DocumentType<TDocumentNode extends DocumentNode<any, any>> =\n TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;\n"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,WAAW;AAalC,MAAMC,SAAS,GAAG;EAChB,
|
|
1
|
+
{"version":3,"file":"gql.js","names":["types","documents","ResolveInstrumentsWithFiltersDocument","graphql","source"],"sources":["../../../../src/gql/types/gql.ts"],"sourcesContent":["/* eslint-disable */\nimport * as types from './graphql';\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n\n/**\n * Map of all GraphQL operations in the project.\n *\n * This map has several performance disadvantages:\n * 1. It is not tree-shakeable, so it will include all operations in the project.\n * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.\n * 3. It does not support dead code elimination, so it will add unused operations.\n *\n * Therefore it is highly recommended to use the babel or swc plugin for production.\n */\nconst documents = {\n '\\n query resolveInstrumentsWithFilters(\\n $division: Division!\\n $assetClass: [AssetClassName]\\n $dataSource: InstrumentDataSource\\n $instruments: [String]\\n $searchPattern: String\\n $tradeModes: [TradeMode]\\n $count: Int\\n $offset: Int\\n $withTradingModes: Boolean!\\n ) {\\n resolveInstrumentsWithFilters(\\n division: $division\\n assetClass: $assetClass\\n dataSource: $dataSource\\n instruments: $instruments\\n searchPattern: $searchPattern\\n count: $count\\n offset: $offset\\n tradeModes: $tradeModes\\n ) {\\n instruments {\\n name\\n displayName\\n tradeMode @include(if: $withTradingModes)\\n }\\n totalCount\\n updatedAt @include(if: $withTradingModes)\\n }\\n }\\n':\n types.ResolveInstrumentsWithFiltersDocument,\n};\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n *\n *\n * @example\n * ```ts\n * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);\n * ```\n *\n * The query argument is unknown!\n * Please regenerate the types.\n */\nexport function graphql(source: string): unknown;\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(\n source: '\\n query resolveInstrumentsWithFilters(\\n $division: Division!\\n $assetClass: [AssetClassName]\\n $dataSource: InstrumentDataSource\\n $instruments: [String]\\n $searchPattern: String\\n $tradeModes: [TradeMode]\\n $count: Int\\n $offset: Int\\n $withTradingModes: Boolean!\\n ) {\\n resolveInstrumentsWithFilters(\\n division: $division\\n assetClass: $assetClass\\n dataSource: $dataSource\\n instruments: $instruments\\n searchPattern: $searchPattern\\n count: $count\\n offset: $offset\\n tradeModes: $tradeModes\\n ) {\\n instruments {\\n name\\n displayName\\n tradeMode @include(if: $withTradingModes)\\n }\\n totalCount\\n updatedAt @include(if: $withTradingModes)\\n }\\n }\\n'\n): (typeof documents)['\\n query resolveInstrumentsWithFilters(\\n $division: Division!\\n $assetClass: [AssetClassName]\\n $dataSource: InstrumentDataSource\\n $instruments: [String]\\n $searchPattern: String\\n $tradeModes: [TradeMode]\\n $count: Int\\n $offset: Int\\n $withTradingModes: Boolean!\\n ) {\\n resolveInstrumentsWithFilters(\\n division: $division\\n assetClass: $assetClass\\n dataSource: $dataSource\\n instruments: $instruments\\n searchPattern: $searchPattern\\n count: $count\\n offset: $offset\\n tradeModes: $tradeModes\\n ) {\\n instruments {\\n name\\n displayName\\n tradeMode @include(if: $withTradingModes)\\n }\\n totalCount\\n updatedAt @include(if: $withTradingModes)\\n }\\n }\\n'];\n\nexport function graphql(source: string) {\n return (documents as any)[source] ?? {};\n}\n\nexport type DocumentType<TDocumentNode extends DocumentNode<any, any>> =\n TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;\n"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,WAAW;AAalC,MAAMC,SAAS,GAAG;EAChB,2wBAA2wB,EACzwBD,KAAK,CAACE;AACV,CAAC;AAuBD,OAAO,SAASC,OAAOA,CAACC,MAAc,EAAE;EACtC,OAAQH,SAAS,CAASG,MAAM,CAAC,IAAI,CAAC,CAAC;AACzC","ignoreList":[]}
|
|
@@ -87,6 +87,15 @@ export let TopicalSort = function (TopicalSort) {
|
|
|
87
87
|
TopicalSort["Volatile"] = "VOLATILE";
|
|
88
88
|
return TopicalSort;
|
|
89
89
|
}({});
|
|
90
|
+
export let TradeMode = function (TradeMode) {
|
|
91
|
+
TradeMode["TradeCloseonly"] = "TRADE_CLOSEONLY";
|
|
92
|
+
TradeMode["TradeDisabled"] = "TRADE_DISABLED";
|
|
93
|
+
TradeMode["TradeFull"] = "TRADE_FULL";
|
|
94
|
+
TradeMode["TradeLongonly"] = "TRADE_LONGONLY";
|
|
95
|
+
TradeMode["TradeShortonly"] = "TRADE_SHORTONLY";
|
|
96
|
+
TradeMode["TradeUndefined"] = "TRADE_UNDEFINED";
|
|
97
|
+
return TradeMode;
|
|
98
|
+
}({});
|
|
90
99
|
export let ValueAtRiskBars = function (ValueAtRiskBars) {
|
|
91
100
|
ValueAtRiskBars["C100"] = "C100";
|
|
92
101
|
ValueAtRiskBars["C200"] = "C200";
|
|
@@ -215,6 +224,25 @@ export const ResolveInstrumentsWithFiltersDocument = {
|
|
|
215
224
|
value: 'String'
|
|
216
225
|
}
|
|
217
226
|
}
|
|
227
|
+
}, {
|
|
228
|
+
kind: 'VariableDefinition',
|
|
229
|
+
variable: {
|
|
230
|
+
kind: 'Variable',
|
|
231
|
+
name: {
|
|
232
|
+
kind: 'Name',
|
|
233
|
+
value: 'tradeModes'
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
type: {
|
|
237
|
+
kind: 'ListType',
|
|
238
|
+
type: {
|
|
239
|
+
kind: 'NamedType',
|
|
240
|
+
name: {
|
|
241
|
+
kind: 'Name',
|
|
242
|
+
value: 'TradeMode'
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
218
246
|
}, {
|
|
219
247
|
kind: 'VariableDefinition',
|
|
220
248
|
variable: {
|
|
@@ -247,6 +275,25 @@ export const ResolveInstrumentsWithFiltersDocument = {
|
|
|
247
275
|
value: 'Int'
|
|
248
276
|
}
|
|
249
277
|
}
|
|
278
|
+
}, {
|
|
279
|
+
kind: 'VariableDefinition',
|
|
280
|
+
variable: {
|
|
281
|
+
kind: 'Variable',
|
|
282
|
+
name: {
|
|
283
|
+
kind: 'Name',
|
|
284
|
+
value: 'withTradingModes'
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
type: {
|
|
288
|
+
kind: 'NonNullType',
|
|
289
|
+
type: {
|
|
290
|
+
kind: 'NamedType',
|
|
291
|
+
name: {
|
|
292
|
+
kind: 'Name',
|
|
293
|
+
value: 'Boolean'
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
250
297
|
}],
|
|
251
298
|
selectionSet: {
|
|
252
299
|
kind: 'SelectionSet',
|
|
@@ -347,6 +394,19 @@ export const ResolveInstrumentsWithFiltersDocument = {
|
|
|
347
394
|
value: 'offset'
|
|
348
395
|
}
|
|
349
396
|
}
|
|
397
|
+
}, {
|
|
398
|
+
kind: 'Argument',
|
|
399
|
+
name: {
|
|
400
|
+
kind: 'Name',
|
|
401
|
+
value: 'tradeModes'
|
|
402
|
+
},
|
|
403
|
+
value: {
|
|
404
|
+
kind: 'Variable',
|
|
405
|
+
name: {
|
|
406
|
+
kind: 'Name',
|
|
407
|
+
value: 'tradeModes'
|
|
408
|
+
}
|
|
409
|
+
}
|
|
350
410
|
}],
|
|
351
411
|
selectionSet: {
|
|
352
412
|
kind: 'SelectionSet',
|
|
@@ -370,6 +430,33 @@ export const ResolveInstrumentsWithFiltersDocument = {
|
|
|
370
430
|
kind: 'Name',
|
|
371
431
|
value: 'displayName'
|
|
372
432
|
}
|
|
433
|
+
}, {
|
|
434
|
+
kind: 'Field',
|
|
435
|
+
name: {
|
|
436
|
+
kind: 'Name',
|
|
437
|
+
value: 'tradeMode'
|
|
438
|
+
},
|
|
439
|
+
directives: [{
|
|
440
|
+
kind: 'Directive',
|
|
441
|
+
name: {
|
|
442
|
+
kind: 'Name',
|
|
443
|
+
value: 'include'
|
|
444
|
+
},
|
|
445
|
+
arguments: [{
|
|
446
|
+
kind: 'Argument',
|
|
447
|
+
name: {
|
|
448
|
+
kind: 'Name',
|
|
449
|
+
value: 'if'
|
|
450
|
+
},
|
|
451
|
+
value: {
|
|
452
|
+
kind: 'Variable',
|
|
453
|
+
name: {
|
|
454
|
+
kind: 'Name',
|
|
455
|
+
value: 'withTradingModes'
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}]
|
|
459
|
+
}]
|
|
373
460
|
}]
|
|
374
461
|
}
|
|
375
462
|
}, {
|
|
@@ -378,6 +465,33 @@ export const ResolveInstrumentsWithFiltersDocument = {
|
|
|
378
465
|
kind: 'Name',
|
|
379
466
|
value: 'totalCount'
|
|
380
467
|
}
|
|
468
|
+
}, {
|
|
469
|
+
kind: 'Field',
|
|
470
|
+
name: {
|
|
471
|
+
kind: 'Name',
|
|
472
|
+
value: 'updatedAt'
|
|
473
|
+
},
|
|
474
|
+
directives: [{
|
|
475
|
+
kind: 'Directive',
|
|
476
|
+
name: {
|
|
477
|
+
kind: 'Name',
|
|
478
|
+
value: 'include'
|
|
479
|
+
},
|
|
480
|
+
arguments: [{
|
|
481
|
+
kind: 'Argument',
|
|
482
|
+
name: {
|
|
483
|
+
kind: 'Name',
|
|
484
|
+
value: 'if'
|
|
485
|
+
},
|
|
486
|
+
value: {
|
|
487
|
+
kind: 'Variable',
|
|
488
|
+
name: {
|
|
489
|
+
kind: 'Name',
|
|
490
|
+
value: 'withTradingModes'
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}]
|
|
494
|
+
}]
|
|
381
495
|
}]
|
|
382
496
|
}
|
|
383
497
|
}]
|