@oanda/labs-ticker-tape-widget 1.0.25 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,226 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 1.0.27 (2024-11-28)
7
+
8
+
9
+
10
+ ## 1.0.170 (2024-11-28)
11
+
12
+
13
+
14
+ ## 1.0.169 (2024-11-20)
15
+
16
+
17
+
18
+ ## 1.0.168 (2024-11-19)
19
+
20
+
21
+
22
+ ## 1.0.167 (2024-10-14)
23
+
24
+
25
+
26
+ ## 1.0.166 (2024-10-07)
27
+
28
+
29
+
30
+ ## 1.0.165 (2024-10-03)
31
+
32
+
33
+
34
+ ## 1.0.164 (2024-09-26)
35
+
36
+
37
+
38
+ ## 1.0.163 (2024-09-18)
39
+
40
+
41
+
42
+ ## 1.0.162 (2024-09-12)
43
+
44
+
45
+
46
+ ## 1.0.161 (2024-09-11)
47
+
48
+
49
+
50
+ ## 1.0.160 (2024-09-10)
51
+
52
+
53
+
54
+ ## 1.0.159 (2024-09-09)
55
+
56
+
57
+
58
+ ## 1.0.158 (2024-09-04)
59
+
60
+
61
+
62
+ ## 1.0.157 (2024-09-04)
63
+
64
+
65
+
66
+ ## 1.0.156 (2024-09-02)
67
+
68
+
69
+
70
+ ## 1.0.155 (2024-08-29)
71
+
72
+
73
+
74
+ ## 1.0.154 (2024-08-29)
75
+
76
+
77
+
78
+ ## 1.0.153 (2024-08-23)
79
+
80
+
81
+
82
+ ## 1.0.152 (2024-08-23)
83
+
84
+
85
+
86
+ ## 1.0.151 (2024-08-20)
87
+
88
+
89
+
90
+ ## 1.0.150 (2024-08-19)
91
+
92
+
93
+
94
+ ## 1.0.149 (2024-08-07)
95
+
96
+
97
+
98
+ ## 1.0.148 (2024-08-01)
99
+
100
+
101
+
102
+ ## 1.0.147 (2024-08-01)
103
+
104
+
105
+
106
+ ## 1.0.146 (2024-07-26)
107
+
108
+
109
+
110
+ ## 1.0.145 (2024-07-25)
111
+
112
+ **Note:** Version bump only for package @oanda/labs-ticker-tape-widget
113
+
114
+
115
+
116
+
117
+
118
+ ## 1.0.26 (2024-11-28)
119
+
120
+
121
+
122
+ ## 1.0.169 (2024-11-20)
123
+
124
+
125
+
126
+ ## 1.0.168 (2024-11-19)
127
+
128
+
129
+
130
+ ## 1.0.167 (2024-10-14)
131
+
132
+
133
+
134
+ ## 1.0.166 (2024-10-07)
135
+
136
+
137
+
138
+ ## 1.0.165 (2024-10-03)
139
+
140
+
141
+
142
+ ## 1.0.164 (2024-09-26)
143
+
144
+
145
+
146
+ ## 1.0.163 (2024-09-18)
147
+
148
+
149
+
150
+ ## 1.0.162 (2024-09-12)
151
+
152
+
153
+
154
+ ## 1.0.161 (2024-09-11)
155
+
156
+
157
+
158
+ ## 1.0.160 (2024-09-10)
159
+
160
+
161
+
162
+ ## 1.0.159 (2024-09-09)
163
+
164
+
165
+
166
+ ## 1.0.158 (2024-09-04)
167
+
168
+
169
+
170
+ ## 1.0.157 (2024-09-04)
171
+
172
+
173
+
174
+ ## 1.0.156 (2024-09-02)
175
+
176
+
177
+
178
+ ## 1.0.155 (2024-08-29)
179
+
180
+
181
+
182
+ ## 1.0.154 (2024-08-29)
183
+
184
+
185
+
186
+ ## 1.0.153 (2024-08-23)
187
+
188
+
189
+
190
+ ## 1.0.152 (2024-08-23)
191
+
192
+
193
+
194
+ ## 1.0.151 (2024-08-20)
195
+
196
+
197
+
198
+ ## 1.0.150 (2024-08-19)
199
+
200
+
201
+
202
+ ## 1.0.149 (2024-08-07)
203
+
204
+
205
+
206
+ ## 1.0.148 (2024-08-01)
207
+
208
+
209
+
210
+ ## 1.0.147 (2024-08-01)
211
+
212
+
213
+
214
+ ## 1.0.146 (2024-07-26)
215
+
216
+
217
+
218
+ ## 1.0.145 (2024-07-25)
219
+
220
+ **Note:** Version bump only for package @oanda/labs-ticker-tape-widget
221
+
222
+
223
+
224
+
225
+
6
226
  ## 1.0.25 (2024-11-20)
