@oanda/labs-currency-cross-table 1.0.20 → 1.0.21

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,94 @@
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.21 (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
+ **Note:** Version bump only for package @oanda/labs-currency-cross-table
89
+
90
+
91
+
92
+
93
+
6
94
  ## 1.0.20 (2024-11-20)
7
95
 
8
96
 
@@ -22,7 +22,8 @@ const CurrencyCrossTableWidget = _ref => {
22
22
  locale,
23
23
  theme,
24
24
  isParamError,
25
- removePadding
25
+ removePadding,
26
+ logoLink
26
27
  } = _ref;
27
28
  const client = new _client.ApolloClient({
28
29
  uri: graphqlUrl,
@@ -44,10 +45,14 @@ const CurrencyCrossTableWidget = _ref => {
44
45
  }, _react.default.createElement(_react.Suspense, null, _react.default.createElement(_labsWidgetCommon.ThemeProvider, {
45
46
  removePadding: removePadding,
46
47
  theme: theme
47
- }, _react.default.createElement(_ValidationWrapper.ValidationWrapper, {
48
- currencies: currencies,
49
- division: division,
50
- isParamError: isParamError
48
+ }, (0, _labsWidgetCommon.renderComponent)({
49
+ Component: _react.default.createElement(_ValidationWrapper.ValidationWrapper, {
50
+ currencies: currencies,
51
+ division: division,
52
+ isParamError: isParamError
53
+ }),
54
+ logoLink,
55
+ linkArea: 'full'
51
56
  }))))));
52
57
  };
