@oanda/labs-instrument-live-rate-widget 1.0.30 → 1.0.32

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,266 @@
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.32 (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
+
113
+
114
+ ## 1.0.144 (2024-07-22)
115
+
116
+
117
+
118
+ ## 1.0.143 (2024-07-19)
119
+
120
+
121
+
122
+ ## 1.0.142 (2024-07-16)
123
+
124
+
125
+
126
+ ## 1.0.141 (2024-07-16)
127
+
128
+
129
+
130
+ ## 1.0.140 (2024-07-12)
131
+
132
+ **Note:** Version bump only for package @oanda/labs-instrument-live-rate-widget
133
+
134
+
135
+
136
+
137
+
138
+ ## 1.0.31 (2024-11-28)
139
+
140
+
141
+
142
+ ## 1.0.169 (2024-11-20)
143
+
144
+
145
+
146
+ ## 1.0.168 (2024-11-19)
147
+
148
+
149
+
150
+ ## 1.0.167 (2024-10-14)
151
+
152
+
153
+
154
+ ## 1.0.166 (2024-10-07)
155
+
156
+
157
+
158
+ ## 1.0.165 (2024-10-03)
159
+
160
+
161
+
162
+ ## 1.0.164 (2024-09-26)
163
+
164
+
165
+
166
+ ## 1.0.163 (2024-09-18)
167
+
168
+
169
+
170
+ ## 1.0.162 (2024-09-12)
171
+
172
+
173
+
174
+ ## 1.0.161 (2024-09-11)
175
+
176
+
177
+
178
+ ## 1.0.160 (2024-09-10)
179
+
180
+
181
+
182
+ ## 1.0.159 (2024-09-09)
183
+
184
+
185
+
186
+ ## 1.0.158 (2024-09-04)
187
+
188
+
189
+
190
+ ## 1.0.157 (2024-09-04)
191
+
192
+
193
+
194
+ ## 1.0.156 (2024-09-02)
195
+
196
+
197
+
198
+ ## 1.0.155 (2024-08-29)
199
+
200
+
201
+
202
+ ## 1.0.154 (2024-08-29)
203
+
204
+
205
+
206
+ ## 1.0.153 (2024-08-23)
207
+
208
+
209
+
210
+ ## 1.0.152 (2024-08-23)
211
+
212
+
213
+
214
+ ## 1.0.151 (2024-08-20)
215
+
216
+
217
+
218
+ ## 1.0.150 (2024-08-19)
219
+
220
+
221
+
222
+ ## 1.0.149 (2024-08-07)
223
+
224
+
225
+
226
+ ## 1.0.148 (2024-08-01)
227
+
228
+
229
+
230
+ ## 1.0.147 (2024-08-01)
231
+
232
+
233
+
234
+ ## 1.0.146 (2024-07-26)
235
+
236
+
237
+
238
+ ## 1.0.145 (2024-07-25)
239
+
240
+
241
+
242
+ ## 1.0.144 (2024-07-22)
243
+
244
+
245
+
246
+ ## 1.0.143 (2024-07-19)
247
+
248
+
249
+
250
+ ## 1.0.142 (2024-07-16)
251
+
252
+
253
+
254
+ ## 1.0.141 (2024-07-16)
255
+
256
+
257
+
258
+ ## 1.0.140 (2024-07-12)
259
+
260
+ **Note:** Version bump only for package @oanda/labs-instrument-live-rate-widget
261
+
262
+
263
+
264
+
265
+
6
266
  ## 1.0.30 (2024-11-20)
7
267
 
8
268
 
@@ -23,7 +23,8 @@ const InstrumentLiveRateWidget = _ref => {
23
23
  theme,
24
24
  isParamError,
25
25
  removePadding,
26
- size
26
+ size,
27
+ logoLink
27
28
  } = _ref;
28
29
  const client = new _client.ApolloClient({
29
30
  uri: graphqlUrl,
@@ -45,11 +46,15 @@ const InstrumentLiveRateWidget = _ref => {
45
46
  }, _react.default.createElement(_react.Suspense, null, _react.default.createElement(_labsWidgetCommon.ThemeProvider, {
46
47
  removePadding: removePadding,
47
48
  theme: theme
48
- }, _react.default.createElement(_ValidationWrapper.ValidationWrapper, {
49
- size: size,
50
- instrument: instrument,
51
- division: division,
52
- isParamError: isParamError
49
+ }, (0, _labsWidgetCommon.renderComponent)({
50
+ Component: _react.default.createElement(_ValidationWrapper.ValidationWrapper, {
51
+ size: size,
52
+ instrument: instrument,
53
+ division: division,
54
+ isParamError: isParamError
55
+ }),
56
+ logoLink,
57
+ linkArea: 'full'
53
58
  }))))));
54
59
  };