7
227
 
8
228
 
@@ -24,7 +24,8 @@ const TickerTapeWidget = _ref => {
24
24
  isParamError,
25
25
  removePadding,
26
26
  size,
27
- motion
27
+ motion,
28
+ logoLink
28
29
  } = _ref;
29
30
  const client = new _client.ApolloClient({
30
31
  uri: graphqlUrl,
@@ -47,12 +48,16 @@ const TickerTapeWidget = _ref => {
47
48
  removePadding: removePadding,
48
49
  theme: theme,
49
50
  fitContent: motion === 'none'
50
- }, _react.default.createElement(_ValidationWrapper.ValidationWrapper, {
51
- size: size,
52
- motion: motion,
53
- instruments: instruments,
54
- division: division,
55
- isParamError: isParamError
51
+ }, (0, _labsWidgetCommon.renderComponent)({
52
+ Component: _react.default.createElement(_ValidationWrapper.ValidationWrapper, {
53
+ size: size,
54
+ motion: motion,
55
+ instruments: instruments,
56
+ division: division,
57
+ isParamError: isParamError
58
+ }),
59
+ logoLink,
60
+ linkArea: 'full'
56
61
  }))))));
57
62
  };
58
63
  exports.TickerTapeWidget = TickerTapeWidget;
@@ -1 +1 @@
1
- {"version":3,"file":"TickerTapeWidget.js","names":["_react","_interopRequireWildcard","require","_client","_monoI18n","_labsWidgetCommon","_translations","_types","_ValidationWrapper","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TickerTapeWidget","_ref","graphqlUrl","liveRatesUrl","instruments","division","locale","theme","isParamError","removePadding","size","motion","client","ApolloClient","uri","cache","InMemoryCache","divisionCode","Division","Opt","Ogm","dataSource","createElement","LocaleProvider","getLocale","translations","LiveRatesProvider","url","options","ApolloProvider","Suspense","ThemeProvider","fitContent","ValidationWrapper","exports"],"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 { LiveRatesProvider, ThemeProvider, getLocale } 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}: 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 <ValidationWrapper\n size={size}\n motion={motion}\n instruments={instruments}\n division={division}\n isParamError={isParamError}\n />\n </ThemeProvider>\n </Suspense>\n </ApolloProvider>\n </LiveRatesProvider>\n </LocaleProvider>\n );\n};\n\nexport { TickerTapeWidget };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AAAwD,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAE,CAAA,SAAA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,GAAGD,eAAQ,CAACE,GAAG,GAAGf,QAAQ;EACxE,MAAMgB,UAAU,GAAGJ,YAAY,KAAKC,eAAQ,CAACE,GAAG,GAAG,KAAK,GAAG,KAAK;EAEhE,OACEjD,MAAA,CAAAe,OAAA,CAAAoC,aAAA,CAAC/C,SAAA,CAAAgD,cAAc;IAACjB,MAAM,EAAE,IAAAkB,2BAAS,EAAClB,MAAM,CAAE;IAACmB,YAAY,EAAEA;EAAa,GACpEtD,MAAA,CAAAe,OAAA,CAAAoC,aAAA,CAAC9C,iBAAA,CAAAkD,iBAAiB;IAChBC,GAAG,EAAExB,YAAa;IAClByB,OAAO,EAAE;MAAEX,YAAY;MAAEI;IAAW;EAAE,GAEtClD,MAAA,CAAAe,OAAA,CAAAoC,aAAA,CAAChD,OAAA,CAAAuD,cAAc;IAACjB,MAAM,EAAEA;EAAO,GAC7BzC,MAAA,CAAAe,OAAA,CAAAoC,aAAA,CAACnD,MAAA,CAAA2D,QAAQ,QACP3D,MAAA,CAAAe,OAAA,CAAAoC,aAAA,CAAC9C,iBAAA,CAAAuD,aAAa;IAACtB,aAAa,EAAEA,aAAc;IAACF,KAAK,EAAEA,KAAM;IAACyB,UAAU,EAAErB,MAAM,KAAK;EAAO,GACvFxC,MAAA,CAAAe,OAAA,CAAAoC,aAAA,CAAC3C,kBAAA,CAAAsD,iBAAiB;IAChBvB,IAAI,EAAEA,IAAK;IACXC,MAAM,EAAEA,MAAO;IACfP,WAAW,EAAEA,WAAY;IACzBC,QAAQ,EAAEA,QAAS;IACnBG,YAAY,EAAEA;EAAa,CAC5B,CACY,CACP,CACI,CACC,CACL,CAAC;AAErB,CAAC;AAAC0B,OAAA,CAAAlC,gBAAA,GAAAA,gBAAA","ignoreList":[]}
1
+ {"version":3,"file":"TickerTapeWidget.js","names":["_react","_interopRequireWildcard","require","_client","_monoI18n","_labsWidgetCommon","_translations","_types","_ValidationWrapper","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TickerTapeWidget","_ref","graphqlUrl","liveRatesUrl","instruments","division","locale","theme","isParamError","removePadding","size","motion","logoLink","client","ApolloClient","uri","cache","InMemoryCache","divisionCode","Division","Opt","Ogm","dataSource","createElement","LocaleProvider","getLocale","translations","LiveRatesProvider","url","options","ApolloProvider","Suspense","ThemeProvider","fitContent","renderComponent","Component","ValidationWrapper","linkArea","exports"],"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,IAA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AAK;EAAO,GACtF,IAAAuB,iCAAe,EAAC;IACfC,SAAS,EAAEhE,MAAA,CAAAe,OAAA,CAAAqC,aAAA,CAAC5C,kBAAA,CAAAyD,iBAAiB;MAC3B1B,IAAI,EAAEA,IAAK;MACXC,MAAM,EAAEA,MAAO;MACfP,WAAW,EAAEA,WAAY;MACzBC,QAAQ,EAAEA,QAAS;MACnBG,YAAY,EAAEA;IAAa,CAC5B,CAAC;IACFI,QAAQ;IACRyB,QAAQ,EAAE;EACZ,CAAC,CACY,CACP,CACI,CACC,CACL,CAAC;AAErB,CAAC;AAACC,OAAA,CAAAtC,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["_monoI18n","require","_graphql"],"sources":["../../../src/TickerTapeWidget/types.ts"],"sourcesContent":["import { Locale } from '@oanda/mono-i18n';\nimport { DataRecord, Theme, 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 {\n graphqlUrl: string;\n division: Division;\n liveRatesUrl: string;\n instruments: string[];\n locale: Locale;\n theme?: Theme;\n isParamError?: boolean;\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":";;;;;;;;;;;;;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["_monoI18n","require","_graphql"],"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,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  import React, { Suspense } from 'react';
2
2
  import { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';
3
3
  import { LocaleProvider } from '@oanda/mono-i18n';
4
- import { LiveRatesProvider, ThemeProvider, getLocale } from '@oanda/labs-widget-common';
4
+ import { LiveRatesProvider, ThemeProvider, getLocale, renderComponent } from '@oanda/labs-widget-common';
5
5
  import { translations } from '../translations';
6
6
  import { Division } from './types';
7
7
  import { ValidationWrapper } from './ValidationWrapper';
@@ -16,7 +16,8 @@ const TickerTapeWidget = _ref => {
16
16
  isParamError,
17
17
  removePadding,
18
18
  size,
19
- motion
19
+ motion,
20
+ logoLink
20
21
  } = _ref;
21
22
  const client = new ApolloClient({
22
23
  uri: graphqlUrl,
@@ -39,12 +40,16 @@ const TickerTapeWidget = _ref => {
39
40
  removePadding: removePadding,
40
41
  theme: theme,
41
42
  fitContent: motion === 'none'
42
- }, React.createElement(ValidationWrapper, {
43
- size: size,
44
- motion: motion,
45
- instruments: instruments,
46
- division: division,
47
- isParamError: isParamError
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'
48
53
  }))))));
49
54
  };
