@oanda/labs-currency-strength-widget 1.0.91 → 1.0.92

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.
Files changed (85) hide show
  1. package/CHANGELOG.md +372 -0
  2. package/dist/main/CurrencyStrengthWidget/ChartsWithData.js +6 -6
  3. package/dist/main/CurrencyStrengthWidget/ChartsWithData.js.map +1 -1
  4. package/dist/main/CurrencyStrengthWidget/CurrencyStrengthWidget.js +6 -6
  5. package/dist/main/CurrencyStrengthWidget/CurrencyStrengthWidget.js.map +1 -1
  6. package/dist/main/CurrencyStrengthWidget/Main.js +2 -2
  7. package/dist/main/CurrencyStrengthWidget/Main.js.map +1 -1
  8. package/dist/main/CurrencyStrengthWidget/components/Chart/Chart.js +14 -14
  9. package/dist/main/CurrencyStrengthWidget/components/Chart/Chart.js.map +1 -1
  10. package/dist/main/CurrencyStrengthWidget/components/Chart/constants.js.map +1 -1
  11. package/dist/main/CurrencyStrengthWidget/components/Chart/formatters.js.map +1 -1
  12. package/dist/main/CurrencyStrengthWidget/components/Chart/getOption.js.map +1 -1
  13. package/dist/main/CurrencyStrengthWidget/components/Chart/types.js.map +1 -1
  14. package/dist/main/CurrencyStrengthWidget/render.js +5 -5
  15. package/dist/main/CurrencyStrengthWidget/render.js.map +1 -1
  16. package/dist/main/CurrencyStrengthWidget/types.js.map +1 -1
  17. package/dist/main/gql/types/fragment-masking.js.map +1 -1
  18. package/dist/main/gql/types/gql.js +1 -1
  19. package/dist/main/gql/types/gql.js.map +1 -1
  20. package/dist/main/gql/types/graphql.js +40 -40
  21. package/dist/main/gql/types/graphql.js.map +1 -1
  22. package/dist/main/gql/types/index.js.map +1 -1
  23. package/dist/main/translations/index.js +1 -1
  24. package/dist/main/translations/index.js.map +1 -1
  25. package/dist/main/translations/translations.js.map +1 -1
  26. package/dist/module/CurrencyStrengthWidget/ChartsWithData.js +6 -6
  27. package/dist/module/CurrencyStrengthWidget/ChartsWithData.js.map +1 -1
  28. package/dist/module/CurrencyStrengthWidget/CurrencyStrengthWidget.js +6 -6
  29. package/dist/module/CurrencyStrengthWidget/CurrencyStrengthWidget.js.map +1 -1
  30. package/dist/module/CurrencyStrengthWidget/Main.js +2 -2
  31. package/dist/module/CurrencyStrengthWidget/Main.js.map +1 -1
  32. package/dist/module/CurrencyStrengthWidget/components/Chart/Chart.js +12 -12
  33. package/dist/module/CurrencyStrengthWidget/components/Chart/Chart.js.map +1 -1
  34. package/dist/module/CurrencyStrengthWidget/components/Chart/constants.js.map +1 -1
  35. package/dist/module/CurrencyStrengthWidget/components/Chart/formatters.js +1 -1
  36. package/dist/module/CurrencyStrengthWidget/components/Chart/formatters.js.map +1 -1
  37. package/dist/module/CurrencyStrengthWidget/components/Chart/getOption.js +1 -1
  38. package/dist/module/CurrencyStrengthWidget/components/Chart/getOption.js.map +1 -1
  39. package/dist/module/CurrencyStrengthWidget/components/Chart/types.js.map +1 -1
  40. package/dist/module/CurrencyStrengthWidget/render.js +5 -5
  41. package/dist/module/CurrencyStrengthWidget/render.js.map +1 -1
  42. package/dist/module/CurrencyStrengthWidget/types.js.map +1 -1
  43. package/dist/module/gql/types/fragment-masking.js.map +1 -1
  44. package/dist/module/gql/types/gql.js +1 -1
  45. package/dist/module/gql/types/gql.js.map +1 -1
  46. package/dist/module/gql/types/graphql.js +40 -40
  47. package/dist/module/gql/types/graphql.js.map +1 -1
  48. package/dist/module/gql/types/index.js +2 -2
  49. package/dist/module/gql/types/index.js.map +1 -1
  50. package/dist/module/translations/index.js +1 -1
  51. package/dist/module/translations/index.js.map +1 -1
  52. package/dist/module/translations/translations.js.map +1 -1
  53. package/dist/types/CurrencyStrengthWidget/ChartsWithData.d.ts +1 -1
  54. package/dist/types/CurrencyStrengthWidget/CurrencyStrengthWidget.d.ts +1 -1
  55. package/dist/types/CurrencyStrengthWidget/Main.d.ts +1 -1
  56. package/dist/types/CurrencyStrengthWidget/components/Chart/Chart.d.ts +1 -1
  57. package/dist/types/CurrencyStrengthWidget/components/Chart/formatters.d.ts +2 -2
  58. package/dist/types/CurrencyStrengthWidget/components/Chart/getOption.d.ts +1 -1
  59. package/dist/types/CurrencyStrengthWidget/components/Chart/types.d.ts +5 -5
  60. package/dist/types/CurrencyStrengthWidget/types.d.ts +1 -1
  61. package/dist/types/gql/types/gql.d.ts +2 -2
  62. package/dist/types/gql/types/index.d.ts +2 -2
  63. package/dist/types/translations/index.d.ts +2 -2
  64. package/package.json +3 -3
  65. package/src/CurrencyStrengthWidget/ChartsWithData.tsx +47 -28
  66. package/src/CurrencyStrengthWidget/CurrencyStrengthWidget.tsx +13 -7
  67. package/src/CurrencyStrengthWidget/Main.tsx +9 -8
  68. package/src/CurrencyStrengthWidget/components/Chart/Chart.tsx +24 -15
  69. package/src/CurrencyStrengthWidget/components/Chart/constants.tsx +1 -0
  70. package/src/CurrencyStrengthWidget/components/Chart/formatters.ts +4 -7
  71. package/src/CurrencyStrengthWidget/components/Chart/getOption.ts +22 -18
  72. package/src/CurrencyStrengthWidget/components/Chart/types.ts +8 -8
  73. package/src/CurrencyStrengthWidget/render.tsx +17 -15
  74. package/src/CurrencyStrengthWidget/types.ts +1 -1
  75. package/src/gql/types/fragment-masking.ts +41 -21
  76. package/src/gql/types/gql.ts +7 -3
  77. package/src/gql/types/graphql.ts +98 -45
  78. package/src/gql/types/index.ts +2 -2
  79. package/src/translations/index.ts +4 -4
  80. package/src/translations/translations.ts +1 -3
  81. package/test/Main.test.tsx +23 -11
  82. package/test/chartOptions.test.ts +9 -7
  83. package/test/mocks/currencyStrengthMock.ts +1 -3
  84. package/test/mocks/responsesMocks.ts +2 -4
  85. package/test/sortData.test.ts +10 -12
