@oanda/labs-sentiment-widget 1.0.67 → 1.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +524 -0
  2. package/dist/main/SentimentWidget/Tool.js +11 -4
  3. package/dist/main/SentimentWidget/Tool.js.map +1 -1
  4. package/dist/main/SentimentWidget/Widget.js +15 -5
  5. package/dist/main/SentimentWidget/Widget.js.map +1 -1
  6. package/dist/main/constant.js +2 -1
  7. package/dist/main/constant.js.map +1 -1
  8. package/dist/main/gql/getInstrumentSentiment.js +1 -1
  9. package/dist/main/gql/getInstrumentSentiment.js.map +1 -1
  10. package/dist/main/gql/getSentimentList.js +1 -1
  11. package/dist/main/gql/getSentimentList.js.map +1 -1
  12. package/dist/main/gql/types/gql.js +2 -2
  13. package/dist/main/gql/types/gql.js.map +1 -1
  14. package/dist/main/gql/types/graphql.js +55 -1
  15. package/dist/main/gql/types/graphql.js.map +1 -1
  16. package/dist/main/translations/sources/en.json +3 -1
  17. package/dist/main/translations/sources/zh_TW.json +3 -1
  18. package/dist/module/SentimentWidget/Tool.js +13 -6
  19. package/dist/module/SentimentWidget/Tool.js.map +1 -1
  20. package/dist/module/SentimentWidget/Widget.js +17 -7
  21. package/dist/module/SentimentWidget/Widget.js.map +1 -1
  22. package/dist/module/constant.js +2 -1
  23. package/dist/module/constant.js.map +1 -1
  24. package/dist/module/gql/getInstrumentSentiment.js +1 -1
  25. package/dist/module/gql/getInstrumentSentiment.js.map +1 -1
  26. package/dist/module/gql/getSentimentList.js +1 -1
  27. package/dist/module/gql/getSentimentList.js.map +1 -1
  28. package/dist/module/gql/types/gql.js +2 -2
  29. package/dist/module/gql/types/gql.js.map +1 -1
  30. package/dist/module/gql/types/graphql.js +54 -0
  31. package/dist/module/gql/types/graphql.js.map +1 -1
  32. package/dist/module/translations/sources/en.json +3 -1
  33. package/dist/module/translations/sources/zh_TW.json +3 -1
  34. package/dist/types/SentimentWidget/utils.d.ts +1 -0
  35. package/dist/types/constant.d.ts +2 -1
  36. package/dist/types/gql/types/gql.d.ts +4 -4
  37. package/dist/types/gql/types/graphql.d.ts +92 -15
  38. package/package.json +3 -3
  39. package/src/SentimentWidget/Tool.tsx +21 -4
  40. package/src/SentimentWidget/Widget.tsx +35 -23
  41. package/src/constant.ts +3 -1
  42. package/src/gql/getInstrumentSentiment.ts +1 -0
  43. package/src/gql/getSentimentList.ts +1 -0
  44. package/src/gql/types/gql.ts +4 -4
  45. package/src/gql/types/graphql.ts +108 -20
  46. package/src/translations/sources/en.json +3 -1
  47. package/src/translations/sources/zh_TW.json +3 -1
  48. package/test/Widget.test.tsx +4 -4
  49. package/test/sortData.test.ts +42 -12