50
55
  export { TickerTapeWidget };
@@ -1 +1 @@
1
- {"version":3,"file":"TickerTapeWidget.js","names":["React","Suspense","ApolloClient","InMemoryCache","ApolloProvider","LocaleProvider","LiveRatesProvider","ThemeProvider","getLocale","translations","Division","ValidationWrapper","TickerTapeWidget","_ref","graphqlUrl","liveRatesUrl","instruments","division","locale","theme","isParamError","removePadding","size","motion","client","uri","cache","divisionCode","Opt","Ogm","dataSource","createElement","url","options","fitContent"],"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 { LiveRatesProvider, ThemeProvider, getLocale } 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}: 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 <ValidationWrapper\n size={size}\n motion={motion}\n instruments={instruments}\n division={division}\n isParamError={isParamError}\n />\n </ThemeProvider>\n </Suspense>\n </ApolloProvider>\n </LiveRatesProvider>\n </LocaleProvider>\n );\n};\n\nexport { TickerTapeWidget };\n"],"mappings":"AAAA,OAAOA,KAAK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;IAACF,KAAK,EAAEA,KAAM;IAACe,UAAU,EAAEX,MAAM,KAAK;EAAO,GACvFvB,KAAA,CAAA+B,aAAA,CAACpB,iBAAiB;IAChBW,IAAI,EAAEA,IAAK;IACXC,MAAM,EAAEA,MAAO;IACfP,WAAW,EAAEA,WAAY;IACzBC,QAAQ,EAAEA,QAAS;IACnBG,YAAY,EAAEA;EAAa,CAC5B,CACY,CACP,CACI,CACC,CACL,CAAC;AAErB,CAAC;AAED,SAASR,gBAAgB","ignoreList":[]}
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;IACVC,YAAY;IACZC,WAAW;IACXC,QAAQ;IACRC,MAAM;IACNC,KAAK;IACLC,YAAY;IACZC,aAAa;IACbC,IAAI;IACJC,MAAM;IACNC;EACgB,CAAC,GAAAX,IAAA;EACjB,MAAMY,MAAM,GAAG,IAAIxB,YAAY,CAAC;IAC9ByB,GAAG,EAAEZ,UAAU;IACfa,KAAK,EAAE,IAAIzB,aAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,MAAM0B,YAAY,GAAGX,QAAQ,KAAKP,QAAQ,CAACmB,GAAG,GAAGnB,QAAQ,CAACoB,GAAG,GAAGb,QAAQ;EACxE,MAAMc,UAAU,GAAGH,YAAY,KAAKlB,QAAQ,CAACoB,GAAG,GAAG,KAAK,GAAG,KAAK;EAEhE,OACE/B,KAAA,CAAAiC,aAAA,CAAC5B,cAAc;IAACc,MAAM,EAAEX,SAAS,CAACW,MAAM,CAAE;IAACT,YAAY,EAAEA;EAAa,GACpEV,KAAA,CAAAiC,aAAA,CAAC3B,iBAAiB;IAChB4B,GAAG,EAAElB,YAAa;IAClBmB,OAAO,EAAE;MAAEN,YAAY;MAAEG;IAAW;EAAE,GAEtChC,KAAA,CAAAiC,aAAA,CAAC7B,cAAc;IAACsB,MAAM,EAAEA;EAAO,GAC7B1B,KAAA,CAAAiC,aAAA,CAAChC,QAAQ,QACPD,KAAA,CAAAiC,aAAA,CAAC1B,aAAa;IAACe,aAAa,EAAEA,aAAc;IAACF,KAAK,EAAEA,KAAM;IAACgB,UAAU,EAAEZ,MAAM,KAAK;EAAO,GACtFf,eAAe,CAAC;IACf4B,SAAS,EAAErC,KAAA,CAAAiC,aAAA,CAACrB,iBAAiB;MAC3BW,IAAI,EAAEA,IAAK;MACXC,MAAM,EAAEA,MAAO;MACfP,WAAW,EAAEA,WAAY;MACzBC,QAAQ,EAAEA,QAAS;MACnBG,YAAY,EAAEA;IAAa,CAC5B,CAAC;IACFI,QAAQ;IACRa,QAAQ,EAAE;EACZ,CAAC,CACY,CACP,CACI,CACC,CACL,CAAC;AAErB,CAAC;AAED,SAASzB,gBAAgB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["Locale","Division"],"sources":["../../../src/TickerTapeWidget/types.ts"],"sourcesContent":["import { Locale } from '@oanda/mono-i18n';\nimport { DataRecord, Theme, 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 {\n graphqlUrl: string;\n division: Division;\n liveRatesUrl: string;\n instruments: string[];\n locale: Locale;\n theme?: Theme;\n isParamError?: boolean;\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":"AAIA,SAASA,MAAM,QAAQ,kBAAkB;AACzC,SAASC,QAAQ,QAAQ,sBAAsB","ignoreList":[]}
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,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { TickerTapeConfig } from './types';
3
- declare const TickerTapeWidget: ({ graphqlUrl, liveRatesUrl, instruments, division, locale, theme, isParamError, removePadding, size, motion, }: TickerTapeConfig) => React.JSX.Element;
3
+ declare const TickerTapeWidget: ({ graphqlUrl, liveRatesUrl, instruments, division, locale, theme, isParamError, removePadding, size, motion, logoLink, }: TickerTapeConfig) => React.JSX.Element;
4
4
  export { TickerTapeWidget };