@@ -1 +1 @@
1
- {"version":3,"file":"getOption.js","names":["_labsWidgetCommon","require","_constants","_formatters","getOption","_ref","values","currency","isDark","lang","currencies","map","item","percentages","percentage","barColors","darkBarColors","lightBarColors","gridLines","getGridLines","chartWidth","CHART_WIDTH","chartHeight","CHART_HEIGHT","xLabelsSize","yLabelSize","animation","title","left","text","textStyle","fontSize","lineHeight","fontWeight","grid","name","top","right","Y_LABEL_SIZE","bottom","X_LABEL_SIZE","graphic","tooltip","trigger","formatter","_ref2","marker","value","tooltipFormatter","axisPointer","axis","extraCssText","xAxis","type","data","axisTick","show","axisLine","splitLine","axisLabel","yAxis","position","min","Math","floor","max","ceil","interval","series","emphasis","disabled","itemStyle","opacity","color","_ref3","positive","negative","zero","exports"],"sources":["../../../../../src/CurrencyStrengthWidget/components/Chart/getOption.ts"],"sourcesContent":["import { getGridLines } from '@oanda/labs-widget-common';\nimport {\n CHART_HEIGHT,\n CHART_WIDTH,\n X_LABEL_SIZE,\n Y_LABEL_SIZE,\n darkBarColors,\n lightBarColors,\n} from './constants';\nimport { GetOptionProps } from './types';\nimport { tooltipFormatter } from './formatters';\n\nexport const getOption = ({\n values, currency, isDark, lang,\n}: GetOptionProps) => {\n const currencies = values.map((item) => item.currency);\n const percentages = values.map((item) => item.percentage);\n const barColors = isDark ? darkBarColors : lightBarColors;\n\n const gridLines = getGridLines({\n isDark,\n chartWidth: CHART_WIDTH,\n chartHeight: CHART_HEIGHT,\n xLabelsSize: -2,\n yLabelSize: -3,\n });\n\n return {\n animation: false,\n title: {\n left: 'center',\n text: `${currency} vs`,\n textStyle: {\n fontSize: 12,\n lineHeight: 20,\n fontWeight: 400,\n },\n },\n grid: [\n {\n name: 'main-grid',\n top: '30px',\n right: '0px',\n left: `${Y_LABEL_SIZE}px`,\n bottom: `${X_LABEL_SIZE}px`,\n },\n ],\n graphic: [\n ...gridLines,\n ],\n tooltip: {\n trigger: 'axis',\n formatter: (\n [{ marker, name, value }]\n : { marker: string, name: string, value: number }[],\n ) => tooltipFormatter({\n lang,\n currency,\n marker,\n name,\n value,\n }),\n axisPointer: {\n axis: 'x',\n },\n extraCssText: 'z-index: 1',\n },\n xAxis: {\n type: 'category',\n data: currencies,\n axisTick: { show: false },\n axisLine: { show: false },\n splitLine: { show: false },\n axisLabel: {\n fontSize: 10,\n },\n },\n yAxis: {\n type: 'value',\n position: 'left',\n min: Math.floor(Math.min(...percentages)),\n max: Math.ceil(Math.max(...percentages)),\n interval: 1,\n axisLine: { show: false },\n axisTick: { show: false },\n axisLabel: {\n formatter: '{value}%',\n fontSize: 10,\n },\n },\n series: [\n {\n data: percentages,\n type: 'bar',\n emphasis: {\n disabled: true,\n },\n itemStyle: {\n opacity: 1,\n color: ({ data } : { data: number }) => {\n if (data > 0) {\n return barColors.positive;\n }\n if (data < 0) {\n return barColors.negative;\n }\n return barColors.zero;\n },\n },\n },\n ],\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AASA,IAAAE,WAAA,GAAAF,OAAA;AAEO,MAAMG,SAAS,GAAGC,IAAA,IAEH;EAAA,IAFI;IACxBC,MAAM;IAAEC,QAAQ;IAAEC,MAAM;IAAEC;EACZ,CAAC,GAAAJ,IAAA;EACf,MAAMK,UAAU,GAAGJ,MAAM,CAACK,GAAG,CAAEC,IAAI,IAAKA,IAAI,CAACL,QAAQ,CAAC;EACtD,MAAMM,WAAW,GAAGP,MAAM,CAACK,GAAG,CAAEC,IAAI,IAAKA,IAAI,CAACE,UAAU,CAAC;EACzD,MAAMC,SAAS,GAAGP,MAAM,GAAGQ,wBAAa,GAAGC,yBAAc;EAEzD,MAAMC,SAAS,GAAG,IAAAC,8BAAY,EAAC;IAC7BX,MAAM;IACNY,UAAU,EAAEC,sBAAW;IACvBC,WAAW,EAAEC,uBAAY;IACzBC,WAAW,EAAE,CAAC,CAAC;IACfC,UAAU,EAAE,CAAC;EACf,CAAC,CAAC;EAEF,OAAO;IACLC,SAAS,EAAE,KAAK;IAChBC,KAAK,EAAE;MACLC,IAAI,EAAE,QAAQ;MACdC,IAAI,EAAE,GAAGtB,QAAQ,KAAK;MACtBuB,SAAS,EAAE;QACTC,QAAQ,EAAE,EAAE;QACZC,UAAU,EAAE,EAAE;QACdC,UAAU,EAAE;MACd;I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AI,EAAE;MAAM,CAAC;MACzBG,SAAS,EAAE;QACTf,SAAS,EAAE,UAAU;QACrBb,QAAQ,EAAE;MACZ;IACF,CAAC;IACDqC,MAAM,EAAE,CACN;MACEd,IAAI,EAAEzC,WAAW;MACjBwC,IAAI,EAAE,KAAK;MACXgB,QAAQ,EAAE;QACRC,QAAQ,EAAE;MACZ,CAAC;MACDC,SAAS,EAAE;QACTC,OAAO,EAAE,CAAC;QACVC,KAAK,EAAEC,KAAA,IAAiC;UAAA,IAAhC;YAAEpB;UAAwB,CAAC,GAAAoB,KAAA;UACjC,IAAIpB,IAAI,GAAG,CAAC,EAAE;YACZ,OAAOvC,SAAS,CAAC4D,QAAQ;UAC3B;UACA,IAAIrB,IAAI,GAAG,CAAC,EAAE;YACZ,OAAOvC,SAAS,CAAC6D,QAAQ;UAC3B;UACA,OAAO7D,SAAS,CAAC8D,IAAI;QACvB;MACF;IACF,CAAC;EAEL,CAAC;AACH,CAAC;AAACC,OAAA,CAAA1E,SAAA,GAAAA,SAAA","ignoreList":[]}
1
+ {"version":3,"file":"getOption.js","names":["_labsWidgetCommon","require","_constants","_formatters","getOption","_ref","values","currency","isDark","lang","currencies","map","item","percentages","percentage","barColors","darkBarColors","lightBarColors","gridLines","getGridLines","chartWidth","CHART_WIDTH","chartHeight","CHART_HEIGHT","xLabelsSize","yLabelSize","animation","title","left","text","textStyle","fontSize","lineHeight","fontWeight","grid","name","top","right","Y_LABEL_SIZE","bottom","X_LABEL_SIZE","graphic","tooltip","trigger","formatter","_ref2","marker","value","tooltipFormatter","axisPointer","axis","extraCssText","xAxis","type","data","axisTick","show","axisLine","splitLine","axisLabel","yAxis","position","min","Math","floor","max","ceil","interval","series","emphasis","disabled","itemStyle","opacity","color","_ref3","positive","negative","zero","exports"],"sources":["../../../../../src/CurrencyStrengthWidget/components/Chart/getOption.ts"],"sourcesContent":["import { getGridLines } from '@oanda/labs-widget-common';\n\nimport {\n CHART_HEIGHT,\n CHART_WIDTH,\n darkBarColors,\n lightBarColors,\n X_LABEL_SIZE,\n Y_LABEL_SIZE,\n} from './constants';\nimport { tooltipFormatter } from './formatters';\nimport type { GetOptionProps } from './types';\n\nexport const getOption = ({\n values,\n currency,\n isDark,\n lang,\n}: GetOptionProps) => {\n const currencies = values.map((item) => item.currency);\n const percentages = values.map((item) => item.percentage);\n const barColors = isDark ? darkBarColors : lightBarColors;\n\n const gridLines = getGridLines({\n isDark,\n chartWidth: CHART_WIDTH,\n chartHeight: CHART_HEIGHT,\n xLabelsSize: -2,\n yLabelSize: -3,\n });\n\n return {\n animation: false,\n title: {\n left: 'center',\n text: `${currency} vs`,\n textStyle: {\n fontSize: 12,\n lineHeight: 20,\n fontWeight: 400,\n },\n },\n grid: [\n {\n name: 'main-grid',\n top: '30px',\n right: '0px',\n left: `${Y_LABEL_SIZE}px`,\n bottom: `${X_LABEL_SIZE}px`,\n },\n ],\n graphic: [...gridLines],\n tooltip: {\n trigger: 'axis',\n formatter: ([{ marker, name, value }]: {\n marker: string;\n name: string;\n value: number;\n }[]) =>\n tooltipFormatter({\n lang,\n currency,\n marker,\n name,\n value,\n }),\n axisPointer: {\n axis: 'x',\n },\n extraCssText: 'z-index: 1',\n },\n xAxis: {\n type: 'category',\n data: currencies,\n axisTick: { show: false },\n axisLine: { show: false },\n splitLine: { show: false },\n axisLabel: {\n fontSize: 10,\n },\n },\n yAxis: {\n type: 'value',\n position: 'left',\n min: Math.floor(Math.min(...percentages)),\n max: Math.ceil(Math.max(...percentages)),\n interval: 1,\n axisLine: { show: false },\n axisTick: { show: false },\n axisLabel: {\n formatter: '{value}%',\n fontSize: 10,\n },\n },\n series: [\n {\n data: percentages,\n type: 'bar',\n emphasis: {\n disabled: true,\n },\n itemStyle: {\n opacity: 1,\n color: ({ data }: { data: number }) => {\n if (data > 0) {\n return barColors.positive;\n }\n if (data < 0) {\n return barColors.negative;\n }\n return barColors.zero;\n },\n },\n },\n ],\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,G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AE;YACZ,OAAOvC,SAAS,CAAC4D,QAAQ;UAC3B;UACA,IAAIrB,IAAI,GAAG,CAAC,EAAE;YACZ,OAAOvC,SAAS,CAAC6D,QAAQ;UAC3B;UACA,OAAO7D,SAAS,CAAC8D,IAAI;QACvB;MACF;IACF,CAAC;EAEL,CAAC;AACH,CAAC;AAACC,OAAA,CAAA1E,SAAA,GAAAA,SAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../../../src/CurrencyStrengthWidget/components/Chart/types.ts"],"sourcesContent":["import { CurrencyName } from '../../../gql/types/graphql';\n\nexport interface CSChartDataValues {\n currency: CurrencyName;\n percentage: number;\n}\nexport interface ChartProps {\n values: CSChartDataValues[];\n currency: CurrencyName;\n}\n\nexport interface TooltipFormatterParams {\n marker: string;\n name: string;\n value: number;\n currency: CurrencyName;\n lang: (label: string) => string;\n}\n\nexport type GetOptionProps = {\n values: CSChartDataValues[],\n currency: CurrencyName,\n lang: (label: string) => string,\n isDark: boolean;\n};\n\nexport type SortingParams = {\n currency: CurrencyName;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../../src/CurrencyStrengthWidget/components/Chart/types.ts"],"sourcesContent":["import type { CurrencyName } from '../../../gql/types/graphql';\n\nexport interface CSChartDataValues {\n currency: CurrencyName;\n percentage: number;\n}\nexport interface ChartProps {\n values: CSChartDataValues[];\n currency: CurrencyName;\n}\n\nexport interface TooltipFormatterParams {\n marker: string;\n name: string;\n value: number;\n currency: CurrencyName;\n lang: (label: string) => string;\n}\n\nexport interface GetOptionProps {\n values: CSChartDataValues[];\n currency: CurrencyName;\n lang: (label: string) => string;\n isDark: boolean;\n}\n\nexport interface SortingParams {\n currency: CurrencyName;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
+ var _labsWidgetCommon = require("@oanda/labs-widget-common");
3
4
  var _react = _interopRequireDefault(require("react"));
4
5
  var _client = require("react-dom/client");
5
- var _labsWidgetCommon = require("@oanda/labs-widget-common");
6
6
  var _CurrencyStrengthWidget = require("./CurrencyStrengthWidget");
7
7
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
8
8
  const {
@@ -28,12 +28,12 @@ currencyStrengthParamsElements.forEach(element => {
28
28
  name: 'graphqlUrl'
29
29
  }]);
30
30
  root.render(_react.default.createElement(_CurrencyStrengthWidget.CurrencyStrengthWidget, {
31
+ currency: currency,
31
32
  graphqlUrl: graphqlUrl,
32
- locale: locale,
33
- theme: mode,
34
33
  isParamError: isParamError,
35
- currency: currency,
36
- logoLink: logoLink
34
+ locale: locale,
35
+ logoLink: logoLink,
36
+ theme: mode
37
37
  }));
38
38
  });
39
39
  //# sourceMappingURL=render.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"render.js","names":["_react","_interopRequireDefault","require","_client","_labsWidgetCommon","_CurrencyStrengthWidget","e","__esModule","default","graphqlUrl","window","widgetsConfig","currencyStrengthParamsElements","document","querySelectorAll","forEach","element","root","createRoot","params","getAttribute","mode","currency","locale","logoLink","JSON","parse","isParamError","validateToolParams","name","valueCheck","value","validateLocale","render","createElement","CurrencyStrengthWidget","theme"],"sources":["../../../src/CurrencyStrengthWidget/render.tsx"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { Theme, validateLocale, validateToolParams } from '@oanda/labs-widget-common';\nimport { CurrencyStrengthWidget } from './CurrencyStrengthWidget';\n\nconst {\n graphqlUrl,\n} = window.widgetsConfig || {};\n\nconst currencyStrengthParamsElements = document.querySelectorAll('div[data-currency-strength-params]');\n\ncurrencyStrengthParamsElements.forEach((element) => {\n const root = createRoot(element);\n const params = element.getAttribute('data-currency-strength-params');\n const mode = element.getAttribute('data-mode');\n const {\n currency, locale, logoLink,\n } = JSON.parse(params as string);\n\n const isParamError = validateToolParams({ locale, graphqlUrl }, [\n {\n name: 'locale',\n valueCheck: (value) => validateLocale(value),\n }, {\n name: 'graphqlUrl',\n }]);\n\n root.render(\n <CurrencyStrengthWidget\n graphqlUrl={graphqlUrl}\n locale={locale}\n theme={mode as Theme}\n isParamError={isParamError}\n currency={currency}\n logoLink={logoLink}\n />,\n );\n});\n"],"mappings":";;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,uBAAA,GAAAH,OAAA;AAAkE,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAElE,MAAM;EACJG;AACF,CAAC,GAAGC,MAAM,CAACC,aAAa,IAAI,CAAC,CAAC;AAE9B,MAAMC,8BAA8B,GAAGC,QAAQ,CAACC,gBAAgB,CAAC,oCAAoC,CAAC;AAEtGF,8BAA8B,CAACG,OAAO,CAAEC,OAAO,IAAK;EAClD,MAAMC,IAAI,GAAG,IAAAC,kBAAU,EAACF,OAAO,CAAC;EAChC,MAAMG,MAAM,GAAGH,OAAO,CAACI,YAAY,CAAC,+BAA+B,CAAC;EACpE,MAAMC,IAAI,GAAGL,OAAO,CAACI,YAAY,CAAC,WAAW,CAAC;EAC9C,MAAM;IACJE,QAAQ;IAAEC,MAAM;IAAEC;EACpB,CAAC,GAAGC,IAAI,CAACC,KAAK,CAACP,MAAgB,CAAC;EAEhC,MAAMQ,YAAY,GAAG,IAAAC,oCAAkB,EAAC;IAAEL,MAAM;IAAEd;EAAW,CAAC,EAAE,CAC9D;IACEoB,IAAI,EAAE,QAAQ;IACdC,UAAU,EAAGC,KAAK,IAAK,IAAAC,gCAAc,EAACD,KAAK;EAC7C,CAAC,EAAE;IACDF,IAAI,EAAE;EACR,CAAC,CAAC,CAAC;EAELZ,IAAI,CAACgB,MAAM,CACTjC,MAAA,CAAAQ,OAAA,CAAA0B,aAAA,CAAC7B,uBAAA,CAAA8B,sBAAsB;IACrB1B,UAAU,EAAEA,UAAW;IACvBc,MAAM,EAAEA,MAAO;IACfa,KAAK,EAAEf,IAAc;IACrBM,YAAY,EAAEA,YAAa;IAC3BL,QAAQ,EAAEA,QAAS;IACnBE,QAAQ,EAAEA;EAAS,CACpB,CACH,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"render.js","names":["_labsWidgetCommon","require","_react","_interopRequireDefault","_client","_CurrencyStrengthWidget","e","__esModule","default","graphqlUrl","window","widgetsConfig","currencyStrengthParamsElements","document","querySelectorAll","forEach","element","root","createRoot","params","getAttribute","mode","currency","locale","logoLink","JSON","parse","isParamError","validateToolParams","name","valueCheck","value","validateLocale","render","createElement","CurrencyStrengthWidget","theme"],"sources":["../../../src/CurrencyStrengthWidget/render.tsx"],"sourcesContent":["import type { Theme } from '@oanda/labs-widget-common';\nimport { validateLocale, validateToolParams } from '@oanda/labs-widget-common';\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\n\nimport { CurrencyStrengthWidget } from './CurrencyStrengthWidget';\n\nconst { graphqlUrl } = window.widgetsConfig || {};\n\nconst currencyStrengthParamsElements = document.querySelectorAll(\n 'div[data-currency-strength-params]'\n);\n\ncurrencyStrengthParamsElements.forEach((element) => {\n const root = createRoot(element);\n const params = element.getAttribute('data-currency-strength-params');\n const mode = element.getAttribute('data-mode');\n const { currency, locale, logoLink } = JSON.parse(params as string);\n\n const isParamError = validateToolParams({ locale, graphqlUrl }, [\n {\n name: 'locale',\n valueCheck: (value: string | undefined) => validateLocale(value),\n },\n {\n name: 'graphqlUrl',\n },\n ]);\n\n root.render(\n <CurrencyStrengthWidget\n currency={currency}\n graphqlUrl={graphqlUrl}\n isParamError={isParamError}\n locale={locale}\n logoLink={logoLink}\n theme={mode as Theme}\n />\n );\n});\n"],"mappings":";;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OA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encyStrengthWidget/types.ts"],"sourcesContent":["import { Theme, WidgetConfig } from '@oanda/labs-widget-common';\n\nexport interface CurrencyStrengthConfig extends WidgetConfig {\n currency?: string;\n}\n\nexport interface CurrencyStrengthWrapperConfig extends CurrencyStrengthConfig {\n renderElementId: string;\n}\n\nexport interface WidgetProps {\n currency?: string;\n theme?: Theme;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/CurrencyStrengthWidget/types.ts"],"sourcesContent":["import type { Theme, WidgetConfig } from '@oanda/labs-widget-common';\n\nexport interface CurrencyStrengthConfig extends WidgetConfig {\n currency?: string;\n}\n\nexport interface CurrencyStrengthWrapperConfig extends CurrencyStrengthConfig {\n renderElementId: string;\n}\n\nexport interface WidgetProps {\n currency?: string;\n theme?: Theme;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"fragment-masking.js","names":["useFragment","_documentNode","fragmentType","makeFragmentData","data","_fragment","isFragmentReady","queryNode","fragmentNode","deferredFields","__meta__","fragDef","definitions","fragName","name","value","fields","length","every","field"],"sources":["../../../../src/gql/types/fragment-masking.ts"],"sourcesContent":["import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';\nimport { FragmentDefinitionNode } from 'graphql';\nimport { Incremental } from './graphql';\n\n\nexport type FragmentType<TDocumentType extends DocumentTypeDecoration<any, any>> = TDocumentType extends DocumentTypeDecoration<\n infer TType,\n any\n>\n ? [TType] extends [{ ' $fragmentName'?: infer TKey }]\n ? TKey extends string\n ? { ' $fragmentRefs'?: { [key in TKey]: TType } }\n : never\n : never\n : never;\n\n// return non-nullable if `fragmentType` is non-nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>\n): TType;\n// return nullable if `fragmentType` is nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null | undefined\n): TType | null | undefined;\n// return array of non-nullable if `fragmentType` is array of non-nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>\n): ReadonlyArray<TType>;\n// return array of nullable if `fragmentType` is array of nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined\n): ReadonlyArray<TType> | null | undefined;\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined\n): TType | ReadonlyArray<TType> | null | undefined {\n return fragmentType as any;\n}\n\n\nexport function makeFragmentData<\n F extends DocumentTypeDecoration<any, any>,\n FT extends ResultOf<F>\n>(data: FT, _fragment: F): FragmentType<F> {\n return data as FragmentType<F>;\n}\nexport function isFragmentReady<TQuery, TFrag>(\n queryNode: DocumentTypeDecoration<TQuery, any>,\n fragmentNode: TypedDocumentNode<TFrag>,\n data: FragmentType<TypedDocumentNode<Incremental<TFrag>, any>> | null | undefined\n): data is FragmentType<typeof fragmentNode> {\n const deferredFields = (queryNode as { __meta__?: { deferredFields: Record<string, (keyof TFrag)[]> } }).__meta__\n ?.deferredFields;\n\n if (!deferredFields) return true;\n\n const fragDef = fragmentNode.definitions[0] as FragmentDefinitionNode | undefined;\n const fragName = fragDef?.name?.value;\n\n const fields = (fragName && deferredFields[fragName]) || [];\n return fields.length > 0 && fields.every(field => data && field in data);\n}\n"],"mappings":";;;;;;;;AAoCO,SAASA,WAAWA,CACzBC,aAAiD,EACjDC,YAAmJ,EAClG;EACjD,OAAOA,YAAY;AACrB;AAGO,SAASC,gBAAgBA,CAG9BC,IAAQ,EAAEC,SAAY,EAAmB;EACzC,OAAOD,IAAI;AACb;AACO,SAASE,eAAeA,CAC7BC,SAA8C,EAC9CC,YAAsC,EACtCJ,IAAiF,EACtC;EAC3C,MAAMK,cAAc,GAAIF,SAAS,CAAwEG,QAAQ,EAC7GD,cAAc;EAElB,IAAI,CAACA,cAAc,EAAE,OAAO,IAAI;EAEhC,MAAME,OAAO,GAAGH,YAAY,CAACI,WAAW,CAAC,CAAC,CAAuC;EACjF,MAAMC,QAAQ,GAAGF,OAAO,EAAEG,IAAI,EAAEC,KAAK;EAErC,MAAMC,MAAM,GAAIH,QAAQ,IAAIJ,cAAc,CAACI,QAAQ,CAAC,IAAK,EAAE;EAC3D,OAAOG,MAAM,CAACC,MAAM,GAAG,CAAC,IAAID,MAAM,CAACE,KAAK,CAACC,KAAK,IAAIf,IAAI,IAAIe,KAAK,IAAIf,IAAI,CAAC;AAC1E","ignoreList":[]}
1
+ {"version":3,"file":"fragment-masking.js","names":["useFragment","_documentNode","fragmentType","makeFragmentData","data","_fragment","isFragmentReady","queryNode","fragmentNode","deferredFields","__meta__","fragDef","definitions","fragName","name","value","fields","length","every","field"],"sources":["../../../../src/gql/types/fragment-masking.ts"],"sourcesContent":["import {\n ResultOf,\n DocumentTypeDecoration,\n TypedDocumentNode,\n} from '@graphql-typed-document-node/core';\nimport { FragmentDefinitionNode } from 'graphql';\nimport { Incremental } from './graphql';\n\nexport type FragmentType<\n TDocumentType extends DocumentTypeDecoration<any, any>,\n> =\n TDocumentType extends DocumentTypeDecoration<infer TType, any>\n ? [TType] extends [{ ' $fragmentName'?: infer TKey }]\n ? TKey extends string\n ? { ' $fragmentRefs'?: { [key in TKey]: TType } }\n : never\n : never\n : never;\n\n// return non-nullable if `fragmentType` is non-nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>\n): TType;\n// return nullable if `fragmentType` is nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType:\n | FragmentType<DocumentTypeDecoration<TType, any>>\n | null\n | undefined\n): TType | null | undefined;\n// return array of non-nullable if `fragmentType` is array of non-nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>\n): ReadonlyArray<TType>;\n// return array of nullable if `fragmentType` is array of nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType:\n | ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>\n | null\n | undefined\n): ReadonlyArray<TType> | null | undefined;\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType:\n | FragmentType<DocumentTypeDecoration<TType, any>>\n | ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>\n | null\n | undefined\n): TType | ReadonlyArray<TType> | null | undefined {\n return fragmentType as any;\n}\n\nexport function makeFragmentData<\n F extends DocumentTypeDecoration<any, any>,\n FT extends ResultOf<F>,\n>(data: FT, _fragment: F): FragmentType<F> {\n return data as FragmentType<F>;\n}\nexport function isFragmentReady<TQuery, TFrag>(\n queryNode: DocumentTypeDecoration<TQuery, any>,\n fragmentNode: TypedDocumentNode<TFrag>,\n data:\n | FragmentType<TypedDocumentNode<Incremental<TFrag>, any>>\n | null\n | undefined\n): data is FragmentType<typeof fragmentNode> {\n const deferredFields = (\n queryNode as {\n __meta__?: { deferredFields: Record<string, (keyof TFrag)[]> };\n }\n ).__meta__?.deferredFields;\n\n if (!deferredFields) return true;\n\n const fragDef = fragmentNode.definitions[0] as\n | FragmentDefinitionNode\n | undefined;\n const fragName = fragDef?.name?.value;\n\n const fields = (fragName && deferredFields[fragName]) || [];\n return fields.length > 0 && fields.every((field) => data && field in data);\n}\n"],"mappings":";;;;;;;;AA6CO,SAASA,WAAWA,CACzBC,aAAiD,EACjDC,YAIa,EACoC;EACjD,OAAOA,YAAY;AACrB;AAEO,SAASC,gBAAgBA,CAG9BC,IAAQ,EAAEC,SAAY,EAAmB;EACzC,OAAOD,IAAI;AACb;AACO,SAASE,eAAeA,CAC7BC,SAA8C,EAC9CC,YAAsC,EACtCJ,IAGa,EAC8B;EAC3C,MAAMK,cAAc,GAClBF,SAAS,CAGTG,QAAQ,EAAED,cAAc;EAE1B,IAAI,CAACA,cAAc,EAAE,OAAO,IAAI;EAEhC,MAAME,OAAO,GAAGH,YAAY,CAACI,WAAW,CAAC,CAAC,CAE7B;EACb,MAAMC,QAAQ,GAAGF,OAAO,EAAEG,IAAI,EAAEC,KAAK;EAErC,MAAMC,MAAM,GAAIH,QAAQ,IAAIJ,cAAc,CAACI,QAAQ,CAAC,IAAK,EAAE;EAC3D,OAAOG,MAAM,CAACC,MAAM,GAAG,CAAC,IAAID,MAAM,CAACE,KAAK,CAAEC,KAAK,IAAKf,IAAI,IAAIe,KAAK,IAAIf,IAAI,CAAC;AAC5E","ignoreList":[]}
@@ -8,7 +8,7 @@ var types = _interopRequireWildcard(require("./graphql"));
8
8
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
9
9
  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; }