@@ -1,3 +1,30 @@
1
+ export let BookType = function (BookType) {
2
+ BookType["Order"] = "ORDER";
3
+ BookType["Position"] = "POSITION";
4
+ return BookType;
5
+ }({});
6
+ export let CurrencyName = function (CurrencyName) {
7
+ CurrencyName["Aud"] = "AUD";
8
+ CurrencyName["Cad"] = "CAD";
9
+ CurrencyName["Chf"] = "CHF";
10
+ CurrencyName["Eur"] = "EUR";
11
+ CurrencyName["Gbp"] = "GBP";
12
+ CurrencyName["Jpy"] = "JPY";
13
+ CurrencyName["Nzd"] = "NZD";
14
+ CurrencyName["Usd"] = "USD";
15
+ return CurrencyName;
16
+ }({});
17
+ export let CurrencyPowerBalanceTimeUnit = function (CurrencyPowerBalanceTimeUnit) {
18
+ CurrencyPowerBalanceTimeUnit["CurrentDay"] = "CURRENT_DAY";
19
+ CurrencyPowerBalanceTimeUnit["H4"] = "H4";
20
+ CurrencyPowerBalanceTimeUnit["H8"] = "H8";
21
+ CurrencyPowerBalanceTimeUnit["H24"] = "H24";
22
+ CurrencyPowerBalanceTimeUnit["M1"] = "M1";
23
+ CurrencyPowerBalanceTimeUnit["M3"] = "M3";
24
+ CurrencyPowerBalanceTimeUnit["PreviousDay"] = "PREVIOUS_DAY";
25
+ CurrencyPowerBalanceTimeUnit["W1"] = "W1";
26
+ return CurrencyPowerBalanceTimeUnit;
27
+ }({});
1
28
  export let DataSource = function (DataSource) {
2
29
  DataSource["Ny4"] = "NY4";
3
30
  DataSource["Ty3"] = "TY3";
@@ -33,6 +60,21 @@ export let TopicalSort = function (TopicalSort) {
33
60
  TopicalSort["Volatile"] = "VOLATILE";
34
61
  return TopicalSort;
35
62
  }({});
63
+ export let VolatilityChartTimeSpan = function (VolatilityChartTimeSpan) {
64
+ VolatilityChartTimeSpan["D5"] = "D5";
65
+ VolatilityChartTimeSpan["D10"] = "D10";
66
+ VolatilityChartTimeSpan["M1"] = "M1";
67
+ VolatilityChartTimeSpan["M3"] = "M3";
68
+ VolatilityChartTimeSpan["W5"] = "W5";
69
+ VolatilityChartTimeSpan["W10"] = "W10";
70
+ return VolatilityChartTimeSpan;
71
+ }({});
72
+ export let VolatilityChartTimeUnit = function (VolatilityChartTimeUnit) {
73
+ VolatilityChartTimeUnit["D"] = "D";
74
+ VolatilityChartTimeUnit["H"] = "H";
75
+ VolatilityChartTimeUnit["W"] = "W";
76
+ return VolatilityChartTimeUnit;
77
+ }({});
36
78
  export const GetInstrumentSentimentDocument = {
37
79
  "kind": "Document",
38
80
  "definitions": [{
@@ -149,6 +191,12 @@ export const GetInstrumentSentimentDocument = {
149
191
  }
150
192
  }]
151
193
  }
194
+ }, {
195
+ "kind": "Field",
196
+ "name": {
197
+ "kind": "Name",
198
+ "value": "updatedAt"
199
+ }
152
200
  }]
153
201
  }
154
202
  }]
@@ -239,6 +287,12 @@ export const GetSentimentListDocument = {
239
287
  }
240
288
  }]
241
289
  }
290
+ }, {
291
+ "kind": "Field",
292
+ "name": {
293
+ "kind": "Name",
294
+ "value": "updatedAt"
295
+ }
242
296
  }]
243
297
  }
