@oanda/labs-ticker-tape-widget 1.0.25 → 1.0.26
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 +108 -0
- package/dist/main/TickerTapeWidget/TickerTapeWidget.js +12 -7
- package/dist/main/TickerTapeWidget/TickerTapeWidget.js.map +1 -1
- package/dist/main/TickerTapeWidget/types.js.map +1 -1
- package/dist/module/TickerTapeWidget/TickerTapeWidget.js +13 -8
- package/dist/module/TickerTapeWidget/TickerTapeWidget.js.map +1 -1
- package/dist/module/TickerTapeWidget/types.js.map +1 -1
- package/dist/types/TickerTapeWidget/TickerTapeWidget.d.ts +1 -1
- package/dist/types/TickerTapeWidget/types.d.ts +2 -7
- package/package.json +3 -3
- package/src/TickerTapeWidget/TickerTapeWidget.tsx +15 -8
- package/src/TickerTapeWidget/types.ts +2 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,114 @@
|
|
|
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.26 (2024-11-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 1.0.169 (2024-11-20)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 1.0.168 (2024-11-19)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## 1.0.167 (2024-10-14)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## 1.0.166 (2024-10-07)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## 1.0.165 (2024-10-03)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## 1.0.164 (2024-09-26)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## 1.0.163 (2024-09-18)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## 1.0.162 (2024-09-12)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 1.0.161 (2024-09-11)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## 1.0.160 (2024-09-10)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## 1.0.159 (2024-09-09)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## 1.0.158 (2024-09-04)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## 1.0.157 (2024-09-04)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## 1.0.156 (2024-09-02)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## 1.0.155 (2024-08-29)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## 1.0.154 (2024-08-29)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## 1.0.153 (2024-08-23)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## 1.0.152 (2024-08-23)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
## 1.0.151 (2024-08-20)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## 1.0.150 (2024-08-19)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
## 1.0.149 (2024-08-07)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## 1.0.148 (2024-08-01)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## 1.0.147 (2024-08-01)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
## 1.0.146 (2024-07-26)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## 1.0.145 (2024-07-25)
|
|
107
|
+
|
|
108
|
+
**Note:** Version bump only for package @oanda/labs-ticker-tape-widget
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
6
114
|
## 1.0.25 (2024-11-20)
|
|
7
115
|
|
|
8
116
|
|
|
@@ -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
|
-
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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 {
|
|
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":"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","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["_monoI18n","require","_graphql"],"sources":["../../../src/TickerTapeWidget/types.ts"],"sourcesContent":["import {
|
|
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
|
-
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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 {
|
|
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 {
|
|
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 {
|
|
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.
|
|
3
|
+
"version": "1.0.26",
|
|
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.
|
|
15
|
+
"@oanda/labs-widget-common": "^1.0.170",
|
|
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": "
|
|
24
|
+
"gitHead": "cfcc2eb4d59e16d25ec3da37e01767b476477125"
|
|
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 {
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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 {
|
|
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;
|