10
10
  const documents = {
11
- "\n query GetCurrencyStrength {\n currencyStrength {\n currency\n strengthRelation {\n currency\n percentage\n }\n updatedAt\n }\n }\n": types.GetCurrencyStrengthDocument
11
+ '\n query GetCurrencyStrength {\n currencyStrength {\n currency\n strengthRelation {\n currency\n percentage\n }\n updatedAt\n }\n }\n': types.GetCurrencyStrengthDocument
12
12
  };
13
13
  function graphql(source) {
14
14
  return documents[source] ?? {};
@@ -1 +1 @@
1
- {"version":3,"file":"gql.js","names":["types","_interopRequireWildcard","require","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","documents","GetCurrencyStrengthDocument","graphql","source"],"sources":["../../../../src/gql/types/gql.ts"],"sourcesContent":["/* eslint-disable */\nimport * as types from './graphql';\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n\n/**\n * Map of all GraphQL operations in the project.\n *\n * This map has several performance disadvantages:\n * 1. It is not tree-shakeable, so it will include all operations in the project.\n * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.\n * 3. It does not support dead code elimination, so it will add unused operations.\n *\n * Therefore it is highly recommended to use the babel or swc plugin for production.\n */\nconst documents = {\n \"\\n query GetCurrencyStrength {\\n currencyStrength {\\n currency\\n strengthRelation {\\n currency\\n percentage\\n }\\n updatedAt\\n }\\n }\\n\": types.GetCurrencyStrengthDocument,\n};\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n *\n *\n * @example\n * ```ts\n * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);\n * ```\n *\n * The query argument is unknown!\n * Please regenerate the types.\n */\nexport function graphql(source: string): unknown;\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\n query GetCurrencyStrength {\\n currencyStrength {\\n currency\\n strengthRelation {\\n currency\\n percentage\\n }\\n updatedAt\\n }\\n }\\n\"): (typeof documents)[\"\\n query GetCurrencyStrength {\\n currencyStrength {\\n currency\\n strengthRelation {\\n currency\\n percentage\\n }\\n updatedAt\\n }\\n }\\n\"];\n\nexport function graphql(source: string) {\n return (documents as any)[source] ?? {};\n}\n\nexport type DocumentType<TDocument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EAAEvB,KAAK,CAACwB;AAC7L,CAAC;AAqBM,SAASC,OAAOA,CAACC,MAAc,EAAE;EACtC,OAAQH,SAAS,CAASG,MAAM,CAAC,IAAI,CAAC,CAAC;AACzC","ignoreList":[]}
1
+ {"version":3,"file":"gql.js","names":["types","_interopRequireWildcard","require","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","documents","GetCurrencyStrengthDocument","graphql","source"],"sources":["../../../../src/gql/types/gql.ts"],"sourcesContent":["/* eslint-disable */\nimport * as types from './graphql';\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n\n/**\n * Map of all GraphQL operations in the project.\n *\n * This map has several performance disadvantages:\n * 1. It is not tree-shakeable, so it will include all operations in the project.\n * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.\n * 3. It does not support dead code elimination, so it will add unused operations.\n *\n * Therefore it is highly recommended to use the babel or swc plugin for production.\n */\nconst documents = {\n '\\n query GetCurrencyStrength {\\n currencyStrength {\\n currency\\n strengthRelation {\\n currency\\n percentage\\n }\\n updatedAt\\n }\\n }\\n':\n types.GetCurrencyStrengthDocument,\n};\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n *\n *\n * @example\n * ```ts\n * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);\n * ```\n *\n * The query argument is unknown!\n * Please regenerate the types.\n */\nexport function graphql(source: string): unknown;\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(\n source: '\\n query GetCurrencyStrength {\\n currencyStrength {\\n currency\\n strengthRelation {\\n currency\\n percentage\\n }\\n updatedAt\\n }\\n }\\n'\n): (typeof documents)['\\n query GetCurrencyStrength {\\n currencyStrength {\\n currency\\n strengthRelation {\\n currency\\n percentage\\n }\\n updatedAt\\n }\\n }\\n'];\n\nexport function graphql(source: string) {\n return (documents as any)[source] ?? {};\n}\n\nexport type DocumentType<TDocumentNode extends DocumentNode<any, any>> =\n TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;\n"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAmC,SAAAC,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,SAAAH,wBAAAG,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,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAanC,MAAMW,SAAS,GAAG;EAChB,iLAAiL,EAC/KvB,KAAK,CAACwB;AACV,CAAC;AAuBM,SAASC,OAAOA,CAACC,MAAc,EAAE;EACtC,OAAQH,SAAS,CAASG,MAAM,CAAC,IAAI,CAAC,CAAC;AACzC","ignoreList":[]}
@@ -118,57 +118,57 @@ let VolatilityChartTimeUnit = exports.VolatilityChartTimeUnit = function (Volati
118
118
  return VolatilityChartTimeUnit;
119
119
  }({});
120
120
  const GetCurrencyStrengthDocument = exports.GetCurrencyStrengthDocument = {
121
- "kind": "Document",
122
- "definitions": [{
123
- "kind": "OperationDefinition",
124
- "operation": "query",
125
- "name": {
126
- "kind": "Name",
127
- "value": "GetCurrencyStrength"
121
+ kind: 'Document',
122
+ definitions: [{
123
+ kind: 'OperationDefinition',
124
+ operation: 'query',
125
+ name: {
126
+ kind: 'Name',
127
+ value: 'GetCurrencyStrength'
128
128
  },
129
- "selectionSet": {
130
- "kind": "SelectionSet",
131
- "selections": [{
132
- "kind": "Field",
133
- "name": {
134
- "kind": "Name",
135
- "value": "currencyStrength"
129
+ selectionSet: {
130
+ kind: 'SelectionSet',
131
+ selections: [{
132
+ kind: 'Field',
133
+ name: {
134
+ kind: 'Name',
135
+ value: 'currencyStrength'
136
136
  },
137
- "selectionSet": {
138
- "kind": "SelectionSet",
139
- "selections": [{
140
- "kind": "Field",
141
- "name": {
142
- "kind": "Name",
143
- "value": "currency"
137
+ selectionSet: {
138
+ kind: 'SelectionSet',
139
+ selections: [{
140
+ kind: 'Field',
141
+ name: {
142
+ kind: 'Name',
143
+ value: 'currency'
144
144
  }
145
145
  }, {
146
- "kind": "Field",
147
- "name": {
148
- "kind": "Name",
149
- "value": "strengthRelation"
146
+ kind: 'Field',
147
+ name: {
148
+ kind: 'Name',
149
+ value: 'strengthRelation'
150
150
  },
151
- "selectionSet": {
152
- "kind": "SelectionSet",
153
- "selections": [{
154
- "kind": "Field",
155
- "name": {
156
- "kind": "Name",
157
- "value": "currency"
151
+ selectionSet: {
152
+ kind: 'SelectionSet',
153
+ selections: [{
154
+ kind: 'Field',
155
+ name: {
156
+ kind: 'Name',
157
+ value: 'currency'
158
158
  }
159
159
  }, {
160
- "kind": "Field",
161
- "name": {
162
- "kind": "Name",
163
- "value": "percentage"
160
+ kind: 'Field',
161
+ name: {
162
+ kind: 'Name',
163
+ value: 'percentage'
164
164
  }
165
165
  }]
166
166
  }
167
167
  }, {
168
- "kind": "Field",
169
- "name": {
170
- "kind": "Name",
171
- "value": "updatedAt"
168
+ kind: 'Field',
169
+ name: {
170
+ kind: 'Name',
171
+ value: 'updatedAt'
172
172
  }
173
173
  }]
174
174
  }
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.js","names":["AssetClassName","exports","BookType","CorrelationTimeUnit","CurrencyName","CurrencyPowerBalanceTimeUnit","DataSource","Division","Region","Sort","TopicalSort","ValueAtRiskBars","ValueAtRiskDuration","VolatilityChartTimeSpan","VolatilityChartTimeUnit","GetCurrencyStrengthDocument"],"sources":["../../../../src/gql/types/graphql.ts"],"sourcesContent":["/* eslint-disable */\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: number; }\n};\n\nexport type AssetClass = {\n __typename?: 'AssetClass';\n instruments: Array<Instrument>;\n name: Scalars['String']['output'];\n};\n\nexport enum AssetClassName {\n Commodities = 'COMMODITIES',\n Cryptocurrency = 'CRYPTOCURRENCY',\n Currency = 'CURRENCY',\n EquityShares = 'EQUITY_SHARES',\n Indices = 'INDICES',\n Rates = 'RATES'\n}\n\nexport enum BookType {\n Order = 'ORDER',\n Position = 'POSITION'\n}\n\nexport type CorrelationHeatmap = {\n __typename?: 'CorrelationHeatmap';\n baseInstrument: Instrument;\n heatmap: Array<Heatmap>;\n};\n\nexport type CorrelationMatrix = {\n __typename?: 'CorrelationMatrix';\n baseTimeUnit: CorrelationTimeUnit;\n matrix: Array<Matrix>;\n};\n\nexport enum CorrelationTimeUnit {\n H1 = 'H1',\n H4 = 'H4',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n M6 = 'M6',\n W1 = 'W1',\n Y1 = 'Y1'\n}\n\nexport enum CurrencyName {\n Aud = 'AUD',\n Cad = 'CAD',\n Chf = 'CHF',\n Eur = 'EUR',\n Gbp = 'GBP',\n Jpy = 'JPY',\n Nzd = 'NZD',\n Usd = 'USD'\n}\n\nexport type CurrencyPower = {\n __typename?: 'CurrencyPower';\n /** UTC Timestamp */\n point: Scalars['String']['output'];\n price: Scalars['Float']['output'];\n};\n\nexport type CurrencyPowerBalance = {\n __typename?: 'CurrencyPowerBalance';\n currency: CurrencyName;\n power: Array<CurrencyPower>;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum CurrencyPowerBalanceTimeUnit {\n CurrentDay = 'CURRENT_DAY',\n H4 = 'H4',\n H8 = 'H8',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n PreviousDay = 'PREVIOUS_DAY',\n W1 = 'W1'\n}\n\nexport type CurrencyStrength = {\n __typename?: 'CurrencyStrength';\n currency: CurrencyName;\n strengthRelation?: Maybe<Array<StrengthRelation>>;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum DataSource {\n Ny4 = 'NY4',\n Ty3 = 'TY3'\n}\n\nexport enum Division {\n Oap = 'OAP',\n Oau = 'OAU',\n Oc = 'OC',\n Ocan = 'OCAN',\n Oel = 'OEL',\n Ogm = 'OGM',\n Oj = 'OJ',\n Opt = 'OPT',\n Otms = 'OTMS'\n}\n\nexport type Heatmap = {\n __typename?: 'Heatmap';\n instrument: Instrument;\n timeCorrelation: Array<TimeCorrelation>;\n};\n\nexport type Instrument = {\n __typename?: 'Instrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n};\n\nexport type InstrumentCorrelation = {\n __typename?: 'InstrumentCorrelation';\n instrument: Instrument;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type Matrix = {\n __typename?: 'Matrix';\n instrument: Instrument;\n instrumentCorrelation: Array<InstrumentCorrelation>;\n};\n\nexport type OrderPositionBucket = {\n __typename?: 'OrderPositionBucket';\n longCountPercent: Scalars['Float']['output'];\n price: Scalars['Float']['output'];\n shortCountPercent: Scalars['Float']['output'];\n};\n\nexport type OrderPositionData = {\n __typename?: 'OrderPositionData';\n bucketWidth: Scalars['Float']['output'];\n buckets: Array<Maybe<OrderPositionBucket>>;\n dataSource?: Maybe<Scalars['String']['output']>;\n instrument: Scalars['String']['output'];\n price?: Maybe<Scalars['Float']['output']>;\n region?: Maybe<Scalars['String']['output']>;\n time: Scalars['String']['output'];\n unixTime: Scalars['Int']['output'];\n};\n\nexport type Query = {\n __typename?: 'Query';\n assetClasses?: Maybe<Array<Maybe<AssetClass>>>;\n correlationHeatmap: CorrelationHeatmap;\n correlationMatrix: CorrelationMatrix;\n currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;\n currencyStrength?: Maybe<Array<CurrencyStrength>>;\n mapInstrumentNames?: Maybe<Array<Maybe<Instrument>>>;\n orderPositionBooks: Array<Maybe<OrderPositionData>>;\n sentiment?: Maybe<Array<SentimentInstrument>>;\n sentimentList?: Maybe<Array<SentimentInstrument>>;\n topicalInstruments?: Maybe<Array<TopicalInstrument>>;\n topicalInstrumentsCharts?: Maybe<Array<TopicalInstrumentChart>>;\n topicalInstrumentsTotalCount: Scalars['Int']['output'];\n valueAtRiskAssetClasses?: Maybe<Array<AssetClass>>;\n valueAtRiskChart?: Maybe<ValueAtRiskChart>;\n volatilityChart?: Maybe<Array<Maybe<VolatilityChart>>>;\n volatilityChartAssetClasses?: Maybe<Array<AssetClass>>;\n};\n\n\nexport type QueryAssetClassesArgs = {\n division: Division;\n};\n\n\nexport type QueryCorrelationHeatmapArgs = {\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n timeSpans?: InputMaybe<Array<InputMaybe<CorrelationTimeUnit>>>;\n};\n\n\nexport type QueryCorrelationMatrixArgs = {\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n};\n\n\nexport type QueryCurrencyPowerBalanceArgs = {\n timeUnit: CurrencyPowerBalanceTimeUnit;\n};\n\n\nexport type QueryMapInstrumentNamesArgs = {\n division?: InputMaybe<Division>;\n instruments: Array<InputMaybe<Scalars['String']['input']>>;\n};\n\n\nexport type QueryOrderPositionBooksArgs = {\n bookType: BookType;\n dataSource?: InputMaybe<DataSource>;\n instrument: Scalars['String']['input'];\n recentHours?: InputMaybe<Scalars['Int']['input']>;\n region?: InputMaybe<Region>;\n};\n\n\nexport type QuerySentimentArgs = {\n division?: InputMaybe<Division>;\n name: Scalars['String']['input'];\n};\n\n\nexport type QuerySentimentListArgs = {\n division?: InputMaybe<Division>;\n sort?: InputMaybe<Sort>;\n};\n\n\nexport type QueryTopicalInstrumentsArgs = {\n assetClass?: InputMaybe<AssetClassName>;\n count?: InputMaybe<Scalars['Int']['input']>;\n division?: InputMaybe<Division>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n sort: TopicalSort;\n};\n\n\nexport type QueryTopicalInstrumentsChartsArgs = {\n division?: InputMaybe<Division>;\n instruments?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\n\nexport type QueryTopicalInstrumentsTotalCountArgs = {\n assetClass?: InputMaybe<AssetClassName>;\n division?: InputMaybe<Division>;\n sort: TopicalSort;\n};\n\n\nexport type QueryValueAtRiskAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\n\nexport type QueryValueAtRiskChartArgs = {\n bars: ValueAtRiskBars;\n division?: InputMaybe<Division>;\n duration: ValueAtRiskDuration;\n instrument: Scalars['String']['input'];\n};\n\n\nexport type QueryVolatilityChartArgs = {\n division?: InputMaybe<Division>;\n instrument: Scalars['String']['input'];\n timeSpan: VolatilityChartTimeSpan;\n timeUnit: VolatilityChartTimeUnit;\n};\n\n\nexport type QueryVolatilityChartAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\nexport enum Region {\n Amer = 'AMER',\n Apac = 'APAC',\n Emea = 'EMEA'\n}\n\nexport type Sentiment = {\n __typename?: 'Sentiment';\n longPercent: Scalars['Float']['output'];\n shortPercent: Scalars['Float']['output'];\n};\n\nexport type SentimentInstrument = {\n __typename?: 'SentimentInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum Sort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH'\n}\n\nexport type StrengthRelation = {\n __typename?: 'StrengthRelation';\n currency: CurrencyName;\n percentage: Scalars['Float']['output'];\n};\n\nexport type TimeCorrelation = {\n __typename?: 'TimeCorrelation';\n timeUnit: CorrelationTimeUnit;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type TopicalInstrument = {\n __typename?: 'TopicalInstrument';\n assetClass?: Maybe<AssetClassName>;\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport type TopicalInstrumentChart = {\n __typename?: 'TopicalInstrumentChart';\n chart?: Maybe<Array<Scalars['Float']['output']>>;\n name: Scalars['String']['output'];\n};\n\nexport enum TopicalSort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH',\n Hot = 'HOT',\n Popular = 'POPULAR',\n Volatile = 'VOLATILE'\n}\n\nexport enum ValueAtRiskBars {\n C100 = 'C100',\n C200 = 'C200',\n C300 = 'C300'\n}\n\nexport type ValueAtRiskChart = {\n __typename?: 'ValueAtRiskChart';\n down: ValueAtRiskChartData;\n up: ValueAtRiskChartData;\n};\n\nexport type ValueAtRiskChartData = {\n __typename?: 'ValueAtRiskChartData';\n average: Scalars['Float']['output'];\n max: Scalars['Float']['output'];\n median: Scalars['Float']['output'];\n points?: Maybe<Array<ValueAtRiskChartPoint>>;\n threshold: Scalars['Float']['output'];\n};\n\nexport type ValueAtRiskChartPoint = {\n __typename?: 'ValueAtRiskChartPoint';\n percent: Scalars['Float']['output'];\n pips: Scalars['Float']['output'];\n};\n\nexport enum ValueAtRiskDuration {\n C1 = 'C1',\n C2 = 'C2',\n C3 = 'C3',\n C4 = 'C4',\n C5 = 'C5',\n C10 = 'C10'\n}\n\nexport type VolatilityChart = {\n __typename?: 'VolatilityChart';\n pips: Scalars['Float']['output'];\n /** Time point - hour in format hh:mm, Date in UTC, Week in format 'Mo' */\n point: Scalars['String']['output'];\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum VolatilityChartTimeSpan {\n /** Valid for: H */\n D5 = 'D5',\n /** Valid for: H */\n D10 = 'D10',\n /** Valid for: D */\n M1 = 'M1',\n /** Valid for: D */\n M3 = 'M3',\n /** Valid for: W */\n W5 = 'W5',\n /** Valid for: W */\n W10 = 'W10'\n}\n\nexport enum VolatilityChartTimeUnit {\n D = 'D',\n H = 'H',\n W = 'W'\n}\n\nexport type GetCurrencyStrengthQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type GetCurrencyStrengthQuery = { __typename?: 'Query', currencyStrength?: Array<{ __typename?: 'CurrencyStrength', currency: CurrencyName, updatedAt: string, strengthRelation?: Array<{ __typename?: 'StrengthRelation', currency: CurrencyName, percentage: number }> | null }> | null };\n\n\nexport const GetCurrencyStrengthDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"GetCurrencyStrength\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"currencyStrength\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"currency\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"strengthRelation\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"currency\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"percentage\"}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"updatedAt\"}}]}}]}}]} as unknown as DocumentNode<GetCurrencyStrengthQuery, GetCurrencyStrengthQueryVariables>;"],"mappings":";;;;;;IAwBYA,cAAc,GAAAC,OAAA,CAAAD,cAAA,aAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAAA,IASdE,QAAQ,GAAAD,OAAA,CAAAC,QAAA,aAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAAA,IAiBRC,mBAAmB,GAAAF,OAAA,CAAAE,mBAAA,aAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAAA,IAWnBC,YAAY,GAAAH,OAAA,CAAAG,YAAA,aAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,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M,EAAC;kBAAC,MAAM,EAAC,MAAM;kBAAC,OAAO,EAAC;gBAAU;cAAC,CAAC,EAAC;gBAAC,MAAM,EAAC,OAAO;gBAAC,MAAM,EAAC;kBAAC,MAAM,EAAC,MAAM;kBAAC,OAAO,EAAC;gBAAY;cAAC,CAAC;YAAC;UAAC,CAAC,EAAC;YAAC,MAAM,EAAC,OAAO;YAAC,MAAM,EAAC;cAAC,MAAM,EAAC,MAAM;cAAC,OAAO,EAAC;YAAW;UAAC,CAAC;QAAC;MAAC,CAAC;IAAC;EAAC,CAAC;AAAC,CAAyF","ignoreList":[]}
1
+ {"version":3,"file":"graphql.js","names":["AssetClassName","exports","BookType","CorrelationTimeUnit","CurrencyName","CurrencyPowerBalanceTimeUnit","DataSource","Division","Region","Sort","TopicalSort","ValueAtRiskBars","ValueAtRiskDuration","VolatilityChartTimeSpan","VolatilityChartTimeUnit","GetCurrencyStrengthDocument","kind","definitions","operation","name","value","selectionSet","selections"],"sources":["../../../../src/gql/types/graphql.ts"],"sourcesContent":["/* eslint-disable */\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = {\n [K in keyof T]: T[K];\n};\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & {\n [SubKey in K]?: Maybe<T[SubKey]>;\n};\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {\n [SubKey in K]: Maybe<T[SubKey]>;\n};\nexport type MakeEmpty<\n T extends { [key: string]: unknown },\n K extends keyof T,\n> = { [_ in K]?: never };\nexport type Incremental<T> =\n | T\n | {\n [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;\n };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string };\n String: { input: string; output: string };\n Boolean: { input: boolean; output: boolean };\n Int: { input: number; output: number };\n Float: { input: number; output: number };\n};\n\nexport type AssetClass = {\n __typename?: 'AssetClass';\n instruments: Array<Instrument>;\n name: Scalars['String']['output'];\n};\n\nexport enum AssetClassName {\n Commodities = 'COMMODITIES',\n Cryptocurrency = 'CRYPTOCURRENCY',\n Currency = 'CURRENCY',\n EquityShares = 'EQUITY_SHARES',\n Indices = 'INDICES',\n Rates = 'RATES',\n}\n\nexport enum BookType {\n Order = 'ORDER',\n Position = 'POSITION',\n}\n\nexport type CorrelationHeatmap = {\n __typename?: 'CorrelationHeatmap';\n baseInstrument: Instrument;\n heatmap: Array<Heatmap>;\n};\n\nexport type CorrelationMatrix = {\n __typename?: 'CorrelationMatrix';\n baseTimeUnit: CorrelationTimeUnit;\n matrix: Array<Matrix>;\n};\n\nexport enum CorrelationTimeUnit {\n H1 = 'H1',\n H4 = 'H4',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n M6 = 'M6',\n W1 = 'W1',\n Y1 = 'Y1',\n}\n\nexport enum CurrencyName {\n Aud = 'AUD',\n Cad = 'CAD',\n Chf = 'CHF',\n Eur = 'EUR',\n Gbp = 'GBP',\n Jpy = 'JPY',\n Nzd = 'NZD',\n Usd = 'USD',\n}\n\nexport type CurrencyPower = {\n __typename?: 'CurrencyPower';\n /** UTC Timestamp */\n point: Scalars['String']['output'];\n price: Scalars['Float']['output'];\n};\n\nexport type CurrencyPowerBalance = {\n __typename?: 'CurrencyPowerBalance';\n currency: CurrencyName;\n power: Array<CurrencyPower>;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum CurrencyPowerBalanceTimeUnit {\n CurrentDay = 'CURRENT_DAY',\n H4 = 'H4',\n H8 = 'H8',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n PreviousDay = 'PREVIOUS_DAY',\n W1 = 'W1',\n}\n\nexport type CurrencyStrength = {\n __typename?: 'CurrencyStrength';\n currency: CurrencyName;\n strengthRelation?: Maybe<Array<StrengthRelation>>;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum DataSource {\n Ny4 = 'NY4',\n Ty3 = 'TY3',\n}\n\nexport enum Division {\n Oap = 'OAP',\n Oau = 'OAU',\n Oc = 'OC',\n Ocan = 'OCAN',\n Oel = 'OEL',\n Ogm = 'OGM',\n Oj = 'OJ',\n Opt = 'OPT',\n Otms = 'OTMS',\n}\n\nexport type Heatmap = {\n __typename?: 'Heatmap';\n instrument: Instrument;\n timeCorrelation: Array<TimeCorrelation>;\n};\n\nexport type Instrument = {\n __typename?: 'Instrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n};\n\nexport type InstrumentCorrelation = {\n __typename?: 'InstrumentCorrelation';\n instrument: Instrument;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type Matrix = {\n __typename?: 'Matrix';\n instrument: Instrument;\n instrumentCorrelation: Array<InstrumentCorrelation>;\n};\n\nexport type OrderPositionBucket = {\n __typename?: 'OrderPositionBucket';\n longCountPercent: Scalars['Float']['output'];\n price: Scalars['Float']['output'];\n shortCountPercent: Scalars['Float']['output'];\n};\n\nexport type OrderPositionData = {\n __typename?: 'OrderPositionData';\n bucketWidth: Scalars['Float']['output'];\n buckets: Array<Maybe<OrderPositionBucket>>;\n dataSource?: Maybe<Scalars['String']['output']>;\n instrument: Scalars['String']['output'];\n price?: Maybe<Scalars['Float']['output']>;\n region?: Maybe<Scalars['String']['output']>;\n time: Scalars['String']['output'];\n unixTime: Scalars['Int']['output'];\n};\n\nexport type Query = {\n __typename?: 'Query';\n assetClasses?: Maybe<Array<Maybe<AssetClass>>>;\n correlationHeatmap: CorrelationHeatmap;\n correlationMatrix: CorrelationMatrix;\n currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;\n currencyStrength?: Maybe<Array<CurrencyStrength>>;\n mapInstrumentNames?: Maybe<Array<Maybe<Instrument>>>;\n orderPositionBooks: Array<Maybe<OrderPositionData>>;\n sentiment?: Maybe<Array<SentimentInstrument>>;\n sentimentList?: Maybe<Array<SentimentInstrument>>;\n topicalInstruments?: Maybe<Array<TopicalInstrument>>;\n topicalInstrumentsCharts?: Maybe<Array<TopicalInstrumentChart>>;\n topicalInstrumentsTotalCount: Scalars['Int']['output'];\n valueAtRiskAssetClasses?: Maybe<Array<AssetClass>>;\n valueAtRiskChart?: Maybe<ValueAtRiskChart>;\n volatilityChart?: Maybe<Array<Maybe<VolatilityChart>>>;\n volatilityChartAssetClasses?: Maybe<Array<AssetClass>>;\n};\n\nexport type QueryAssetClassesArgs = {\n division: Division;\n};\n\nexport type QueryCorrelationHeatmapArgs = {\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n timeSpans?: InputMaybe<Array<InputMaybe<CorrelationTimeUnit>>>;\n};\n\nexport type QueryCorrelationMatrixArgs = {\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n};\n\nexport type QueryCurrencyPowerBalanceArgs = {\n timeUnit: CurrencyPowerBalanceTimeUnit;\n};\n\nexport type QueryMapInstrumentNamesArgs = {\n division?: InputMaybe<Division>;\n instruments: Array<InputMaybe<Scalars['String']['input']>>;\n};\n\nexport type QueryOrderPositionBooksArgs = {\n bookType: BookType;\n dataSource?: InputMaybe<DataSource>;\n instrument: Scalars['String']['input'];\n recentHours?: InputMaybe<Scalars['Int']['input']>;\n region?: InputMaybe<Region>;\n};\n\nexport type QuerySentimentArgs = {\n division?: InputMaybe<Division>;\n name: Scalars['String']['input'];\n};\n\nexport type QuerySentimentListArgs = {\n division?: InputMaybe<Division>;\n sort?: InputMaybe<Sort>;\n};\n\nexport type QueryTopicalInstrumentsArgs = {\n assetClass?: InputMaybe<AssetClassName>;\n count?: InputMaybe<Scalars['Int']['input']>;\n division?: InputMaybe<Division>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n sort: TopicalSort;\n};\n\nexport type QueryTopicalInstrumentsChartsArgs = {\n division?: InputMaybe<Division>;\n instruments?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\nexport type QueryTopicalInstrumentsTotalCountArgs = {\n assetClass?: InputMaybe<AssetClassName>;\n division?: InputMaybe<Division>;\n sort: TopicalSort;\n};\n\nexport type QueryValueAtRiskAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\nexport type QueryValueAtRiskChartArgs = {\n bars: ValueAtRiskBars;\n division?: InputMaybe<Division>;\n duration: ValueAtRiskDuration;\n instrument: Scalars['String']['input'];\n};\n\nexport type QueryVolatilityChartArgs = {\n division?: InputMaybe<Division>;\n instrument: Scalars['String']['input'];\n timeSpan: VolatilityChartTimeSpan;\n timeUnit: VolatilityChartTimeUnit;\n};\n\nexport type QueryVolatilityChartAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\nexport enum Region {\n Amer = 'AMER',\n Apac = 'APAC',\n Emea = 'EMEA',\n}\n\nexport type Sentiment = {\n __typename?: 'Sentiment';\n longPercent: Scalars['Float']['output'];\n shortPercent: Scalars['Float']['output'];\n};\n\nexport type SentimentInstrument = {\n __typename?: 'SentimentInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum Sort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH',\n}\n\nexport type StrengthRelation = {\n __typename?: 'StrengthRelation';\n currency: CurrencyName;\n percentage: Scalars['Float']['output'];\n};\n\nexport type TimeCorrelation = {\n __typename?: 'TimeCorrelation';\n timeUnit: CorrelationTimeUnit;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type TopicalInstrument = {\n __typename?: 'TopicalInstrument';\n assetClass?: Maybe<AssetClassName>;\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport type TopicalInstrumentChart = {\n __typename?: 'TopicalInstrumentChart';\n chart?: Maybe<Array<Scalars['Float']['output']>>;\n name: Scalars['String']['output'];\n};\n\nexport enum TopicalSort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH',\n Hot = 'HOT',\n Popular = 'POPULAR',\n Volatile = 'VOLATILE',\n}\n\nexport enum ValueAtRiskBars {\n C100 = 'C100',\n C200 = 'C200',\n C300 = 'C300',\n}\n\nexport type ValueAtRiskChart = {\n __typename?: 'ValueAtRiskChart';\n down: ValueAtRiskChartData;\n up: ValueAtRiskChartData;\n};\n\nexport type ValueAtRiskChartData = {\n __typename?: 'ValueAtRiskChartData';\n average: Scalars['Float']['output'];\n max: Scalars['Float']['output'];\n median: Scalars['Float']['output'];\n points?: Maybe<Array<ValueAtRiskChartPoint>>;\n threshold: Scalars['Float']['output'];\n};\n\nexport type ValueAtRiskChartPoint = {\n __typename?: 'ValueAtRiskChartPoint';\n percent: Scalars['Float']['output'];\n pips: Scalars['Float']['output'];\n};\n\nexport enum ValueAtRiskDuration {\n C1 = 'C1',\n C2 = 'C2',\n C3 = 'C3',\n C4 = 'C4',\n C5 = 'C5',\n C10 = 'C10',\n}\n\nexport type VolatilityChart = {\n __typename?: 'VolatilityChart';\n pips: Scalars['Float']['output'];\n /** Time point - hour in format hh:mm, Date in UTC, Week in format 'Mo' */\n point: Scalars['String']['output'];\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum VolatilityChartTimeSpan {\n /** Valid for: H */\n D5 = 'D5',\n /** Valid for: H */\n D10 = 'D10',\n /** Valid for: D */\n M1 = 'M1',\n /** Valid for: D */\n M3 = 'M3',\n /** Valid for: W */\n W5 = 'W5',\n /** Valid for: W */\n W10 = 'W10',\n}\n\nexport enum VolatilityChartTimeUnit {\n D = 'D',\n H = 'H',\n W = 'W',\n}\n\nexport type GetCurrencyStrengthQueryVariables = Exact<{ [key: string]: never }>;\n\nexport type GetCurrencyStrengthQuery = {\n __typename?: 'Query';\n currencyStrength?: Array<{\n __typename?: 'CurrencyStrength';\n currency: CurrencyName;\n updatedAt: string;\n strengthRelation?: Array<{\n __typename?: 'StrengthRelation';\n currency: CurrencyName;\n percentage: number;\n }> | null;\n }> | null;\n};\n\nexport const GetCurrencyStrengthDocument = {\n kind: 'Document',\n definitions: [\n {\n kind: 'OperationDefinition',\n operation: 'query',\n name: { kind: 'Name', value: 'GetCurrencyStrength' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'currencyStrength' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'currency' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'strengthRelation' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'currency' },\n },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'percentage' },\n },\n ],\n },\n },\n { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<\n GetCurrencyStrengthQuery,\n GetCurrencyStrengthQueryVariables\n>;\n"],"mappings":";;;;;;IAqCYA,cAAc,GAAAC,OAAA,CAAAD,cAAA,aAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAAA,IASdE,QAAQ,GAAAD,OAAA,CAAAC,QAAA,aAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAAA,IAiBRC,mBAAmB,GAAAF,OAAA,CAAAE,mBAAA,aAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAAA,IAWnBC,YAAY,GAAAH,OAAA,CAAAG,YAAA,aAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,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KAAK,EAAE;gBAAW;cAC1C,CAAC,EACD;gBACEJ,IAAI,EAAE,OAAO;gBACbG,IAAI,EAAE;kBAAEH,IAAI,EAAE,MAAM;kBAAEI,KAAK,EAAE;gBAAa;cAC5C,CAAC;YAEL;UACF,CAAC,EACD;YAAEJ,IAAI,EAAE,OAAO;YAAEG,IAAI,EAAE;cAAEH,IAAI,EAAE,MAAM;cAAEI,KAAK,EAAE;YAAY;UAAE,CAAC;QAEjE;MACF,CAAC;IAEL;EACF,CAAC;AAEL,CAGC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_fragmentMasking","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_gql"],"sources":["../../../../src/gql/types/index.ts"],"sourcesContent":["export * from \"./fragment-masking\";\nexport * from \"./gql\";"],"mappings":";;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,gBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,gBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,gBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,IAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,IAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,IAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,IAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_fragmentMasking","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_gql"],"sources":["../../../../src/gql/types/index.ts"],"sourcesContent":["export * from './fragment-masking';\nexport * from './gql';\n"],"mappings":";;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,gBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,gBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,gBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,IAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,IAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,IAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,IAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.translations = void 0;
7
7
  var _monoI18n = require("@oanda/mono-i18n");
8
8
  var _en = _interopRequireDefault(require("./sources/en.json"));
9
- var _zh_TW = _interopRequireDefault(require("./sources/zh_TW.json"));
10
9
  var _es = _interopRequireDefault(require("./sources/es.json"));
11
10
  var _th = _interopRequireDefault(require("./sources/th.json"));
11
+ var _zh_TW = _interopRequireDefault(require("./sources/zh_TW.json"));
12
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
13
  const translations = exports.translations = {
14
14
  [_monoI18n.Locale.en]: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_monoI18n","require","_en","_interopRequireDefault","_zh_TW","_es","_th","e","__esModule","default","translations","exports","Locale","en","translation","zhTW","es","th"],"sources":["../../../src/translations/index.ts"],"sourcesContent":["import { Locale, Translations } from '@oanda/mono-i18n';\n\nimport en from './sources/en.json';\nimport zhTW from './sources/zh_TW.json';\nimport es from './sources/es.json';\nimport th from './sources/th.json';\n\nimport { defaultTranslations } from './translations';\n\nexport type TranslationKey = keyof typeof defaultTranslations;\n\nexport const translations: Translations = {\n [Locale.en]: { translation: en },\n [Locale.zhTW]: { translation: zhTW },\n [Locale.es]: { translation: es },\n [Locale.th]: { translation: th },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,GAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,GAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,GAAA,GAAAH,sBAAA,CAAAF,OAAA;AAAmC,SAAAE,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAM5B,MAAMG,YAA0B,GAAAC,OAAA,CAAAD,YAAA,GAAG;EACxC,CAACE,gBAAM,CAACC,EAAE,GAAG;IAAEC,WAAW,EAAED;EAAG,CAAC;EAChC,CAACD,gBAAM,CAACG,IAAI,GAAG;IAAED,WAAW,EAAEC;EAAK,CAAC;EACpC,CAACH,gBAAM,CAACI,EAAE,GAAG;IAAEF,WAAW,EAAEE;EAAG,CAAC;EAChC,CAACJ,gBAAM,CAACK,EAAE,GAAG;IAAEH,WAAW,EAAEG;EAAG;AACjC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_monoI18n","require","_en","_interopRequireDefault","_es","_th","_zh_TW","e","__esModule","default","translations","exports","Locale","en","translation","zhTW","es","th"],"sources":["../../../src/translations/index.ts"],"sourcesContent":["import type { Translations } from '@oanda/mono-i18n';\nimport { Locale } from '@oanda/mono-i18n';\n\nimport en from './sources/en.json';\nimport es from './sources/es.json';\nimport th from './sources/th.json';\nimport zhTW from './sources/zh_TW.json';\nimport type { defaultTranslations } from './translations';\n\nexport type TranslationKey = keyof typeof defaultTranslations;\n\nexport const translations: Translations = {\n [Locale.en]: { translation: en },\n [Locale.zhTW]: { translation: zhTW },\n [Locale.es]: { translation: es },\n [Locale.th]: { translation: th },\n};\n"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,GAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,GAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,GAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAH,sBAAA,CAAAF,OAAA;AAAwC,SAAAE,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAKjC,MAAMG,YAA0B,GAAAC,OAAA,CAAAD,YAAA,GAAG;EACxC,CAACE,gBAAM,CAACC,EAAE,GAAG;IAAEC,WAAW,EAAED;EAAG,CAAC;EAChC,CAACD,gBAAM,CAACG,IAAI,GAAG;IAAED,WAAW,EAAEC;EAAK,CAAC;EACpC,CAACH,gBAAM,CAACI,EAAE,GAAG;IAAEF,WAAW,EAAEE;EAAG,CAAC;EAChC,CAACJ,gBAAM,CAACK,EAAE,GAAG;IAAEH,WAAW,EAAEG;EAAG;AACjC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"translations.js","names":["defaultTranslations","exports"],"sources":["../../../src/translations/translations.ts"],"sourcesContent":["export const defaultTranslations = {\n\n};\n"],"mappings":";;;;;;AAAO,MAAMA,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG,CAEnC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"translations.js","names":["defaultTranslations","exports"],"sources":["../../../src/translations/translations.ts"],"sourcesContent":["export const defaultTranslations = {};\n"],"mappings":";;;;;;AAAO,MAAMA,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG,CAAC,CAAC","ignoreList":[]}
@@ -1,8 +1,8 @@
1
- import React from 'react';
2
1
  import { useQuery } from '@apollo/client';
3
- import { useLocale } from '@oanda/mono-i18n';
4
2
  import { ChartError, LastUpdated, Size, Spinner, SpinnerSize, useLayoutProvider } from '@oanda/labs-widget-common';
3
+ import { useLocale } from '@oanda/mono-i18n';
5
4
  import classnames from 'classnames';
5
+ import React from 'react';
6
6
  import { getCurrencyStrength } from '../gql/getCurrencyStrength';
7
7
  import { Chart } from './components/Chart';
8
8
  import { sortCurrencies } from './components/Chart/formatters';
@@ -35,11 +35,11 @@ const ChartWithData = _ref => {
35
35
  }, React.createElement(Spinner, {
36
36
  size: SpinnerSize.lg
37
37
  })), !loading && showChart && React.createElement("div", {
38
- "data-testid": "currency-strength-chart-wrapper",
39
38
  className: classnames('lw-grid lw-place-content-center lw-gap-7', {
40
39
  'lw-grid-cols-3 ': isDesktop && !currency,
41
40
  'lw-grid-cols-1': !isDesktop || currency
42
- })
41
+ }),
42
+ "data-testid": "currency-strength-chart-wrapper"
43
43
  }, currencyData && currencyData.map(item => React.createElement("div", {
44
44
  key: item.currency,
45
45
  className: "lw-flex lw-h-[135px] lw-flex-1 lw-items-center lw-justify-center"
@@ -54,8 +54,8 @@ const ChartWithData = _ref => {
54
54
  }, React.createElement(ChartError, null)), !loading && !showError && React.createElement("div", {
55
55
  className: "lw-mt-2 lw-h-8"
56
56
  }, React.createElement(LastUpdated, {
57
- timestamp: data?.currencyStrength[0]?.updatedAt,
58
- labelCallback: lang
57
+ labelCallback: lang,
58
+ timestamp: data?.currencyStrength[0]?.updatedAt
59
59
  })));
60
60
  };
61
61
  export { ChartWithData };
@@ -1 +1 @@
1
- {"version":3,"file":"ChartsWithData.js","names":["React","useQuery","useLocale","ChartError","LastUpdated","Size","Spinner","SpinnerSize","useLayoutProvider","classnames","getCurrencyStrength","Chart","sortCurrencies","ChartWithData","_ref","currency","size","isDesktop","DESKTOP","lang","loading","data","error","fetchPolicy","showChart","currencyStrength","length","showError","currencyData","filter","item","slice","sort","createElement","Fragment","className","lg","map","key","values","strengthRelation","timestamp","updatedAt","labelCallback"],"sources":["../../../src/CurrencyStrengthWidget/ChartsWithData.tsx"],"sourcesContent":["import React from 'react';\nimport { useQuery } from '@apollo/client';\nimport { useLocale } from '@oanda/mono-i18n';\nimport {\n ChartError,\n LastUpdated,\n Size,\n Spinner,\n SpinnerSize,\n useLayoutProvider,\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';\nimport { sortCurrencies } from './components/Chart/formatters';\nimport { WidgetProps } from './types';\n\nconst ChartWithData = ({ currency }: WidgetProps) => {\n const { size } = useLayoutProvider();\n const isDesktop = size === Size.DESKTOP;\n const { lang } = useLocale();\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 const currencyData = currency\n ? data?.currencyStrength?.filter((item) => item.currency === currency)\n : data?.currencyStrength?.slice().sort(sortCurrencies);\n\n return (\n <>\n {loading\n && (\n <div className={classnames('lw-flex lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary', {\n 'lw-h-[461px]': !currency,\n 'lw-h-[135px]': currency,\n })}\n >\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 && !currency,\n 'lw-grid-cols-1': !isDesktop || currency,\n })}\n >\n {currencyData && currencyData.map((item) => (\n <div key={item.currency} className=\"lw-flex lw-h-[135px] lw-flex-1 lw-items-center lw-justify-center\">\n <Chart\n currency={item.currency}\n values={item.strengthRelation?.slice().sort(sortCurrencies)!}\n />\n </div>\n ))}\n </div>\n )}\n {!loading && showError && (\n <div className={classnames('lw-flex lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary', {\n 'lw-h-[425px]': !currency,\n 'lw-h-[135px]': currency,\n })}\n >\n <ChartError />\n </div>\n )}\n {!loading && !showError && (\n <div className=\"lw-mt-2 lw-h-8\">\n <LastUpdated timestamp={data?.currencyStrength![0]?.updatedAt} labelCallback={lang} />\n </div>\n )}\n </>\n );\n};\n\nexport { ChartWithData };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SACEC,UAAU,EACVC,WAAW,EACXC,IAAI,EACJC,OAAO,EACPC,WAAW,EACXC,iBAAiB,QACZ,2BAA2B;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,mBAAmB,QAAQ,4BAA4B;AAEhE,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,cAAc,QAAQ,+BAA+B;AAG9D,MAAMC,aAAa,GAAGC,IAAA,IAA+B;EAAA,IAA9B;IAAEC;EAAsB,CAAC,GAAAD,IAAA;EAC9C,MAAM;IAAEE;EAAK,CAAC,GAAGR,iBAAiB,CAAC,CAAC;EACpC,MAAMS,SAAS,GAAGD,IAAI,KAAKX,IAAI,CAACa,OAAO;EACvC,MAAM;IAAEC;EAAK,CAAC,GAAGjB,SAAS,CAAC,CAAC;EAC5B,MAAM;IAAEkB,OAAO;IAAEC,IAAI;IAAEC;EAAM,CAAC,GAAGrB,QAAQ,CAA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I,CAACf,QAAS;IACxBwB,MAAM,EAAET,IAAI,CAACU,gBAAgB,EAAET,KAAK,CAAC,CAAC,CAACC,IAAI,CAACpB,cAAc;EAAG,CAC9D,CACE,CACN,CACE,CACN,EACA,CAACQ,OAAO,IAAIO,SAAS,IACpB3B,KAAA,CAAAiC,aAAA;IAAKE,SAAS,EAAE1B,UAAU,CAAC,sFAAsF,EAAE;MACjH,cAAc,EAAE,CAACM,QAAQ;MACzB,cAAc,EAAEA;IAClB,CAAC;EAAE,GAEDf,KAAA,CAAAiC,aAAA,CAAC9B,UAAU,MAAE,CACV,CACN,EACA,CAACiB,OAAO,IAAI,CAACO,SAAS,IACrB3B,KAAA,CAAAiC,aAAA;IAAKE,SAAS,EAAC;EAAgB,GAC7BnC,KAAA,CAAAiC,aAAA,CAAC7B,WAAW;IAACqC,SAAS,EAAEpB,IAAI,EAAEI,gBAAgB,CAAE,CAAC,CAAC,EAAEiB,SAAU;IAACC,aAAa,EAAExB;EAAK,CAAE,CAClF,CAEP,CAAC;AAEP,CAAC;AAED,SAASN,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"ChartsWithData.js","names":["useQuery","ChartError","LastUpdated","Size","Spinner","SpinnerSize","useLayoutProvider","useLocale","classnames","React","getCurrencyStrength","Chart","sortCurrencies","ChartWithData","_ref","currency","size","isDesktop","DESKTOP","lang","loading","data","error","fetchPolicy","showChart","currencyStrength","length","showError","currencyData","filter","item","slice","sort","createElement","Fragment","className","lg","map","key","values","strengthRelation","labelCallback","timestamp","updatedAt"],"sources":["../../../src/CurrencyStrengthWidget/ChartsWithData.tsx"],"sourcesContent":["import { useQuery } from '@apollo/client';\nimport {\n ChartError,\n LastUpdated,\n Size,\n Spinner,\n SpinnerSize,\n useLayoutProvider,\n} from '@oanda/labs-widget-common';\nimport { useLocale } from '@oanda/mono-i18n';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { getCurrencyStrength } from '../gql/getCurrencyStrength';\nimport type { GetCurrencyStrengthQuery } from '../gql/types/graphql';\nimport { Chart } from './components/Chart';\nimport { sortCurrencies } from './components/Chart/formatters';\nimport type { WidgetProps } from './types';\n\nconst ChartWithData = ({ currency }: WidgetProps) => {\n const { size } = useLayoutProvider();\n const isDesktop = size === Size.DESKTOP;\n const { lang } = useLocale();\n const { loading, data, error } = useQuery<GetCurrencyStrengthQuery>(\n getCurrencyStrength,\n {\n fetchPolicy: 'cache-and-network',\n }\n );\n\n const showChart =\n data?.currencyStrength && data?.currencyStrength?.length > 0;\n const showError = data?.currencyStrength?.length === 0 || error;\n\n const currencyData = currency\n ? data?.currencyStrength?.filter((item) => item.currency === currency)\n : data?.currencyStrength?.slice().sort(sortCurrencies);\n\n return (\n <>\n {loading && (\n <div\n className={classnames(\n 'lw-flex lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary',\n {\n 'lw-h-[461px]': !currency,\n 'lw-h-[135px]': currency,\n }\n )}\n >\n <Spinner size={SpinnerSize.lg} />\n </div>\n )}\n {!loading && showChart && (\n <div\n className={classnames('lw-grid lw-place-content-center lw-gap-7', {\n 'lw-grid-cols-3 ': isDesktop && !currency,\n 'lw-grid-cols-1': !isDesktop || currency,\n })}\n data-testid=\"currency-strength-chart-wrapper\"\n >\n {currencyData &&\n currencyData.map((item) => (\n <div\n key={item.currency}\n className=\"lw-flex lw-h-[135px] lw-flex-1 lw-items-center lw-justify-center\"\n >\n <Chart\n currency={item.currency}\n values={item.strengthRelation?.slice().sort(sortCurrencies)!}\n />\n </div>\n ))}\n </div>\n )}\n {!loading && showError && (\n <div\n className={classnames(\n 'lw-flex lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary',\n {\n 'lw-h-[425px]': !currency,\n 'lw-h-[135px]': currency,\n }\n )}\n >\n <ChartError />\n </div>\n )}\n {!loading && !showError && (\n <div className=\"lw-mt-2 lw-h-8\">\n <LastUpdated\n labelCallback={lang}\n timestamp={data?.currencyStrength![0]?.updatedAt}\n />\n </div>\n )}\n </>\n );\n};\n\nexport { ChartW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I,EAAEI,gBAAgB,CAAE,CAAC,CAAC,EAAEkB;EAAU,CAClD,CACE,CAEP,CAAC;AAEP,CAAC;AAED,SAAS9B,aAAa","ignoreList":[]}
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
1
  import { ApolloClient, InMemoryCache } from '@apollo/client';
3
2
  import { WidgetProvider, WidgetWrapper } from '@oanda/labs-widget-common';
3
+ import React from 'react';
4
4
  import { translations } from '../translations';
5
5
  import { Main } from './Main';
6
6
  const CurrencyStrengthWidget = _ref => {
@@ -17,14 +17,14 @@ const CurrencyStrengthWidget = _ref => {
17
17
  cache: new InMemoryCache()
18
18
  });
19
19
  return React.createElement(WidgetProvider, {
20
- locale: locale,
21
- translations: translations,
22
20
  client: client,
23
- theme: theme
21
+ locale: locale,
22
+ theme: theme,
23
+ translations: translations
24
24
  }, React.createElement(WidgetWrapper, {
25
- logoLink: logoLink,
25
+ isParamError: isParamError,
26
26
  linkArea: "logo",
27
- isParamError: isParamError
27
+ logoLink: logoLink
28
28
  }, React.createElement(Main, {
29
29
  currency: currency,
30
30
  theme: theme
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyStrengthWidget.js","names":["React","ApolloClient","InMemoryCache","WidgetProvider","WidgetWrapper","translations","Main","CurrencyStrengthWidget","_ref","graphqlUrl","currency","locale","theme","isParamError","logoLink","client","uri","cache","createElement","linkArea"],"sources":["../../../src/CurrencyStrengthWidget/CurrencyStrengthWidget.tsx"],"sourcesContent":["import React from 'react';\nimport { ApolloClient, InMemoryCache } from '@apollo/client';\nimport { WidgetProvider, WidgetWrapper } from '@oanda/labs-widget-common';\nimport { CurrencyStrengthConfig } from './types';\nimport { translations } from '../translations';\nimport { Main } from './Main';\n\nconst CurrencyStrengthWidget = ({\n graphqlUrl, currency, locale, theme, isParamError, logoLink,\n}: CurrencyStrengthConfig) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n return (\n <WidgetProvider\n locale={locale}\n translations={translations}\n client={client}\n theme={theme}\n >\n <WidgetWrapper\n logoLink={logoLink}\n linkArea=\"logo\"\n isParamError={isParamError}\n >\n <Main currency={currency} theme={theme} />\n </WidgetWrapper>\n </WidgetProvider>\n );\n};\n\nexport { CurrencyStrengthWidget };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,EAAEC,aAAa,QAAQ,gBAAgB;AAC5D,SAASC,cAAc,EAAEC,aAAa,QAAQ,2BAA2B;AAEzE,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,IAAI,QAAQ,QAAQ;AAE7B,MAAMC,sBAAsB,GAAGC,IAAA,IAED;EAAA,IAFE;IAC9BC,UAAU;IAAEC,QAAQ;IAAEC,MAAM;IAAEC,KAAK;IAAEC,YAAY;IAAEC;EAC7B,CAAC,GAAAN,IAAA;EACvB,MAAMO,MAAM,GAAG,IAAId,YAAY,CAAC;IAC9Be,GAAG,EAAEP,UAAU;IACfQ,KAAK,EAAE,IAAIf,aAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,OACEF,KAAA,CAAAkB,aAAA,CAACf,cAAc;IACbQ,MAAM,EAAEA,MAAO;IACfN,YAAY,EAAEA,YAAa;IAC3BU,MAAM,EAAEA,MAAO;IACfH,KAAK,EAAEA;EAAM,GAEbZ,KAAA,CAAAkB,aAAA,CAACd,aAAa;IACZU,QAAQ,EAAEA,QAAS;IACnBK,QAAQ,EAAC,MAAM;IACfN,YAAY,EAAEA;EAAa,GAE3Bb,KAAA,CAAAkB,aAAA,CAACZ,IAAI;IAACI,QAAQ,EAAEA,QAAS;IAACE,KAAK,EAAEA;EAAM,CAAE,CAC5B,CACD,CAAC;AAErB,CAAC;AAED,SAASL,sBAAsB","ignoreList":[]}
1
+ {"version":3,"file":"CurrencyStrengthWidget.js","names":["ApolloClient","InMemoryCache","WidgetProvider","WidgetWrapper","React","translations","Main","CurrencyStrengthWidget","_ref","graphqlUrl","currency","locale","theme","isParamError","logoLink","client","uri","cache","createElement","linkArea"],"sources":["../../../src/CurrencyStrengthWidget/CurrencyStrengthWidget.tsx"],"sourcesContent":["import { ApolloClient, InMemoryCache } from '@apollo/client';\nimport { WidgetProvider, WidgetWrapper } from '@oanda/labs-widget-common';\nimport React from 'react';\n\nimport { translations } from '../translations';\nimport { Main } from './Main';\nimport type { CurrencyStrengthConfig } from './types';\n\nconst CurrencyStrengthWidget = ({\n graphqlUrl,\n currency,\n locale,\n theme,\n isParamError,\n logoLink,\n}: CurrencyStrengthConfig) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n return (\n <WidgetProvider\n client={client}\n locale={locale}\n theme={theme}\n translations={translations}\n >\n <WidgetWrapper\n isParamError={isParamError}\n linkArea=\"logo\"\n logoLink={logoLink}\n >\n <Main currency={currency} theme={theme} />\n </WidgetWrapper>\n </WidgetProvider>\n );\n};\n\nexport { CurrencyStrengthWidget };\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,aAAa,QAAQ,gBAAgB;AAC5D,SAASC,cAAc,EAAEC,aAAa,QAAQ,2BAA2B;AACzE,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,IAAI,QAAQ,QAAQ;AAG7B,MAAMC,sBAAsB,GAAGC,IAAA,IAOD;EAAA,IAPE;IAC9BC,UAAU;IACVC,QAAQ;IACRC,MAAM;IACNC,KAAK;IACLC,YAAY;IACZC;EACsB,CAAC,GAAAN,IAAA;EACvB,MAAMO,MAAM,GAAG,IAAIf,YAAY,CAAC;IAC9BgB,GAAG,EAAEP,UAAU;IACfQ,KAAK,EAAE,IAAIhB,aAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,OACEG,KAAA,CAAAc,aAAA,CAAChB,cAAc;IACba,MAAM,EAAEA,MAAO;IACfJ,MAAM,EAAEA,MAAO;IACfC,KAAK,EAAEA,KAAM;IACbP,YAAY,EAAEA;EAAa,GAE3BD,KAAA,CAAAc,aAAA,CAACf,aAAa;IACZU,YAAY,EAAEA,YAAa;IAC3BM,QAAQ,EAAC,MAAM;IACfL,QAAQ,EAAEA;EAAS,GAEnBV,KAAA,CAAAc,aAAA,CAACZ,IAAI;IAACI,QAAQ,EAAEA,QAAS;IAACE,KAAK,EAAEA;EAAM,CAAE,CAC5B,CACD,CAAC;AAErB,CAAC;AAED,SAASL,sBAAsB","ignoreList":[]}
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { useLocale } from '@oanda/mono-i18n';
3
1
  import { useLayoutProvider } from '@oanda/labs-widget-common';
2
+ import { useLocale } from '@oanda/mono-i18n';
3
+ import React from 'react';
4
4
  import { ChartWithData } from './ChartsWithData';
5
5
  const Main = _ref => {
6
6
  let {
@@ -1 +1 @@
1
- {"version":3,"file":"Main.js","names":["React","useLocale","useLayoutProvider","ChartWithData","Main","_ref","currency","lang","size","createElement","Fragment","className","count"],"sources":["../../../src/CurrencyStrengthWidget/Main.tsx"],"sourcesContent":["import React from 'react';\nimport { useLocale } from '@oanda/mono-i18n';\nimport { useLayoutProvider } from '@oanda/labs-widget-common';\nimport { ChartWithData } from './ChartsWithData';\nimport { WidgetProps } from './types';\n\nconst Main = ({ currency }: WidgetProps) => {\n const { lang } = useLocale();\n const { size } = useLayoutProvider();\n\n return (\n <>\n {size && (\n <div data-testid=\"currency-strength-wrapper\">\n <div className=\"lw-mb-8 lw-flex lw-justify-center lw-font-sans lw-text-lg lw-font-bold\">\n <span>{`${lang('daily')} (${lang('minute', { count: 5 })})`}</span>\n </div>\n <ChartWithData currency={currency} />\n </div>\n )}\n </>\n );\n};\n\nexport { Main };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SAASC,iBAAiB,QAAQ,2BAA2B;AAC7D,SAASC,aAAa,QAAQ,kBAAkB;AAGhD,MAAMC,IAAI,GAAGC,IAAA,IAA+B;EAAA,IAA9B;IAAEC;EAAsB,CAAC,GAAAD,IAAA;EACrC,MAAM;IAAEE;EAAK,CAAC,GAAGN,SAAS,CAAC,CAAC;EAC5B,MAAM;IAAEO;EAAK,CAAC,GAAGN,iBAAiB,CAAC,CAAC;EAEpC,OACEF,KAAA,CAAAS,aAAA,CAAAT,KAAA,CAAAU,QAAA,QACGF,IAAI,IACLR,KAAA,CAAAS,aAAA;IAAK,eAAY;EAA2B,GAC1CT,KAAA,CAAAS,aAAA;IAAKE,SAAS,EAAC;EAAwE,GACrFX,KAAA,CAAAS,aAAA,eAAO,GAAGF,IAAI,CAAC,OAAO,CAAC,KAAKA,IAAI,CAAC,QAAQ,EAAE;IAAEK,KAAK,EAAE;EAAE,CAAC,CAAC,GAAU,CAC/D,CAAC,EACNZ,KAAA,CAAAS,aAAA,CAACN,aAAa;IAACG,QAAQ,EAAEA;EAAS,CAAE,CACjC,CAEL,CAAC;AAEP,CAAC;AAED,SAASF,IAAI","ignoreList":[]}
1
+ {"version":3,"file":"Main.js","names":["useLayoutProvider","useLocale","React","ChartWithData","Main","_ref","currency","lang","size","createElement","Fragment","className","count"],"sources":["../../../src/CurrencyStrengthWidget/Main.tsx"],"sourcesContent":["import { useLayoutProvider } from '@oanda/labs-widget-common';\nimport { useLocale } from '@oanda/mono-i18n';\nimport React from 'react';\n\nimport { ChartWithData } from './ChartsWithData';\nimport type { WidgetProps } from './types';\n\nconst Main = ({ currency }: WidgetProps) => {\n const { lang } = useLocale();\n const { size } = useLayoutProvider();\n\n return (\n <>\n {size && (\n <div data-testid=\"currency-strength-wrapper\">\n <div className=\"lw-mb-8 lw-flex lw-justify-center lw-font-sans lw-text-lg lw-font-bold\">\n <span>{`${lang('daily')} (${lang('minute', { count: 5 })})`}</span>\n </div>\n <ChartWithData currency={currency} />\n </div>\n )}\n </>\n );\n};\n\nexport { Main };\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,2BAA2B;AAC7D,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,aAAa,QAAQ,kBAAkB;AAGhD,MAAMC,IAAI,GAAGC,IAAA,IAA+B;EAAA,IAA9B;IAAEC;EAAsB,CAAC,GAAAD,IAAA;EACrC,MAAM;IAAEE;EAAK,CAAC,GAAGN,SAAS,CAAC,CAAC;EAC5B,MAAM;IAAEO;EAAK,CAAC,GAAGR,iBAAiB,CAAC,CAAC;EAEpC,OACEE,KAAA,CAAAO,aAAA,CAAAP,KAAA,CAAAQ,QAAA,QACGF,IAAI,IACHN,KAAA,CAAAO,aAAA;IAAK,eAAY;EAA2B,GAC1CP,KAAA,CAAAO,aAAA;IAAKE,SAAS,EAAC;EAAwE,GACrFT,KAAA,CAAAO,aAAA,eAAO,GAAGF,IAAI,CAAC,OAAO,CAAC,KAAKA,IAAI,CAAC,QAAQ,EAAE;IAAEK,KAAK,EAAE;EAAE,CAAC,CAAC,GAAU,CAC/D,CAAC,EACNV,KAAA,CAAAO,aAAA,CAACN,aAAa;IAACG,QAAQ,EAAEA;EAAS,CAAE,CACjC,CAEP,CAAC;AAEP,CAAC;AAED,SAASF,IAAI","ignoreList":[]}
@@ -1,11 +1,11 @@
1
- import React from 'react';
2
- import ReactEChartsCore from 'echarts-for-react/lib/core';
3
- import * as echarts from 'echarts/core';
1
+ import { getChartTheme, Theme, useLayoutProvider } from '@oanda/labs-widget-common';
2
+ import { useLocale } from '@oanda/mono-i18n';
4
3
  import { BarChart } from 'echarts/charts';
4
+ import { GraphicComponent, GridSimpleComponent, TitleComponent, TooltipComponent } from 'echarts/components';
5
+ import * as echarts from 'echarts/core';
5
6
  import { CanvasRenderer } from 'echarts/renderers';
6
- import { GridSimpleComponent, GraphicComponent, TooltipComponent, TitleComponent } from 'echarts/components';
7
- import { useLocale } from '@oanda/mono-i18n';
8
- import { Theme, useLayoutProvider, getChartTheme } from '@oanda/labs-widget-common';
7
+ import ReactEChartsCore from 'echarts-for-react/lib/core';
8
+ import React from 'react';
9
9
  import { CHART_HEIGHT } from './constants';
10
10
  import { getOption } from './getOption';
11
11
  echarts.use([GridSimpleComponent, GraphicComponent, TooltipComponent, TitleComponent, BarChart, CanvasRenderer]);
@@ -24,17 +24,17 @@ const Chart = _ref => {
24
24
  } = useLayoutProvider();
25
25
  return React.createElement(ReactEChartsCore, {
26
26
  echarts: echarts,
27
- theme: isDark ? 'dark_theme' : 'light_theme',
28
- style: {
29
- height: `${CHART_HEIGHT}px`,
30
- width: '100%'
31
- },
32
27
  option: getOption({
33
28
  values,
34
29
  currency,
35
30
  lang,
36
31
  isDark
37
- })
32
+ }),
33
+ style: {
34
+ height: `${CHART_HEIGHT}px`,
35
+ width: '100%'
36
+ },
37
+ theme: isDark ? 'dark_theme' : 'light_theme'
38
38
  });
39
39
  };
40
40
  export { Chart };