@oanda/labs-currency-strength-widget 1.0.3 → 1.0.4

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,26 @@
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.4 (2024-02-20)
7
+
8
+
9
+
10
+ ## 1.0.85 (2024-02-13)
11
+
12
+
13
+
14
+ ## 1.0.84 (2024-02-13)
15
+
16
+
17
+
18
+ ## 1.0.83 (2024-02-09)
19
+
20
+ **Note:** Version bump only for package @oanda/labs-currency-strength-widget
21
+
22
+
23
+
24
+
25
+
6
26
  ## 1.0.3 (2024-02-13)
7
27
 
8
28
 
@@ -39,6 +39,7 @@ const ChartWithData = () => {
39
39
  'lw-grid-cols-1': !isDesktop
40
40
  })
41
41
  }, (_data$currencyStrengt3 = data.currencyStrength) === null || _data$currencyStrengt3 === void 0 ? void 0 : _data$currencyStrengt3.map(item => _react.default.createElement("div", {
42
+ key: item.currency,
42
43
  className: "lw-flex lw-h-[135px] lw-flex-1 lw-items-center lw-justify-center"
43
44
  }, _react.default.createElement(_Chart.Chart, {
44
45
  currency: item.currency,
@@ -1 +1 @@
1
- {"version":3,"file":"ChartsWithData.js","names":["_react","_interopRequireWildcard","require","_client","_labsWidgetCommon","_classnames","_interopRequireDefault","_getCurrencyStrength","_Chart","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ChartWithData","_data$currencyStrengt","_data$currencyStrengt2","_data$currencyStrengt3","size","useContext","ThemeContext","isDesktop","Size","DESKTOP","loading","data","error","useQuery","getCurrencyStrength","fetchPolicy","showChart","currencyStrength","length","showError","createElement","Fragment","className","Spinner","SpinnerSize","lg","classnames","map","item","Chart","currency","values","strengthRelation","ChartError","exports"],"sources":["../../../src/CurrencyStrengthWidget/ChartsWithData.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { useQuery } from '@apollo/client';\nimport {\n ChartError, Size, Spinner, SpinnerSize,\n ThemeContext,\n} from '@oanda/labs-widget-common';\nimport classnames from 'classnames';\nimport { getCurrencyStrength } from '../gql/getCurrencyStrength';\nimport { GetCurrencyStrengthQuery } from '../gql/types/graphql';\nimport { Chart } from './components/Chart';\n\nconst ChartWithData = () => {\n const { size } = useContext(ThemeContext);\n const isDesktop = size === Size.DESKTOP;\n const { loading, data, error } = useQuery<GetCurrencyStrengthQuery>(getCurrencyStrength, {\n fetchPolicy: 'cache-and-network',\n });\n\n const showChart = data?.currencyStrength && data?.currencyStrength?.length > 0;\n const showError = data?.currencyStrength?.length === 0 || error;\n\n return (\n <>\n {loading\n && (\n <div className=\"lw-flex lw-h-[461px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary\">\n <Spinner size={SpinnerSize.lg} />\n </div>\n )}\n {!loading && showChart && (\n <div\n data-testid=\"currency-strength-chart-wrapper\"\n className={classnames('lw-grid lw-place-content-center lw-gap-7', {\n 'lw-grid-cols-3 ': isDesktop,\n 'lw-grid-cols-1': !isDesktop,\n })}\n >\n {data.currencyStrength?.map((item) => (\n <div className=\"lw-flex lw-h-[135px] lw-flex-1 lw-items-center lw-justify-center\">\n <Chart currency={item.currency} values={item.strengthRelation!} />\n </div>\n ))}\n </div>\n )}\n {!loading && showError && (\n <div className=\"lw-flex lw-h-[425px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary\">\n <ChartError />\n </div>\n )}\n </>\n );\n};\n\nexport { ChartWithData };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AAIA,IAAAG,WAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAL,OAAA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S;MAC5B,gBAAgB,EAAE,CAACA;IACrB,CAAC;EAAE,IAAAJ,sBAAA,GAEFQ,IAAI,CAACM,gBAAgB,cAAAd,sBAAA,uBAArBA,sBAAA,CAAuBwB,GAAG,CAAEC,IAAI,IAC/B3D,MAAA,CAAAW,OAAA,CAAAwC,aAAA;IAAKE,SAAS,EAAC;EAAkE,GAC/ErD,MAAA,CAAAW,OAAA,CAAAwC,aAAA,CAAC3C,MAAA,CAAAoD,KAAK;IAACC,QAAQ,EAAEF,IAAI,CAACE,QAAS;IAACC,MAAM,EAAEH,IAAI,CAACI;EAAkB,CAAE,CAC9D,CACN,CACE,CACN,EACA,CAACtB,OAAO,IAAIS,SAAS,IACpBlD,MAAA,CAAAW,OAAA,CAAAwC,aAAA;IAAKE,SAAS,EAAC;EAAmG,GAChHrD,MAAA,CAAAW,OAAA,CAAAwC,aAAA,CAAC/C,iBAAA,CAAA4D,UAAU,MAAE,CACV,CAEP,CAAC;AAEP,CAAC;AAACC,OAAA,CAAAlC,aAAA,GAAAA,aAAA"}
1
+ {"version":3,"file":"ChartsWithData.js","names":["_react","_interopRequireWildcard","require","_client","_labsWidgetCommon","_classnames","_interopRequireDefault","_getCurrencyStrength","_Chart","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ChartWithData","_data$currencyStrengt","_data$currencyStrengt2","_data$currencyStrengt3","size","useContext","ThemeContext","isDesktop","Size","DESKTOP","loading","data","error","useQuery","getCurrencyStrength","fetchPolicy","showChart","currencyStrength","length","showError","createElement","Fragment","className","Spinner","SpinnerSize","lg","classnames","map","item","key","currency","Chart","values","strengthRelation","ChartError","exports"],"sources":["../../../src/CurrencyStrengthWidget/ChartsWithData.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { useQuery } from '@apollo/client';\nimport {\n ChartError, Size, Spinner, SpinnerSize,\n ThemeContext,\n} from '@oanda/labs-widget-common';\nimport classnames from 'classnames';\nimport { getCurrencyStrength } from '../gql/getCurrencyStrength';\nimport { GetCurrencyStrengthQuery } from '../gql/types/graphql';\nimport { Chart } from './components/Chart';\n\nconst ChartWithData = () => {\n const { size } = useContext(ThemeContext);\n const isDesktop = size === Size.DESKTOP;\n const { loading, data, error } = useQuery<GetCurrencyStrengthQuery>(getCurrencyStrength, {\n fetchPolicy: 'cache-and-network',\n });\n\n const showChart = data?.currencyStrength && data?.currencyStrength?.length > 0;\n const showError = data?.currencyStrength?.length === 0 || error;\n\n return (\n <>\n {loading\n && (\n <div className=\"lw-flex lw-h-[461px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary\">\n <Spinner size={SpinnerSize.lg} />\n </div>\n )}\n {!loading && showChart && (\n <div\n data-testid=\"currency-strength-chart-wrapper\"\n className={classnames('lw-grid lw-place-content-center lw-gap-7', {\n 'lw-grid-cols-3 ': isDesktop,\n 'lw-grid-cols-1': !isDesktop,\n })}\n >\n {data.currencyStrength?.map((item) => (\n <div key={item.currency} className=\"lw-flex lw-h-[135px] lw-flex-1 lw-items-center lw-justify-center\">\n <Chart currency={item.currency} values={item.strengthRelation!} />\n </div>\n ))}\n </div>\n )}\n {!loading && showError && (\n <div className=\"lw-flex lw-h-[425px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary\">\n <ChartError />\n </div>\n )}\n </>\n );\n};\n\nexport { ChartWithData };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AAIA,IAAAG,WAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAN,OAAA;AAA2C,SAAAI,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AA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,IAAI,IAC/B3D,MAAA,CAAAW,OAAA,CAAAwC,aAAA;IAAKS,GAAG,EAAED,IAAI,CAACE,QAAS;IAACR,SAAS,EAAC;EAAkE,GACnGrD,MAAA,CAAAW,OAAA,CAAAwC,aAAA,CAAC3C,MAAA,CAAAsD,KAAK;IAACD,QAAQ,EAAEF,IAAI,CAACE,QAAS;IAACE,MAAM,EAAEJ,IAAI,CAACK;EAAkB,CAAE,CAC9D,CACN,CACE,CACN,EACA,CAACvB,OAAO,IAAIS,SAAS,IACpBlD,MAAA,CAAAW,OAAA,CAAAwC,aAAA;IAAKE,SAAS,EAAC;EAAmG,GAChHrD,MAAA,CAAAW,OAAA,CAAAwC,aAAA,CAAC/C,iBAAA,CAAA6D,UAAU,MAAE,CACV,CAEP,CAAC;AAEP,CAAC;AAACC,OAAA,CAAAnC,aAAA,GAAAA,aAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyStrengthWidget.js","names":["_react","_interopRequireDefault","require","_monoI18n","_client","_labsWidgetCommon","_translations","_Main","obj","__esModule","default","CurrencyStrengthWidget","_ref","graphqlUrl","locale","theme","isParamError","client","ApolloClient","uri","cache","InMemoryCache","createElement","ThemeProvider","LocaleProvider","getLocale","translations","ApolloProvider","className","ChartError","Main","exports"],"sources":["../../../src/CurrencyStrengthWidget/CurrencyStrengthWidget.tsx"],"sourcesContent":["import React from 'react';\nimport { LocaleProvider } from '@oanda/mono-i18n';\nimport { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';\nimport { ChartError, ThemeProvider, getLocale } from '@oanda/labs-widget-common';\nimport { VolatilityChartConfig } from './types';\nimport { translations } from '../translations';\nimport { Main } from './Main';\n\nconst CurrencyStrengthWidget = ({\n graphqlUrl, locale, theme, isParamError,\n}: VolatilityChartConfig) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n return (\n <ThemeProvider theme={theme}>\n <LocaleProvider locale={getLocale(locale)} translations={translations}>\n <ApolloProvider client={client}>\n {isParamError ? (\n <div className=\"lw-flex lw-h-[425px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary\">\n <ChartError />\n </div>\n ) : <Main />}\n </ApolloProvider>\n </LocaleProvider>\n </ThemeProvider>\n );\n};\n\nexport { CurrencyStrengthWidget };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAEA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAA8B,SAAAD,uBAAAO,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE9B,MAAMG,sBAAsB,GAAGC,IAAA,IAEF;EAAA,IAFG;IAC9BC,UAAU;IAAEC,MAAM;IAAEC,KAAK;IAAEC;EACN,CAAC,GAAAJ,IAAA;EACtB,MAAMK,MAAM,GAAG,IAAIC,oBAAY,CAAC;IAC9BC,GAAG,EAAEN,UAAU;IACfO,KAAK,EAAE,IAAIC,qBAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,OACErB,MAAA,CAAAU,OAAA,CAAAY,aAAA,CAACjB,iBAAA,CAAAkB,aAAa;IAACR,KAAK,EAAEA;EAAM,GAC1Bf,MAAA,CAAAU,OAAA,CAAAY,aAAA,CAACnB,SAAA,CAAAqB,cAAc;IAACV,MAAM,EAAE,IAAAW,2BAAS,EAACX,MAAM,CAAE;IAACY,YAAY,EAAEA;EAAa,GACpE1B,MAAA,CAAAU,OAAA,CAAAY,aAAA,CAAClB,OAAA,CAAAuB,cAAc;IAACV,MAAM,EAAEA;EAAO,GAC5BD,YAAY,GACXhB,MAAA,CAAAU,OAAA,CAAAY,aAAA;IAAKM,SAAS,EAAC;EAAmG,GAChH5B,MAAA,CAAAU,OAAA,CAAAY,aAAA,CAACjB,iBAAA,CAAAwB,UAAU,MAAE,CACV,CAAC,GACJ7B,MAAA,CAAAU,OAAA,CAAAY,aAAA,CAACf,KAAA,CAAAuB,IAAI,MAAE,CACG,CACF,CACH,CAAC;AAEpB,CAAC;AAACC,OAAA,CAAApB,sBAAA,GAAAA,sBAAA"}
1
+ {"version":3,"file":"CurrencyStrengthWidget.js","names":["_react","_interopRequireDefault","require","_monoI18n","_client","_labsWidgetCommon","_translations","_Main","obj","__esModule","default","CurrencyStrengthWidget","_ref","graphqlUrl","locale","theme","isParamError","client","ApolloClient","uri","cache","InMemoryCache","createElement","ThemeProvider","LocaleProvider","getLocale","translations","ApolloProvider","className","ChartError","Main","exports"],"sources":["../../../src/CurrencyStrengthWidget/CurrencyStrengthWidget.tsx"],"sourcesContent":["import React from 'react';\nimport { LocaleProvider } from '@oanda/mono-i18n';\nimport { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';\nimport { ChartError, ThemeProvider, getLocale } from '@oanda/labs-widget-common';\nimport { CurrencyStrengthConfig } from './types';\nimport { translations } from '../translations';\nimport { Main } from './Main';\n\nconst CurrencyStrengthWidget = ({\n graphqlUrl, locale, theme, isParamError,\n}: CurrencyStrengthConfig) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n return (\n <ThemeProvider theme={theme}>\n <LocaleProvider locale={getLocale(locale)} translations={translations}>\n <ApolloProvider client={client}>\n {isParamError ? (\n <div className=\"lw-flex lw-h-[425px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary\">\n <ChartError />\n </div>\n ) : <Main />}\n </ApolloProvider>\n </LocaleProvider>\n </ThemeProvider>\n );\n};\n\nexport { CurrencyStrengthWidget };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAEA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAA8B,SAAAD,uBAAAO,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE9B,MAAMG,sBAAsB,GAAGC,IAAA,IAED;EAAA,IAFE;IAC9BC,UAAU;IAAEC,MAAM;IAAEC,KAAK;IAAEC;EACL,CAAC,GAAAJ,IAAA;EACvB,MAAMK,MAAM,GAAG,IAAIC,oBAAY,CAAC;IAC9BC,GAAG,EAAEN,UAAU;IACfO,KAAK,EAAE,IAAIC,qBAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,OACErB,MAAA,CAAAU,OAAA,CAAAY,aAAA,CAACjB,iBAAA,CAAAkB,aAAa;IAACR,KAAK,EAAEA;EAAM,GAC1Bf,MAAA,CAAAU,OAAA,CAAAY,aAAA,CAACnB,SAAA,CAAAqB,cAAc;IAACV,MAAM,EAAE,IAAAW,2BAAS,EAACX,MAAM,CAAE;IAACY,YAAY,EAAEA;EAAa,GACpE1B,MAAA,CAAAU,OAAA,CAAAY,aAAA,CAAClB,OAAA,CAAAuB,cAAc;IAACV,MAAM,EAAEA;EAAO,GAC5BD,YAAY,GACXhB,MAAA,CAAAU,OAAA,CAAAY,aAAA;IAAKM,SAAS,EAAC;EAAmG,GAChH5B,MAAA,CAAAU,OAAA,CAAAY,aAAA,CAACjB,iBAAA,CAAAwB,UAAU,MAAE,CACV,CAAC,GACJ7B,MAAA,CAAAU,OAAA,CAAAY,aAAA,CAACf,KAAA,CAAAuB,IAAI,MAAE,CACG,CACF,CACH,CAAC;AAEpB,CAAC;AAACC,OAAA,CAAApB,sBAAA,GAAAA,sBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../src/CurrencyStrengthWidget/types.ts"],"sourcesContent":["import { Locale } from '@oanda/mono-i18n';\nimport { Theme } from '@oanda/labs-widget-common';\n\nexport interface VolatilityChartConfig {\n graphqlUrl: string;\n locale: Locale;\n theme?: Theme;\n isParamError?: boolean;\n}\n\nexport interface VolatilityChartWrapperConfig extends VolatilityChartConfig {\n renderElementId: string;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/CurrencyStrengthWidget/types.ts"],"sourcesContent":["import { Locale } from '@oanda/mono-i18n';\nimport { Theme } from '@oanda/labs-widget-common';\n\nexport interface CurrencyStrengthConfig {\n graphqlUrl: string;\n locale: Locale;\n theme?: Theme;\n isParamError?: boolean;\n}\n\nexport interface CurrencyStrengthWrapperConfig extends CurrencyStrengthConfig {\n renderElementId: string;\n}\n"],"mappings":""}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- var _CurrencyStrengthWidget = require("./CurrencyStrengthWidget/CurrencyStrengthWidget");
6
+ var _CurrencyStrengthWidget = require("./CurrencyStrengthWidget");
7
7
  Object.keys(_CurrencyStrengthWidget).forEach(function (key) {
8
8
  if (key === "default" || key === "__esModule") return;
9
9
  if (key in exports && exports[key] === _CurrencyStrengthWidget[key]) return;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_CurrencyStrengthWidget","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../src/index.ts"],"sourcesContent":["export * from './CurrencyStrengthWidget/CurrencyStrengthWidget';\n"],"mappings":";;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,uBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,uBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,uBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":["_CurrencyStrengthWidget","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../src/index.ts"],"sourcesContent":["export * from './CurrencyStrengthWidget';\n"],"mappings":";;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,uBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,uBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,uBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"}
@@ -1,6 +1,7 @@
1
1
  {
2
- "data_unavailable": "Data unavailable",
3
- "vs": "vs",
4
2
  "5_minutes": "5 minutes",
5
- "daily": "Daily"
3
+ "daily": "Daily",
4
+ "data_unavailable": "Data unavailable",
5
+ "pagination_entries_range": "{{firstItemOnPage}}-{{lastItemOnPage}} of {{itemCount}} entries",
6
+ "vs": "vs"
6
7
  }
@@ -1,6 +1,5 @@
1
1
  {
2
+ "daily": "每日",
2
3
  "data_unavailable": "沒有數據",
3
- "vs": "",
4
- "5_minutes": "",
5
- "daily": ""
4
+ "pagination_entries_range": "{{itemCount}}个挂单中的{{firstItemOnPage}}-{{lastItemOnPage}}"
6
5
  }
@@ -30,6 +30,7 @@ const ChartWithData = () => {
30
30
  'lw-grid-cols-1': !isDesktop
31
31
  })
32
32
  }, (_data$currencyStrengt3 = data.currencyStrength) === null || _data$currencyStrengt3 === void 0 ? void 0 : _data$currencyStrengt3.map(item => React.createElement("div", {
33
+ key: item.currency,
33
34
  className: "lw-flex lw-h-[135px] lw-flex-1 lw-items-center lw-justify-center"
34
35
  }, React.createElement(Chart, {
35
36
  currency: item.currency,
@@ -1 +1 @@
1
- {"version":3,"file":"ChartsWithData.js","names":["React","useContext","useQuery","ChartError","Size","Spinner","SpinnerSize","ThemeContext","classnames","getCurrencyStrength","Chart","ChartWithData","_data$currencyStrengt","_data$currencyStrengt2","_data$currencyStrengt3","size","isDesktop","DESKTOP","loading","data","error","fetchPolicy","showChart","currencyStrength","length","showError","createElement","Fragment","className","lg","map","item","currency","values","strengthRelation"],"sources":["../../../src/CurrencyStrengthWidget/ChartsWithData.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { useQuery } from '@apollo/client';\nimport {\n ChartError, Size, Spinner, SpinnerSize,\n ThemeContext,\n} from '@oanda/labs-widget-common';\nimport classnames from 'classnames';\nimport { getCurrencyStrength } from '../gql/getCurrencyStrength';\nimport { GetCurrencyStrengthQuery } from '../gql/types/graphql';\nimport { Chart } from './components/Chart';\n\nconst ChartWithData = () => {\n const { size } = useContext(ThemeContext);\n const isDesktop = size === Size.DESKTOP;\n const { loading, data, error } = useQuery<GetCurrencyStrengthQuery>(getCurrencyStrength, {\n fetchPolicy: 'cache-and-network',\n });\n\n const showChart = data?.currencyStrength && data?.currencyStrength?.length > 0;\n const showError = data?.currencyStrength?.length === 0 || error;\n\n return (\n <>\n {loading\n && (\n <div className=\"lw-flex lw-h-[461px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary\">\n <Spinner size={SpinnerSize.lg} />\n </div>\n )}\n {!loading && showChart && (\n <div\n data-testid=\"currency-strength-chart-wrapper\"\n className={classnames('lw-grid lw-place-content-center lw-gap-7', {\n 'lw-grid-cols-3 ': isDesktop,\n 'lw-grid-cols-1': !isDesktop,\n })}\n >\n {data.currencyStrength?.map((item) => (\n <div className=\"lw-flex lw-h-[135px] lw-flex-1 lw-items-center lw-justify-center\">\n <Chart currency={item.currency} values={item.strengthRelation!} />\n </div>\n ))}\n </div>\n )}\n {!loading && showError && (\n <div className=\"lw-flex lw-h-[425px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-prim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O;IAACU,IAAI,EAAET,WAAW,CAACuB;EAAG,CAAE,CAC7B,CACN,EACA,CAACX,OAAO,IAAII,SAAS,IACpBtB,KAAA,CAAA0B,aAAA;IACE,eAAY,iCAAiC;IAC7CE,SAAS,EAAEpB,UAAU,CAAC,0CAA0C,EAAE;MAChE,iBAAiB,EAAEQ,SAAS;MAC5B,gBAAgB,EAAE,CAACA;IACrB,CAAC;EAAE,IAAAF,sBAAA,GAEFK,IAAI,CAACI,gBAAgB,cAAAT,sBAAA,uBAArBA,sBAAA,CAAuBgB,GAAG,CAAEC,IAAI,IAC/B/B,KAAA,CAAA0B,aAAA;IAAKE,SAAS,EAAC;EAAkE,GAC/E5B,KAAA,CAAA0B,aAAA,CAAChB,KAAK;IAACsB,QAAQ,EAAED,IAAI,CAACC,QAAS;IAACC,MAAM,EAAEF,IAAI,CAACG;EAAkB,CAAE,CAC9D,CACN,CACE,CACN,EACA,CAAChB,OAAO,IAAIO,SAAS,IACpBzB,KAAA,CAAA0B,aAAA;IAAKE,SAAS,EAAC;EAAmG,GAChH5B,KAAA,CAAA0B,aAAA,CAACvB,UAAU,MAAE,CACV,CAEP,CAAC;AAEP,CAAC;AAED,SAASQ,aAAa"}
1
+ {"version":3,"file":"ChartsWithData.js","names":["React","useContext","useQuery","ChartError","Size","Spinner","SpinnerSize","ThemeContext","classnames","getCurrencyStrength","Chart","ChartWithData","_data$currencyStrengt","_data$currencyStrengt2","_data$currencyStrengt3","size","isDesktop","DESKTOP","loading","data","error","fetchPolicy","showChart","currencyStrength","length","showError","createElement","Fragment","className","lg","map","item","key","currency","values","strengthRelation"],"sources":["../../../src/CurrencyStrengthWidget/ChartsWithData.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { useQuery } from '@apollo/client';\nimport {\n ChartError, Size, Spinner, SpinnerSize,\n ThemeContext,\n} from '@oanda/labs-widget-common';\nimport classnames from 'classnames';\nimport { getCurrencyStrength } from '../gql/getCurrencyStrength';\nimport { GetCurrencyStrengthQuery } from '../gql/types/graphql';\nimport { Chart } from './components/Chart';\n\nconst ChartWithData = () => {\n const { size } = useContext(ThemeContext);\n const isDesktop = size === Size.DESKTOP;\n const { loading, data, error } = useQuery<GetCurrencyStrengthQuery>(getCurrencyStrength, {\n fetchPolicy: 'cache-and-network',\n });\n\n const showChart = data?.currencyStrength && data?.currencyStrength?.length > 0;\n const showError = data?.currencyStrength?.length === 0 || error;\n\n return (\n <>\n {loading\n && (\n <div className=\"lw-flex lw-h-[461px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary\">\n <Spinner size={SpinnerSize.lg} />\n </div>\n )}\n {!loading && showChart && (\n <div\n data-testid=\"currency-strength-chart-wrapper\"\n className={classnames('lw-grid lw-place-content-center lw-gap-7', {\n 'lw-grid-cols-3 ': isDesktop,\n 'lw-grid-cols-1': !isDesktop,\n })}\n >\n {data.currencyStrength?.map((item) => (\n <div key={item.currency} className=\"lw-flex lw-h-[135px] lw-flex-1 lw-items-center lw-justify-center\">\n <Chart currency={item.currency} values={item.strengthRelation!} />\n </div>\n ))}\n </div>\n )}\n {!loading && showError && (\n <div className=\"lw-flex lw-h-[425px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary\">\n <ChartError />\n </div>\n )}\n </>\n );\n};\n\nexport { ChartWithData };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SACEC,UAAU,EAAEC,IAAI,EAAEC,OAAO,EAAEC,WAAW,EACtCC,YAAY,QACP,2BAA2B;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,mBAAmB,QAAQ,4BAA4B;AAEhE,SAASC,KAAK,QAAQ,oBAAoB;AAE1C,MAAMC,aAAa,GAAGA,CAAA,KAAM;EAAA,IAAAC,qBAAA,EAAAC,sBAAA,EAAAC,sBAAA;EAC1B,MAAM;IAAEC;EAAK,CAAC,GAAGd,UAAU,CAACM,YAAY,CAAC;EACz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KAAK;IAACuB,QAAQ,EAAEF,IAAI,CAACE,QAAS;IAACC,MAAM,EAAEH,IAAI,CAACI;EAAkB,CAAE,CAC9D,CACN,CACE,CACN,EACA,CAACjB,OAAO,IAAIO,SAAS,IACpBzB,KAAA,CAAA0B,aAAA;IAAKE,SAAS,EAAC;EAAmG,GAChH5B,KAAA,CAAA0B,aAAA,CAACvB,UAAU,MAAE,CACV,CAEP,CAAC;AAEP,CAAC;AAED,SAASQ,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyStrengthWidget.js","names":["React","LocaleProvider","ApolloClient","InMemoryCache","ApolloProvider","ChartError","ThemeProvider","getLocale","translations","Main","CurrencyStrengthWidget","_ref","graphqlUrl","locale","theme","isParamError","client","uri","cache","createElement","className"],"sources":["../../../src/CurrencyStrengthWidget/CurrencyStrengthWidget.tsx"],"sourcesContent":["import React from 'react';\nimport { LocaleProvider } from '@oanda/mono-i18n';\nimport { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';\nimport { ChartError, ThemeProvider, getLocale } from '@oanda/labs-widget-common';\nimport { VolatilityChartConfig } from './types';\nimport { translations } from '../translations';\nimport { Main } from './Main';\n\nconst CurrencyStrengthWidget = ({\n graphqlUrl, locale, theme, isParamError,\n}: VolatilityChartConfig) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n return (\n <ThemeProvider theme={theme}>\n <LocaleProvider locale={getLocale(locale)} translations={translations}>\n <ApolloProvider client={client}>\n {isParamError ? (\n <div className=\"lw-flex lw-h-[425px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary\">\n <ChartError />\n </div>\n ) : <Main />}\n </ApolloProvider>\n </LocaleProvider>\n </ThemeProvider>\n );\n};\n\nexport { CurrencyStrengthWidget };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,YAAY,EAAEC,aAAa,EAAEC,cAAc,QAAQ,gBAAgB;AAC5E,SAASC,UAAU,EAAEC,aAAa,EAAEC,SAAS,QAAQ,2BAA2B;AAEhF,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,IAAI,QAAQ,QAAQ;AAE7B,MAAMC,sBAAsB,GAAGC,IAAA,IAEF;EAAA,IAFG;IAC9BC,UAAU;IAAEC,MAAM;IAAEC,KAAK;IAAEC;EACN,CAAC,GAAAJ,IAAA;EACtB,MAAMK,MAAM,GAAG,IAAId,YAAY,CAAC;IAC9Be,GAAG,EAAEL,UAAU;IACfM,KAAK,EAAE,IAAIf,aAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,OACEH,KAAA,CAAAmB,aAAA,CAACb,aAAa;IAACQ,KAAK,EAAEA;EAAM,GAC1Bd,KAAA,CAAAmB,aAAA,CAAClB,cAAc;IAACY,MAAM,EAAEN,SAAS,CAACM,MAAM,CAAE;IAACL,YAAY,EAAEA;EAAa,GACpER,KAAA,CAAAmB,aAAA,CAACf,cAAc;IAACY,MAAM,EAAEA;EAAO,GAC5BD,YAAY,GACXf,KAAA,CAAAmB,aAAA;IAAKC,SAAS,EAAC;EAAmG,GAChHpB,KAAA,CAAAmB,aAAA,CAACd,UAAU,MAAE,CACV,CAAC,GACJL,KAAA,CAAAmB,aAAA,CAACV,IAAI,MAAE,CACG,CACF,CACH,CAAC;AAEpB,CAAC;AAED,SAASC,sBAAsB"}
1
+ {"version":3,"file":"CurrencyStrengthWidget.js","names":["React","LocaleProvider","ApolloClient","InMemoryCache","ApolloProvider","ChartError","ThemeProvider","getLocale","translations","Main","CurrencyStrengthWidget","_ref","graphqlUrl","locale","theme","isParamError","client","uri","cache","createElement","className"],"sources":["../../../src/CurrencyStrengthWidget/CurrencyStrengthWidget.tsx"],"sourcesContent":["import React from 'react';\nimport { LocaleProvider } from '@oanda/mono-i18n';\nimport { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';\nimport { ChartError, ThemeProvider, getLocale } from '@oanda/labs-widget-common';\nimport { CurrencyStrengthConfig } from './types';\nimport { translations } from '../translations';\nimport { Main } from './Main';\n\nconst CurrencyStrengthWidget = ({\n graphqlUrl, locale, theme, isParamError,\n}: CurrencyStrengthConfig) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n return (\n <ThemeProvider theme={theme}>\n <LocaleProvider locale={getLocale(locale)} translations={translations}>\n <ApolloProvider client={client}>\n {isParamError ? (\n <div className=\"lw-flex lw-h-[425px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary\">\n <ChartError />\n </div>\n ) : <Main />}\n </ApolloProvider>\n </LocaleProvider>\n </ThemeProvider>\n );\n};\n\nexport { CurrencyStrengthWidget };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,YAAY,EAAEC,aAAa,EAAEC,cAAc,QAAQ,gBAAgB;AAC5E,SAASC,UAAU,EAAEC,aAAa,EAAEC,SAAS,QAAQ,2BAA2B;AAEhF,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,IAAI,QAAQ,QAAQ;AAE7B,MAAMC,sBAAsB,GAAGC,IAAA,IAED;EAAA,IAFE;IAC9BC,UAAU;IAAEC,MAAM;IAAEC,KAAK;IAAEC;EACL,CAAC,GAAAJ,IAAA;EACvB,MAAMK,MAAM,GAAG,IAAId,YAAY,CAAC;IAC9Be,GAAG,EAAEL,UAAU;IACfM,KAAK,EAAE,IAAIf,aAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,OACEH,KAAA,CAAAmB,aAAA,CAACb,aAAa;IAACQ,KAAK,EAAEA;EAAM,GAC1Bd,KAAA,CAAAmB,aAAA,CAAClB,cAAc;IAACY,MAAM,EAAEN,SAAS,CAACM,MAAM,CAAE;IAACL,YAAY,EAAEA;EAAa,GACpER,KAAA,CAAAmB,aAAA,CAACf,cAAc;IAACY,MAAM,EAAEA;EAAO,GAC5BD,YAAY,GACXf,KAAA,CAAAmB,aAAA;IAAKC,SAAS,EAAC;EAAmG,GAChHpB,KAAA,CAAAmB,aAAA,CAACd,UAAU,MAAE,CACV,CAAC,GACJL,KAAA,CAAAmB,aAAA,CAACV,IAAI,MAAE,CACG,CACF,CACH,CAAC;AAEpB,CAAC;AAED,SAASC,sBAAsB"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../src/CurrencyStrengthWidget/types.ts"],"sourcesContent":["import { Locale } from '@oanda/mono-i18n';\nimport { Theme } from '@oanda/labs-widget-common';\n\nexport interface VolatilityChartConfig {\n graphqlUrl: string;\n locale: Locale;\n theme?: Theme;\n isParamError?: boolean;\n}\n\nexport interface VolatilityChartWrapperConfig extends VolatilityChartConfig {\n renderElementId: string;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/CurrencyStrengthWidget/types.ts"],"sourcesContent":["import { Locale } from '@oanda/mono-i18n';\nimport { Theme } from '@oanda/labs-widget-common';\n\nexport interface CurrencyStrengthConfig {\n graphqlUrl: string;\n locale: Locale;\n theme?: Theme;\n isParamError?: boolean;\n}\n\nexport interface CurrencyStrengthWrapperConfig extends CurrencyStrengthConfig {\n renderElementId: string;\n}\n"],"mappings":""}
@@ -1,2 +1,2 @@
1
- export * from './CurrencyStrengthWidget/CurrencyStrengthWidget';
1
+ export * from './CurrencyStrengthWidget';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from './CurrencyStrengthWidget/CurrencyStrengthWidget';\n"],"mappings":"AAAA,cAAc,iDAAiD"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from './CurrencyStrengthWidget';\n"],"mappings":"AAAA,cAAc,0BAA0B"}
@@ -1,6 +1,7 @@
1
1
  {
2
- "data_unavailable": "Data unavailable",
3
- "vs": "vs",
4
2
  "5_minutes": "5 minutes",
5
- "daily": "Daily"
3
+ "daily": "Daily",
4
+ "data_unavailable": "Data unavailable",
5
+ "pagination_entries_range": "{{firstItemOnPage}}-{{lastItemOnPage}} of {{itemCount}} entries",
6
+ "vs": "vs"
6
7
  }
@@ -1,6 +1,5 @@
1
1
  {
2
+ "daily": "每日",
2
3
  "data_unavailable": "沒有數據",
3
- "vs": "",
4
- "5_minutes": "",
5
- "daily": ""
4
+ "pagination_entries_range": "{{itemCount}}个挂单中的{{firstItemOnPage}}-{{lastItemOnPage}}"
6
5
  }
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { VolatilityChartConfig } from './types';
3
- declare const CurrencyStrengthWidget: ({ graphqlUrl, locale, theme, isParamError, }: VolatilityChartConfig) => JSX.Element;
2
+ import { CurrencyStrengthConfig } from './types';
3
+ declare const CurrencyStrengthWidget: ({ graphqlUrl, locale, theme, isParamError, }: CurrencyStrengthConfig) => JSX.Element;
4
4
  export { CurrencyStrengthWidget };
@@ -1,11 +1,11 @@
1
1
  import { Locale } from '@oanda/mono-i18n';
2
2
  import { Theme } from '@oanda/labs-widget-common';
3
- export interface VolatilityChartConfig {
3
+ export interface CurrencyStrengthConfig {
4
4
  graphqlUrl: string;
5
5
  locale: Locale;
6
6
  theme?: Theme;
7
7
  isParamError?: boolean;
8
8
  }
9
- export interface VolatilityChartWrapperConfig extends VolatilityChartConfig {
9
+ export interface CurrencyStrengthWrapperConfig extends CurrencyStrengthConfig {
10
10
  renderElementId: string;
11
11
  }
@@ -1 +1 @@
1
- export * from './CurrencyStrengthWidget/CurrencyStrengthWidget';
1
+ export * from './CurrencyStrengthWidget';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oanda/labs-currency-strength-widget",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Labs Currency Strength Widget",
5
5
  "main": "dist/main/index.js",
6
6
  "module": "dist/module/index.js",
@@ -13,7 +13,7 @@
13
13
  "license": "UNLICENSED",
14
14
  "dependencies": {
15
15
  "@apollo/client": "3.7.17",
16
- "@oanda/labs-widget-common": "^1.0.85",
16
+ "@oanda/labs-widget-common": "^1.0.86",
17
17
  "@oanda/mono-i18n": "9.0.0",
18
18
  "classnames": "2.3.2",
19
19
  "echarts": "5.4.3",
@@ -25,5 +25,5 @@
25
25
  "@graphql-codegen/client-preset": "4.1.0",
26
26
  "@graphql-codegen/typescript": "4.0.1"
27
27
  },
28
- "gitHead": "4821c093592494a4f93db1db19b2d60d666ffeb2"
28
+ "gitHead": "869f190b337ee149a20f83727856cb68d846f6f6"
29
29
  }
@@ -36,7 +36,7 @@ const ChartWithData = () => {
36
36
  })}
37
37
  >
38
38
  {data.currencyStrength?.map((item) => (
39
- <div className="lw-flex lw-h-[135px] lw-flex-1 lw-items-center lw-justify-center">
39
+ <div key={item.currency} className="lw-flex lw-h-[135px] lw-flex-1 lw-items-center lw-justify-center">
40
40
  <Chart currency={item.currency} values={item.strengthRelation!} />
41
41
  </div>
42
42
  ))}
@@ -2,13 +2,13 @@ import React from 'react';
2
2
  import { LocaleProvider } from '@oanda/mono-i18n';
3
3
  import { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';
4
4
  import { ChartError, ThemeProvider, getLocale } from '@oanda/labs-widget-common';
5
- import { VolatilityChartConfig } from './types';
5
+ import { CurrencyStrengthConfig } from './types';
6
6
  import { translations } from '../translations';
7
7
  import { Main } from './Main';
8
8
 
9
9
  const CurrencyStrengthWidget = ({
10
10
  graphqlUrl, locale, theme, isParamError,
11
- }: VolatilityChartConfig) => {
11
+ }: CurrencyStrengthConfig) => {
12
12
  const client = new ApolloClient({
13
13
  uri: graphqlUrl,
14
14
  cache: new InMemoryCache(),
@@ -1,13 +1,13 @@
1
1
  import { Locale } from '@oanda/mono-i18n';
2
2
  import { Theme } from '@oanda/labs-widget-common';
3
3
 
4
- export interface VolatilityChartConfig {
4
+ export interface CurrencyStrengthConfig {
5
5
  graphqlUrl: string;
6
6
  locale: Locale;
7
7
  theme?: Theme;
8
8
  isParamError?: boolean;
9
9
  }
10
10
 
11
- export interface VolatilityChartWrapperConfig extends VolatilityChartConfig {
11
+ export interface CurrencyStrengthWrapperConfig extends CurrencyStrengthConfig {
12
12
  renderElementId: string;
13
13
  }
package/src/index.ts CHANGED
@@ -1 +1 @@
1
- export * from './CurrencyStrengthWidget/CurrencyStrengthWidget';
1
+ export * from './CurrencyStrengthWidget';
@@ -1,6 +1,7 @@
1
1
  {
2
- "data_unavailable": "Data unavailable",
3
- "vs": "vs",
4
2
  "5_minutes": "5 minutes",
5
- "daily": "Daily"
3
+ "daily": "Daily",
4
+ "data_unavailable": "Data unavailable",
5
+ "pagination_entries_range": "{{firstItemOnPage}}-{{lastItemOnPage}} of {{itemCount}} entries",
6
+ "vs": "vs"
6
7
  }
@@ -1,6 +1,5 @@
1
1
  {
2
+ "daily": "每日",
2
3
  "data_unavailable": "沒有數據",
3
- "vs": "",
4
- "5_minutes": "",
5
- "daily": ""
4
+ "pagination_entries_range": "{{itemCount}}个挂单中的{{firstItemOnPage}}-{{lastItemOnPage}}"
6
5
  }