53
58
  exports.CurrencyCrossTableWidget = CurrencyCrossTableWidget;
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyCrossTableWidget.js","names":["_react","_interopRequireWildcard","require","_client","_monoI18n","_labsWidgetCommon","_translations","_ValidationWrapper","_graphql","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CurrencyCrossTableWidget","_ref","graphqlUrl","liveRatesUrl","currencies","division","locale","theme","isParamError","removePadding","client","ApolloClient","uri","cache","InMemoryCache","divisionCode","Division","Opt","Ogm","dataSource","createElement","LocaleProvider","getLocale","translations","LiveRatesProvider","url","options","ApolloProvider","Suspense","ThemeProvider","ValidationWrapper","exports"],"sources":["../../../src/CurrencyCrossTableWidget/CurrencyCrossTableWidget.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 { 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}: 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 <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 currencies={currencies}\n division={division}\n isParamError={isParamError}\n />\n </ThemeProvider>\n </Suspense>\n </ApolloProvider>\n </LiveRatesProvider>\n </LocaleProvider>\n );\n};\n\nexport { CurrencyCrossTableWidget };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAGA,IAAAI,aAAA,GAAAJ,OAAA;AAEA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAAgD,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,CA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;EAEhE,OACE/C,MAAA,CAAAe,OAAA,CAAAkC,aAAA,CAAC7C,SAAA,CAAA8C,cAAc;IAACf,MAAM,EAAE,IAAAgB,2BAAS,EAAChB,MAAM,CAAE;IAACiB,YAAY,EAAEA;EAAa,GACpEpD,MAAA,CAAAe,OAAA,CAAAkC,aAAA,CAAC5C,iBAAA,CAAAgD,iBAAiB;IAChBC,GAAG,EAAEtB,YAAa;IAClBuB,OAAO,EAAE;MAAEX,YAAY;MAAEI;IAAW;EAAE,GAEtChD,MAAA,CAAAe,OAAA,CAAAkC,aAAA,CAAC9C,OAAA,CAAAqD,cAAc;IAACjB,MAAM,EAAEA;EAAO,GAC7BvC,MAAA,CAAAe,OAAA,CAAAkC,aAAA,CAACjD,MAAA,CAAAyD,QAAQ,QACPzD,MAAA,CAAAe,OAAA,CAAAkC,aAAA,CAAC5C,iBAAA,CAAAqD,aAAa;IAACpB,aAAa,EAAEA,aAAc;IAACF,KAAK,EAAEA;EAAM,GACxDpC,MAAA,CAAAe,OAAA,CAAAkC,aAAA,CAAC1C,kBAAA,CAAAoD,iBAAiB;IAChB1B,UAAU,EAAEA,UAAW;IACvBC,QAAQ,EAAEA,QAAS;IACnBG,YAAY,EAAEA;EAAa,CAC5B,CACY,CACP,CACI,CACC,CACL,CAAC;AAErB,CAAC;AAACuB,OAAA,CAAA/B,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"file":"CurrencyCrossTableWidget.js","names":["_react","_interopRequireWildcard","require","_client","_monoI18n","_labsWidgetCommon","_translations","_ValidationWrapper","_graphql","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CurrencyCrossTableWidget","_ref","graphqlUrl","liveRatesUrl","currencies","division","locale","theme","isParamError","removePadding","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/CurrencyCrossTableWidget/CurrencyCrossTableWidget.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 { 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 <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 currencies={currencies}\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 { CurrencyCrossTableWidget };\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;AAEA,IAAAK,kBAAA,GAAAL,OAAA;AACA,I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C,CACY,CACP,CACI,CACC,CACL,CAAC;AAErB,CAAC;AAACC,OAAA,CAAAnC,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["_monoI18n","require"],"sources":["../../../src/CurrencyCrossTableWidget/types.tsx"],"sourcesContent":["import { Locale } from '@oanda/mono-i18n';\nimport { Theme } from '@oanda/labs-widget-common';\nimport { Division } from '../gql/types/graphql';\n\nexport { Locale } from '@oanda/mono-i18n';\n\nexport interface CurrencyCrossTableConfig {\n division: Division;\n graphqlUrl: string;\n liveRatesUrl: string;\n currencies: string[];\n locale: Locale;\n theme?: Theme;\n isParamError?: boolean;\n removePadding?: boolean;\n}\n\nexport interface ValidationWrapperProps {\n currencies: string[];\n division: Division;\n isParamError?: boolean;\n}\nexport interface MainProps {\n currencies: string[];\n validInstruments: string[];\n division: Division;\n}\n"],"mappings":";;;;;;;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["_monoI18n","require"],"sources":["../../../src/CurrencyCrossTableWidget/types.tsx"],"sourcesContent":["import { WidgetConfig } from '@oanda/labs-widget-common';\nimport { Division } from '../gql/types/graphql';\n\nexport { Locale } from '@oanda/mono-i18n';\n\nexport interface CurrencyCrossTableConfig extends WidgetConfig {\n division: Division;\n liveRatesUrl: string;\n currencies: string[];\n removePadding?: boolean;\n}\n\nexport interface ValidationWrapperProps {\n currencies: string[];\n division: Division;\n isParamError?: boolean;\n}\nexport interface MainProps {\n currencies: string[];\n validInstruments: string[];\n division: Division;\n}\n"],"mappings":";;;;;;;;;;;AAGA,IAAAA,SAAA,GAAAC,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 { ValidationWrapper } from './ValidationWrapper';
7
7
  import { Division } from '../gql/types/graphql';
@@ -14,7 +14,8 @@ const CurrencyCrossTableWidget = _ref => {
14
14
  locale,
15
15
  theme,
16
16
  isParamError,
17
- removePadding
17
+ removePadding,
18
+ logoLink
18
19
  } = _ref;
19
20
  const client = new ApolloClient({
20
21
  uri: graphqlUrl,
@@ -36,10 +37,14 @@ const CurrencyCrossTableWidget = _ref => {
36
37
  }, React.createElement(Suspense, null, React.createElement(ThemeProvider, {
37
38
  removePadding: removePadding,
38
39
  theme: theme
39
- }, React.createElement(ValidationWrapper, {
40
- currencies: currencies,
41
- division: division,
42
- isParamError: isParamError
40
+ }, renderComponent({
41
+ Component: React.createElement(ValidationWrapper, {
42
+ currencies: currencies,
43
+ division: division,
44
+ isParamError: isParamError
45
+ }),
46
+ logoLink,
47
+ linkArea: 'full'
43
48
  }))))));
44
49
  };