244
298
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.js","names":["DataSource","Division","Region","Sort","TopicalSort","GetInstrumentSentimentDocument","GetSentimentListDocument"],"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?: Maybe<Array<Maybe<Instrument>>>;\n name?: Maybe<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 Otms = 'OTMS'\n}\n\nexport type Instrument = {\n __typename?: 'Instrument';\n displayName?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\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: 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 orderBooks: Array<Maybe<OrderPositionData>>;\n positionBooks: 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};\n\n\nexport type QueryAssetClassesArgs = {\n division: Division;\n};\n\n\nexport type QueryOrderBooksArgs = {\n dataSource?: InputMaybe<DataSource>;\n instrument: Scalars['String']['input'];\n recentHours?: InputMaybe<Scalars['Int']['input']>;\n region?: InputMaybe<Region>;\n};\n\n\nexport type QueryPositionBooksArgs = {\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 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 division?: InputMaybe<Division>;\n sort: TopicalSort;\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};\n\nexport enum Sort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH'\n}\n\nexport type TopicalInstrument = {\n __typename?: 'TopicalInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: TopicalInstrumentSentiment;\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 type TopicalInstrumentSentiment = {\n __typename?: 'TopicalInstrumentSentiment';\n longPercent: Scalars['Float']['output'];\n shortPercent: Scalars['Float']['output'];\n};\n\nexport enum TopicalSort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH',\n Hot = 'HOT',\n Popular = 'POPULAR',\n Volatile = 'VOLATILE'\n}\n\nexport type GetInstrumentSentimentQueryVariables = Exact<{\n name: Scalars['String']['input'];\n division?: InputMaybe<Division>;\n}>;\n\n\nexport type GetInstrumentSentimentQuery = { __typename?: 'Query', sentiment?: Array<{ __typename?: 'SentimentInstrument', name: string, displayName: string, sentiment: { __typename?: 'Sentiment', shortPercent: number, longPercent: number } }> | null };\n\nexport type GetSentimentListQueryVariables = Exact<{\n division?: InputMaybe<Division>;\n}>;\n\n\nexport type GetSentimentListQuery = { __typename?: 'Query', sentimentList?: Array<{ __typename?: 'SentimentInstrument', name: string, displayName: string, sentiment: { __typename?: 'Sentiment', shortPercent: number, longPercent: number } }> | null };\n\n\nexport const GetInstrumentSentimentDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"GetInstrumentSentiment\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}},\"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\":\"sentiment\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}}},{\"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\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sentiment\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"shortPercent\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"longPercent\"}}]}}]}}]}}]} as unknown as DocumentNode<GetInstrumentSentimentQuery, GetInstrumentSentimentQueryVariables>;\nexport const GetSentimentListDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"GetSentimentList\"},\"variableDefinitions\":[{\"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\":\"sentimentList\"},\"arguments\":[{\"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\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sentiment\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"shortPercent\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"longPercent\"}}]}}]}}]}}]} as unknown as DocumentNode<GetSentimentListQuery, GetSentimentListQueryVariables>;"],"mappings":"AAwBA,WAAYA,UAAU,aAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAKtB,WAAYC,QAAQ,aAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAqGpB,WAAYC,MAAM,aAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;AAmBlB,WAAYC,IAAI,aAAJA,IAAI;EAAJA,IAAI;EAAJA,IAAI;EAAA,OAAJA,IAAI;AAAA;AAyBhB,WAAYC,WAAW,aAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA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kBAAC,OAAO,EAAC;gBAAc;cAAC,CAAC,EAAC;gBAAC,MAAM,EAAC,OAAO;gBAAC,MAAM,EAAC;kBAAC,MAAM,EAAC,MAAM;kBAAC,OAAO,EAAC;gBAAa;cAAC,CAAC;YAAC;UAAC,CAAC;QAAC;MAAC,CAAC;IAAC;EAAC,CAAC;AAAC,CAAmF"}
1
+ {"version":3,"file":"graphql.js","names":["BookType","CurrencyName","CurrencyPowerBalanceTimeUnit","DataSource","Division","Region","Sort","TopicalSort","VolatilityChartTimeSpan","VolatilityChartTimeUnit","GetInstrumentSentimentDocument","GetSentimentListDocument"],"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?: Maybe<Array<Maybe<Instrument>>>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport enum BookType {\n Order = 'ORDER',\n Position = 'POSITION'\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};\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 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 Otms = 'OTMS'\n}\n\nexport type Instrument = {\n __typename?: 'Instrument';\n displayName?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\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 currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;\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 volatilityChart?: Maybe<Array<Maybe<VolatilityChart>>>;\n volatilityChartAssetClasses?: Maybe<Array<VolatilityChartAssetClass>>;\n};\n\n\nexport type QueryAssetClassesArgs = {\n division: Division;\n};\n\n\nexport type QueryCurrencyPowerBalanceArgs = {\n timeUnit: CurrencyPowerBalanceTimeUnit;\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 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 division?: InputMaybe<Division>;\n sort: TopicalSort;\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 TopicalInstrument = {\n __typename?: 'TopicalInstrument';\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 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};\n\nexport type VolatilityChartAssetClass = {\n __typename?: 'VolatilityChartAssetClass';\n instruments: Array<VolatilityChartInstrument>;\n name: Scalars['String']['output'];\n};\n\nexport type VolatilityChartInstrument = {\n __typename?: 'VolatilityChartInstrument';\n displayName: Scalars['String']['output'];\n name: 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 GetInstrumentSentimentQueryVariables = Exact<{\n name: Scalars['String']['input'];\n division?: InputMaybe<Division>;\n}>;\n\n\nexport type GetInstrumentSentimentQuery = { __typename?: 'Query', sentiment?: Array<{ __typename?: 'SentimentInstrument', name: string, displayName: string, updatedAt: string, sentiment: { __typename?: 'Sentiment', shortPercent: number, longPercent: number } }> | null };\n\nexport type GetSentimentListQueryVariables = Exact<{\n division?: InputMaybe<Division>;\n}>;\n\n\nexport type GetSentimentListQuery = { __typename?: 'Query', sentimentList?: Array<{ __typename?: 'SentimentInstrument', name: string, displayName: string, updatedAt: string, sentiment: { __typename?: 'Sentiment', shortPercent: number, longPercent: number } }> | null };\n\n\nexport const GetInstrumentSentimentDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"GetInstrumentSentiment\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}},\"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\":\"sentiment\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}}},{\"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\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sentiment\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"shortPercent\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"longPercent\"}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"updatedAt\"}}]}}]}}]} as unknown as DocumentNode<GetInstrumentSentimentQuery, GetInstrumentSentimentQueryVariables>;\nexport const GetSentimentListDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"GetSentimentList\"},\"variableDefinitions\":[{\"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\":\"sentimentList\"},\"arguments\":[{\"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\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sentiment\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"shortPercent\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"longPercent\"}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"updatedAt\"}}]}}]}}]} as unknown as Docum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AC;cAAC,MAAM,EAAC,MAAM;cAAC,OAAO,EAAC;YAAW,CAAC;YAAC,cAAc,EAAC;cAAC,MAAM,EAAC,cAAc;cAAC,YAAY,EAAC,CAAC;gBAAC,MAAM,EAAC,OAAO;gBAAC,MAAM,EAAC;kBAAC,MAAM,EAAC,MAAM;kBAAC,OAAO,EAAC;gBAAc;cAAC,CAAC,EAAC;gBAAC,MAAM,EAAC,OAAO;gBAAC,MAAM,EAAC;kBAAC,MAAM,EAAC,MAAM;kBAAC,OAAO,EAAC;gBAAa;cAAC,CAAC;YAAC;UAAC,CAAC,EAAC;YAAC,MAAM,EAAC,OAAO;YAAC,MAAM,EAAC;cAAC,MAAM,EAAC,MAAM;cAAC,OAAO,EAAC;YAAW;UAAC,CAAC;QAAC;MAAC,CAAC;IAAC;EAAC,CAAC;AAAC,CAAmF"}
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "data_unavailable": "Data unavailable",
3
+ "last_updated": "Last updated",
3
4
  "net_long": "Net-long",