@@ -1,16 +1,11 @@
1
- import { Locale } from '@oanda/mono-i18n';
2
- import { DataRecord, Theme, WidgetSize } from '@oanda/labs-widget-common';
1
+ import { DataRecord, WidgetConfig, WidgetSize } from '@oanda/labs-widget-common';
3
2
  import { Division } from '../gql/types/graphql';
4
3
  export { Locale } from '@oanda/mono-i18n';
5
4
  export { Division } from '../gql/types/graphql';
6
- export interface TickerTapeConfig {
7
- graphqlUrl: string;
5
+ export interface TickerTapeConfig extends WidgetConfig {
8
6
  division: Division;
9
7
  liveRatesUrl: string;
10
8
  instruments: string[];
11
- locale: Locale;
12
- theme?: Theme;
13
- isParamError?: boolean;
14
9
  removePadding?: boolean;
15
10
  size?: WidgetSize;
16
11
  motion?: Motion;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oanda/labs-ticker-tape-widget",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "description": "Labs Ticker Tape Widget",
5
5
  "main": "dist/main/index.js",
6
6
  "module": "dist/module/index.js",
@@ -12,7 +12,7 @@
12
12
  "author": "OANDA",
13
13
  "license": "UNLICENSED",
14
14
  "dependencies": {
15
- "@oanda/labs-widget-common": "^1.0.169",
15
+ "@oanda/labs-widget-common": "^1.0.171",
16
16
  "@oanda/mono-i18n": "10.0.1",
17
17
  "graphql": "16.8.1",
18
18
  "react-fast-marquee": "1.6.5"
@@ -21,5 +21,5 @@
21
21
  "@graphql-codegen/cli": "5.0.0",
22
22
  "@graphql-codegen/client-preset": "4.1.0"
23
23
  },
24
- "gitHead": "e809eb04614639bd88d4e9d501940b8d08d26d88"
24
+ "gitHead": "f978676624ce706f807cbecc432c67ed809dbf48"
25
25
  }
@@ -1,7 +1,9 @@
1
1
  import React, { Suspense } from 'react';
2
2
  import { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';
3
3
  import { LocaleProvider } from '@oanda/mono-i18n';
4
- import { LiveRatesProvider, ThemeProvider, getLocale } from '@oanda/labs-widget-common';
4
+ import {
5
+ LiveRatesProvider, ThemeProvider, getLocale, renderComponent,
6
+ } from '@oanda/labs-widget-common';
5
7
  import { translations } from '../translations';
6
8
  import { Division, TickerTapeConfig } from './types';
7
9
  import { ValidationWrapper } from './ValidationWrapper';
@@ -17,6 +19,7 @@ const TickerTapeWidget = ({
17
19
  removePadding,
18
20
  size,
19
21
  motion,
22
+ logoLink,
20
23
  }: TickerTapeConfig) => {
21
24
  const client = new ApolloClient({
22
25
  uri: graphqlUrl,
@@ -35,13 +38,17 @@ const TickerTapeWidget = ({
35
38
  <ApolloProvider client={client}>
36
39
  <Suspense>
37
40
  <ThemeProvider removePadding={removePadding} theme={theme} fitContent={motion === 'none'}>
38
- <ValidationWrapper
39
- size={size}
40
- motion={motion}
41
- instruments={instruments}
42
- division={division}
43
- isParamError={isParamError}
44
- />
41
+ {renderComponent({
42
+ Component: <ValidationWrapper
43
+ size={size}
44
+ motion={motion}
45
+ instruments={instruments}
46
+ division={division}
47
+ isParamError={isParamError}
48
+ />,
49
+ logoLink,
50
+ linkArea: 'full',
51
+ })}
45
52
  </ThemeProvider>
46
53
  </Suspense>
47
54
  </ApolloProvider>
@@ -1,18 +1,13 @@
1
- import { Locale } from '@oanda/mono-i18n';
2
- import { DataRecord, Theme, WidgetSize } from '@oanda/labs-widget-common';
1
+ import { DataRecord, WidgetConfig, WidgetSize } from '@oanda/labs-widget-common';
3
2
  import { Division } from '../gql/types/graphql';
4
3
 
5
4
  export { Locale } from '@oanda/mono-i18n';
6
5
  export { Division } from '../gql/types/graphql';
7
6
 
8
- export interface TickerTapeConfig {
9
- graphqlUrl: string;
7
+ export interface TickerTapeConfig extends WidgetConfig {
10
8
  division: Division;
11
9
  liveRatesUrl: string;
12
10
  instruments: string[];
13
- locale: Locale;
14
- theme?: Theme;
15
- isParamError?: boolean;
16
11
  removePadding?: boolean;
17
12
  size?: WidgetSize;
18
13
  motion?: Motion;