45
50
  export { CurrencyCrossTableWidget };
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyCrossTableWidget.js","names":["React","Suspense","ApolloClient","InMemoryCache","ApolloProvider","LocaleProvider","LiveRatesProvider","ThemeProvider","getLocale","translations","ValidationWrapper","Division","CurrencyCrossTableWidget","_ref","graphqlUrl","liveRatesUrl","currencies","division","locale","theme","isParamError","removePadding","client","uri","cache","divisionCode","Opt","Ogm","dataSource","createElement","url","options"],"sources":["../../../src/CurrencyCrossTableWidget/CurrencyCrossTableWidget.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 { 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}: 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 <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 currencies={currencies}\n division={division}\n isParamError={isParamError}\n />\n </ThemeProvider>\n </Suspense>\n </ApolloProvider>\n </LiveRatesProvider>\n </LocaleProvider>\n );\n};\n\nexport { CurrencyCrossTableWidget };\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;AAE9C,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,QAAQ,QAAQ,sBAAsB;AAE/C,MAAMC,wBAAwB,GAAGC,IAAA,IASD;EAAA,IATE;IAChCC,UAAU;IACVC,YAAY;IACZC,UAAU;IACVC,QAAQ;IACRC,MAAM;IACNC,KAAK;IACLC,YAAY;IACZC;EACwB,CAAC,GAAAR,IAAA;EACzB,MAAMS,MAAM,GAAG,IAAIpB,YAAY,CAAC;IAC9BqB,GAAG,EAAET,UAAU;IACfU,KAAK,EAAE,IAAIrB,aAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,MAAMsB,YAAY,GAAGR,QAAQ,KAAKN,QAAQ,CAACe,GAAG,GAAGf,QAAQ,CAACgB,GAAG,GAAGV,QAAQ;EACxE,MAAMW,UAAU,GAAGH,YAAY,KAAKd,QAAQ,CAACgB,GAAG,GAAG,KAAK,GAAG,KAAK;EAEhE,OACE3B,KAAA,CAAA6B,aAAA,CAACxB,cAAc;IAACa,MAAM,EAAEV,SAAS,CAACU,MAAM,CAAE;IAACT,YAAY,EAAEA;EAAa,GACpET,KAAA,CAAA6B,aAAA,CAACvB,iBAAiB;IAChBwB,GAAG,EAAEf,YAAa;IAClBgB,OAAO,EAAE;MAAEN,YAAY;MAAEG;IAAW;EAAE,GAEtC5B,KAAA,CAAA6B,aAAA,CAACzB,cAAc;IAACkB,MAAM,EAAEA;EAAO,GAC7BtB,KAAA,CAAA6B,aAAA,CAAC5B,QAAQ,QACPD,KAAA,CAAA6B,aAAA,CAACtB,aAAa;IAACc,aAAa,EAAEA,aAAc;IAACF,KAAK,EAAEA;EAAM,GACxDnB,KAAA,CAAA6B,aAAA,CAACnB,iBAAiB;IAChBM,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":"CurrencyCrossTableWidget.js","names":["React","Suspense","ApolloClient","InMemoryCache","ApolloProvider","LocaleProvider","LiveRatesProvider","ThemeProvider","getLocale","renderComponent","translations","ValidationWrapper","Division","CurrencyCrossTableWidget","_ref","graphqlUrl","liveRatesUrl","currencies","division","locale","theme","isParamError","removePadding","logoLink","client","uri","cache","divisionCode","Opt","Ogm","dataSource","createElement","url","options","Component","linkArea"],"sources":["../../../src/CurrencyCrossTableWidget/CurrencyCrossTableWidget.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 { 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 <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 currencies={currencies}\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 { CurrencyCrossTableWidget };\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;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,IAAItB,YAAY,CAAC;IAC9BuB,GAAG,EAAEV,UAAU;IACfW,KAAK,EAAE,IAAIvB,aAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,MAAMwB,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,OACE7B,KAAA,CAAA+B,aAAA,CAAC1B,cAAc;IAACc,MAAM,EAAEX,SAAS,CAACW,MAAM,CAAE;IAACT,YAAY,EAAEA;EAAa,GACpEV,KAAA,CAAA+B,aAAA,CAACzB,iBAAiB;IAChB0B,GAAG,EAAEhB,YAAa;IAClBiB,OAAO,EAAE;MAAEN,YAAY;MAAEG;IAAW;EAAE,GAEtC9B,KAAA,CAAA+B,aAAA,CAAC3B,cAAc;IAACoB,MAAM,EAAEA;EAAO,GAC7BxB,KAAA,CAAA+B,aAAA,CAAC9B,QAAQ,QACPD,KAAA,CAAA+B,aAAA,CAACxB,aAAa;IAACe,aAAa,EAAEA,aAAc;IAACF,KAAK,EAAEA;EAAM,GACvDX,eAAe,CAAC;IACfyB,SAAS,EAAElC,KAAA,CAAA+B,aAAA,CAACpB,iBAAiB;MAC3BM,UAAU,EAAEA,UAAW;MACvBC,QAAQ,EAAEA,QAAS;MACnBG,YAAY,EAAEA;IAAa,CAC5B,CAAC;IACFE,QAAQ;IACRY,QAAQ,EAAE;EACZ,CAAC,CACY,CACP,CACI,CACC,CACL,CAAC;AAErB,CAAC;AAED,SAAStB,wBAAwB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["Locale"],"sources":["../../../src/CurrencyCrossTableWidget/types.tsx"],"sourcesContent":["import { Locale } from '@oanda/mono-i18n';\nimport { Theme } from '@oanda/labs-widget-common';\nimport { Division } from '../gql/types/graphql';\n\nexport { Locale } from '@oanda/mono-i18n';\n\nexport interface CurrencyCrossTableConfig {\n division: Division;\n graphqlUrl: string;\n liveRatesUrl: string;\n currencies: string[];\n locale: Locale;\n theme?: Theme;\n isParamError?: boolean;\n removePadding?: boolean;\n}\n\nexport interface ValidationWrapperProps {\n currencies: string[];\n division: Division;\n isParamError?: boolean;\n}\nexport interface MainProps {\n currencies: string[];\n validInstruments: string[];\n division: Division;\n}\n"],"mappings":"AAIA,SAASA,MAAM,QAAQ,kBAAkB","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["Locale"],"sources":["../../../src/CurrencyCrossTableWidget/types.tsx"],"sourcesContent":["import { WidgetConfig } from '@oanda/labs-widget-common';\nimport { Division } from '../gql/types/graphql';\n\nexport { Locale } from '@oanda/mono-i18n';\n\nexport interface CurrencyCrossTableConfig extends WidgetConfig {\n division: Division;\n liveRatesUrl: string;\n currencies: string[];\n removePadding?: boolean;\n}\n\nexport interface ValidationWrapperProps {\n currencies: string[];\n division: Division;\n isParamError?: boolean;\n}\nexport interface MainProps {\n currencies: string[];\n validInstruments: string[];\n division: Division;\n}\n"],"mappings":"AAGA,SAASA,MAAM,QAAQ,kBAAkB","ignoreList":[]}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { CurrencyCrossTableConfig } from './types';
3
- declare const CurrencyCrossTableWidget: ({ graphqlUrl, liveRatesUrl, currencies, division, locale, theme, isParamError, removePadding, }: CurrencyCrossTableConfig) => React.JSX.Element;
3
+ declare const CurrencyCrossTableWidget: ({ graphqlUrl, liveRatesUrl, currencies, division, locale, theme, isParamError, removePadding, logoLink, }: CurrencyCrossTableConfig) => React.JSX.Element;
4
4
  export { CurrencyCrossTableWidget };
@@ -1,15 +1,10 @@
1
- import { Locale } from '@oanda/mono-i18n';
2
- import { Theme } from '@oanda/labs-widget-common';
1
+ import { WidgetConfig } from '@oanda/labs-widget-common';
3
2
  import { Division } from '../gql/types/graphql';
4
3
  export { Locale } from '@oanda/mono-i18n';
5
- export interface CurrencyCrossTableConfig {
4
+ export interface CurrencyCrossTableConfig extends WidgetConfig {
6
5
  division: Division;
7
- graphqlUrl: string;
8
6
  liveRatesUrl: string;
9
7
  currencies: string[];
10
- locale: Locale;
11
- theme?: Theme;
12
- isParamError?: boolean;
13
8
  removePadding?: boolean;
14
9
  }
15
10
  export interface ValidationWrapperProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oanda/labs-currency-cross-table",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
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.169",
15
+ "@oanda/labs-widget-common": "^1.0.170",
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": "cfcc2eb4d59e16d25ec3da37e01767b476477125"
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 { CurrencyCrossTableConfig } from './types';
@@ -18,6 +19,7 @@ const CurrencyCrossTableWidget = ({
18
19
  theme,
19
20
  isParamError,
20
21
  removePadding,
22
+ logoLink,
21
23
  }: CurrencyCrossTableConfig) => {
22
24
  const client = new ApolloClient({
23
25
  uri: graphqlUrl,
@@ -36,11 +38,15 @@ const CurrencyCrossTableWidget = ({
36
38
  <ApolloProvider client={client}>
37
39
  <Suspense>
38
40
  <ThemeProvider removePadding={removePadding} theme={theme}>
39
- <ValidationWrapper
40
- currencies={currencies}
41
- division={division}
42
- isParamError={isParamError}
43
- />
41
+ {renderComponent({
42
+ Component: <ValidationWrapper
43
+ currencies={currencies}
44
+ division={division}
45
+ isParamError={isParamError}
46
+ />,
47
+ logoLink,
48
+ linkArea: 'full',
49
+ })}
44
50
  </ThemeProvider>
45
51
  </Suspense>
46
52
  </ApolloProvider>
@@ -1,17 +1,12 @@
1
- import { Locale } from '@oanda/mono-i18n';
2
- import { Theme } from '@oanda/labs-widget-common';
1
+ import { WidgetConfig } 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
 
7
- export interface CurrencyCrossTableConfig {
6
+ export interface CurrencyCrossTableConfig extends WidgetConfig {
8
7
  division: Division;
9
- graphqlUrl: string;
10
8
  liveRatesUrl: string;
11
9
  currencies: string[];
12
- locale: Locale;
13
- theme?: Theme;
14
- isParamError?: boolean;
15
10
  removePadding?: boolean;
16
11
  }
17
12