4
5
  "net_short": "Net-short",
5
- "pagination_entries_range": "{{firstItemOnPage}}-{{lastItemOnPage}} of {{itemCount}} entries"
6
+ "pagination_entries_range": "{{firstItemOnPage}}-{{lastItemOnPage}} of {{itemCount}} entries",
7
+ "today": "Today"
6
8
  }
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "data_unavailable": "沒有數據",
3
+ "last_updated": "最後更新",
3
4
  "net_long": "淨長倉",
4
5
  "net_short": "淨短倉",
5
- "pagination_entries_range": "{{itemCount}}个挂单中的{{firstItemOnPage}}-{{lastItemOnPage}}"
6
+ "pagination_entries_range": "{{itemCount}}个挂单中的{{firstItemOnPage}}-{{lastItemOnPage}}",
7
+ "today": "今日"
6
8
  }
@@ -3,6 +3,7 @@ export declare const sortData: ({ sentimentList }: GetSentimentListQuery, sort:
3
3
  __typename?: "SentimentInstrument" | undefined;
4
4
  name: string;
5
5
  displayName: string;
6
+ updatedAt: string;
6
7
  sentiment: {
7
8
  __typename?: "Sentiment" | undefined;
8
9
  shortPercent: number;
@@ -1,2 +1,3 @@
1
+ declare const EMPTY_VALUE = "\u2014";
1
2
  declare const INSTRUMENT_TOOLTIP_ID = "instrument_tooltip_id";
2
- export { INSTRUMENT_TOOLTIP_ID };
3
+ export { EMPTY_VALUE, INSTRUMENT_TOOLTIP_ID };
@@ -11,11 +11,11 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
11
11
  * Therefore it is highly recommended to use the babel or swc plugin for production.
12
12
  */
13
13
  declare const documents: {
14
- "\n query GetInstrumentSentiment(\n $name: String!\n $division: Division\n ) {\n sentiment(\n name: $name\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n }\n }\n": DocumentNode<types.GetInstrumentSentimentQuery, types.Exact<{
14
+ "\n query GetInstrumentSentiment(\n $name: String!\n $division: Division\n ) {\n sentiment(\n name: $name\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n updatedAt\n }\n }\n": DocumentNode<types.GetInstrumentSentimentQuery, types.Exact<{
15
15
  name: string;
16
16
  division?: types.InputMaybe<types.Division> | undefined;
17
17
  }>>;
18
- "\n query GetSentimentList (\n $division: Division\n ) {\n sentimentList (\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n }\n }\n": DocumentNode<types.GetSentimentListQuery, types.Exact<{
18
+ "\n query GetSentimentList (\n $division: Division\n ) {\n sentimentList (\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n updatedAt\n }\n }\n": DocumentNode<types.GetSentimentListQuery, types.Exact<{
19
19
  division?: types.InputMaybe<types.Division> | undefined;
20
20
  }>>;
21
21
  };
@@ -35,10 +35,10 @@ export declare function graphql(source: string): unknown;
35
35
  /**
36
36
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
37
37
  */
38
- export declare function graphql(source: "\n query GetInstrumentSentiment(\n $name: String!\n $division: Division\n ) {\n sentiment(\n name: $name\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n }\n }\n"): (typeof documents)["\n query GetInstrumentSentiment(\n $name: String!\n $division: Division\n ) {\n sentiment(\n name: $name\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n }\n }\n"];
38
+ export declare function graphql(source: "\n query GetInstrumentSentiment(\n $name: String!\n $division: Division\n ) {\n sentiment(\n name: $name\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n updatedAt\n }\n }\n"): (typeof documents)["\n query GetInstrumentSentiment(\n $name: String!\n $division: Division\n ) {\n sentiment(\n name: $name\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n updatedAt\n }\n }\n"];
39
39
  /**
40
40
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
41
41
  */
42
- export declare function graphql(source: "\n query GetSentimentList (\n $division: Division\n ) {\n sentimentList (\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n }\n }\n"): (typeof documents)["\n query GetSentimentList (\n $division: Division\n ) {\n sentimentList (\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n }\n }\n"];
42
+ export declare function graphql(source: "\n query GetSentimentList (\n $division: Division\n ) {\n sentimentList (\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n updatedAt\n }\n }\n"): (typeof documents)["\n query GetSentimentList (\n $division: Division\n ) {\n sentimentList (\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n updatedAt\n }\n }\n"];
43
43
  export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;
44
44
  export {};
@@ -48,6 +48,41 @@ export type AssetClass = {
48
48
  instruments?: Maybe<Array<Maybe<Instrument>>>;
49
49
  name?: Maybe<Scalars['String']['output']>;
50
50
  };
51
+ export declare enum BookType {
52
+ Order = "ORDER",
53
+ Position = "POSITION"
54
+ }
55
+ export declare enum CurrencyName {
56
+ Aud = "AUD",
57
+ Cad = "CAD",
58
+ Chf = "CHF",
59
+ Eur = "EUR",
60
+ Gbp = "GBP",
61
+ Jpy = "JPY",
62
+ Nzd = "NZD",
63
+ Usd = "USD"
64
+ }
65
+ export type CurrencyPower = {
66
+ __typename?: 'CurrencyPower';
67
+ /** UTC Timestamp */
68
+ point: Scalars['String']['output'];
69
+ price: Scalars['Float']['output'];
70
+ };
71
+ export type CurrencyPowerBalance = {
72
+ __typename?: 'CurrencyPowerBalance';
73
+ currency: CurrencyName;
74
+ power: Array<CurrencyPower>;
75
+ };
76
+ export declare enum CurrencyPowerBalanceTimeUnit {
77
+ CurrentDay = "CURRENT_DAY",
78
+ H4 = "H4",
79
+ H8 = "H8",
80
+ H24 = "H24",
81
+ M1 = "M1",
82
+ M3 = "M3",
83
+ PreviousDay = "PREVIOUS_DAY",
84
+ W1 = "W1"
85
+ }
51
86
  export declare enum DataSource {
52
87
  Ny4 = "NY4",
53
88
  Ty3 = "TY3"
@@ -79,7 +114,7 @@ export type OrderPositionData = {
79
114
  buckets: Array<Maybe<OrderPositionBucket>>;
80
115
  dataSource?: Maybe<Scalars['String']['output']>;
81
116
  instrument: Scalars['String']['output'];
82
- price: Scalars['Float']['output'];
117
+ price?: Maybe<Scalars['Float']['output']>;
83
118
  region?: Maybe<Scalars['String']['output']>;
84
119
  time: Scalars['String']['output'];
85
120
  unixTime: Scalars['Int']['output'];
@@ -87,24 +122,24 @@ export type OrderPositionData = {
87
122
  export type Query = {
88
123
  __typename?: 'Query';
89
124
  assetClasses?: Maybe<Array<Maybe<AssetClass>>>;
90
- orderBooks: Array<Maybe<OrderPositionData>>;
91
- positionBooks: Array<Maybe<OrderPositionData>>;
125
+ currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;
126
+ orderPositionBooks: Array<Maybe<OrderPositionData>>;
92
127
  sentiment?: Maybe<Array<SentimentInstrument>>;
93
128
  sentimentList?: Maybe<Array<SentimentInstrument>>;
94
129
  topicalInstruments?: Maybe<Array<TopicalInstrument>>;
95
130
  topicalInstrumentsCharts?: Maybe<Array<TopicalInstrumentChart>>;
96
131
  topicalInstrumentsTotalCount: Scalars['Int']['output'];
132
+ volatilityChart?: Maybe<Array<Maybe<VolatilityChart>>>;
133
+ volatilityChartAssetClasses?: Maybe<Array<VolatilityChartAssetClass>>;
97
134
  };
98
135
  export type QueryAssetClassesArgs = {
99
136
  division: Division;
100
137
  };
101
- export type QueryOrderBooksArgs = {
102
- dataSource?: InputMaybe<DataSource>;
103
- instrument: Scalars['String']['input'];
104
- recentHours?: InputMaybe<Scalars['Int']['input']>;
105
- region?: InputMaybe<Region>;
138
+ export type QueryCurrencyPowerBalanceArgs = {
139
+ timeUnit: CurrencyPowerBalanceTimeUnit;
106
140
  };
107
- export type QueryPositionBooksArgs = {
141
+ export type QueryOrderPositionBooksArgs = {
142
+ bookType: BookType;
108
143
  dataSource?: InputMaybe<DataSource>;
109
144
  instrument: Scalars['String']['input'];
110
145
  recentHours?: InputMaybe<Scalars['Int']['input']>;
@@ -132,6 +167,15 @@ export type QueryTopicalInstrumentsTotalCountArgs = {
132
167
  division?: InputMaybe<Division>;
133
168
  sort: TopicalSort;
134
169
  };
170
+ export type QueryVolatilityChartArgs = {
171
+ division?: InputMaybe<Division>;
172
+ instrument: Scalars['String']['input'];
173
+ timeSpan: VolatilityChartTimeSpan;
174
+ timeUnit: VolatilityChartTimeUnit;
175
+ };
176
+ export type QueryVolatilityChartAssetClassesArgs = {
177
+ division?: InputMaybe<Division>;
178
+ };
135
179
  export declare enum Region {
136
180
  Amer = "AMER",
137
181
  Apac = "APAC",
@@ -147,6 +191,7 @@ export type SentimentInstrument = {
147
191
  displayName: Scalars['String']['output'];
148
192
  name: Scalars['String']['output'];
149
193
  sentiment: Sentiment;
194
+ updatedAt: Scalars['String']['output'];
150
195
  };
151
196
  export declare enum Sort {
152
197
  Bearish = "BEARISH",
@@ -156,7 +201,7 @@ export type TopicalInstrument = {
156
201
  __typename?: 'TopicalInstrument';
157
202
  displayName: Scalars['String']['output'];
158
203
  name: Scalars['String']['output'];
159
- sentiment: TopicalInstrumentSentiment;
204
+ sentiment: Sentiment;
160
205
  updatedAt: Scalars['String']['output'];
161
206
  };
162
207
  export type TopicalInstrumentChart = {
@@ -164,11 +209,6 @@ export type TopicalInstrumentChart = {
164
209
  chart?: Maybe<Array<Scalars['Float']['output']>>;
165
210
  name: Scalars['String']['output'];
166
211
  };
167
- export type TopicalInstrumentSentiment = {
168
- __typename?: 'TopicalInstrumentSentiment';
169
- longPercent: Scalars['Float']['output'];
170
- shortPercent: Scalars['Float']['output'];
171
- };
172
212
  export declare enum TopicalSort {
173
213
  Bearish = "BEARISH",
174
214
  Bullish = "BULLISH",
@@ -176,6 +216,41 @@ export declare enum TopicalSort {
176
216
  Popular = "POPULAR",
177
217
  Volatile = "VOLATILE"
178
218
  }
219
+ export type VolatilityChart = {
220
+ __typename?: 'VolatilityChart';
221
+ pips: Scalars['Float']['output'];
222
+ /** Time point - hour in format hh:mm, Date in UTC, Week in format 'Mo' */
223
+ point: Scalars['String']['output'];
224
+ };
225
+ export type VolatilityChartAssetClass = {
226
+ __typename?: 'VolatilityChartAssetClass';
227
+ instruments: Array<VolatilityChartInstrument>;
228
+ name: Scalars['String']['output'];
229
+ };
230
+ export type VolatilityChartInstrument = {
231
+ __typename?: 'VolatilityChartInstrument';
232
+ displayName: Scalars['String']['output'];
233
+ name: Scalars['String']['output'];
234
+ };
235
+ export declare enum VolatilityChartTimeSpan {
236
+ /** Valid for: H */
237
+ D5 = "D5",
238
+ /** Valid for: H */
239
+ D10 = "D10",
240
+ /** Valid for: D */
241
+ M1 = "M1",
242
+ /** Valid for: D */
243
+ M3 = "M3",
244
+ /** Valid for: W */
245
+ W5 = "W5",
246
+ /** Valid for: W */
247
+ W10 = "W10"
248
+ }
249
+ export declare enum VolatilityChartTimeUnit {
250
+ D = "D",
251
+ H = "H",
252
+ W = "W"
253
+ }
179
254
  export type GetInstrumentSentimentQueryVariables = Exact<{
180
255
  name: Scalars['String']['input'];
181
256
  division?: InputMaybe<Division>;
@@ -186,6 +261,7 @@ export type GetInstrumentSentimentQuery = {
186
261
  __typename?: 'SentimentInstrument';
187
262
  name: string;
188
263
  displayName: string;
264
+ updatedAt: string;
189
265
  sentiment: {
190
266
  __typename?: 'Sentiment';
191
267
  shortPercent: number;
@@ -202,6 +278,7 @@ export type GetSentimentListQuery = {
202
278
  __typename?: 'SentimentInstrument';
203
279
  name: string;
204
280
  displayName: string;
281
+ updatedAt: string;
205
282
  sentiment: {
206
283
  __typename?: 'Sentiment';
207
284
  shortPercent: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oanda/labs-sentiment-widget",
3
- "version": "1.0.67",
3
+ "version": "1.0.69",
4
4
  "description": "Labs Sentiment Widget",
5
5
  "main": "dist/main/index.js",
6
6
  "module": "dist/module/index.js",
@@ -13,7 +13,7 @@
13
13
  "license": "UNLICENSED",
14
14
  "dependencies": {
15
15
  "@apollo/client": "3.7.17",
16
- "@oanda/labs-widget-common": "^1.0.67",
16
+ "@oanda/labs-widget-common": "^1.0.69",
17
17
  "@oanda/mono-i18n": "9.0.0",
18
18
  "classnames": "2.3.2",
19
19
  "graphql": "16.7.1"
@@ -22,5 +22,5 @@
22
22
  "@graphql-codegen/cli": "5.0.0",
23
23
  "@graphql-codegen/client-preset": "4.1.0"
24
24
  },
25
- "gitHead": "53982e6ca1af39793b46ca4cf7ae044074ec8f19"
25
+ "gitHead": "59e64694479289a64803840072625d6411219d9b"
26
26
  }
@@ -1,6 +1,14 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import {
3
- Sentiment, SentimentHeight, Loader, LoaderSize, ChartError, Truncate, Tooltip,
3
+ Sentiment,
4
+ SentimentHeight,
5
+ Loader,
6
+ LoaderSize,
7
+ ChartError,
8
+ Truncate,
9
+ Tooltip,
10
+ InfoBox,
11
+ formatUpdatedTimestamp,
4
12
  } from '@oanda/labs-widget-common';
5
13
  import { useQuery } from '@apollo/client';
6
14
  import { useLocale } from '@oanda/mono-i18n';
@@ -11,7 +19,7 @@ import { SelectedArrow, SortSwitch } from './components/SortSwitch';
11
19
  import {
12
20
  GetSentimentListQuery, GetSentimentListQueryVariables, SentimentInstrument, Sort,
13
21
  } from '../gql/types/graphql';
14
- import { INSTRUMENT_TOOLTIP_ID } from '../constant';
22
+ import { EMPTY_VALUE, INSTRUMENT_TOOLTIP_ID } from '../constant';
15
23
 
16
24
  const Tool = ({ division }: SentimentToolConfig) => {
17
25
  const [sort, setSort] = useState(Sort.Bullish);
@@ -26,14 +34,17 @@ const Tool = ({ division }: SentimentToolConfig) => {
26
34
  fetchPolicy: 'cache-and-network',
27
35
  });
28
36
 
37
+ const { lang } = useLocale();
38
+ const [updatedTimestamp, setUpdatedTimestamp] = useState(EMPTY_VALUE);
39
+
29
40
  useEffect(() => {
30
41
  if (data) {
31
42
  setSortedData(sortData(data, sort));
43
+ setUpdatedTimestamp(formatUpdatedTimestamp(data.sentimentList![0]?.updatedAt, lang('today')));
32
44
  }
45
+ // eslint-disable-next-line react-hooks/exhaustive-deps
33
46
  }, [data, sort]);
34
47
 
35
- const { lang } = useLocale();
36
-
37
48
  return (
38
49
  <div data-testid="sentiment-tool" className="lw-relative lw-bg-bg-primary lw-text-sm lw-tracking-normal lw-text-text-primary">
39
50
  {error || sortedData.length === 0 ? (
@@ -80,6 +91,12 @@ const Tool = ({ division }: SentimentToolConfig) => {
80
91
  </>
81
92
  )}
82
93
  <Tooltip id={INSTRUMENT_TOOLTIP_ID} />
94
+ {!error
95
+ && (
96
+ <div className="lw-mt-2 lw-h-8">
97
+ <InfoBox text={`${lang('last_updated')}: ${updatedTimestamp}`} />
98
+ </div>
99
+ )}
83
100
  </div>
84
101
  );
85
102
  };
@@ -1,12 +1,13 @@
1
1
  import React from 'react';
2
2
  import {
3
- Sentiment, SentimentHeight, Error, Loader, LoaderSize, Truncate,
3
+ Sentiment, SentimentHeight, Error, Loader, LoaderSize, Truncate, InfoBox, formatUpdatedTimestamp,
4
4
  } from '@oanda/labs-widget-common';
5
+ import { useLocale } from '@oanda/mono-i18n';
5
6
  import { useQuery } from '@apollo/client';
6
7
  import { getInstrumentSentiment } from '../gql/getInstrumentSentiment';
7
8
  import { SentimentWidgetConfig } from './types';
8
9
  import { GetInstrumentSentimentQuery, GetInstrumentSentimentQueryVariables } from '../gql/types/graphql';
9
- import { INSTRUMENT_TOOLTIP_ID } from '../constant';
10
+ import { EMPTY_VALUE, INSTRUMENT_TOOLTIP_ID } from '../constant';
10
11
 
11
12
  const Widget = ({ instrument, division }: SentimentWidgetConfig) => {
12
13
  const { loading, data, error } = useQuery<
@@ -20,35 +21,46 @@ const Widget = ({ instrument, division }: SentimentWidgetConfig) => {
20
21
  fetchPolicy: 'cache-and-network',
21
22
  });
22
23
 
23
- const { sentiment } = data?.sentiment?.[0] || {};
24
+ const { lang } = useLocale();
25
+
26
+ const { displayName, sentiment, updatedAt } = data?.sentiment?.[0] || {};
27
+
24
28
  const isError = error
25
29
  || (sentiment?.shortPercent === 0 && sentiment?.longPercent === 0)
26
30
  || sentiment?.shortPercent === undefined
27
31
  || sentiment?.longPercent === undefined;
28
32
 
29
33
  return (
30
- <div data-testid="sentiment-widget" className="lw-border lw-border-solid lw-border-border-primary lw-bg-bg-primary lw-p-4 lw-text-sm lw-tracking-normal lw-text-text-primary">
31
- <div className="lw-flex lw-items-center lw-justify-between">
32
- <div className="lw-w-[120px] lw-shrink-0">
33
- {loading && <Loader size={LoaderSize.md} />}
34
- {!loading && !isError && (
35
- <Truncate
36
- maxWidth={120}
37
- tooltipId={INSTRUMENT_TOOLTIP_ID}
38
- className="lw-pr-2 lw-font-sans lw-text-sm lw-font-bold"
39
- text={data?.sentiment?.[0]?.displayName || '\u2014'}
40
- />
41
- )}
34
+ <>
35
+ <div data-testid="sentiment-widget" className="lw-border lw-border-solid lw-border-border-primary lw-bg-bg-primary lw-p-4 lw-text-sm lw-tracking-normal lw-text-text-primary">
36
+ <div className="lw-flex lw-items-center lw-justify-between">
37
+ <div className="lw-w-[120px] lw-shrink-0">
38
+ {loading && <Loader size={LoaderSize.md} />}
39
+ {!loading && !isError && (
40
+ <Truncate
41
+ maxWidth={120}
42
+ tooltipId={INSTRUMENT_TOOLTIP_ID}
43
+ className="lw-pr-2 lw-font-sans lw-text-sm lw-font-bold"
44
+ text={displayName || '\u2014'}
45
+ />
46
+ )}
47
+ </div>
48
+ <Sentiment
49
+ withError={false}
50
+ isLoading={loading}
51
+ height={SentimentHeight.md}
52
+ sentiment={sentiment}
53
+ />
42
54
  </div>
43
- <Sentiment
44
- withError={false}
45
- isLoading={loading}
46
- height={SentimentHeight.md}
47
- sentiment={sentiment}
48
- />
55
+
56
+ {!loading && isError && <Error />}
49
57
  </div>
50
- {!loading && isError && <Error />}
51
- </div>
58
+ {!isError && updatedAt && (
59
+ <div className="lw-mt-2 lw-h-8">
60
+ <InfoBox text={`${lang('last_updated')}: ${formatUpdatedTimestamp(updatedAt, lang('today')) || EMPTY_VALUE}`} />
61
+ </div>
62
+ )}
63
+ </>
52
64
  );
53
65
  };
54
66
 
package/src/constant.ts CHANGED
@@ -1,3 +1,5 @@
1
+ const EMPTY_VALUE = '\u2014';
2
+
1
3
  const INSTRUMENT_TOOLTIP_ID = 'instrument_tooltip_id';
2
4
 
3
- export { INSTRUMENT_TOOLTIP_ID };
5
+ export { EMPTY_VALUE, INSTRUMENT_TOOLTIP_ID };
@@ -15,6 +15,7 @@ const getInstrumentSentiment = gql`
15
15
  shortPercent
16
16
  longPercent
17
17
  }
18
+ updatedAt
18
19
  }
19
20
  }
20
21
  `;
@@ -13,6 +13,7 @@ const getSentimentList = gql`
13
13
  shortPercent
14
14
  longPercent
15
15
  }
16
+ updatedAt
16
17
  }
17
18
  }
18
19
  `;
@@ -13,8 +13,8 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
13
13
  * Therefore it is highly recommended to use the babel or swc plugin for production.
14
14
  */
15
15
  const documents = {
16
- "\n query GetInstrumentSentiment(\n $name: String!\n $division: Division\n ) {\n sentiment(\n name: $name\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n }\n }\n": types.GetInstrumentSentimentDocument,
17
- "\n query GetSentimentList (\n $division: Division\n ) {\n sentimentList (\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n }\n }\n": types.GetSentimentListDocument,
16
+ "\n query GetInstrumentSentiment(\n $name: String!\n $division: Division\n ) {\n sentiment(\n name: $name\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n updatedAt\n }\n }\n": types.GetInstrumentSentimentDocument,
17
+ "\n query GetSentimentList (\n $division: Division\n ) {\n sentimentList (\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n updatedAt\n }\n }\n": types.GetSentimentListDocument,
18
18
  };
19
19
 
20
20
  /**
@@ -34,11 +34,11 @@ export function graphql(source: string): unknown;
34
34
  /**
35
35
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
36
36
  */
37
- export function graphql(source: "\n query GetInstrumentSentiment(\n $name: String!\n $division: Division\n ) {\n sentiment(\n name: $name\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n }\n }\n"): (typeof documents)["\n query GetInstrumentSentiment(\n $name: String!\n $division: Division\n ) {\n sentiment(\n name: $name\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n }\n }\n"];
37
+ export function graphql(source: "\n query GetInstrumentSentiment(\n $name: String!\n $division: Division\n ) {\n sentiment(\n name: $name\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n updatedAt\n }\n }\n"): (typeof documents)["\n query GetInstrumentSentiment(\n $name: String!\n $division: Division\n ) {\n sentiment(\n name: $name\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n updatedAt\n }\n }\n"];
38
38
  /**
39
39
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
40
40
  */
41
- export function graphql(source: "\n query GetSentimentList (\n $division: Division\n ) {\n sentimentList (\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n }\n }\n"): (typeof documents)["\n query GetSentimentList (\n $division: Division\n ) {\n sentimentList (\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n }\n }\n"];
41
+ export function graphql(source: "\n query GetSentimentList (\n $division: Division\n ) {\n sentimentList (\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n updatedAt\n }\n }\n"): (typeof documents)["\n query GetSentimentList (\n $division: Division\n ) {\n sentimentList (\n division: $division\n ) {\n name\n displayName\n sentiment {\n shortPercent\n longPercent\n }\n updatedAt\n }\n }\n"];
42
42
 
43
43
  export function graphql(source: string) {
44
44
  return (documents as any)[source] ?? {};