55
60
  exports.InstrumentLiveRateWidget = InstrumentLiveRateWidget;
@@ -1 +1 @@
1
- {"version":3,"file":"InstrumentLiveRateWidget.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","InstrumentLiveRateWidget","_ref","graphqlUrl","liveRatesUrl","instrument","division","locale","theme","isParamError","removePadding","size","client","ApolloClient","uri","cache","InMemoryCache","divisionCode","Division","Opt","Ogm","dataSource","createElement","LocaleProvider","getLocale","translations","LiveRatesProvider","url","options","ApolloProvider","Suspense","ThemeProvider","ValidationWrapper","exports"],"sources":["../../../src/InstrumentLiveRateWidget/InstrumentLiveRateWidget.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,\n} from '@oanda/labs-widget-common';\nimport { translations } from '../translations';\nimport { Division, InstrumentLiveRateConfig } from './types';\nimport { ValidationWrapper } from './ValidationWrapper';\n\nconst InstrumentLiveRateWidget = ({\n graphqlUrl,\n liveRatesUrl,\n instrument,\n division,\n locale,\n theme,\n isParamError,\n removePadding,\n size,\n}: InstrumentLiveRateConfig) => {\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}>\n <ValidationWrapper\n size={size}\n instrument={instrument}\n division={division}\n isParamError={isParamError}\n />\n </ThemeProvider>\n </Suspense>\n </ApolloProvider>\n </LiveRatesProvider>\n </LocaleProvider>\n );\n};\n\nexport { InstrumentLiveRateWidget };\n"],"mappings":";;;;;;AAAA,IAAAA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,CAAAoD,iBAAiB;IAChBrB,IAAI,EAAEA,IAAK;IACXN,UAAU,EAAEA,UAAW;IACvBC,QAAQ,EAAEA,QAAS;IACnBG,YAAY,EAAEA;EAAa,CAC5B,CACY,CACP,CACI,CACC,CACL,CAAC;AAErB,CAAC;AAACwB,OAAA,CAAAhC,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"file":"InstrumentLiveRateWidget.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","InstrumentLiveRateWidget","_ref","graphqlUrl","liveRatesUrl","instrument","division","locale","theme","isParamError","removePadding","size","logoLink","client","ApolloClient","uri","cache","InMemoryCache","divisionCode","Division","Opt","Ogm","dataSource","createElement","LocaleProvider","getLocale","translations","LiveRatesProvider","url","options","ApolloProvider","Suspense","ThemeProvider","renderComponent","Component","ValidationWrapper","linkArea","exports"],"sources":["../../../src/InstrumentLiveRateWidget/InstrumentLiveRateWidget.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,\n renderComponent,\n} from '@oanda/labs-widget-common';\nimport { translations } from '../translations';\nimport { Division, InstrumentLiveRateConfig } from './types';\nimport { ValidationWrapper } from './ValidationWrapper';\n\nconst InstrumentLiveRateWidget = ({\n graphqlUrl,\n liveRatesUrl,\n instrument,\n division,\n locale,\n theme,\n isParamError,\n removePadding,\n size,\n logoLink,\n}: InstrumentLiveRateConfig) => {\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}>\n {renderComponent({\n Component: <ValidationWrapper\n size={size}\n instrument={instrument}\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 { InstrumentLiveRateWidget };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAIA,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,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oB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ByB,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;EAAM,GACvD,IAAAyB,iCAAe,EAAC;IACfC,SAAS,EAAE9D,MAAA,CAAAe,OAAA,CAAAoC,aAAA,CAAC3C,kBAAA,CAAAuD,iBAAiB;MAC3BxB,IAAI,EAAEA,IAAK;MACXN,UAAU,EAAEA,UAAW;MACvBC,QAAQ,EAAEA,QAAS;MACnBG,YAAY,EAAEA;IAAa,CAC5B,CAAC;IACFG,QAAQ;IACRwB,QAAQ,EAAE;EACZ,CAAC,CACY,CACP,CACI,CACC,CACL,CAAC;AAErB,CAAC;AAACC,OAAA,CAAApC,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["_monoI18n","require","_graphql"],"sources":["../../../src/InstrumentLiveRateWidget/types.tsx"],"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 InstrumentLiveRateConfig {\n graphqlUrl: string;\n division: Division;\n liveRatesUrl: string;\n instrument: string;\n locale: Locale;\n theme?: Theme;\n isParamError?: boolean;\n removePadding?: boolean;\n size?: WidgetSize;\n}\n\nexport interface ValidationWrapperProps {\n instrument: string;\n division: Division;\n size?: WidgetSize;\n isParamError?: boolean;\n}\nexport interface MainProps {\n record: DataRecord;\n division: Division;\n size?: WidgetSize;\n}\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/InstrumentLiveRateWidget/types.tsx"],"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 InstrumentLiveRateConfig extends WidgetConfig {\n division: Division;\n liveRatesUrl: string;\n instrument: string;\n removePadding?: boolean;\n size?: WidgetSize;\n}\n\nexport interface ValidationWrapperProps {\n instrument: string;\n division: Division;\n size?: WidgetSize;\n isParamError?: boolean;\n}\nexport interface MainProps {\n record: DataRecord;\n division: Division;\n size?: WidgetSize;\n}\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';
@@ -15,7 +15,8 @@ const InstrumentLiveRateWidget = _ref => {
15
15
  theme,
16
16
  isParamError,
17
17
  removePadding,
18
- size
18
+ size,
19
+ logoLink
19
20
  } = _ref;
20
21
  const client = new ApolloClient({
21
22
  uri: graphqlUrl,
@@ -37,11 +38,15 @@ const InstrumentLiveRateWidget = _ref => {
37
38
  }, React.createElement(Suspense, null, React.createElement(ThemeProvider, {
38
39
  removePadding: removePadding,
39
40
  theme: theme
40
- }, React.createElement(ValidationWrapper, {
41
- size: size,
42
- instrument: instrument,
43
- division: division,
44
- isParamError: isParamError
41
+ }, renderComponent({
42
+ Component: React.createElement(ValidationWrapper, {
43
+ size: size,
44
+ instrument: instrument,
45
+ division: division,
46
+ isParamError: isParamError
47
+ }),
48
+ logoLink,
49
+ linkArea: 'full'
45
50
  }))))));
46
51
  };
47
52
  export { InstrumentLiveRateWidget };
@@ -1 +1 @@
1
- {"version":3,"file":"InstrumentLiveRateWidget.js","names":["React","Suspense","ApolloClient","InMemoryCache","ApolloProvider","LocaleProvider","LiveRatesProvider","ThemeProvider","getLocale","translations","Division","ValidationWrapper","InstrumentLiveRateWidget","_ref","graphqlUrl","liveRatesUrl","instrument","division","locale","theme","isParamError","removePadding","size","client","uri","cache","divisionCode","Opt","Ogm","dataSource","createElement","url","options"],"sources":["../../../src/InstrumentLiveRateWidget/InstrumentLiveRateWidget.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,\n} from '@oanda/labs-widget-common';\nimport { translations } from '../translations';\nimport { Division, InstrumentLiveRateConfig } from './types';\nimport { ValidationWrapper } from './ValidationWrapper';\n\nconst InstrumentLiveRateWidget = ({\n graphqlUrl,\n liveRatesUrl,\n instrument,\n division,\n locale,\n theme,\n isParamError,\n removePadding,\n size,\n}: InstrumentLiveRateConfig) => {\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}>\n <ValidationWrapper\n size={size}\n instrument={instrument}\n division={division}\n isParamError={isParamError}\n />\n </ThemeProvider>\n </Suspense>\n </ApolloProvider>\n </LiveRatesProvider>\n </LocaleProvider>\n );\n};\n\nexport { InstrumentLiveRateWidget };\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,QACtC,2BAA2B;AAClC,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,QAAQ,QAAkC,SAAS;AAC5D,SAASC,iBAAiB,QAAQ,qBAAqB;AAEvD,MAAMC,wBAAwB,GAAGC,IAAA,IAUD;EAAA,IAVE;IAChCC,UAAU;IACVC,YAAY;IACZC,UAAU;IACVC,QAAQ;IACRC,MAAM;IACNC,KAAK;IACLC,YAAY;IACZC,aAAa;IACbC;EACwB,CAAC,GAAAT,IAAA;EACzB,MAAMU,MAAM,GAAG,IAAIrB,YAAY,CAAC;IAC9BsB,GAAG,EAAEV,UAAU;IACfW,KAAK,EAAE,IAAItB,aAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,MAAMuB,YAAY,GAAGT,QAAQ,KAAKP,QAAQ,CAACiB,GAAG,GAAGjB,QAAQ,CAACkB,GAAG,GAAGX,QAAQ;EACxE,MAAMY,UAAU,GAAGH,YAAY,KAAKhB,QAAQ,CAACkB,GAAG,GAAG,KAAK,GAAG,KAAK;EAEhE,OACE5B,KAAA,CAAA8B,aAAA,CAACzB,cAAc;IAACa,MAAM,EAAEV,SAAS,CAACU,MAAM,CAAE;IAACT,YAAY,EAAEA;EAAa,GACpET,KAAA,CAAA8B,aAAA,CAACxB,iBAAiB;IAChByB,GAAG,EAAEhB,YAAa;IAClBiB,OAAO,EAAE;MAAEN,YAAY;MAAEG;IAAW;EAAE,GAEtC7B,KAAA,CAAA8B,aAAA,CAAC1B,cAAc;IAACmB,MAAM,EAAEA;EAAO,GAC7BvB,KAAA,CAAA8B,aAAA,CAAC7B,QAAQ,QACPD,KAAA,CAAA8B,aAAA,CAACvB,aAAa;IAACc,aAAa,EAAEA,aAAc;IAACF,KAAK,EAAEA;EAAM,GACxDnB,KAAA,CAAA8B,aAAA,CAACnB,iBAAiB;IAChBW,IAAI,EAAEA,IAAK;IACXN,UAAU,EAAEA,UAAW;IACvBC,QAAQ,EAAEA,QAAS;IACnBG,YAAY,EAAEA;EAAa,CAC5B,CACY,CACP,CACI,CACC,CACL,CAAC;AAErB,CAAC;AAED,SAASR,wBAAwB","ignoreList":[]}
1
+ {"version":3,"file":"InstrumentLiveRateWidget.js","names":["React","Suspense","ApolloClient","InMemoryCache","ApolloProvider","LocaleProvider","LiveRatesProvider","ThemeProvider","getLocale","renderComponent","translations","Division","ValidationWrapper","InstrumentLiveRateWidget","_ref","graphqlUrl","liveRatesUrl","instrument","division","locale","theme","isParamError","removePadding","size","logoLink","client","uri","cache","divisionCode","Opt","Ogm","dataSource","createElement","url","options","Component","linkArea"],"sources":["../../../src/InstrumentLiveRateWidget/InstrumentLiveRateWidget.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,\n renderComponent,\n} from '@oanda/labs-widget-common';\nimport { translations } from '../translations';\nimport { Division, InstrumentLiveRateConfig } from './types';\nimport { ValidationWrapper } from './ValidationWrapper';\n\nconst InstrumentLiveRateWidget = ({\n graphqlUrl,\n liveRatesUrl,\n instrument,\n division,\n locale,\n theme,\n isParamError,\n removePadding,\n size,\n logoLink,\n}: InstrumentLiveRateConfig) => {\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}>\n {renderComponent({\n Component: <ValidationWrapper\n size={size}\n instrument={instrument}\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 { InstrumentLiveRateWidget };\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,EAC3CC,eAAe,QACV,2BAA2B;AAClC,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,QAAQ,QAAkC,SAAS;AAC5D,SAASC,iBAAiB,QAAQ,qBAAqB;AAEvD,MAAMC,wBAAwB,GAAGC,IAAA,IAWD;EAAA,IAXE;IAChCC,UAAU;IACVC,YAAY;IACZC,UAAU;IACVC,QAAQ;IACRC,MAAM;IACNC,KAAK;IACLC,YAAY;IACZC,aAAa;IACbC,IAAI;IACJC;EACwB,CAAC,GAAAV,IAAA;EACzB,MAAMW,MAAM,GAAG,IAAIvB,YAAY,CAAC;IAC9BwB,GAAG,EAAEX,UAAU;IACfY,KAAK,EAAE,IAAIxB,aAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,MAAMyB,YAAY,GAAGV,QAAQ,KAAKP,QAAQ,CAACkB,GAAG,GAAGlB,QAAQ,CAACmB,GAAG,GAAGZ,QAAQ;EACxE,MAAMa,UAAU,GAAGH,YAAY,KAAKjB,QAAQ,CAACmB,GAAG,GAAG,KAAK,GAAG,KAAK;EAEhE,OACE9B,KAAA,CAAAgC,aAAA,CAAC3B,cAAc;IAACc,MAAM,EAAEX,SAAS,CAACW,MAAM,CAAE;IAACT,YAAY,EAAEA;EAAa,GACpEV,KAAA,CAAAgC,aAAA,CAAC1B,iBAAiB;IAChB2B,GAAG,EAAEjB,YAAa;IAClBkB,OAAO,EAAE;MAAEN,YAAY;MAAEG;IAAW;EAAE,GAEtC/B,KAAA,CAAAgC,aAAA,CAAC5B,cAAc;IAACqB,MAAM,EAAEA;EAAO,GAC7BzB,KAAA,CAAAgC,aAAA,CAAC/B,QAAQ,QACPD,KAAA,CAAAgC,aAAA,CAACzB,aAAa;IAACe,aAAa,EAAEA,aAAc;IAACF,KAAK,EAAEA;EAAM,GACvDX,eAAe,CAAC;IACf0B,SAAS,EAAEnC,KAAA,CAAAgC,aAAA,CAACpB,iBAAiB;MAC3BW,IAAI,EAAEA,IAAK;MACXN,UAAU,EAAEA,UAAW;MACvBC,QAAQ,EAAEA,QAAS;MACnBG,YAAY,EAAEA;IAAa,CAC5B,CAAC;IACFG,QAAQ;IACRY,QAAQ,EAAE;EACZ,CAAC,CACY,CACP,CACI,CACC,CACL,CAAC;AAErB,CAAC;AAED,SAASvB,wBAAwB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["Locale","Division"],"sources":["../../../src/InstrumentLiveRateWidget/types.tsx"],"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 InstrumentLiveRateConfig {\n graphqlUrl: string;\n division: Division;\n liveRatesUrl: string;\n instrument: string;\n locale: Locale;\n theme?: Theme;\n isParamError?: boolean;\n removePadding?: boolean;\n size?: WidgetSize;\n}\n\nexport interface ValidationWrapperProps {\n instrument: string;\n division: Division;\n size?: WidgetSize;\n isParamError?: boolean;\n}\nexport interface MainProps {\n record: DataRecord;\n division: Division;\n size?: WidgetSize;\n}\n"],"mappings":"AAIA,SAASA,MAAM,QAAQ,kBAAkB;AACzC,SAASC,QAAQ,QAAQ,sBAAsB","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["Locale","Division"],"sources":["../../../src/InstrumentLiveRateWidget/types.tsx"],"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 InstrumentLiveRateConfig extends WidgetConfig {\n division: Division;\n liveRatesUrl: string;\n instrument: string;\n removePadding?: boolean;\n size?: WidgetSize;\n}\n\nexport interface ValidationWrapperProps {\n instrument: string;\n division: Division;\n size?: WidgetSize;\n isParamError?: boolean;\n}\nexport interface MainProps {\n record: DataRecord;\n division: Division;\n size?: WidgetSize;\n}\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 { InstrumentLiveRateConfig } from './types';
3
- declare const InstrumentLiveRateWidget: ({ graphqlUrl, liveRatesUrl, instrument, division, locale, theme, isParamError, removePadding, size, }: InstrumentLiveRateConfig) => React.JSX.Element;
3
+ declare const InstrumentLiveRateWidget: ({ graphqlUrl, liveRatesUrl, instrument, division, locale, theme, isParamError, removePadding, size, logoLink, }: InstrumentLiveRateConfig) => React.JSX.Element;
4
4
  export { InstrumentLiveRateWidget };
@@ -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 InstrumentLiveRateConfig {
7
- graphqlUrl: string;
5
+ export interface InstrumentLiveRateConfig extends WidgetConfig {
8
6
  division: Division;
9
7
  liveRatesUrl: string;
10
8
  instrument: string;
11
- locale: Locale;
12
- theme?: Theme;
13
- isParamError?: boolean;
14
9
  removePadding?: boolean;
15
10
  size?: WidgetSize;
16
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oanda/labs-instrument-live-rate-widget",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "description": "Labs Instrument Live Rate 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
  },
@@ -20,5 +20,5 @@
20
20
  "@graphql-codegen/cli": "5.0.0",
21
21
  "@graphql-codegen/client-preset": "4.1.0"
22
22
  },
23
- "gitHead": "e809eb04614639bd88d4e9d501940b8d08d26d88"
23
+ "gitHead": "f978676624ce706f807cbecc432c67ed809dbf48"
24
24
  }
@@ -3,6 +3,7 @@ import { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';
3
3
  import { LocaleProvider } from '@oanda/mono-i18n';
4
4
  import {
5
5
  LiveRatesProvider, ThemeProvider, getLocale,
6
+ renderComponent,
6
7
  } from '@oanda/labs-widget-common';
7
8
  import { translations } from '../translations';
8
9
  import { Division, InstrumentLiveRateConfig } from './types';
@@ -18,6 +19,7 @@ const InstrumentLiveRateWidget = ({
18
19
  isParamError,
19
20
  removePadding,
20
21
  size,
22
+ logoLink,
21
23
  }: InstrumentLiveRateConfig) => {
22
24
  const client = new ApolloClient({
23
25
  uri: graphqlUrl,
@@ -36,12 +38,16 @@ const InstrumentLiveRateWidget = ({
36
38
  <ApolloProvider client={client}>
37
39
  <Suspense>
38
40
  <ThemeProvider removePadding={removePadding} theme={theme}>
39
- <ValidationWrapper
40
- size={size}
41
- instrument={instrument}
42
- division={division}
43
- isParamError={isParamError}
44
- />
41
+ {renderComponent({
42
+ Component: <ValidationWrapper
43
+ size={size}
44
+ instrument={instrument}
45
+ division={division}
46
+ isParamError={isParamError}
47
+ />,
48
+ logoLink,
49
+ linkArea: 'full',
50
+ })}
45
51
  </ThemeProvider>
46
52
  </Suspense>
47
53
  </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 InstrumentLiveRateConfig {
9
- graphqlUrl: string;
7
+ export interface InstrumentLiveRateConfig extends WidgetConfig {
10
8
  division: Division;
11
9
  liveRatesUrl: string;
12
10
  instrument: string;
13
- locale: Locale;
14
- theme?: Theme;
15
- isParamError?: boolean;
16
11
  removePadding?: boolean;
17
12
  size?: WidgetSize;
18
13
  }