@oanda/labs-currency-cross-table 1.0.22 → 1.0.24
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 +196 -0
- package/dist/main/CurrencyCrossTableWidget/CurrencyCrossTableWidget.js +25 -26
- package/dist/main/CurrencyCrossTableWidget/CurrencyCrossTableWidget.js.map +1 -1
- package/dist/module/CurrencyCrossTableWidget/CurrencyCrossTableWidget.js +26 -26
- package/dist/module/CurrencyCrossTableWidget/CurrencyCrossTableWidget.js.map +1 -1
- package/package.json +3 -3
- package/src/CurrencyCrossTableWidget/CurrencyCrossTableWidget.tsx +27 -28
- package/test/Main.test.tsx +10 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,202 @@
|
|
|
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.24 (2024-12-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 1.0.172 (2024-11-29)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 1.0.171 (2024-11-28)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## 1.0.170 (2024-11-28)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## 1.0.169 (2024-11-20)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## 1.0.168 (2024-11-19)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## 1.0.167 (2024-10-14)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## 1.0.166 (2024-10-07)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## 1.0.165 (2024-10-03)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 1.0.164 (2024-09-26)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## 1.0.163 (2024-09-18)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## 1.0.162 (2024-09-12)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## 1.0.161 (2024-09-11)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## 1.0.160 (2024-09-10)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## 1.0.159 (2024-09-09)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## 1.0.158 (2024-09-04)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## 1.0.157 (2024-09-04)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## 1.0.156 (2024-09-02)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## 1.0.155 (2024-08-29)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
## 1.0.154 (2024-08-29)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## 1.0.153 (2024-08-23)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
## 1.0.152 (2024-08-23)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## 1.0.151 (2024-08-20)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## 1.0.150 (2024-08-19)
|
|
99
|
+
|
|
100
|
+
**Note:** Version bump only for package @oanda/labs-currency-cross-table
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## 1.0.23 (2024-11-29)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
## 1.0.171 (2024-11-28)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
## 1.0.170 (2024-11-28)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
## 1.0.169 (2024-11-20)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
## 1.0.168 (2024-11-19)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
## 1.0.167 (2024-10-14)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
## 1.0.166 (2024-10-07)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
## 1.0.165 (2024-10-03)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
## 1.0.164 (2024-09-26)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
## 1.0.163 (2024-09-18)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
## 1.0.162 (2024-09-12)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
## 1.0.161 (2024-09-11)
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
## 1.0.160 (2024-09-10)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
## 1.0.159 (2024-09-09)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
## 1.0.158 (2024-09-04)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
## 1.0.157 (2024-09-04)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
## 1.0.156 (2024-09-02)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
## 1.0.155 (2024-08-29)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
## 1.0.154 (2024-08-29)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
## 1.0.153 (2024-08-23)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
## 1.0.152 (2024-08-23)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
## 1.0.151 (2024-08-20)
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
## 1.0.150 (2024-08-19)
|
|
195
|
+
|
|
196
|
+
**Note:** Version bump only for package @oanda/labs-currency-cross-table
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
6
202
|
## 1.0.22 (2024-11-28)
|
|
7
203
|
|
|
8
204
|
|
|
@@ -4,15 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.CurrencyCrossTableWidget = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _client = require("@apollo/client");
|
|
9
|
-
var _monoI18n = require("@oanda/mono-i18n");
|
|
10
9
|
var _labsWidgetCommon = require("@oanda/labs-widget-common");
|
|
11
10
|
var _translations = require("../translations");
|
|
12
11
|
var _ValidationWrapper = require("./ValidationWrapper");
|
|
13
12
|
var _graphql = require("../gql/types/graphql");
|
|
14
|
-
function
|
|
15
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
14
|
const CurrencyCrossTableWidget = _ref => {
|
|
17
15
|
let {
|
|
18
16
|
graphqlUrl,
|
|
@@ -31,29 +29,30 @@ const CurrencyCrossTableWidget = _ref => {
|
|
|
31
29
|
});
|
|
32
30
|
const divisionCode = division === _graphql.Division.Opt ? _graphql.Division.Ogm : division;
|
|
33
31
|
const dataSource = divisionCode === _graphql.Division.Ogm ? 'MT5' : 'V20';
|
|
34
|
-
return _react.default.createElement(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
return _react.default.createElement(_labsWidgetCommon.WidgetProvider, {
|
|
33
|
+
withSuspense: true,
|
|
34
|
+
locale: locale,
|
|
35
|
+
translations: _translations.translations,
|
|
36
|
+
client: client,
|
|
37
|
+
theme: theme,
|
|
38
|
+
styling: {
|
|
39
|
+
removePadding
|
|
40
|
+
},
|
|
41
|
+
liveRates: {
|
|
42
|
+
url: liveRatesUrl,
|
|
43
|
+
options: {
|
|
44
|
+
divisionCode,
|
|
45
|
+
dataSource
|
|
46
|
+
}
|
|
42
47
|
}
|
|
43
|
-
}, _react.default.createElement(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
division: division,
|
|
52
|
-
isParamError: isParamError
|
|
53
|
-
}),
|
|
54
|
-
logoLink,
|
|
55
|
-
linkArea: 'full'
|
|
56
|
-
}))))));
|
|
48
|
+
}, _react.default.createElement(_labsWidgetCommon.WidgetWrapper, {
|
|
49
|
+
logoLink: logoLink,
|
|
50
|
+
linkArea: "full"
|
|
51
|
+
}, _react.default.createElement(_ValidationWrapper.ValidationWrapper, {
|
|
52
|
+
currencies: currencies,
|
|
53
|
+
division: division,
|
|
54
|
+
isParamError: isParamError
|
|
55
|
+
})));
|
|
57
56
|
};
|
|
58
57
|
exports.CurrencyCrossTableWidget = CurrencyCrossTableWidget;
|
|
59
58
|
//# sourceMappingURL=CurrencyCrossTableWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencyCrossTableWidget.js","names":["_react","
|
|
1
|
+
{"version":3,"file":"CurrencyCrossTableWidget.js","names":["_react","_interopRequireDefault","require","_client","_labsWidgetCommon","_translations","_ValidationWrapper","_graphql","e","__esModule","default","CurrencyCrossTableWidget","_ref","graphqlUrl","liveRatesUrl","currencies","division","locale","theme","isParamError","removePadding","logoLink","client","ApolloClient","uri","cache","InMemoryCache","divisionCode","Division","Opt","Ogm","dataSource","createElement","WidgetProvider","withSuspense","translations","styling","liveRates","url","options","WidgetWrapper","linkArea","ValidationWrapper","exports"],"sources":["../../../src/CurrencyCrossTableWidget/CurrencyCrossTableWidget.tsx"],"sourcesContent":["import React from 'react';\nimport { ApolloClient, InMemoryCache } from '@apollo/client';\nimport { WidgetProvider, WidgetWrapper } from '@oanda/labs-widget-common';\nimport { translations } from '../translations';\nimport { CurrencyCrossTableConfig } from './types';\nimport { ValidationWrapper } from './ValidationWrapper';\nimport { Division } from '../gql/types/graphql';\n\nconst CurrencyCrossTableWidget = ({\n graphqlUrl,\n liveRatesUrl,\n currencies,\n division,\n locale,\n theme,\n isParamError,\n removePadding,\n logoLink,\n}: CurrencyCrossTableConfig) => {\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 locale={locale}\n translations={translations}\n client={client}\n theme={theme}\n styling={{\n removePadding,\n }}\n liveRates={{\n url: liveRatesUrl,\n options: { divisionCode, dataSource },\n }}\n >\n <WidgetWrapper\n logoLink={logoLink}\n linkArea=\"full\"\n >\n <ValidationWrapper\n currencies={currencies}\n division={division}\n isParamError={isParamError}\n />\n </WidgetWrapper>\n </WidgetProvider>\n );\n};\n\nexport { CurrencyCrossTableWidget };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAEA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAAgD,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhD,MAAMG,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,IAAIC,oBAAY,CAAC;IAC9BC,GAAG,EAAEX,UAAU;IACfY,KAAK,EAAE,IAAIC,qBAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,MAAMC,YAAY,GAAGX,QAAQ,KAAKY,iBAAQ,CAACC,GAAG,GAAGD,iBAAQ,CAACE,GAAG,GAAGd,QAAQ;EACxE,MAAMe,UAAU,GAAGJ,YAAY,KAAKC,iBAAQ,CAACE,GAAG,GAAG,KAAK,GAAG,KAAK;EAEhE,OACE9B,MAAA,CAAAU,OAAA,CAAAsB,aAAA,CAAC5B,iBAAA,CAAA6B,cAAc;IACbC,YAAY;IACZjB,MAAM,EAAEA,MAAO;IACfkB,YAAY,EAAEA,0BAAa;IAC3Bb,MAAM,EAAEA,MAAO;IACfJ,KAAK,EAAEA,KAAM;IACbkB,OAAO,EAAE;MACPhB;IACF,CAAE;IACFiB,SAAS,EAAE;MACTC,GAAG,EAAExB,YAAY;MACjByB,OAAO,EAAE;QAAEZ,YAAY;QAAEI;MAAW;IACtC;EAAE,GAEF/B,MAAA,CAAAU,OAAA,CAAAsB,aAAA,CAAC5B,iBAAA,CAAAoC,aAAa;IACZnB,QAAQ,EAAEA,QAAS;IACnBoB,QAAQ,EAAC;EAAM,GAEfzC,MAAA,CAAAU,OAAA,CAAAsB,aAAA,CAAC1B,kBAAA,CAAAoC,iBAAiB;IAChB3B,UAAU,EAAEA,UAAW;IACvBC,QAAQ,EAAEA,QAAS;IACnBG,YAAY,EAAEA;EAAa,CAC5B,CACY,CACD,CAAC;AAErB,CAAC;AAACwB,OAAA,CAAAhC,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { ApolloClient, InMemoryCache
|
|
3
|
-
import {
|
|
4
|
-
import { LiveRatesProvider, ThemeProvider, getLocale, renderComponent } from '@oanda/labs-widget-common';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ApolloClient, InMemoryCache } from '@apollo/client';
|
|
3
|
+
import { WidgetProvider, WidgetWrapper } from '@oanda/labs-widget-common';
|
|
5
4
|
import { translations } from '../translations';
|
|
6
5
|
import { ValidationWrapper } from './ValidationWrapper';
|
|
7
6
|
import { Division } from '../gql/types/graphql';
|
|
@@ -23,29 +22,30 @@ const CurrencyCrossTableWidget = _ref => {
|
|
|
23
22
|
});
|
|
24
23
|
const divisionCode = division === Division.Opt ? Division.Ogm : division;
|
|
25
24
|
const dataSource = divisionCode === Division.Ogm ? 'MT5' : 'V20';
|
|
26
|
-
return React.createElement(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
return React.createElement(WidgetProvider, {
|
|
26
|
+
withSuspense: true,
|
|
27
|
+
locale: locale,
|
|
28
|
+
translations: translations,
|
|
29
|
+
client: client,
|
|
30
|
+
theme: theme,
|
|
31
|
+
styling: {
|
|
32
|
+
removePadding
|
|
33
|
+
},
|
|
34
|
+
liveRates: {
|
|
35
|
+
url: liveRatesUrl,
|
|
36
|
+
options: {
|
|
37
|
+
divisionCode,
|
|
38
|
+
dataSource
|
|
39
|
+
}
|
|
34
40
|
}
|
|
35
|
-
}, React.createElement(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
division: division,
|
|
44
|
-
isParamError: isParamError
|
|
45
|
-
}),
|
|
46
|
-
logoLink,
|
|
47
|
-
linkArea: 'full'
|
|
48
|
-
}))))));
|
|
41
|
+
}, React.createElement(WidgetWrapper, {
|
|
42
|
+
logoLink: logoLink,
|
|
43
|
+
linkArea: "full"
|
|
44
|
+
}, React.createElement(ValidationWrapper, {
|
|
45
|
+
currencies: currencies,
|
|
46
|
+
division: division,
|
|
47
|
+
isParamError: isParamError
|
|
48
|
+
})));
|
|
49
49
|
};
|
|
50
50
|
export { CurrencyCrossTableWidget };
|
|
51
51
|
//# sourceMappingURL=CurrencyCrossTableWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencyCrossTableWidget.js","names":["React","
|
|
1
|
+
{"version":3,"file":"CurrencyCrossTableWidget.js","names":["React","ApolloClient","InMemoryCache","WidgetProvider","WidgetWrapper","translations","ValidationWrapper","Division","CurrencyCrossTableWidget","_ref","graphqlUrl","liveRatesUrl","currencies","division","locale","theme","isParamError","removePadding","logoLink","client","uri","cache","divisionCode","Opt","Ogm","dataSource","createElement","withSuspense","styling","liveRates","url","options","linkArea"],"sources":["../../../src/CurrencyCrossTableWidget/CurrencyCrossTableWidget.tsx"],"sourcesContent":["import React from 'react';\nimport { ApolloClient, InMemoryCache } from '@apollo/client';\nimport { WidgetProvider, WidgetWrapper } from '@oanda/labs-widget-common';\nimport { translations } from '../translations';\nimport { CurrencyCrossTableConfig } from './types';\nimport { ValidationWrapper } from './ValidationWrapper';\nimport { Division } from '../gql/types/graphql';\n\nconst CurrencyCrossTableWidget = ({\n graphqlUrl,\n liveRatesUrl,\n currencies,\n division,\n locale,\n theme,\n isParamError,\n removePadding,\n logoLink,\n}: CurrencyCrossTableConfig) => {\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 locale={locale}\n translations={translations}\n client={client}\n theme={theme}\n styling={{\n removePadding,\n }}\n liveRates={{\n url: liveRatesUrl,\n options: { divisionCode, dataSource },\n }}\n >\n <WidgetWrapper\n logoLink={logoLink}\n linkArea=\"full\"\n >\n <ValidationWrapper\n currencies={currencies}\n division={division}\n isParamError={isParamError}\n />\n </WidgetWrapper>\n </WidgetProvider>\n );\n};\n\nexport { CurrencyCrossTableWidget };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,EAAEC,aAAa,QAAQ,gBAAgB;AAC5D,SAASC,cAAc,EAAEC,aAAa,QAAQ,2BAA2B;AACzE,SAASC,YAAY,QAAQ,iBAAiB;AAE9C,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,QAAQ,QAAQ,sBAAsB;AAE/C,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,IAAIlB,YAAY,CAAC;IAC9BmB,GAAG,EAAEV,UAAU;IACfW,KAAK,EAAE,IAAInB,aAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,MAAMoB,YAAY,GAAGT,QAAQ,KAAKN,QAAQ,CAACgB,GAAG,GAAGhB,QAAQ,CAACiB,GAAG,GAAGX,QAAQ;EACxE,MAAMY,UAAU,GAAGH,YAAY,KAAKf,QAAQ,CAACiB,GAAG,GAAG,KAAK,GAAG,KAAK;EAEhE,OACExB,KAAA,CAAA0B,aAAA,CAACvB,cAAc;IACbwB,YAAY;IACZb,MAAM,EAAEA,MAAO;IACfT,YAAY,EAAEA,YAAa;IAC3Bc,MAAM,EAAEA,MAAO;IACfJ,KAAK,EAAEA,KAAM;IACba,OAAO,EAAE;MACPX;IACF,CAAE;IACFY,SAAS,EAAE;MACTC,GAAG,EAAEnB,YAAY;MACjBoB,OAAO,EAAE;QAAET,YAAY;QAAEG;MAAW;IACtC;EAAE,GAEFzB,KAAA,CAAA0B,aAAA,CAACtB,aAAa;IACZc,QAAQ,EAAEA,QAAS;IACnBc,QAAQ,EAAC;EAAM,GAEfhC,KAAA,CAAA0B,aAAA,CAACpB,iBAAiB;IAChBM,UAAU,EAAEA,UAAW;IACvBC,QAAQ,EAAEA,QAAS;IACnBG,YAAY,EAAEA;EAAa,CAC5B,CACY,CACD,CAAC;AAErB,CAAC;AAED,SAASR,wBAAwB","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oanda/labs-currency-cross-table",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"description": "Labs Currency Cross Table",
|
|
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.173",
|
|
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": "
|
|
23
|
+
"gitHead": "67a7801f99f0bab94dd6067a102761f51de786c1"
|
|
24
24
|
}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { ApolloClient, InMemoryCache
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
LiveRatesProvider, ThemeProvider, getLocale,
|
|
6
|
-
renderComponent,
|
|
7
|
-
} from '@oanda/labs-widget-common';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ApolloClient, InMemoryCache } from '@apollo/client';
|
|
3
|
+
import { WidgetProvider, WidgetWrapper } from '@oanda/labs-widget-common';
|
|
8
4
|
import { translations } from '../translations';
|
|
9
5
|
import { CurrencyCrossTableConfig } from './types';
|
|
10
6
|
import { ValidationWrapper } from './ValidationWrapper';
|
|
@@ -30,28 +26,31 @@ const CurrencyCrossTableWidget = ({
|
|
|
30
26
|
const dataSource = divisionCode === Division.Ogm ? 'MT5' : 'V20';
|
|
31
27
|
|
|
32
28
|
return (
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
<WidgetProvider
|
|
30
|
+
withSuspense
|
|
31
|
+
locale={locale}
|
|
32
|
+
translations={translations}
|
|
33
|
+
client={client}
|
|
34
|
+
theme={theme}
|
|
35
|
+
styling={{
|
|
36
|
+
removePadding,
|
|
37
|
+
}}
|
|
38
|
+
liveRates={{
|
|
39
|
+
url: liveRatesUrl,
|
|
40
|
+
options: { divisionCode, dataSource },
|
|
41
|
+
}}
|
|
42
|
+
>
|
|
43
|
+
<WidgetWrapper
|
|
44
|
+
logoLink={logoLink}
|
|
45
|
+
linkArea="full"
|
|
37
46
|
>
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
isParamError={isParamError}
|
|
46
|
-
/>,
|
|
47
|
-
logoLink,
|
|
48
|
-
linkArea: 'full',
|
|
49
|
-
})}
|
|
50
|
-
</ThemeProvider>
|
|
51
|
-
</Suspense>
|
|
52
|
-
</ApolloProvider>
|
|
53
|
-
</LiveRatesProvider>
|
|
54
|
-
</LocaleProvider>
|
|
47
|
+
<ValidationWrapper
|
|
48
|
+
currencies={currencies}
|
|
49
|
+
division={division}
|
|
50
|
+
isParamError={isParamError}
|
|
51
|
+
/>
|
|
52
|
+
</WidgetWrapper>
|
|
53
|
+
</WidgetProvider>
|
|
55
54
|
);
|
|
56
55
|
};
|
|
57
56
|
|
package/test/Main.test.tsx
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { render } from '@testing-library/react';
|
|
6
6
|
import { MockedProvider } from '@apollo/client/testing';
|
|
7
|
-
import {
|
|
7
|
+
import { LiveRatesProvider, MockLayoutProvider } from '@oanda/labs-widget-common';
|
|
8
8
|
import { Main } from '../src/CurrencyCrossTableWidget/Main';
|
|
9
9
|
import { Division } from '../src/gql/types/graphql';
|
|
10
10
|
import { widgetMocks } from './mocks';
|
|
@@ -15,13 +15,15 @@ describe('Main component', () => {
|
|
|
15
15
|
|
|
16
16
|
const { getByTestId } = render(
|
|
17
17
|
<MockedProvider mocks={widgetMocks}>
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
<LiveRatesProvider url="oanda.com">
|
|
19
|
+
<MockLayoutProvider>
|
|
20
|
+
<Main
|
|
21
|
+
currencies={currencies}
|
|
22
|
+
division={Division.Oc}
|
|
23
|
+
validInstruments={['EUR_USD', 'EUR_GBP', 'EUR_CHF', 'USD_GBP', 'USD_CHF', 'GBP_CHF', 'CHF_EUR']}
|
|
24
|
+
/>
|
|
25
|
+
</MockLayoutProvider>
|
|
26
|
+
</LiveRatesProvider>
|
|
25
27
|
</MockedProvider>,
|
|
26
28
|
);
|
|
27
29
|
|