@oanda/labs-ticker-tape-widget 1.0.28 → 1.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/CHANGELOG.md +244 -0
  2. package/dist/main/TickerTapeWidget/Main.js +11 -11
  3. package/dist/main/TickerTapeWidget/Main.js.map +1 -1
  4. package/dist/main/TickerTapeWidget/TickerTapeWidget.js +29 -29
  5. package/dist/main/TickerTapeWidget/TickerTapeWidget.js.map +1 -1
  6. package/dist/main/TickerTapeWidget/ValidationWrapper.js +5 -7
  7. package/dist/main/TickerTapeWidget/ValidationWrapper.js.map +1 -1
  8. package/dist/main/TickerTapeWidget/components/InstrumentRateWithData/InstrumentRateWithData.js +5 -5
  9. package/dist/main/TickerTapeWidget/components/InstrumentRateWithData/InstrumentRateWithData.js.map +1 -1
  10. package/dist/main/TickerTapeWidget/components/InstrumentRateWithData/types.js.map +1 -1
  11. package/dist/main/TickerTapeWidget/components/MarqueeWrapper/MarqueeWrapper.js +1 -1
  12. package/dist/main/TickerTapeWidget/components/MarqueeWrapper/MarqueeWrapper.js.map +1 -1
  13. package/dist/main/TickerTapeWidget/constant.js.map +1 -1
  14. package/dist/main/TickerTapeWidget/index.js +8 -8
  15. package/dist/main/TickerTapeWidget/index.js.map +1 -1
  16. package/dist/main/TickerTapeWidget/render.js +7 -7
  17. package/dist/main/TickerTapeWidget/render.js.map +1 -1
  18. package/dist/main/TickerTapeWidget/types.js +1 -1
  19. package/dist/main/TickerTapeWidget/types.js.map +1 -1
  20. package/dist/main/TickerTapeWidget/utils.js +1 -1
  21. package/dist/main/TickerTapeWidget/utils.js.map +1 -1
  22. package/dist/main/gql/types/fragment-masking.js.map +1 -1
  23. package/dist/main/gql/types/gql.js +2 -2
  24. package/dist/main/gql/types/gql.js.map +1 -1
  25. package/dist/main/gql/types/graphql.js +142 -142
  26. package/dist/main/gql/types/graphql.js.map +1 -1
  27. package/dist/main/gql/types/index.js.map +1 -1
  28. package/dist/main/translations/index.js +1 -1
  29. package/dist/main/translations/index.js.map +1 -1
  30. package/dist/main/translations/translations.js.map +1 -1
  31. package/dist/module/TickerTapeWidget/Main.js +10 -10
  32. package/dist/module/TickerTapeWidget/Main.js.map +1 -1
  33. package/dist/module/TickerTapeWidget/TickerTapeWidget.js +30 -29
  34. package/dist/module/TickerTapeWidget/TickerTapeWidget.js.map +1 -1
  35. package/dist/module/TickerTapeWidget/ValidationWrapper.js +5 -5
  36. package/dist/module/TickerTapeWidget/ValidationWrapper.js.map +1 -1
  37. package/dist/module/TickerTapeWidget/components/InstrumentRateWithData/InstrumentRateWithData.js +5 -5
  38. package/dist/module/TickerTapeWidget/components/InstrumentRateWithData/InstrumentRateWithData.js.map +1 -1
  39. package/dist/module/TickerTapeWidget/components/InstrumentRateWithData/types.js.map +1 -1
  40. package/dist/module/TickerTapeWidget/components/MarqueeWrapper/MarqueeWrapper.js +1 -1
  41. package/dist/module/TickerTapeWidget/components/MarqueeWrapper/MarqueeWrapper.js.map +1 -1
  42. package/dist/module/TickerTapeWidget/constant.js.map +1 -1
  43. package/dist/module/TickerTapeWidget/index.js +1 -1
  44. package/dist/module/TickerTapeWidget/index.js.map +1 -1
  45. package/dist/module/TickerTapeWidget/render.js +7 -7
  46. package/dist/module/TickerTapeWidget/render.js.map +1 -1
  47. package/dist/module/TickerTapeWidget/types.js +1 -1
  48. package/dist/module/TickerTapeWidget/types.js.map +1 -1
  49. package/dist/module/TickerTapeWidget/utils.js +1 -1
  50. package/dist/module/TickerTapeWidget/utils.js.map +1 -1
  51. package/dist/module/gql/types/fragment-masking.js.map +1 -1
  52. package/dist/module/gql/types/gql.js +2 -2
  53. package/dist/module/gql/types/gql.js.map +1 -1
  54. package/dist/module/gql/types/graphql.js +142 -142
  55. package/dist/module/gql/types/graphql.js.map +1 -1
  56. package/dist/module/gql/types/index.js +2 -2
  57. package/dist/module/gql/types/index.js.map +1 -1
  58. package/dist/module/translations/index.js +1 -1
  59. package/dist/module/translations/index.js.map +1 -1
  60. package/dist/module/translations/translations.js.map +1 -1
  61. package/dist/types/TickerTapeWidget/Main.d.ts +1 -1
  62. package/dist/types/TickerTapeWidget/TickerTapeWidget.d.ts +1 -1
  63. package/dist/types/TickerTapeWidget/ValidationWrapper.d.ts +1 -1
  64. package/dist/types/TickerTapeWidget/components/InstrumentRateWithData/InstrumentRateWithData.d.ts +1 -1
  65. package/dist/types/TickerTapeWidget/components/InstrumentRateWithData/types.d.ts +2 -2
  66. package/dist/types/TickerTapeWidget/components/MarqueeWrapper/MarqueeWrapper.d.ts +1 -1
  67. package/dist/types/TickerTapeWidget/constant.d.ts +1 -1
  68. package/dist/types/TickerTapeWidget/index.d.ts +1 -1
  69. package/dist/types/TickerTapeWidget/types.d.ts +3 -3
  70. package/dist/types/TickerTapeWidget/utils.d.ts +3 -3
  71. package/dist/types/gql/types/gql.d.ts +4 -4
  72. package/dist/types/gql/types/index.d.ts +2 -2
  73. package/dist/types/translations/index.d.ts +2 -2
  74. package/package.json +3 -3
  75. package/src/TickerTapeWidget/Main.tsx +23 -14
  76. package/src/TickerTapeWidget/TickerTapeWidget.tsx +34 -30
  77. package/src/TickerTapeWidget/ValidationWrapper.tsx +24 -16
  78. package/src/TickerTapeWidget/components/InstrumentRateWithData/InstrumentRateWithData.tsx +12 -8
  79. package/src/TickerTapeWidget/components/InstrumentRateWithData/types.ts +4 -3
  80. package/src/TickerTapeWidget/components/MarqueeWrapper/MarqueeWrapper.tsx +6 -8
  81. package/src/TickerTapeWidget/constant.ts +1 -3
  82. package/src/TickerTapeWidget/index.ts +1 -1
  83. package/src/TickerTapeWidget/render.tsx +47 -32
  84. package/src/TickerTapeWidget/types.ts +8 -3
  85. package/src/TickerTapeWidget/utils.ts +16 -16
  86. package/src/gql/types/fragment-masking.ts +41 -21
  87. package/src/gql/types/gql.ts +12 -5
  88. package/src/gql/types/graphql.ts +214 -50
  89. package/src/gql/types/index.ts +2 -2
  90. package/src/translations/index.ts +4 -4
  91. package/src/translations/translations.ts +2 -1
  92. package/test/Main.test.tsx +22 -14
  93. package/test/mocks.ts +1 -3
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.js","names":["AssetClassName","exports","BookType","CorrelationTimeUnit","CurrencyName","CurrencyPowerBalanceTimeUnit","DataSource","Division","Region","Sort","TopicalSort","ValueAtRiskBars","ValueAtRiskDuration","VolatilityChartTimeSpan","VolatilityChartTimeUnit","GetInstrumentsChartDocument","ValidateInstrumentsDocument"],"sources":["../../../../src/gql/types/graphql.ts"],"sourcesContent":["/* eslint-disable */\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: number; }\n};\n\nexport type AssetClass = {\n __typename?: 'AssetClass';\n instruments: Array<Instrument>;\n name: Scalars['String']['output'];\n};\n\nexport enum AssetClassName {\n Commodities = 'COMMODITIES',\n Cryptocurrency = 'CRYPTOCURRENCY',\n Currency = 'CURRENCY',\n EquityShares = 'EQUITY_SHARES',\n Indices = 'INDICES',\n Rates = 'RATES'\n}\n\nexport enum BookType {\n Order = 'ORDER',\n Position = 'POSITION'\n}\n\nexport type CorrelationHeatmap = {\n __typename?: 'CorrelationHeatmap';\n baseInstrument: Instrument;\n heatmap: Array<Heatmap>;\n};\n\nexport type CorrelationMatrix = {\n __typename?: 'CorrelationMatrix';\n baseTimeUnit: CorrelationTimeUnit;\n matrix: Array<Matrix>;\n};\n\nexport enum CorrelationTimeUnit {\n H1 = 'H1',\n H4 = 'H4',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n M6 = 'M6',\n W1 = 'W1',\n Y1 = 'Y1'\n}\n\nexport enum CurrencyName {\n Aud = 'AUD',\n Cad = 'CAD',\n Chf = 'CHF',\n Eur = 'EUR',\n Gbp = 'GBP',\n Jpy = 'JPY',\n Nzd = 'NZD',\n Usd = 'USD'\n}\n\nexport type CurrencyPower = {\n __typename?: 'CurrencyPower';\n /** UTC Timestamp */\n point: Scalars['String']['output'];\n price: Scalars['Float']['output'];\n};\n\nexport type CurrencyPowerBalance = {\n __typename?: 'CurrencyPowerBalance';\n currency: CurrencyName;\n power: Array<CurrencyPower>;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum CurrencyPowerBalanceTimeUnit {\n CurrentDay = 'CURRENT_DAY',\n H4 = 'H4',\n H8 = 'H8',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n PreviousDay = 'PREVIOUS_DAY',\n W1 = 'W1'\n}\n\nexport type CurrencyStrength = {\n __typename?: 'CurrencyStrength';\n currency: CurrencyName;\n strengthRelation?: Maybe<Array<StrengthRelation>>;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum DataSource {\n Ny4 = 'NY4',\n Ty3 = 'TY3'\n}\n\nexport enum Division {\n Oap = 'OAP',\n Oau = 'OAU',\n Oc = 'OC',\n Ocan = 'OCAN',\n Oel = 'OEL',\n Ogm = 'OGM',\n Oj = 'OJ',\n Opt = 'OPT',\n Otms = 'OTMS'\n}\n\nexport type Heatmap = {\n __typename?: 'Heatmap';\n instrument: Instrument;\n timeCorrelation: Array<TimeCorrelation>;\n};\n\nexport type Instrument = {\n __typename?: 'Instrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n};\n\nexport type InstrumentCorrelation = {\n __typename?: 'InstrumentCorrelation';\n instrument: Instrument;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type Matrix = {\n __typename?: 'Matrix';\n instrument: Instrument;\n instrumentCorrelation: Array<InstrumentCorrelation>;\n};\n\nexport type OrderPositionBucket = {\n __typename?: 'OrderPositionBucket';\n longCountPercent: Scalars['Float']['output'];\n price: Scalars['Float']['output'];\n shortCountPercent: Scalars['Float']['output'];\n};\n\nexport type OrderPositionData = {\n __typename?: 'OrderPositionData';\n bucketWidth: Scalars['Float']['output'];\n buckets: Array<Maybe<OrderPositionBucket>>;\n dataSource?: Maybe<Scalars['String']['output']>;\n instrument: Scalars['String']['output'];\n price?: Maybe<Scalars['Float']['output']>;\n region?: Maybe<Scalars['String']['output']>;\n time: Scalars['String']['output'];\n unixTime: Scalars['Int']['output'];\n};\n\nexport type Query = {\n __typename?: 'Query';\n assetClasses?: Maybe<Array<Maybe<AssetClass>>>;\n correlationHeatmap: CorrelationHeatmap;\n correlationMatrix: CorrelationMatrix;\n currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;\n currencyStrength?: Maybe<Array<CurrencyStrength>>;\n isAllowedPartner?: Maybe<Scalars['Boolean']['output']>;\n mapInstrumentNames?: Maybe<Array<Maybe<Instrument>>>;\n orderPositionBooks: Array<Maybe<OrderPositionData>>;\n sentiment?: Maybe<Array<SentimentInstrument>>;\n sentimentList?: Maybe<Array<SentimentInstrument>>;\n topicalInstruments?: Maybe<Array<TopicalInstrument>>;\n topicalInstrumentsCharts?: Maybe<Array<TopicalInstrumentChart>>;\n topicalInstrumentsTotalCount: Scalars['Int']['output'];\n valueAtRiskAssetClasses?: Maybe<Array<AssetClass>>;\n valueAtRiskChart?: Maybe<ValueAtRiskChart>;\n volatilityChart?: Maybe<Array<Maybe<VolatilityChart>>>;\n volatilityChartAssetClasses?: Maybe<Array<AssetClass>>;\n};\n\n\nexport type QueryAssetClassesArgs = {\n division: Division;\n};\n\n\nexport type QueryCorrelationHeatmapArgs = {\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n timeSpans?: InputMaybe<Array<InputMaybe<CorrelationTimeUnit>>>;\n};\n\n\nexport type QueryCorrelationMatrixArgs = {\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n};\n\n\nexport type QueryCurrencyPowerBalanceArgs = {\n timeUnit: CurrencyPowerBalanceTimeUnit;\n};\n\n\nexport type QueryIsAllowedPartnerArgs = {\n url: Scalars['String']['input'];\n};\n\n\nexport type QueryMapInstrumentNamesArgs = {\n division?: InputMaybe<Division>;\n instruments: Array<InputMaybe<Scalars['String']['input']>>;\n};\n\n\nexport type QueryOrderPositionBooksArgs = {\n bookType: BookType;\n dataSource?: InputMaybe<DataSource>;\n instrument: Scalars['String']['input'];\n recentHours?: InputMaybe<Scalars['Int']['input']>;\n region?: InputMaybe<Region>;\n};\n\n\nexport type QuerySentimentArgs = {\n division?: InputMaybe<Division>;\n name: Scalars['String']['input'];\n};\n\n\nexport type QuerySentimentListArgs = {\n division?: InputMaybe<Division>;\n sort?: InputMaybe<Sort>;\n};\n\n\nexport type QueryTopicalInstrumentsArgs = {\n assetClass?: InputMaybe<AssetClassName>;\n count?: InputMaybe<Scalars['Int']['input']>;\n division?: InputMaybe<Division>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n sort: TopicalSort;\n};\n\n\nexport type QueryTopicalInstrumentsChartsArgs = {\n division?: InputMaybe<Division>;\n instruments?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\n\nexport type QueryTopicalInstrumentsTotalCountArgs = {\n assetClass?: InputMaybe<AssetClassName>;\n division?: InputMaybe<Division>;\n sort: TopicalSort;\n};\n\n\nexport type QueryValueAtRiskAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\n\nexport type QueryValueAtRiskChartArgs = {\n bars: ValueAtRiskBars;\n division?: InputMaybe<Division>;\n duration: ValueAtRiskDuration;\n instrument: Scalars['String']['input'];\n};\n\n\nexport type QueryVolatilityChartArgs = {\n division?: InputMaybe<Division>;\n instrument: Scalars['String']['input'];\n timeSpan: VolatilityChartTimeSpan;\n timeUnit: VolatilityChartTimeUnit;\n};\n\n\nexport type QueryVolatilityChartAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\nexport enum Region {\n Amer = 'AMER',\n Apac = 'APAC',\n Emea = 'EMEA'\n}\n\nexport type Sentiment = {\n __typename?: 'Sentiment';\n longPercent: Scalars['Float']['output'];\n shortPercent: Scalars['Float']['output'];\n};\n\nexport type SentimentInstrument = {\n __typename?: 'SentimentInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum Sort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH'\n}\n\nexport type StrengthRelation = {\n __typename?: 'StrengthRelation';\n currency: CurrencyName;\n percentage: Scalars['Float']['output'];\n};\n\nexport type TimeCorrelation = {\n __typename?: 'TimeCorrelation';\n timeUnit: CorrelationTimeUnit;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type TopicalInstrument = {\n __typename?: 'TopicalInstrument';\n assetClass?: Maybe<AssetClassName>;\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport type TopicalInstrumentChart = {\n __typename?: 'TopicalInstrumentChart';\n chart?: Maybe<Array<Scalars['Float']['output']>>;\n name: Scalars['String']['output'];\n};\n\nexport enum TopicalSort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH',\n Hot = 'HOT',\n Popular = 'POPULAR',\n Volatile = 'VOLATILE'\n}\n\nexport enum ValueAtRiskBars {\n C100 = 'C100',\n C200 = 'C200',\n C300 = 'C300'\n}\n\nexport type ValueAtRiskChart = {\n __typename?: 'ValueAtRiskChart';\n down: ValueAtRiskChartData;\n up: ValueAtRiskChartData;\n};\n\nexport type ValueAtRiskChartData = {\n __typename?: 'ValueAtRiskChartData';\n average: Scalars['Float']['output'];\n max: Scalars['Float']['output'];\n median: Scalars['Float']['output'];\n points?: Maybe<Array<ValueAtRiskChartPoint>>;\n threshold: Scalars['Float']['output'];\n};\n\nexport type ValueAtRiskChartPoint = {\n __typename?: 'ValueAtRiskChartPoint';\n percent: Scalars['Float']['output'];\n pips: Scalars['Float']['output'];\n};\n\nexport enum ValueAtRiskDuration {\n C1 = 'C1',\n C2 = 'C2',\n C3 = 'C3',\n C4 = 'C4',\n C5 = 'C5',\n C10 = 'C10'\n}\n\nexport type VolatilityChart = {\n __typename?: 'VolatilityChart';\n pips: Scalars['Float']['output'];\n /** Time point - hour in format hh:mm, Date in UTC, Week in format 'Mo' */\n point: Scalars['String']['output'];\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum VolatilityChartTimeSpan {\n /** Valid for: H */\n D5 = 'D5',\n /** Valid for: H */\n D10 = 'D10',\n /** Valid for: D */\n M1 = 'M1',\n /** Valid for: D */\n M3 = 'M3',\n /** Valid for: W */\n W5 = 'W5',\n /** Valid for: W */\n W10 = 'W10'\n}\n\nexport enum VolatilityChartTimeUnit {\n D = 'D',\n H = 'H',\n W = 'W'\n}\n\nexport type GetInstrumentsChartQueryVariables = Exact<{\n instruments?: InputMaybe<Array<Scalars['String']['input']> | Scalars['String']['input']>;\n division?: InputMaybe<Division>;\n}>;\n\n\nexport type GetInstrumentsChartQuery = { __typename?: 'Query', topicalInstrumentsCharts?: Array<{ __typename?: 'TopicalInstrumentChart', name: string, chart?: Array<number> | null }> | null };\n\nexport type ValidateInstrumentsQueryVariables = Exact<{\n instruments: Array<InputMaybe<Scalars['String']['input']>> | InputMaybe<Scalars['String']['input']>;\n division?: InputMaybe<Division>;\n}>;\n\n\nexport type ValidateInstrumentsQuery = { __typename?: 'Query', mapInstrumentNames?: Array<{ __typename?: 'Instrument', name: string, displayName: string } | null> | null };\n\n\nexport const GetInstrumentsChartDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"GetInstrumentsChart\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"}},\"type\":{\"kind\":\"ListType\",\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Division\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"topicalInstrumentsCharts\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"chart\"}}]}}]}}]} as unknown as DocumentNode<GetInstrumentsChartQuery, GetInstrumentsChartQueryVariables>;\nexport const ValidateInstrumentsDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"validateInstruments\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"ListType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Division\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"mapInstrumentNames\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"displayName\"}}]}}]}}]} as unknown as DocumentNode<ValidateInstrumentsQuery, ValidateInstrumentsQueryVariables>;"],"mappings":";;;;;;IAwBYA,cAAc,GAAAC,OAAA,CAAAD,cAAA,aAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAAA,IASdE,QAAQ,GAAAD,OAAA,CAAAC,QAAA,aAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAAA,IAiBRC,mBAAmB,GAAAF,OAAA,CAAAE,mBAAA,aAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EA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EAAC;UAAa,CAAC;UAAC,OAAO,EAAC;YAAC,MAAM,EAAC,UAAU;YAAC,MAAM,EAAC;cAAC,MAAM,EAAC,MAAM;cAAC,OAAO,EAAC;YAAa;UAAC;QAAC,CAAC,EAAC;UAAC,MAAM,EAAC,UAAU;UAAC,MAAM,EAAC;YAAC,MAAM,EAAC,MAAM;YAAC,OAAO,EAAC;UAAU,CAAC;UAAC,OAAO,EAAC;YAAC,MAAM,EAAC,UAAU;YAAC,MAAM,EAAC;cAAC,MAAM,EAAC,MAAM;cAAC,OAAO,EAAC;YAAU;UAAC;QAAC,CAAC,CAAC;QAAC,cAAc,EAAC;UAAC,MAAM,EAAC,cAAc;UAAC,YAAY,EAAC,CAAC;YAAC,MAAM,EAAC,OAAO;YAAC,MAAM,EAAC;cAAC,MAAM,EAAC,MAAM;cAAC,OAAO,EAAC;YAAM;UAAC,CAAC,EAAC;YAAC,MAAM,EAAC,OAAO;YAAC,MAAM,EAAC;cAAC,MAAM,EAAC,MAAM;cAAC,OAAO,EAAC;YAAa;UAAC,CAAC;QAAC;MAAC,CAAC;IAAC;EAAC,CAAC;AAAC,CAAyF","ignoreList":[]}
1
+ {"version":3,"file":"graphql.js","names":["AssetClassName","exports","BookType","CorrelationTimeUnit","CurrencyName","CurrencyPowerBalanceTimeUnit","DataSource","Division","Region","Sort","TopicalSort","ValueAtRiskBars","ValueAtRiskDuration","VolatilityChartTimeSpan","VolatilityChartTimeUnit","GetInstrumentsChartDocument","kind","definitions","operation","name","value","variableDefinitions","variable","type","selectionSet","selections","arguments","ValidateInstrumentsDocument"],"sources":["../../../../src/gql/types/graphql.ts"],"sourcesContent":["/* eslint-disable */\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = {\n [K in keyof T]: T[K];\n};\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & {\n [SubKey in K]?: Maybe<T[SubKey]>;\n};\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {\n [SubKey in K]: Maybe<T[SubKey]>;\n};\nexport type MakeEmpty<\n T extends { [key: string]: unknown },\n K extends keyof T,\n> = { [_ in K]?: never };\nexport type Incremental<T> =\n | T\n | {\n [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;\n };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string };\n String: { input: string; output: string };\n Boolean: { input: boolean; output: boolean };\n Int: { input: number; output: number };\n Float: { input: number; output: number };\n};\n\nexport type AssetClass = {\n __typename?: 'AssetClass';\n instruments: Array<Instrument>;\n name: Scalars['String']['output'];\n};\n\nexport enum AssetClassName {\n Commodities = 'COMMODITIES',\n Cryptocurrency = 'CRYPTOCURRENCY',\n Currency = 'CURRENCY',\n EquityShares = 'EQUITY_SHARES',\n Indices = 'INDICES',\n Rates = 'RATES',\n}\n\nexport enum BookType {\n Order = 'ORDER',\n Position = 'POSITION',\n}\n\nexport type CorrelationHeatmap = {\n __typename?: 'CorrelationHeatmap';\n baseInstrument: Instrument;\n heatmap: Array<Heatmap>;\n};\n\nexport type CorrelationMatrix = {\n __typename?: 'CorrelationMatrix';\n baseTimeUnit: CorrelationTimeUnit;\n matrix: Array<Matrix>;\n};\n\nexport enum CorrelationTimeUnit {\n H1 = 'H1',\n H4 = 'H4',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n M6 = 'M6',\n W1 = 'W1',\n Y1 = 'Y1',\n}\n\nexport enum CurrencyName {\n Aud = 'AUD',\n Cad = 'CAD',\n Chf = 'CHF',\n Eur = 'EUR',\n Gbp = 'GBP',\n Jpy = 'JPY',\n Nzd = 'NZD',\n Usd = 'USD',\n}\n\nexport type CurrencyPower = {\n __typename?: 'CurrencyPower';\n /** UTC Timestamp */\n point: Scalars['String']['output'];\n price: Scalars['Float']['output'];\n};\n\nexport type CurrencyPowerBalance = {\n __typename?: 'CurrencyPowerBalance';\n currency: CurrencyName;\n power: Array<CurrencyPower>;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum CurrencyPowerBalanceTimeUnit {\n CurrentDay = 'CURRENT_DAY',\n H4 = 'H4',\n H8 = 'H8',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n PreviousDay = 'PREVIOUS_DAY',\n W1 = 'W1',\n}\n\nexport type CurrencyStrength = {\n __typename?: 'CurrencyStrength';\n currency: CurrencyName;\n strengthRelation?: Maybe<Array<StrengthRelation>>;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum DataSource {\n Ny4 = 'NY4',\n Ty3 = 'TY3',\n}\n\nexport enum Division {\n Oap = 'OAP',\n Oau = 'OAU',\n Oc = 'OC',\n Ocan = 'OCAN',\n Oel = 'OEL',\n Ogm = 'OGM',\n Oj = 'OJ',\n Opt = 'OPT',\n Otms = 'OTMS',\n}\n\nexport type Heatmap = {\n __typename?: 'Heatmap';\n instrument: Instrument;\n timeCorrelation: Array<TimeCorrelation>;\n};\n\nexport type Instrument = {\n __typename?: 'Instrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n};\n\nexport type InstrumentCorrelation = {\n __typename?: 'InstrumentCorrelation';\n instrument: Instrument;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type Matrix = {\n __typename?: 'Matrix';\n instrument: Instrument;\n instrumentCorrelation: Array<InstrumentCorrelation>;\n};\n\nexport type OrderPositionBucket = {\n __typename?: 'OrderPositionBucket';\n longCountPercent: Scalars['Float']['output'];\n price: Scalars['Float']['output'];\n shortCountPercent: Scalars['Float']['output'];\n};\n\nexport type OrderPositionData = {\n __typename?: 'OrderPositionData';\n bucketWidth: Scalars['Float']['output'];\n buckets: Array<Maybe<OrderPositionBucket>>;\n dataSource?: Maybe<Scalars['String']['output']>;\n instrument: Scalars['String']['output'];\n price?: Maybe<Scalars['Float']['output']>;\n region?: Maybe<Scalars['String']['output']>;\n time: Scalars['String']['output'];\n unixTime: Scalars['Int']['output'];\n};\n\nexport type Query = {\n __typename?: 'Query';\n assetClasses?: Maybe<Array<Maybe<AssetClass>>>;\n correlationHeatmap: CorrelationHeatmap;\n correlationMatrix: CorrelationMatrix;\n currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;\n currencyStrength?: Maybe<Array<CurrencyStrength>>;\n isAllowedPartner?: Maybe<Scalars['Boolean']['output']>;\n mapInstrumentNames?: Maybe<Array<Maybe<Instrument>>>;\n orderPositionBooks: Array<Maybe<OrderPositionData>>;\n sentiment?: Maybe<Array<SentimentInstrument>>;\n sentimentList?: Maybe<Array<SentimentInstrument>>;\n topicalInstruments?: Maybe<Array<TopicalInstrument>>;\n topicalInstrumentsCharts?: Maybe<Array<TopicalInstrumentChart>>;\n topicalInstrumentsTotalCount: Scalars['Int']['output'];\n valueAtRiskAssetClasses?: Maybe<Array<AssetClass>>;\n valueAtRiskChart?: Maybe<ValueAtRiskChart>;\n volatilityChart?: Maybe<Array<Maybe<VolatilityChart>>>;\n volatilityChartAssetClasses?: Maybe<Array<AssetClass>>;\n};\n\nexport type QueryAssetClassesArgs = {\n division: Division;\n};\n\nexport type QueryCorrelationHeatmapArgs = {\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n timeSpans?: InputMaybe<Array<InputMaybe<CorrelationTimeUnit>>>;\n};\n\nexport type QueryCorrelationMatrixArgs = {\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n};\n\nexport type QueryCurrencyPowerBalanceArgs = {\n timeUnit: CurrencyPowerBalanceTimeUnit;\n};\n\nexport type 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 QuerySentimentArgs = {\n division?: InputMaybe<Division>;\n name: Scalars['String']['input'];\n};\n\nexport type QuerySentimentListArgs = {\n division?: InputMaybe<Division>;\n sort?: InputMaybe<Sort>;\n};\n\nexport type QueryTopicalInstrumentsArgs = {\n assetClass?: InputMaybe<AssetClassName>;\n count?: InputMaybe<Scalars['Int']['input']>;\n division?: InputMaybe<Division>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n sort: TopicalSort;\n};\n\nexport type QueryTopicalInstrumentsChartsArgs = {\n division?: InputMaybe<Division>;\n instruments?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\nexport type QueryTopicalInstrumentsTotalCountArgs = {\n assetClass?: InputMaybe<AssetClassName>;\n division?: InputMaybe<Division>;\n sort: TopicalSort;\n};\n\nexport type QueryValueAtRiskAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\nexport type QueryValueAtRiskChartArgs = {\n bars: ValueAtRiskBars;\n division?: InputMaybe<Division>;\n duration: ValueAtRiskDuration;\n instrument: Scalars['String']['input'];\n};\n\nexport type QueryVolatilityChartArgs = {\n division?: InputMaybe<Division>;\n instrument: Scalars['String']['input'];\n timeSpan: VolatilityChartTimeSpan;\n timeUnit: VolatilityChartTimeUnit;\n};\n\nexport type QueryVolatilityChartAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\nexport enum Region {\n Amer = 'AMER',\n Apac = 'APAC',\n Emea = 'EMEA',\n}\n\nexport type Sentiment = {\n __typename?: 'Sentiment';\n longPercent: Scalars['Float']['output'];\n shortPercent: Scalars['Float']['output'];\n};\n\nexport type SentimentInstrument = {\n __typename?: 'SentimentInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum Sort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH',\n}\n\nexport type StrengthRelation = {\n __typename?: 'StrengthRelation';\n currency: CurrencyName;\n percentage: Scalars['Float']['output'];\n};\n\nexport type TimeCorrelation = {\n __typename?: 'TimeCorrelation';\n timeUnit: CorrelationTimeUnit;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type TopicalInstrument = {\n __typename?: 'TopicalInstrument';\n assetClass?: Maybe<AssetClassName>;\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport type TopicalInstrumentChart = {\n __typename?: 'TopicalInstrumentChart';\n chart?: Maybe<Array<Scalars['Float']['output']>>;\n name: Scalars['String']['output'];\n};\n\nexport enum TopicalSort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH',\n Hot = 'HOT',\n Popular = 'POPULAR',\n Volatile = 'VOLATILE',\n}\n\nexport enum ValueAtRiskBars {\n C100 = 'C100',\n C200 = 'C200',\n C300 = 'C300',\n}\n\nexport type ValueAtRiskChart = {\n __typename?: 'ValueAtRiskChart';\n down: ValueAtRiskChartData;\n up: ValueAtRiskChartData;\n};\n\nexport type ValueAtRiskChartData = {\n __typename?: 'ValueAtRiskChartData';\n average: Scalars['Float']['output'];\n max: Scalars['Float']['output'];\n median: Scalars['Float']['output'];\n points?: Maybe<Array<ValueAtRiskChartPoint>>;\n threshold: Scalars['Float']['output'];\n};\n\nexport type ValueAtRiskChartPoint = {\n __typename?: 'ValueAtRiskChartPoint';\n percent: Scalars['Float']['output'];\n pips: Scalars['Float']['output'];\n};\n\nexport enum ValueAtRiskDuration {\n C1 = 'C1',\n C2 = 'C2',\n C3 = 'C3',\n C4 = 'C4',\n C5 = 'C5',\n C10 = 'C10',\n}\n\nexport type VolatilityChart = {\n __typename?: 'VolatilityChart';\n pips: Scalars['Float']['output'];\n /** Time point - hour in format hh:mm, Date in UTC, Week in format 'Mo' */\n point: Scalars['String']['output'];\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum VolatilityChartTimeSpan {\n /** Valid for: H */\n D5 = 'D5',\n /** Valid for: H */\n D10 = 'D10',\n /** Valid for: D */\n M1 = 'M1',\n /** Valid for: D */\n M3 = 'M3',\n /** Valid for: W */\n W5 = 'W5',\n /** Valid for: W */\n W10 = 'W10',\n}\n\nexport enum VolatilityChartTimeUnit {\n D = 'D',\n H = 'H',\n W = 'W',\n}\n\nexport type GetInstrumentsChartQueryVariables = Exact<{\n instruments?: InputMaybe<\n Array<Scalars['String']['input']> | Scalars['String']['input']\n >;\n division?: InputMaybe<Division>;\n}>;\n\nexport type GetInstrumentsChartQuery = {\n __typename?: 'Query';\n topicalInstrumentsCharts?: Array<{\n __typename?: 'TopicalInstrumentChart';\n name: string;\n chart?: Array<number> | null;\n }> | null;\n};\n\nexport type ValidateInstrumentsQueryVariables = Exact<{\n instruments:\n | Array<InputMaybe<Scalars['String']['input']>>\n | InputMaybe<Scalars['String']['input']>;\n division?: InputMaybe<Division>;\n}>;\n\nexport type ValidateInstrumentsQuery = {\n __typename?: 'Query';\n mapInstrumentNames?: Array<{\n __typename?: 'Instrument';\n name: string;\n displayName: string;\n } | null> | null;\n};\n\nexport const GetInstrumentsChartDocument = {\n kind: 'Document',\n definitions: [\n {\n kind: 'OperationDefinition',\n operation: 'query',\n name: { kind: 'Name', value: 'GetInstrumentsChart' },\n variableDefinitions: [\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'instruments' },\n },\n type: {\n kind: 'ListType',\n type: {\n kind: 'NonNullType',\n type: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'String' },\n },\n },\n },\n },\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'division' },\n },\n type: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'Division' },\n },\n },\n ],\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'topicalInstrumentsCharts' },\n arguments: [\n {\n kind: 'Argument',\n name: { kind: 'Name', value: 'instruments' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'instruments' },\n },\n },\n {\n kind: 'Argument',\n name: { kind: 'Name', value: 'division' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'division' },\n },\n },\n ],\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n { kind: 'Field', name: { kind: 'Name', value: 'chart' } },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<\n GetInstrumentsChartQuery,\n GetInstrumentsChartQueryVariables\n>;\nexport const ValidateInstrumentsDocument = {\n kind: 'Document',\n definitions: [\n {\n kind: 'OperationDefinition',\n operation: 'query',\n name: { kind: 'Name', value: 'validateInstruments' },\n variableDefinitions: [\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'instruments' },\n },\n type: {\n kind: 'NonNullType',\n type: {\n kind: 'ListType',\n type: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'String' },\n },\n },\n },\n },\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'division' },\n },\n type: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'Division' },\n },\n },\n ],\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'mapInstrumentNames' },\n arguments: [\n {\n kind: 'Argument',\n name: { kind: 'Name', value: 'instruments' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'instruments' },\n },\n },\n {\n kind: 'Argument',\n name: { kind: 'Name', value: 'division' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'division' },\n },\n },\n ],\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n { kind: 'Field', name: { kind: 'Name', value: 'displayName' } },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<\n ValidateInstruments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AAE,CAAC;QAEnE;MACF,CAAC;IAEL;EACF,CAAC;AAEL,CAGC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_fragmentMasking","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_gql"],"sources":["../../../../src/gql/types/index.ts"],"sourcesContent":["export * from \"./fragment-masking\";\nexport * from \"./gql\";"],"mappings":";;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,gBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,gBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,gBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,IAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,IAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,IAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,IAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_fragmentMasking","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_gql"],"sources":["../../../../src/gql/types/index.ts"],"sourcesContent":["export * from './fragment-masking';\nexport * from './gql';\n"],"mappings":";;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,gBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,gBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,gBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,IAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,IAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,IAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,IAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.translations = void 0;
7
7
  var _monoI18n = require("@oanda/mono-i18n");
8
8
  var _en = _interopRequireDefault(require("./sources/en.json"));
9
- var _zh_TW = _interopRequireDefault(require("./sources/zh_TW.json"));
10
9
  var _es = _interopRequireDefault(require("./sources/es.json"));
11
10
  var _th = _interopRequireDefault(require("./sources/th.json"));
11
+ var _zh_TW = _interopRequireDefault(require("./sources/zh_TW.json"));
12
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
13
  const translations = exports.translations = {
14
14
  [_monoI18n.Locale.en]: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_monoI18n","require","_en","_interopRequireDefault","_zh_TW","_es","_th","e","__esModule","default","translations","exports","Locale","en","translation","zhTW","es","th"],"sources":["../../../src/translations/index.ts"],"sourcesContent":["import { Locale, Translations } from '@oanda/mono-i18n';\n\nimport en from './sources/en.json';\nimport zhTW from './sources/zh_TW.json';\nimport es from './sources/es.json';\nimport th from './sources/th.json';\n\nimport { defaultTranslations } from './translations';\n\nexport type TranslationKey = keyof typeof defaultTranslations;\n\nexport const translations: Translations = {\n [Locale.en]: { translation: en },\n [Locale.zhTW]: { translation: zhTW },\n [Locale.es]: { translation: es },\n [Locale.th]: { translation: th },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,GAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,GAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,GAAA,GAAAH,sBAAA,CAAAF,OAAA;AAAmC,SAAAE,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAM5B,MAAMG,YAA0B,GAAAC,OAAA,CAAAD,YAAA,GAAG;EACxC,CAACE,gBAAM,CAACC,EAAE,GAAG;IAAEC,WAAW,EAAED;EAAG,CAAC;EAChC,CAACD,gBAAM,CAACG,IAAI,GAAG;IAAED,WAAW,EAAEC;EAAK,CAAC;EACpC,CAACH,gBAAM,CAACI,EAAE,GAAG;IAAEF,WAAW,EAAEE;EAAG,CAAC;EAChC,CAACJ,gBAAM,CAACK,EAAE,GAAG;IAAEH,WAAW,EAAEG;EAAG;AACjC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_monoI18n","require","_en","_interopRequireDefault","_es","_th","_zh_TW","e","__esModule","default","translations","exports","Locale","en","translation","zhTW","es","th"],"sources":["../../../src/translations/index.ts"],"sourcesContent":["import type { Translations } from '@oanda/mono-i18n';\nimport { Locale } from '@oanda/mono-i18n';\n\nimport en from './sources/en.json';\nimport es from './sources/es.json';\nimport th from './sources/th.json';\nimport zhTW from './sources/zh_TW.json';\nimport type { defaultTranslations } from './translations';\n\nexport type TranslationKey = keyof typeof defaultTranslations;\n\nexport const translations: Translations = {\n [Locale.en]: { translation: en },\n [Locale.zhTW]: { translation: zhTW },\n [Locale.es]: { translation: es },\n [Locale.th]: { translation: th },\n};\n"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,GAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,GAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,GAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAH,sBAAA,CAAAF,OAAA;AAAwC,SAAAE,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAKjC,MAAMG,YAA0B,GAAAC,OAAA,CAAAD,YAAA,GAAG;EACxC,CAACE,gBAAM,CAACC,EAAE,GAAG;IAAEC,WAAW,EAAED;EAAG,CAAC;EAChC,CAACD,gBAAM,CAACG,IAAI,GAAG;IAAED,WAAW,EAAEC;EAAK,CAAC;EACpC,CAACH,gBAAM,CAACI,EAAE,GAAG;IAAEF,WAAW,EAAEE;EAAG,CAAC;EAChC,CAACJ,gBAAM,CAACK,EAAE,GAAG;IAAEH,WAAW,EAAEG;EAAG;AACjC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"translations.js","names":["defaultTranslations","exports","data_unavailable","pagination_entries_range"],"sources":["../../../src/translations/translations.ts"],"sourcesContent":["export const defaultTranslations = {\n data_unavailable: 'Data unavailable',\n pagination_entries_range: '{{firstItemOnPage}}-{{lastItemOnPage}} of {{itemCount}} entries',\n};\n"],"mappings":";;;;;;AAAO,MAAMA,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG;EACjCE,gBAAgB,EAAE,kBAAkB;EACpCC,wBAAwB,EAAE;AAC5B,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"translations.js","names":["defaultTranslations","exports","data_unavailable","pagination_entries_range"],"sources":["../../../src/translations/translations.ts"],"sourcesContent":["export const defaultTranslations = {\n data_unavailable: 'Data unavailable',\n pagination_entries_range:\n '{{firstItemOnPage}}-{{lastItemOnPage}} of {{itemCount}} entries',\n};\n"],"mappings":";;;;;;AAAO,MAAMA,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG;EACjCE,gBAAgB,EAAE,kBAAkB;EACpCC,wBAAwB,EACtB;AACJ,CAAC","ignoreList":[]}
@@ -1,9 +1,9 @@
1
- import React, { useEffect } from 'react';
2
- import classnames from 'classnames';
3
1
  import { Tooltip, useLiveRatesQuery } from '@oanda/labs-widget-common';
4
- import { INSTRUMENT_TOOLTIP_ID } from './constant';
2
+ import classnames from 'classnames';
3
+ import React, { useEffect } from 'react';
5
4
  import { InstrumentRateWithData } from './components/InstrumentRateWithData';
6
5
  import { MarqueeWrapper } from './components/MarqueeWrapper';
6
+ import { INSTRUMENT_TOOLTIP_ID } from './constant';
7
7
  const Main = _ref => {
8
8
  let {
9
9
  records,
@@ -29,11 +29,11 @@ const Main = _ref => {
29
29
  }
30
30
  }, [records]);
31
31
  return React.createElement("div", {
32
- "data-testid": "ticker-tape-wrapper",
33
- className: "lw-flex"
32
+ className: "lw-flex",
33
+ "data-testid": "ticker-tape-wrapper"
34
34
  }, React.createElement(MarqueeWrapper, {
35
- shouldPlay: records.length > 0,
36
- isStatic: motion === 'none'
35
+ isStatic: motion === 'none',
36
+ shouldPlay: records.length > 0
37
37
  }, records.map(record => React.createElement("div", {
38
38
  key: record.instrument,
39
39
  className: classnames('lw-flex lw-border lw-border-r-0 lw-border-solid lw-border-border-primary lw-px-4 lw-text-sm lw-tracking-normal lw-text-text-primary', {
@@ -42,10 +42,10 @@ const Main = _ref => {
42
42
  'lw-w-fit last:lw-border-r': motion === 'none'
43
43
  })
44
44
  }, React.createElement(InstrumentRateWithData, {
45
- record: record,
46
- target: target,
47
45
  division: division,
48
- size: widgetSize
46
+ record: record,
47
+ size: widgetSize,
48
+ target: target
49
49
  })))), React.createElement(Tooltip, {
50
50
  id: INSTRUMENT_TOOLTIP_ID
51
51
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"Main.js","names":["React","useEffect","classnames","Tooltip","useLiveRatesQuery","INSTRUMENT_TOOLTIP_ID","InstrumentRateWithData","MarqueeWrapper","Main","_ref","records","division","size","widgetSize","motion","target","setQuery","instrumentsNames","map","_ref2","instrument","instrumentName","instruments","createElement","className","shouldPlay","length","isStatic","record","key","id"],"sources":["../../../src/TickerTapeWidget/Main.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport classnames from 'classnames';\nimport { Tooltip, useLiveRatesQuery } from '@oanda/labs-widget-common';\nimport { MainProps } from './types';\nimport { INSTRUMENT_TOOLTIP_ID } from './constant';\nimport { InstrumentRateWithData } from './components/InstrumentRateWithData';\nimport { MarqueeWrapper } from './components/MarqueeWrapper';\n\nconst Main = ({\n records,\n division,\n size: widgetSize = 'fullWithChart',\n motion = 'linear',\n}: MainProps) => {\n const { target, setQuery } = useLiveRatesQuery();\n\n const instrumentsNames = records.map(({ instrument: instrumentName }) => instrumentName);\n\n useEffect(() => {\n if (instrumentsNames[0]) {\n setQuery({ instruments: instrumentsNames });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [records]);\n\n return (\n <div data-testid=\"ticker-tape-wrapper\" className=\"lw-flex\">\n <MarqueeWrapper shouldPlay={records.length > 0} isStatic={motion === 'none'}>\n {records.map((record) => (\n <div\n key={record.instrument}\n className={classnames('lw-flex lw-border lw-border-r-0 lw-border-solid lw-border-border-primary lw-px-4 lw-text-sm lw-tracking-normal lw-text-text-primary', {\n 'lw-h-[82px]': widgetSize !== 'compact',\n 'lw-h-[54px]': widgetSize === 'compact',\n 'lw-w-fit last:lw-border-r': motion === 'none',\n })}\n >\n <InstrumentRateWithData\n record={record}\n target={target}\n division={division}\n size={widgetSize}\n />\n </div>\n ))}\n </MarqueeWrapper>\n <Tooltip id={INSTRUMENT_TOOLTIP_ID} />\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ACvC,aAAa,EAAEA,UAAU,KAAK,SAAS;MACvC,2BAA2B,EAAEC,MAAM,KAAK;IAC1C,CAAC;EAAE,GAEHd,KAAA,CAAAuB,aAAA,CAACjB,sBAAsB;IACrBsB,MAAM,EAAEA,MAAO;IACfb,MAAM,EAAEA,MAAO;IACfJ,QAAQ,EAAEA,QAAS;IACnBC,IAAI,EAAEC;EAAW,CAClB,CACE,CACN,CACa,CAAC,EACjBb,KAAA,CAAAuB,aAAA,CAACpB,OAAO;IAAC2B,EAAE,EAAEzB;EAAsB,CAAE,CAClC,CAAC;AAEV,CAAC;AAED,SAASG,IAAI","ignoreList":[]}
1
+ {"version":3,"file":"Main.js","names":["Tooltip","useLiveRatesQuery","classnames","React","useEffect","InstrumentRateWithData","MarqueeWrapper","INSTRUMENT_TOOLTIP_ID","Main","_ref","records","division","size","widgetSize","motion","target","setQuery","instrumentsNames","map","_ref2","instrument","instrumentName","instruments","createElement","className","isStatic","shouldPlay","length","record","key","id"],"sources":["../../../src/TickerTapeWidget/Main.tsx"],"sourcesContent":["import { Tooltip, useLiveRatesQuery } from '@oanda/labs-widget-common';\nimport classnames from 'classnames';\nimport React, { useEffect } from 'react';\n\nimport { InstrumentRateWithData } from './components/InstrumentRateWithData';\nimport { MarqueeWrapper } from './components/MarqueeWrapper';\nimport { INSTRUMENT_TOOLTIP_ID } from './constant';\nimport type { MainProps } from './types';\n\nconst Main = ({\n records,\n division,\n size: widgetSize = 'fullWithChart',\n motion = 'linear',\n}: MainProps) => {\n const { target, setQuery } = useLiveRatesQuery();\n\n const instrumentsNames = records.map(\n ({ instrument: instrumentName }) => instrumentName\n );\n\n useEffect(() => {\n if (instrumentsNames[0]) {\n setQuery({ instruments: instrumentsNames });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [records]);\n\n return (\n <div className=\"lw-flex\" data-testid=\"ticker-tape-wrapper\">\n <MarqueeWrapper\n isStatic={motion === 'none'}\n shouldPlay={records.length > 0}\n >\n {records.map((record) => (\n <div\n key={record.instrument}\n className={classnames(\n 'lw-flex lw-border lw-border-r-0 lw-border-solid lw-border-border-primary lw-px-4 lw-text-sm lw-tracking-normal lw-text-text-primary',\n {\n 'lw-h-[82px]': widgetSize !== 'compact',\n 'lw-h-[54px]': widgetSize === 'compact',\n 'lw-w-fit last:lw-border-r': motion === 'none',\n }\n )}\n >\n <InstrumentRateWithData\n division={division}\n record={record}\n size={widgetSize}\n target={target}\n />\n </div>\n ))}\n </MarqueeWrapper>\n <Tooltip id={INSTRUMENT_TOOLTIP_ID} />\n </div>\n );\n};\n\nexport { Main };\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,iBAAiB,QAAQ,2BAA2B;AACtE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,IAAIC,SAAS,QAAQ,OAAO;AAExC,SAASC,sBAAsB,QAAQ,qCAAqC;AAC5E,SAASC,cAAc,QAAQ,6BAA6B;AAC5D,SAASC,qBAAqB,QAAQ,YAAY;AAGlD,MAAMC,IAAI,GAAGC,IAAA,IAKI;EAAA,IALH;IACZC,OAAO;IACPC,QAAQ;IACRC,IAAI,EAAEC,UAAU,GAAG,eAAe;IAClCC,MAAM,GAAG;EACA,CAAC,GAAAL,IAAA;EACV,MAAM;IAAEM,MAAM;IAAEC;EAAS,CAAC,GAAGf,iBAAiB,CAAC,CAAC;EAEhD,MAAMgB,gBAAgB,GAAGP,OAAO,CAACQ,GAAG,CAClCC,KAAA;IAAA,IAAC;MAAEC,UAAU,EAAEC;IAAe,CAAC,GAAAF,KAAA;IAAA,OAAKE,cAAc;EAAA,CACpD,CAAC;EAEDjB,SAAS,CAAC,MAAM;IACd,IAAIa,gBAAgB,CAAC,CAAC,CAAC,EAAE;MACvBD,QAAQ,CAAC;QAAEM,WAAW,EAAEL;MAAiB,CAAC,CAAC;IAC7C;EAEF,CAAC,EAAE,CAACP,OAAO,CAAC,CAAC;EAEb,OACEP,KAAA,CAAAoB,aAAA;IAAKC,SAAS,EAAC,SAAS;IAAC,eAAY;EAAqB,GACxDrB,KAAA,CAAAoB,aAAA,CAACjB,cAAc;IACbmB,QAAQ,EAAEX,MAAM,KAAK,MAAO;IAC5BY,UAAU,EAAEhB,OAAO,CAACiB,MAAM,GAAG;EAAE,GAE9BjB,OAAO,CAACQ,GAAG,CAAEU,MAAM,IAClBzB,KAAA,CAAAoB,aAAA;IACEM,GAAG,EAAED,MAAM,CAACR,UAAW;IACvBI,SAAS,EAAEtB,UAAU,CACnB,qIAAqI,EACrI;MACE,aAAa,EAAEW,UAAU,KAAK,SAAS;MACvC,aAAa,EAAEA,UAAU,KAAK,SAAS;MACvC,2BAA2B,EAAEC,MAAM,KAAK;IAC1C,CACF;EAAE,GAEFX,KAAA,CAAAoB,aAAA,CAAClB,sBAAsB;IACrBM,QAAQ,EAAEA,QAAS;IACnBiB,MAAM,EAAEA,MAAO;IACfhB,IAAI,EAAEC,UAAW;IACjBE,MAAM,EAAEA;EAAO,CAChB,CACE,CACN,CACa,CAAC,EACjBZ,KAAA,CAAAoB,aAAA,CAACvB,OAAO;IAAC8B,EAAE,EAAEvB;EAAsB,CAAE,CAClC,CAAC;AAEV,CAAC;AAED,SAASC,IAAI","ignoreList":[]}
@@ -1,7 +1,6 @@
1
- import React, { Suspense } from 'react';
2
- import { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';
3
- import { LocaleProvider } from '@oanda/mono-i18n';
4
- import { LiveRatesProvider, ThemeProvider, getLocale, renderComponent } from '@oanda/labs-widget-common';
1
+ import { ApolloClient, InMemoryCache } from '@apollo/client';
2
+ import { WidgetProvider, WidgetWrapper } from '@oanda/labs-widget-common';
3
+ import React from 'react';
5
4
  import { translations } from '../translations';
6
5
  import { Division } from './types';
7
6
  import { ValidationWrapper } from './ValidationWrapper';
@@ -25,32 +24,34 @@ const TickerTapeWidget = _ref => {
25
24
  });
26
25
  const divisionCode = division === Division.Opt ? Division.Ogm : division;
27
26
  const dataSource = divisionCode === Division.Ogm ? 'MT5' : 'V20';
28
- return React.createElement(LocaleProvider, {
29
- locale: getLocale(locale),
30
- translations: translations
31
- }, React.createElement(LiveRatesProvider, {
32
- url: liveRatesUrl,
33
- options: {
34
- divisionCode,
35
- dataSource
36
- }
37
- }, React.createElement(ApolloProvider, {
38
- client: client
39
- }, React.createElement(Suspense, null, React.createElement(ThemeProvider, {
40
- removePadding: removePadding,
27
+ return React.createElement(WidgetProvider, {
28
+ withSuspense: true,
29
+ client: client,
30
+ liveRates: {
31
+ url: liveRatesUrl,
32
+ options: {
33
+ divisionCode,
34
+ dataSource
35
+ }
36
+ },
37
+ locale: locale,
38
+ styling: {
39
+ removePadding,
40
+ fitContent: motion === 'none'
41
+ },
41
42
  theme: theme,
42
- fitContent: motion === 'none'
43
- }, renderComponent({
44
- Component: React.createElement(ValidationWrapper, {
45
- size: size,
46
- motion: motion,
47
- instruments: instruments,
48
- division: division,
49
- isParamError: isParamError
50
- }),
51
- logoLink,
52
- linkArea: 'full'
53
- }))))));
43
+ translations: translations
44
+ }, React.createElement(WidgetWrapper, {
45
+ isParamError: isParamError,
46
+ linkArea: "full",
47
+ logoLink: logoLink
48
+ }, React.createElement(ValidationWrapper, {
49
+ division: division,
50
+ instruments: instruments,
51
+ isParamError: isParamError,
52
+ motion: motion,
53
+ size: size
54
+ })));
54
55
  };
55
56
  export { TickerTapeWidget };
56
57
  //# sourceMappingURL=TickerTapeWidget.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TickerTapeWidget.js","names":["React","Suspense","ApolloClient","InMemoryCache","ApolloProvider","LocaleProvider","LiveRatesProvider","ThemeProvider","getLocale","renderComponent","translations","Division","ValidationWrapper","TickerTapeWidget","_ref","graphqlUrl","liveRatesUrl","instruments","division","locale","theme","isParamError","removePadding","size","motion","logoLink","client","uri","cache","divisionCode","Opt","Ogm","dataSource","createElement","url","options","fitContent","Component","linkArea"],"sources":["../../../src/TickerTapeWidget/TickerTapeWidget.tsx"],"sourcesContent":["import React, { Suspense } from 'react';\nimport { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';\nimport { LocaleProvider } from '@oanda/mono-i18n';\nimport {\n LiveRatesProvider, ThemeProvider, getLocale, renderComponent,\n} from '@oanda/labs-widget-common';\nimport { translations } from '../translations';\nimport { Division, TickerTapeConfig } from './types';\nimport { ValidationWrapper } from './ValidationWrapper';\n\nconst TickerTapeWidget = ({\n graphqlUrl,\n liveRatesUrl,\n instruments,\n division,\n locale,\n theme,\n isParamError,\n removePadding,\n size,\n motion,\n logoLink,\n}: TickerTapeConfig) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n const divisionCode = division === Division.Opt ? Division.Ogm : division;\n const dataSource = divisionCode === Division.Ogm ? 'MT5' : 'V20';\n\n return (\n <LocaleProvider locale={getLocale(locale)} translations={translations}>\n <LiveRatesProvider\n url={liveRatesUrl}\n options={{ divisionCode, dataSource }}\n >\n <ApolloProvider client={client}>\n <Suspense>\n <ThemeProvider removePadding={removePadding} theme={theme} fitContent={motion === 'none'}>\n {renderComponent({\n Component: <ValidationWrapper\n size={size}\n motion={motion}\n instruments={instruments}\n division={division}\n isParamError={isParamError}\n />,\n logoLink,\n linkArea: 'full',\n })}\n </ThemeProvider>\n </Suspense>\n </ApolloProvider>\n </LiveRatesProvider>\n </LocaleProvider>\n );\n};\n\nexport { TickerTapeWidget };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,YAAY,EAAEC,aAAa,EAAEC,cAAc,QAAQ,gBAAgB;AAC5E,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SACEC,iBAAiB,EAAEC,aAAa,EAAEC,SAAS,EAAEC,eAAe,QACvD,2BAA2B;AAClC,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,QAAQ,QAA0B,SAAS;AACpD,SAASC,iBAAiB,QAAQ,qBAAqB;AAEvD,MAAMC,gBAAgB,GAAGC,IAAA,IAYD;EAAA,IAZE;IACxBC,UAAU;IAC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CACC,CACL,CAAC;AAErB,CAAC;AAED,SAASzB,gBAAgB","ignoreList":[]}
1
+ {"version":3,"file":"TickerTapeWidget.js","names":["ApolloClient","InMemoryCache","WidgetProvider","WidgetWrapper","React","translations","Division","ValidationWrapper","TickerTapeWidget","_ref","graphqlUrl","liveRatesUrl","instruments","division","locale","theme","isParamError","removePadding","size","motion","logoLink","client","uri","cache","divisionCode","Opt","Ogm","dataSource","createElement","withSuspense","liveRates","url","options","styling","fitContent","linkArea"],"sources":["../../../src/TickerTapeWidget/TickerTapeWidget.tsx"],"sourcesContent":["import { ApolloClient, InMemoryCache } from '@apollo/client';\nimport { WidgetProvider, WidgetWrapper } from '@oanda/labs-widget-common';\nimport React from 'react';\n\nimport { translations } from '../translations';\nimport type { TickerTapeConfig } from './types';\nimport { Division } from './types';\nimport { ValidationWrapper } from './ValidationWrapper';\n\nconst TickerTapeWidget = ({\n graphqlUrl,\n liveRatesUrl,\n instruments,\n division,\n locale,\n theme,\n isParamError,\n removePadding,\n size,\n motion,\n logoLink,\n}: TickerTapeConfig) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n const divisionCode = division === Division.Opt ? Division.Ogm : division;\n const dataSource = divisionCode === Division.Ogm ? 'MT5' : 'V20';\n\n return (\n <WidgetProvider\n withSuspense\n client={client}\n liveRates={{\n url: liveRatesUrl,\n options: { divisionCode, dataSource },\n }}\n locale={locale}\n styling={{\n removePadding,\n fitContent: motion === 'none',\n }}\n theme={theme}\n translations={translations}\n >\n <WidgetWrapper\n isParamError={isParamError}\n linkArea=\"full\"\n logoLink={logoLink}\n >\n <ValidationWrapper\n division={division}\n instruments={instruments}\n isParamError={isParamError}\n motion={motion}\n size={size}\n />\n </WidgetWrapper>\n </WidgetProvider>\n );\n};\n\nexport { TickerTapeWidget };\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,aAAa,QAAQ,gBAAgB;AAC5D,SAASC,cAAc,EAAEC,aAAa,QAAQ,2BAA2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AY;IACzBI,YAAY,EAAEA,YAAa;IAC3BG,MAAM,EAAEA,MAAO;IACfD,IAAI,EAAEA;EAAK,CACZ,CACY,CACD,CAAC;AAErB,CAAC;AAED,SAASV,gBAAgB","ignoreList":[]}
@@ -1,7 +1,7 @@
1
- import React, { useContext } from 'react';
2
1
  import { useSuspenseQuery } from '@apollo/client';
2
+ import { Error, useLayoutProvider } from '@oanda/labs-widget-common';
3
3
  import classnames from 'classnames';
4
- import { Error, ThemeContext } from '@oanda/labs-widget-common';
4
+ import React from 'react';
5
5
  import { validateInstruments } from '../gql/validateInstruments';
6
6
  import { Main } from './Main';
7
7
  import { getRecords } from './utils';
@@ -15,7 +15,7 @@ const ValidationWrapper = _ref => {
15
15
  } = _ref;
16
16
  const {
17
17
  size
18
- } = useContext(ThemeContext);
18
+ } = useLayoutProvider();
19
19
  const {
20
20
  data,
21
21
  error
@@ -29,10 +29,10 @@ const ValidationWrapper = _ref => {
29
29
  });
30
30
  const showError = !!error || isParamError;
31
31
  return React.createElement(React.Fragment, null, !showError && size && React.createElement(Main, {
32
- size: widgetSize,
33
32
  division: division,
33
+ motion: motion,
34
34
  records: getRecords(data),
35
- motion: motion
35
+ size: widgetSize
36
36
  }), showError && React.createElement("div", {
37
37
  className: classnames('lw-flex lw-border lw-border-solid lw-border-border-primary lw-px-4 lw-text-sm lw-tracking-normal lw-text-text-primary', {
38
38
  'lw-h-[82px]': widgetSize !== 'compact',
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationWrapper.js","names":["React","useContext","useSuspenseQuery","classnames","Error","ThemeContext","validateInstruments","Main","getRecords","ValidationWrapper","_ref","instruments","division","size","widgetSize","motion","isParamError","data","error","variables","fetchPolicy","errorPolicy","showError","createElement","Fragment","records","className"],"sources":["../../../src/TickerTapeWidget/ValidationWrapper.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { useSuspenseQuery } from '@apollo/client';\nimport classnames from 'classnames';\nimport { Error, ThemeContext } from '@oanda/labs-widget-common';\nimport { validateInstruments } from '../gql/validateInstruments';\nimport { ValidateInstrumentsQuery, ValidateInstrumentsQueryVariables } from '../gql/types/graphql';\nimport { Main } from './Main';\nimport { getRecords } from './utils';\nimport { ValidationWrapperProps } from './types';\n\nconst ValidationWrapper = ({\n instruments,\n division,\n size: widgetSize,\n motion,\n isParamError,\n}: ValidationWrapperProps) => {\n const { size } = useContext(ThemeContext);\n const { data, error } = useSuspenseQuery<\n ValidateInstrumentsQuery,\n ValidateInstrumentsQueryVariables\n >(validateInstruments, {\n variables: {\n instruments,\n division,\n },\n fetchPolicy: 'network-only',\n errorPolicy: 'all',\n });\n\n const showError = !!error || isParamError;\n\n return (\n <>\n {!showError && size && (\n <Main\n size={widgetSize}\n division={division}\n records={getRecords(data!)!}\n motion={motion}\n />\n )}\n {showError && (\n <div className={classnames('lw-flex lw-border lw-border-solid lw-border-border-primary lw-px-4 lw-text-sm lw-tracking-normal lw-text-text-primary', {\n 'lw-h-[82px]': widgetSize !== 'compact',\n 'lw-h-[54px]': widgetSize === 'compact',\n })}\n >\n <Error />\n </div>\n )}\n </>\n );\n};\n\nexport { ValidationWrapper };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,gBAAgB,QAAQ,gBAAgB;AACjD,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,KAAK,EAAEC,YAAY,QAAQ,2BAA2B;AAC/D,SAASC,mBAAmB,QAAQ,4BAA4B;AAEhE,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,UAAU,QAAQ,SAAS;AAGpC,MAAMC,iBAAiB,GAAGC,IAAA,IAMI;EAAA,IANH;IACzBC,WAAW;IACXC,QAAQ;IACRC,IAAI,EAAEC,UAAU;IAChBC,MAAM;IACNC;EACsB,CAAC,GAAAN,IAAA;EACvB,MAAM;IAAEG;EAAK,CAAC,GAAGZ,UAAU,CAACI,YAAY,CAAC;EACzC,MAAM;IAAEY,IAAI;IAAEC;EAAM,CAAC,GAAGhB,gBAAgB,CAGtCI,mBAAmB,EAAE;IACrBa,SAAS,EAAE;MACTR,WAAW;MACXC;IACF,CAAC;IACDQ,WAAW,EAAE,cAAc;IAC3BC,WAAW,EAAE;EACf,CAAC,CAAC;EAEF,MAAMC,SAAS,GAAG,CAAC,CAACJ,KAAK,IAAIF,YAAY;EAEzC,OACEhB,KAAA,CAAAuB,aAAA,CAAAvB,KAAA,CAAAwB,QAAA,QACG,CAACF,SAAS,IAAIT,IAAI,IACjBb,KAAA,CAAAuB,aAAA,CAAChB,IAAI;IACHM,IAAI,EAAEC,UAAW;IACjBF,QAAQ,EAAEA,QAAS;IACnBa,OAAO,EAAEjB,UAAU,CAACS,IAAK,CAAG;IAC5BF,MAAM,EAAEA;EAAO,CAChB,CACF,EACAO,SAAS,IACVtB,KAAA,CAAAuB,aAAA;IAAKG,SAAS,EAAEvB,UAAU,CAAC,uHAAuH,EAAE;MAClJ,aAAa,EAAEW,UAAU,KAAK,SAAS;MACvC,aAAa,EAAEA,UAAU,KAAK;IAChC,CAAC;EAAE,GAEDd,KAAA,CAAAuB,aAAA,CAACnB,KAAK,MAAE,CACL,CAEL,CAAC;AAEP,CAAC;AAED,SAASK,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"ValidationWrapper.js","names":["useSuspenseQuery","Error","useLayoutProvider","classnames","React","validateInstruments","Main","getRecords","ValidationWrapper","_ref","instruments","division","size","widgetSize","motion","isParamError","data","error","variables","fetchPolicy","errorPolicy","showError","createElement","Fragment","records","className"],"sources":["../../../src/TickerTapeWidget/ValidationWrapper.tsx"],"sourcesContent":["import { useSuspenseQuery } from '@apollo/client';\nimport { Error, useLayoutProvider } from '@oanda/labs-widget-common';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport type {\n ValidateInstrumentsQuery,\n ValidateInstrumentsQueryVariables,\n} from '../gql/types/graphql';\nimport { validateInstruments } from '../gql/validateInstruments';\nimport { Main } from './Main';\nimport type { ValidationWrapperProps } from './types';\nimport { getRecords } from './utils';\n\nconst ValidationWrapper = ({\n instruments,\n division,\n size: widgetSize,\n motion,\n isParamError,\n}: ValidationWrapperProps) => {\n const { size } = useLayoutProvider();\n const { data, error } = useSuspenseQuery<\n ValidateInstrumentsQuery,\n ValidateInstrumentsQueryVariables\n >(validateInstruments, {\n variables: {\n instruments,\n division,\n },\n fetchPolicy: 'network-only',\n errorPolicy: 'all',\n });\n\n const showError = !!error || isParamError;\n\n return (\n <>\n {!showError && size && (\n <Main\n division={division}\n motion={motion}\n records={getRecords(data!)!}\n size={widgetSize}\n />\n )}\n {showError && (\n <div\n className={classnames(\n 'lw-flex lw-border lw-border-solid lw-border-border-primary lw-px-4 lw-text-sm lw-tracking-normal lw-text-text-primary',\n {\n 'lw-h-[82px]': widgetSize !== 'compact',\n 'lw-h-[54px]': widgetSize === 'compact',\n }\n )}\n >\n <Error />\n </div>\n )}\n </>\n );\n};\n\nexport { ValidationWrapper };\n"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,gBAAgB;AACjD,SAASC,KAAK,EAAEC,iBAAiB,QAAQ,2BAA2B;AACpE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AAMzB,SAASC,mBAAmB,QAAQ,4BAA4B;AAChE,SAASC,IAAI,QAAQ,QAAQ;AAE7B,SAASC,UAAU,QAAQ,SAAS;AAEpC,MAAMC,iBAAiB,GAAGC,IAAA,IAMI;EAAA,IANH;IACzBC,WAAW;IACXC,QAAQ;IACRC,IAAI,EAAEC,UAAU;IAChBC,MAAM;IACNC;EACsB,CAAC,GAAAN,IAAA;EACvB,MAAM;IAAEG;EAAK,CAAC,GAAGV,iBAAiB,CAAC,CAAC;EACpC,MAAM;IAAEc,IAAI;IAAEC;EAAM,CAAC,GAAGjB,gBAAgB,CAGtCK,mBAAmB,EAAE;IACrBa,SAAS,EAAE;MACTR,WAAW;MACXC;IACF,CAAC;IACDQ,WAAW,EAAE,cAAc;IAC3BC,WAAW,EAAE;EACf,CAAC,CAAC;EAEF,MAAMC,SAAS,GAAG,CAAC,CAACJ,KAAK,IAAIF,YAAY;EAEzC,OACEX,KAAA,CAAAkB,aAAA,CAAAlB,KAAA,CAAAmB,QAAA,QACG,CAACF,SAAS,IAAIT,IAAI,IACjBR,KAAA,CAAAkB,aAAA,CAAChB,IAAI;IACHK,QAAQ,EAAEA,QAAS;IACnBG,MAAM,EAAEA,MAAO;IACfU,OAAO,EAAEjB,UAAU,CAACS,IAAK,CAAG;IAC5BJ,IAAI,EAAEC;EAAW,CAClB,CACF,EACAQ,SAAS,IACRjB,KAAA,CAAAkB,aAAA;IACEG,SAAS,EAAEtB,UAAU,CACnB,uHAAuH,EACvH;MACE,aAAa,EAAEU,UAAU,KAAK,SAAS;MACvC,aAAa,EAAEA,UAAU,KAAK;IAChC,CACF;EAAE,GAEFT,KAAA,CAAAkB,aAAA,CAACrB,KAAK,MAAE,CACL,CAEP,CAAC;AAEP,CAAC;AAED,SAASO,iBAAiB","ignoreList":[]}
@@ -1,8 +1,8 @@
1
- import React from 'react';
2
1
  import { useBackgroundQuery } from '@apollo/client';
3
2
  import { InstrumentRateWithChart } from '@oanda/labs-widget-common';
4
- import { INSTRUMENT_TOOLTIP_ID } from '../../constant';
3
+ import React from 'react';
5
4
  import { getInstrumentsChart } from '../../../gql/getInstrumentsChart';
5
+ import { INSTRUMENT_TOOLTIP_ID } from '../../constant';
6
6
  const InstrumentRateWithData = _ref => {
7
7
  let {
8
8
  record,
@@ -20,11 +20,11 @@ const InstrumentRateWithData = _ref => {
20
20
  skip: !hasInstrument
21
21
  });
22
22
  return React.createElement(InstrumentRateWithChart, {
23
+ queryRef: queryRef,
23
24
  record: record,
24
- target: target,
25
25
  size: size,
26
- tooltipId: INSTRUMENT_TOOLTIP_ID,
27
- queryRef: queryRef
26
+ target: target,
27
+ tooltipId: INSTRUMENT_TOOLTIP_ID
28
28
  });
29
29
  };
30
30
  export { InstrumentRateWithData };
@@ -1 +1 @@
1
- {"version":3,"file":"InstrumentRateWithData.js","names":["React","useBackgroundQuery","InstrumentRateWithChart","INSTRUMENT_TOOLTIP_ID","getInstrumentsChart","InstrumentRateWithData","_ref","record","division","target","size","hasInstrument","instrument","queryRef","variables","instruments","fetchPolicy","skip","createElement","tooltipId"],"sources":["../../../../../src/TickerTapeWidget/components/InstrumentRateWithData/InstrumentRateWithData.tsx"],"sourcesContent":["import React from 'react';\nimport { useBackgroundQuery } from '@apollo/client';\nimport { InstrumentRateWithChart } from '@oanda/labs-widget-common';\nimport { InstrumentRateWithDataProps } from './types';\nimport { INSTRUMENT_TOOLTIP_ID } from '../../constant';\nimport { getInstrumentsChart } from '../../../gql/getInstrumentsChart';\nimport { GetInstrumentsChartQuery, GetInstrumentsChartQueryVariables } from '../../../gql/types/graphql';\n\nconst InstrumentRateWithData = ({\n record,\n division,\n target,\n size,\n}: InstrumentRateWithDataProps) => {\n const hasInstrument = !!record.instrument;\n\n const [queryRef] = useBackgroundQuery<\n GetInstrumentsChartQuery,\n GetInstrumentsChartQueryVariables\n >(getInstrumentsChart, {\n variables: {\n instruments: [record.instrument],\n division,\n },\n fetchPolicy: 'network-only',\n skip: !hasInstrument,\n });\n\n return (\n <InstrumentRateWithChart<GetInstrumentsChartQuery>\n record={record}\n target={target}\n size={size}\n tooltipId={INSTRUMENT_TOOLTIP_ID}\n queryRef={queryRef}\n />\n );\n};\n\nexport { InstrumentRateWithData };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,kBAAkB,QAAQ,gBAAgB;AACnD,SAASC,uBAAuB,QAAQ,2BAA2B;AAEnE,SAASC,qBAAqB,QAAQ,gBAAgB;AACtD,SAASC,mBAAmB,QAAQ,kCAAkC;AAGtE,MAAMC,sBAAsB,GAAGC,IAAA,IAKI;EAAA,IALH;IAC9BC,MAAM;IACNC,QAAQ;IACRC,MAAM;IACNC;EAC2B,CAAC,GAAAJ,IAAA;EAC5B,MAAMK,aAAa,GAAG,CAAC,CAACJ,MAAM,CAACK,UAAU;EAEzC,MAAM,CAACC,QAAQ,CAAC,GAAGZ,kBAAkB,CAGnCG,mBAAmB,EAAE;IACrBU,SAAS,EAAE;MACTC,WAAW,EAAE,CAACR,MAAM,CAACK,UAAU,CAAC;MAChCJ;IACF,CAAC;IACDQ,WAAW,EAAE,cAAc;IAC3BC,IAAI,EAAE,CAACN;EACT,CAAC,CAAC;EAEF,OACEX,KAAA,CAAAkB,aAAA,CAAChB,uBAAuB;IACtBK,MAAM,EAAEA,MAAO;IACfE,MAAM,EAAEA,MAAO;IACfC,IAAI,EAAEA,IAAK;IACXS,SAAS,EAAEhB,qBAAsB;IACjCU,QAAQ,EAAEA;EAAS,CACpB,CAAC;AAEN,CAAC;AAED,SAASR,sBAAsB","ignoreList":[]}
1
+ {"version":3,"file":"InstrumentRateWithData.js","names":["useBackgroundQuery","InstrumentRateWithChart","React","getInstrumentsChart","INSTRUMENT_TOOLTIP_ID","InstrumentRateWithData","_ref","record","division","target","size","hasInstrument","instrument","queryRef","variables","instruments","fetchPolicy","skip","createElement","tooltipId"],"sources":["../../../../../src/TickerTapeWidget/components/InstrumentRateWithData/InstrumentRateWithData.tsx"],"sourcesContent":["import { useBackgroundQuery } from '@apollo/client';\nimport { InstrumentRateWithChart } from '@oanda/labs-widget-common';\nimport React from 'react';\n\nimport { getInstrumentsChart } from '../../../gql/getInstrumentsChart';\nimport type {\n GetInstrumentsChartQuery,\n GetInstrumentsChartQueryVariables,\n} from '../../../gql/types/graphql';\nimport { INSTRUMENT_TOOLTIP_ID } from '../../constant';\nimport type { InstrumentRateWithDataProps } from './types';\n\nconst InstrumentRateWithData = ({\n record,\n division,\n target,\n size,\n}: InstrumentRateWithDataProps) => {\n const hasInstrument = !!record.instrument;\n\n const [queryRef] = useBackgroundQuery<\n GetInstrumentsChartQuery,\n GetInstrumentsChartQueryVariables\n >(getInstrumentsChart, {\n variables: {\n instruments: [record.instrument],\n division,\n },\n fetchPolicy: 'network-only',\n skip: !hasInstrument,\n });\n\n return (\n <InstrumentRateWithChart<GetInstrumentsChartQuery>\n queryRef={queryRef}\n record={record}\n size={size}\n target={target}\n tooltipId={INSTRUMENT_TOOLTIP_ID}\n />\n );\n};\n\nexport { InstrumentRateWithData };\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,gBAAgB;AACnD,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,mBAAmB,QAAQ,kCAAkC;AAKtE,SAASC,qBAAqB,QAAQ,gBAAgB;AAGtD,MAAMC,sBAAsB,GAAGC,IAAA,IAKI;EAAA,IALH;IAC9BC,MAAM;IACNC,QAAQ;IACRC,MAAM;IACNC;EAC2B,CAAC,GAAAJ,IAAA;EAC5B,MAAMK,aAAa,GAAG,CAAC,CAACJ,MAAM,CAACK,UAAU;EAEzC,MAAM,CAACC,QAAQ,CAAC,GAAGb,kBAAkB,CAGnCG,mBAAmB,EAAE;IACrBW,SAAS,EAAE;MACTC,WAAW,EAAE,CAACR,MAAM,CAACK,UAAU,CAAC;MAChCJ;IACF,CAAC;IACDQ,WAAW,EAAE,cAAc;IAC3BC,IAAI,EAAE,CAACN;EACT,CAAC,CAAC;EAEF,OACET,KAAA,CAAAgB,aAAA,CAACjB,uBAAuB;IACtBY,QAAQ,EAAEA,QAAS;IACnBN,MAAM,EAAEA,MAAO;IACfG,IAAI,EAAEA,IAAK;IACXD,MAAM,EAAEA,MAAO;IACfU,SAAS,EAAEf;EAAsB,CAClC,CAAC;AAEN,CAAC;AAED,SAASC,sBAAsB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../../../src/TickerTapeWidget/components/InstrumentRateWithData/types.ts"],"sourcesContent":["import { DataRecord, WidgetSize } from '@oanda/labs-widget-common';\nimport { Division } from '../../types';\n\nexport interface InstrumentRateWithDataProps {\n record: DataRecord;\n target: EventTarget | null;\n division: Division;\n size?: WidgetSize\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../../src/TickerTapeWidget/components/InstrumentRateWithData/types.ts"],"sourcesContent":["import type { DataRecord, WidgetSize } from '@oanda/labs-widget-common';\n\nimport type { Division } from '../../types';\n\nexport interface InstrumentRateWithDataProps {\n record: DataRecord;\n target: EventTarget | null;\n division: Division;\n size?: WidgetSize;\n}\n"],"mappings":"","ignoreList":[]}
@@ -7,9 +7,9 @@ const MarqueeWrapper = _ref => {
7
7
  isStatic
8
8
  } = _ref;
9
9
  return React.createElement(React.Fragment, null, !isStatic ? React.createElement(Marquee, {
10
- play: shouldPlay,
11
10
  autoFill: true,
12
11
  pauseOnHover: true,
12
+ play: shouldPlay,
13
13
  speed: 60
14
14
  }, children) : children);
15
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MarqueeWrapper.js","names":["React","Marquee","MarqueeWrapper","_ref","children","shouldPlay","isStatic","createElement","Fragment","play","autoFill","pauseOnHover","speed"],"sources":["../../../../../src/TickerTapeWidget/components/MarqueeWrapper/MarqueeWrapper.tsx"],"sourcesContent":["import React from 'react';\nimport Marquee from 'react-fast-marquee';\nimport { MarqueeWrapperProps } from './types';\n\nconst MarqueeWrapper = ({\n children,\n shouldPlay,\n isStatic,\n}: MarqueeWrapperProps) => (\n <>\n {!isStatic ? (\n <Marquee\n play={shouldPlay}\n autoFill\n pauseOnHover\n speed={60}\n >\n {children}\n </Marquee>\n ) : children}\n </>\n);\n\nexport { MarqueeWrapper };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,oBAAoB;AAGxC,MAAMC,cAAc,GAAGC,IAAA;EAAA,IAAC;IACtBC,QAAQ;IACRC,UAAU;IACVC;EACmB,CAAC,GAAAH,IAAA;EAAA,OACpBH,KAAA,CAAAO,aAAA,CAAAP,KAAA,CAAAQ,QAAA,QACG,CAACF,QAAQ,GACRN,KAAA,CAAAO,aAAA,CAACN,OAAO;IACNQ,IAAI,EAAEJ,UAAW;IACjBK,QAAQ;IACRC,YAAY;IACZC,KAAK,EAAE;EAAG,GAETR,QACM,CAAC,GACRA,QACJ,CAAC;AAAA,CACJ;AAED,SAASF,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"MarqueeWrapper.js","names":["React","Marquee","MarqueeWrapper","_ref","children","shouldPlay","isStatic","createElement","Fragment","autoFill","pauseOnHover","play","speed"],"sources":["../../../../../src/TickerTapeWidget/components/MarqueeWrapper/MarqueeWrapper.tsx"],"sourcesContent":["import React from 'react';\nimport Marquee from 'react-fast-marquee';\n\nimport type { MarqueeWrapperProps } from './types';\n\nconst MarqueeWrapper = ({\n children,\n shouldPlay,\n isStatic,\n}: MarqueeWrapperProps) => (\n <>\n {!isStatic ? (\n <Marquee autoFill pauseOnHover play={shouldPlay} speed={60}>\n {children}\n </Marquee>\n ) : (\n children\n )}\n </>\n);\n\nexport { MarqueeWrapper };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,oBAAoB;AAIxC,MAAMC,cAAc,GAAGC,IAAA;EAAA,IAAC;IACtBC,QAAQ;IACRC,UAAU;IACVC;EACmB,CAAC,GAAAH,IAAA;EAAA,OACpBH,KAAA,CAAAO,aAAA,CAAAP,KAAA,CAAAQ,QAAA,QACG,CAACF,QAAQ,GACRN,KAAA,CAAAO,aAAA,CAACN,OAAO;IAACQ,QAAQ;IAACC,YAAY;IAACC,IAAI,EAAEN,UAAW;IAACO,KAAK,EAAE;EAAG,GACxDR,QACM,CAAC,GAEVA,QAEF,CAAC;AAAA,CACJ;AAED,SAASF,cAAc","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"constant.js","names":["INSTRUMENT_TOOLTIP_ID"],"sources":["../../../src/TickerTapeWidget/constant.ts"],"sourcesContent":["const INSTRUMENT_TOOLTIP_ID = 'instrument_tooltip_id';\n\nexport {\n INSTRUMENT_TOOLTIP_ID,\n};\n"],"mappings":"AAAA,MAAMA,qBAAqB,GAAG,uBAAuB;AAErD,SACEA,qBAAqB","ignoreList":[]}
1
+ {"version":3,"file":"constant.js","names":["INSTRUMENT_TOOLTIP_ID"],"sources":["../../../src/TickerTapeWidget/constant.ts"],"sourcesContent":["const INSTRUMENT_TOOLTIP_ID = 'instrument_tooltip_id';\n\nexport { INSTRUMENT_TOOLTIP_ID };\n"],"mappings":"AAAA,MAAMA,qBAAqB,GAAG,uBAAuB;AAErD,SAASA,qBAAqB","ignoreList":[]}
@@ -1,3 +1,3 @@
1
- export * from './types';
2
1
  export * from './TickerTapeWidget';
2
+ export * from './types';
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/TickerTapeWidget/index.ts"],"sourcesContent":["export * from './types';\nexport * from './TickerTapeWidget';\n"],"mappings":"AAAA,cAAc,SAAS;AACvB,cAAc,oBAAoB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/TickerTapeWidget/index.ts"],"sourcesContent":["export * from './TickerTapeWidget';\nexport * from './types';\n"],"mappings":"AAAA,cAAc,oBAAoB;AAClC,cAAc,SAAS","ignoreList":[]}
@@ -1,8 +1,8 @@
1
+ import { validateLocale, validateToolParams } from '@oanda/labs-widget-common';
1
2
  import React from 'react';
2
3
  import { createRoot } from 'react-dom/client';
3
- import { validateLocale, validateToolParams } from '@oanda/labs-widget-common';
4
- import { TickerTapeWidget } from './TickerTapeWidget';
5
4
  import { Division } from '../gql/types/graphql';
5
+ import { TickerTapeWidget } from './TickerTapeWidget';
6
6
  const {
7
7
  graphqlUrl,
8
8
  liveRatesUrl
@@ -40,15 +40,15 @@ dataTickerTapeParamsElements.forEach(element => {
40
40
  name: 'liveRatesUrl'
41
41
  }]);
42
42
  root.render(React.createElement(TickerTapeWidget, {
43
- graphqlUrl: graphqlUrl,
44
- liveRatesUrl: liveRatesUrl,
45
43
  division: division,
44
+ graphqlUrl: graphqlUrl,
46
45
  instruments: instruments,
47
- locale: locale,
48
- theme: mode,
49
46
  isParamError: isParamError,
47
+ liveRatesUrl: liveRatesUrl,
48
+ locale: locale,
49
+ motion: motion,
50
50
  size: size,
51
- motion: motion
51
+ theme: mode
52
52
  }));
53
53
  });
54
54
  //# sourceMappingURL=render.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"render.js","names":["React","createRoot","validateLocale","validateToolParams","TickerTapeWidget","Division","graphqlUrl","liveRatesUrl","window","widgetsConfig","dataTickerTapeParamsElements","document","querySelectorAll","forEach","element","root","params","getAttribute","mode","instruments","division","locale","size","motion","JSON","parse","isParamError","name","valueCheck","value","Object","values","includes","length","render","createElement","theme"],"sources":["../../../src/TickerTapeWidget/render.tsx"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { Theme, validateLocale, validateToolParams } from '@oanda/labs-widget-common';\nimport { TickerTapeWidget } from './TickerTapeWidget';\nimport { Division } from '../gql/types/graphql';\n\nconst {\n graphqlUrl,\n liveRatesUrl,\n} = window.widgetsConfig || {};\n\nconst dataTickerTapeParamsElements = document.querySelectorAll('div[data-ticker-tape-params]');\n\ndataTickerTapeParamsElements.forEach((element) => {\n const root = createRoot(element);\n const params = element.getAttribute('data-ticker-tape-params');\n const mode = element.getAttribute('data-mode');\n const {\n instruments, division, locale, size, motion,\n } = JSON.parse(params as string);\n\n const isParamError = validateToolParams({\n division, locale, graphqlUrl, liveRatesUrl, instruments,\n }, [{\n name: 'locale',\n valueCheck: (value) => validateLocale(value),\n }, {\n name: 'division',\n valueCheck: (value) => Object.values(Division).includes(value),\n }, {\n name: 'instruments',\n valueCheck: (value) => value.length > 0 && value.length <= 10,\n }, {\n name: 'graphqlUrl',\n }, {\n name: 'liveRatesUrl',\n }]);\n\n root.render(\n <TickerTapeWidget\n graphqlUrl={graphqlUrl}\n liveRatesUrl={liveRatesUrl}\n division={division}\n instruments={instruments}\n locale={locale}\n theme={mode as Theme}\n isParamError={isParamError}\n size={size}\n motion={motion}\n />,\n );\n});\n"],"mappings":"AAAA,OAA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CAAC,EAAE;IACDA,IAAI,EAAE;EACR,CAAC,CAAC,CAAC;EAEHZ,IAAI,CAACmB,MAAM,CACTlC,KAAA,CAAAmC,aAAA,CAAC/B,gBAAgB;IACfE,UAAU,EAAEA,UAAW;IACvBC,YAAY,EAAEA,YAAa;IAC3Ba,QAAQ,EAAEA,QAAS;IACnBD,WAAW,EAAEA,WAAY;IACzBE,MAAM,EAAEA,MAAO;IACfe,KAAK,EAAElB,IAAc;IACrBQ,YAAY,EAAEA,YAAa;IAC3BJ,IAAI,EAAEA,IAAK;IACXC,MAAM,EAAEA;EAAO,CAChB,CACH,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"render.js","names":["validateLocale","validateToolParams","React","createRoot","Division","TickerTapeWidget","graphqlUrl","liveRatesUrl","window","widgetsConfig","dataTickerTapeParamsElements","document","querySelectorAll","forEach","element","root","params","getAttribute","mode","instruments","division","locale","size","motion","JSON","parse","isParamError","name","valueCheck","value","Object","values","includes","length","render","createElement","theme"],"sources":["../../../src/TickerTapeWidget/render.tsx"],"sourcesContent":["import type { Theme } from '@oanda/labs-widget-common';\nimport { validateLocale, validateToolParams } from '@oanda/labs-widget-common';\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\n\nimport { Division } from '../gql/types/graphql';\nimport { TickerTapeWidget } from './TickerTapeWidget';\n\nconst { graphqlUrl, liveRatesUrl } = window.widgetsConfig || {};\n\nconst dataTickerTapeParamsElements = document.querySelectorAll(\n 'div[data-ticker-tape-params]'\n);\n\ndataTickerTapeParamsElements.forEach((element) => {\n const root = createRoot(element);\n const params = element.getAttribute('data-ticker-tape-params');\n const mode = element.getAttribute('data-mode');\n const { instruments, division, locale, size, motion } = JSON.parse(\n params as string\n );\n\n const isParamError = validateToolParams(\n {\n division,\n locale,\n graphqlUrl,\n liveRatesUrl,\n instruments,\n },\n [\n {\n name: 'locale',\n valueCheck: (value: string | undefined) => validateLocale(value),\n },\n {\n name: 'division',\n valueCheck: (value: Division) =>\n Object.values(Division).includes(value),\n },\n {\n name: 'instruments',\n valueCheck: (value) => value.length > 0 && value.length <= 10,\n },\n {\n name: 'graphqlUrl',\n },\n {\n name: 'liveRatesUrl',\n },\n ]\n );\n\n root.render(\n <TickerTapeWidget\n division={division}\n graphqlUrl={graphqlUrl}\n instruments={instruments}\n isParamError={isParamError}\n liveRatesUrl={liveRatesUrl}\n locale={locale}\n motion={motion}\n size={size}\n theme={mode as Theme}\n />\n );\n});\n"],"mappings":"AACA,SAASA,cAAc,EAAEC,kBAAkB,QAAQ,2BAA2B;AAC9E,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,kBAAkB;AAE7C,SAASC,QAAQ,QAAQ,sBAAsB;AAC/C,SAASC,gBAAgB,QAAQ,oBAAoB;AAErD,MAAM;EAAEC,UAAU;EAAEC;AAAa,CAAC,GAAGC,MAAM,CAACC,aAAa,IAAI,CAAC,CAAC;AAE/D,MAAMC,4BAA4B,GAAGC,QAAQ,CAACC,gBAAgB,CAC5D,8BACF,CAAC;AAEDF,4BAA4B,CAACG,OAAO,CAAEC,OAAO,IAAK;EAChD,MAAMC,IAAI,GAAGZ,UAAU,CAACW,OAAO,CAAC;EAChC,MAAME,MAAM,GAAGF,OAAO,CAACG,YAAY,CAAC,yBAAyB,CAAC;EAC9D,MAAMC,IAAI,GAAGJ,OAAO,CAACG,YAAY,CAAC,WAAW,CAAC;EAC9C,MAAM;IAAEE,WAAW;IAAEC,QAAQ;IAAEC,MAAM;IAAEC,IAAI;IAAEC;EAAO,CAAC,GAAGC,IAAI,CAACC,KAAK,CAChET,MACF,CAAC;EAED,MAAMU,YAAY,GAAGzB,kBAAkB,CACrC;IACEmB,QAAQ;IACRC,MAAM;IACNf,UAAU;IACVC,YAAY;IACZY;EACF,CAAC,EACD,CACE;IACEQ,IAAI,EAAE,QAAQ;IACdC,UAAU,EAAGC,KAAyB,IAAK7B,cAAc,CAAC6B,KAAK;EACjE,CAAC,EACD;IACEF,IAAI,EAAE,UAAU;IAChBC,UAAU,EAAGC,KAAe,IAC1BC,MAAM,CAACC,MAAM,CAAC3B,QAAQ,CAAC,CAAC4B,QAAQ,CAACH,KAAK;EAC1C,CAAC,EACD;IACEF,IAAI,EAAE,aAAa;IACnBC,UAAU,EAAGC,KAAK,IAAKA,KAAK,CAACI,MAAM,GAAG,CAAC,IAAIJ,KAAK,CAACI,MAAM,IAAI;EAC7D,CAAC,EACD;IACEN,IAAI,EAAE;EACR,CAAC,EACD;IACEA,IAAI,EAAE;EACR,CAAC,CAEL,CAAC;EAEDZ,IAAI,CAACmB,MAAM,CACThC,KAAA,CAAAiC,aAAA,CAAC9B,gBAAgB;IACfe,QAAQ,EAAEA,QAAS;IACnBd,UAAU,EAAEA,UAAW;IACvBa,WAAW,EAAEA,WAAY;IACzBO,YAAY,EAAEA,YAAa;IAC3BnB,YAAY,EAAEA,YAAa;IAC3Bc,MAAM,EAAEA,MAAO;IACfE,MAAM,EAAEA,MAAO;IACfD,IAAI,EAAEA,IAAK;IACXc,KAAK,EAAElB;EAAc,CACtB,CACH,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
@@ -1,3 +1,3 @@
1
- export { Locale } from '@oanda/mono-i18n';
2
1
  export { Division } from '../gql/types/graphql';
2
+ export { Locale } from '@oanda/mono-i18n';
3
3
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["Locale","Division"],"sources":["../../../src/TickerTapeWidget/types.ts"],"sourcesContent":["import { DataRecord, WidgetConfig, WidgetSize } from '@oanda/labs-widget-common';\nimport { Division } from '../gql/types/graphql';\n\nexport { Locale } from '@oanda/mono-i18n';\nexport { Division } from '../gql/types/graphql';\n\nexport interface TickerTapeConfig extends WidgetConfig {\n division: Division;\n liveRatesUrl: string;\n instruments: string[];\n removePadding?: boolean;\n size?: WidgetSize;\n motion?: Motion;\n}\n\nexport interface ValidationWrapperProps {\n instruments: string[];\n division: Division;\n size?: WidgetSize;\n motion?: Motion;\n isParamError?: boolean;\n}\n\nexport interface MainProps {\n records: DataRecord[];\n division: Division;\n size?: WidgetSize;\n motion?: Motion;\n}\n\ntype Motion = 'linear' | 'none';\n"],"mappings":"AAGA,SAASA,MAAM,QAAQ,kBAAkB;AACzC,SAASC,QAAQ,QAAQ,sBAAsB","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["Division","Locale"],"sources":["../../../src/TickerTapeWidget/types.ts"],"sourcesContent":["import type {\n DataRecord,\n WidgetConfig,\n WidgetSize,\n} from '@oanda/labs-widget-common';\n\nimport type { Division } from '../gql/types/graphql';\n\nexport { Division } from '../gql/types/graphql';\nexport { Locale } from '@oanda/mono-i18n';\n\nexport interface TickerTapeConfig extends WidgetConfig {\n division: Division;\n liveRatesUrl: string;\n instruments: string[];\n removePadding?: boolean;\n size?: WidgetSize;\n motion?: Motion;\n}\n\nexport interface ValidationWrapperProps {\n instruments: string[];\n division: Division;\n size?: WidgetSize;\n motion?: Motion;\n isParamError?: boolean;\n}\n\nexport interface MainProps {\n records: DataRecord[];\n division: Division;\n size?: WidgetSize;\n motion?: Motion;\n}\n\ntype Motion = 'linear' | 'none';\n"],"mappings":"AAQA,SAASA,QAAQ,QAAQ,sBAAsB;AAC/C,SAASC,MAAM,QAAQ,kBAAkB","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import { useState, useEffect } from 'react';
2
1
  import { useLiveRatesMessage } from '@oanda/labs-widget-common';
2
+ import { useEffect, useState } from 'react';
3
3
  const getRecords = data => data?.mapInstrumentNames?.map(item => ({
4
4
  instrument: item?.name || '',
5
5
  displayName: item?.displayName || ''
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["useState","useEffect","useLiveRatesMessage","getRecords","data","mapInstrumentNames","map","item","instrument","name","displayName","useRecords","record","target","updatedRecord","setUpdatedRecord","sentiment","error","setError","update","liveRatesError","buy","bid","buyPriceMovement","bidPriceMovement","dailyPercentChange","dailyPercentChangeFromOpen","dailyPipsChange","dailyPipsChangeFromOpen","displayPrecision"],"sources":["../../../src/TickerTapeWidget/utils.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\nimport { DataRecord, LiveRatesErrorMessage, useLiveRatesMessage } from '@oanda/labs-widget-common';\nimport { ValidateInstrumentsQuery } from '../gql/types/graphql';\n\nconst getRecords = (data: ValidateInstrumentsQuery) => data?.mapInstrumentNames?.map((item) => ({\n instrument: item?.name || '',\n displayName: item?.displayName || '',\n}));\n\nconst useRecords = (\n record: DataRecord,\n target: EventTarget | null,\n) => {\n const [updatedRecord, setUpdatedRecord] = useState<DataRecord>({\n displayName: record.displayName,\n instrument: record.instrument,\n sentiment: record.sentiment,\n });\n const [error, setError] = useState<LiveRatesErrorMessage | null>(null);\n\n const { update, error: liveRatesError } = useLiveRatesMessage(\n record.instrument,\n target,\n );\n\n useEffect(() => {\n setUpdatedRecord({\n displayName: record.displayName,\n instrument: record.instrument,\n buy: update?.bid,\n buyPriceMovement: update?.bidPriceMovement,\n dailyPercentChange: update?.dailyPercentChangeFromOpen,\n dailyPipsChange: update?.dailyPipsChangeFromOpen,\n displayPrecision: update?.displayPrecision,\n });\n setError(liveRatesError);\n }, [update, record, liveRatesError]);\n\n return {\n updatedRecord,\n error,\n };\n};\n\nexport {\n getRecords,\n useRecords,\n};\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAC3C,SAA4CC,mBAAmB,QAAQ,2BAA2B;AAGlG,MAAMC,UAAU,GAAIC,IAA8B,IAAKA,IAAI,EAAEC,kBAAkB,EAAEC,GAAG,CAAEC,IAAI,KAAM;EAC9FC,UAAU,EAAED,IAAI,EAAEE,IAAI,IAAI,EAAE;EAC5BC,WAAW,EAAEH,IAAI,EAAEG,WAAW,IAAI;AACpC,CAAC,CAAC,CAAC;AAEH,MAAMC,UAAU,GAAGA,CACjBC,MAAkB,EAClBC,MAA0B,KACvB;EACH,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAGf,QAAQ,CAAa;IAC7DU,WAAW,EAAEE,MAAM,CAACF,WAAW;IAC/BF,UAAU,EAAEI,MAAM,CAACJ,UAAU;IAC7BQ,SAAS,EAAEJ,MAAM,CAACI;EACpB,CAAC,CAAC;EACF,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGlB,QAAQ,CAA+B,IAAI,CAAC;EAEtE,MAAM;IAAEmB,MAAM;IAAEF,KAAK,EAAEG;EAAe,CAAC,GAAGlB,mBAAmB,CAC3DU,MAAM,CAACJ,UAAU,EACjBK,MACF,CAAC;EAEDZ,SAAS,CAAC,MAAM;IACdc,gBAAgB,CAAC;MACfL,WAAW,EAAEE,MAAM,CAACF,WAAW;MAC/BF,UAAU,EAAEI,MAAM,CAACJ,UAAU;MAC7Ba,GAAG,EAAEF,MAAM,EAAEG,GAAG;MAChBC,gBAAgB,EAAEJ,MAAM,EAAEK,gBAAgB;MAC1CC,kBAAkB,EAAEN,MAAM,EAAEO,0BAA0B;MACtDC,eAAe,EAAER,MAAM,EAAES,uBAAuB;MAChDC,gBAAgB,EAAEV,MAAM,EAAEU;IAC5B,CAAC,CAAC;IACFX,QAAQ,CAACE,cAAc,CAAC;EAC1B,CAAC,EAAE,CAACD,MAAM,EAAEP,MAAM,EAAEQ,cAAc,CAAC,CAAC;EAEpC,OAAO;IACLN,aAAa;IACbG;EACF,CAAC;AACH,CAAC;AAED,SACEd,UAAU,EACVQ,UAAU","ignoreList":[]}
1
+ {"version":3,"file":"utils.js","names":["useLiveRatesMessage","useEffect","useState","getRecords","data","mapInstrumentNames","map","item","instrument","name","displayName","useRecords","record","target","updatedRecord","setUpdatedRecord","sentiment","error","setError","update","liveRatesError","buy","bid","buyPriceMovement","bidPriceMovement","dailyPercentChange","dailyPercentChangeFromOpen","dailyPipsChange","dailyPipsChangeFromOpen","displayPrecision"],"sources":["../../../src/TickerTapeWidget/utils.ts"],"sourcesContent":["import type {\n DataRecord,\n LiveRatesErrorMessage,\n} from '@oanda/labs-widget-common';\nimport { useLiveRatesMessage } from '@oanda/labs-widget-common';\nimport { useEffect, useState } from 'react';\n\nimport type { ValidateInstrumentsQuery } from '../gql/types/graphql';\n\nconst getRecords = (data: ValidateInstrumentsQuery) =>\n data?.mapInstrumentNames?.map((item) => ({\n instrument: item?.name || '',\n displayName: item?.displayName || '',\n }));\n\nconst useRecords = (record: DataRecord, target: EventTarget | null) => {\n const [updatedRecord, setUpdatedRecord] = useState<DataRecord>({\n displayName: record.displayName,\n instrument: record.instrument,\n sentiment: record.sentiment,\n });\n const [error, setError] = useState<LiveRatesErrorMessage | null>(null);\n\n const { update, error: liveRatesError } = useLiveRatesMessage(\n record.instrument,\n target\n );\n\n useEffect(() => {\n setUpdatedRecord({\n displayName: record.displayName,\n instrument: record.instrument,\n buy: update?.bid,\n buyPriceMovement: update?.bidPriceMovement,\n dailyPercentChange: update?.dailyPercentChangeFromOpen,\n dailyPipsChange: update?.dailyPipsChangeFromOpen,\n displayPrecision: update?.displayPrecision,\n });\n setError(liveRatesError);\n }, [update, record, liveRatesError]);\n\n return {\n updatedRecord,\n error,\n };\n};\n\nexport { getRecords, useRecords };\n"],"mappings":"AAIA,SAASA,mBAAmB,QAAQ,2BAA2B;AAC/D,SAASC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAI3C,MAAMC,UAAU,GAAIC,IAA8B,IAChDA,IAAI,EAAEC,kBAAkB,EAAEC,GAAG,CAAEC,IAAI,KAAM;EACvCC,UAAU,EAAED,IAAI,EAAEE,IAAI,IAAI,EAAE;EAC5BC,WAAW,EAAEH,IAAI,EAAEG,WAAW,IAAI;AACpC,CAAC,CAAC,CAAC;AAEL,MAAMC,UAAU,GAAGA,CAACC,MAAkB,EAAEC,MAA0B,KAAK;EACrE,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAGb,QAAQ,CAAa;IAC7DQ,WAAW,EAAEE,MAAM,CAACF,WAAW;IAC/BF,UAAU,EAAEI,MAAM,CAACJ,UAAU;IAC7BQ,SAAS,EAAEJ,MAAM,CAAC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