@oanda/labs-currency-cross-table 1.0.13 → 1.0.15

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 (56) hide show
  1. package/CHANGELOG.md +124 -0
  2. package/dist/main/CurrencyCrossTableWidget/CurrencyCrossTableWidget.js +8 -7
  3. package/dist/main/CurrencyCrossTableWidget/CurrencyCrossTableWidget.js.map +1 -1
  4. package/dist/main/CurrencyCrossTableWidget/Main.js +8 -12
  5. package/dist/main/CurrencyCrossTableWidget/Main.js.map +1 -1
  6. package/dist/main/CurrencyCrossTableWidget/ValidationWrapper.js +17 -2
  7. package/dist/main/CurrencyCrossTableWidget/ValidationWrapper.js.map +1 -1
  8. package/dist/main/CurrencyCrossTableWidget/components/CellWithData.js +9 -8
  9. package/dist/main/CurrencyCrossTableWidget/components/CellWithData.js.map +1 -1
  10. package/dist/main/CurrencyCrossTableWidget/components/types.js.map +1 -1
  11. package/dist/main/CurrencyCrossTableWidget/types.js.map +1 -1
  12. package/dist/main/gql/types/gql.js +1 -1
  13. package/dist/main/gql/types/gql.js.map +1 -1
  14. package/dist/main/gql/types/graphql.js +8 -5
  15. package/dist/main/gql/types/graphql.js.map +1 -1
  16. package/dist/main/gql/validateInstruments.js +2 -2
  17. package/dist/main/gql/validateInstruments.js.map +1 -1
  18. package/dist/module/CurrencyCrossTableWidget/CurrencyCrossTableWidget.js +6 -6
  19. package/dist/module/CurrencyCrossTableWidget/CurrencyCrossTableWidget.js.map +1 -1
  20. package/dist/module/CurrencyCrossTableWidget/Main.js +10 -14
  21. package/dist/module/CurrencyCrossTableWidget/Main.js.map +1 -1
  22. package/dist/module/CurrencyCrossTableWidget/ValidationWrapper.js +17 -2
  23. package/dist/module/CurrencyCrossTableWidget/ValidationWrapper.js.map +1 -1
  24. package/dist/module/CurrencyCrossTableWidget/components/CellWithData.js +10 -9
  25. package/dist/module/CurrencyCrossTableWidget/components/CellWithData.js.map +1 -1
  26. package/dist/module/CurrencyCrossTableWidget/components/types.js.map +1 -1
  27. package/dist/module/CurrencyCrossTableWidget/types.js.map +1 -1
  28. package/dist/module/gql/types/gql.js +1 -1
  29. package/dist/module/gql/types/gql.js.map +1 -1
  30. package/dist/module/gql/types/graphql.js +8 -5
  31. package/dist/module/gql/types/graphql.js.map +1 -1
  32. package/dist/module/gql/validateInstruments.js +2 -2
  33. package/dist/module/gql/validateInstruments.js.map +1 -1
  34. package/dist/types/CurrencyCrossTableWidget/Main.d.ts +1 -1
  35. package/dist/types/CurrencyCrossTableWidget/components/CellWithData.d.ts +1 -1
  36. package/dist/types/CurrencyCrossTableWidget/components/types.d.ts +2 -12
  37. package/dist/types/CurrencyCrossTableWidget/types.d.ts +1 -1
  38. package/dist/types/gql/types/gql.d.ts +3 -3
  39. package/dist/types/gql/types/graphql.d.ts +8 -3
  40. package/package.json +3 -3
  41. package/src/CurrencyCrossTableWidget/CurrencyCrossTableWidget.tsx +19 -17
  42. package/src/CurrencyCrossTableWidget/Main.tsx +15 -25
  43. package/src/CurrencyCrossTableWidget/ValidationWrapper.tsx +26 -2
  44. package/src/CurrencyCrossTableWidget/components/CellWithData.tsx +10 -9
  45. package/src/CurrencyCrossTableWidget/components/types.ts +2 -12
  46. package/src/CurrencyCrossTableWidget/types.tsx +1 -1
  47. package/src/gql/types/gql.ts +2 -2
  48. package/src/gql/types/graphql.ts +10 -3
  49. package/src/gql/validateInstruments.ts +2 -2
  50. package/test/Main.test.tsx +1 -2
  51. package/dist/main/CurrencyCrossTableWidget/components/CellValidationWrapper.js +0 -49
  52. package/dist/main/CurrencyCrossTableWidget/components/CellValidationWrapper.js.map +0 -1
  53. package/dist/module/CurrencyCrossTableWidget/components/CellValidationWrapper.js +0 -42
  54. package/dist/module/CurrencyCrossTableWidget/components/CellValidationWrapper.js.map +0 -1
  55. package/dist/types/CurrencyCrossTableWidget/components/CellValidationWrapper.d.ts +0 -4
  56. package/src/CurrencyCrossTableWidget/components/CellValidationWrapper.tsx +0 -49
package/CHANGELOG.md CHANGED
@@ -3,6 +3,130 @@
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.15 (2024-09-26)
7
+
8
+
9
+
10
+ ## 1.0.163 (2024-09-18)
11
+
12
+
13
+
14
+ ## 1.0.162 (2024-09-12)
15
+
16
+
17
+
18
+ ## 1.0.161 (2024-09-11)
19
+
20
+
21
+
22
+ ## 1.0.160 (2024-09-10)
23
+
24
+
25
+
26
+ ## 1.0.159 (2024-09-09)
27
+
28
+
29
+
30
+ ## 1.0.158 (2024-09-04)
31
+
32
+
33
+
34
+ ## 1.0.157 (2024-09-04)
35
+
36
+
37
+
38
+ ## 1.0.156 (2024-09-02)
39
+
40
+
41
+
42
+ ## 1.0.155 (2024-08-29)
43
+
44
+
45
+
46
+ ## 1.0.154 (2024-08-29)
47
+
48
+
49
+
50
+ ## 1.0.153 (2024-08-23)
51
+
52
+
53
+
54
+ ## 1.0.152 (2024-08-23)
55
+
56
+
57
+
58
+ ## 1.0.151 (2024-08-20)
59
+
60
+
61
+
62
+ ## 1.0.150 (2024-08-19)
63
+
64
+ **Note:** Version bump only for package @oanda/labs-currency-cross-table
65
+
66
+
67
+
68
+
69
+
70
+ ## 1.0.14 (2024-09-18)
71
+
72
+
73
+
74
+ ## 1.0.162 (2024-09-12)
75
+
76
+
77
+
78
+ ## 1.0.161 (2024-09-11)
79
+
80
+
81
+
82
+ ## 1.0.160 (2024-09-10)
83
+
84
+
85
+
86
+ ## 1.0.159 (2024-09-09)
87
+
88
+
89
+
90
+ ## 1.0.158 (2024-09-04)
91
+
92
+
93
+
94
+ ## 1.0.157 (2024-09-04)
95
+
96
+
97
+
98
+ ## 1.0.156 (2024-09-02)
99
+
100
+
101
+
102
+ ## 1.0.155 (2024-08-29)
103
+
104
+
105
+
106
+ ## 1.0.154 (2024-08-29)
107
+
108
+
109
+
110
+ ## 1.0.153 (2024-08-23)
111
+
112
+
113
+
114
+ ## 1.0.152 (2024-08-23)
115
+
116
+
117
+
118
+ ## 1.0.151 (2024-08-20)
119
+
120
+
121
+
122
+ ## 1.0.150 (2024-08-19)
123
+
124
+ **Note:** Version bump only for package @oanda/labs-currency-cross-table
125
+
126
+
127
+
128
+
129
+
6
130
  ## 1.0.13 (2024-09-12)
7
131
 
8
132
 
@@ -4,14 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.CurrencyCrossTableWidget = void 0;
7
- var _react = _interopRequireDefault(require("react"));
7
+ var _react = _interopRequireWildcard(require("react"));
8
8
  var _client = require("@apollo/client");
9
9
  var _monoI18n = require("@oanda/mono-i18n");
10
10
  var _labsWidgetCommon = require("@oanda/labs-widget-common");
11
11
  var _translations = require("../translations");
12
12
  var _ValidationWrapper = require("./ValidationWrapper");
13
13
  var _graphql = require("../gql/types/graphql");
14
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ 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); }
15
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
16
  const CurrencyCrossTableWidget = _ref => {
16
17
  let {
17
18
  graphqlUrl,
@@ -29,10 +30,7 @@ const CurrencyCrossTableWidget = _ref => {
29
30
  });
30
31
  const divisionCode = division === _graphql.Division.Opt ? _graphql.Division.Ogm : division;
31
32
  const dataSource = divisionCode === _graphql.Division.Ogm ? 'MT5' : 'V20';
32
- return _react.default.createElement(_labsWidgetCommon.ThemeProvider, {
33
- removePadding: removePadding,
34
- theme: theme
35
- }, _react.default.createElement(_monoI18n.LocaleProvider, {
33
+ return _react.default.createElement(_monoI18n.LocaleProvider, {
36
34
  locale: (0, _labsWidgetCommon.getLocale)(locale),
37
35
  translations: _translations.translations
38
36
  }, _react.default.createElement(_labsWidgetCommon.LiveRatesProvider, {
@@ -43,11 +41,14 @@ const CurrencyCrossTableWidget = _ref => {
43
41
  }
44
42
  }, _react.default.createElement(_client.ApolloProvider, {
45
43
  client: client
44
+ }, _react.default.createElement(_react.Suspense, null, _react.default.createElement(_labsWidgetCommon.ThemeProvider, {
45
+ removePadding: removePadding,
46
+ theme: theme
46
47
  }, _react.default.createElement(_ValidationWrapper.ValidationWrapper, {
47
48
  currencies: currencies,
48
49
  division: division,
49
50
  isParamError: isParamError
50
- })))));
51
+ }))))));
51
52
  };
52
53
  exports.CurrencyCrossTableWidget = CurrencyCrossTableWidget;
53
54
  //# sourceMappingURL=CurrencyCrossTableWidget.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyCrossTableWidget.js","names":["_react","_interopRequireDefault","require","_client","_monoI18n","_labsWidgetCommon","_translations","_ValidationWrapper","_graphql","e","__esModule","default","CurrencyCrossTableWidget","_ref","graphqlUrl","liveRatesUrl","currencies","division","locale","theme","isParamError","removePadding","client","ApolloClient","uri","cache","InMemoryCache","divisionCode","Division","Opt","Ogm","dataSource","createElement","ThemeProvider","LocaleProvider","getLocale","translations","LiveRatesProvider","url","options","ApolloProvider","ValidationWrapper","exports"],"sources":["../../../src/CurrencyCrossTableWidget/CurrencyCrossTableWidget.tsx"],"sourcesContent":["import React from 'react';\nimport { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';\nimport { LocaleProvider } from '@oanda/mono-i18n';\nimport {\n LiveRatesProvider, ThemeProvider, getLocale,\n} from '@oanda/labs-widget-common';\nimport { translations } from '../translations';\nimport { CurrencyCrossTableConfig } from './types';\nimport { ValidationWrapper } from './ValidationWrapper';\nimport { Division } from '../gql/types/graphql';\n\nconst CurrencyCrossTableWidget = ({\n graphqlUrl,\n liveRatesUrl,\n currencies,\n division,\n locale,\n theme,\n isParamError,\n removePadding,\n}: CurrencyCrossTableConfig) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n const divisionCode = division === Division.Opt ? Division.Ogm : division;\n const dataSource = divisionCode === Division.Ogm ? 'MT5' : 'V20';\n\n return (\n <ThemeProvider removePadding={removePadding} theme={theme}>\n <LocaleProvider locale={getLocale(locale)} translations={translations}>\n <LiveRatesProvider\n url={liveRatesUrl}\n options={{ divisionCode, dataSource }}\n >\n <ApolloProvider client={client}>\n <ValidationWrapper\n currencies={currencies}\n division={division}\n isParamError={isParamError}\n />\n </ApolloProvider>\n </LiveRatesProvider>\n </LocaleProvider>\n </ThemeProvider>\n );\n};\n\nexport { CurrencyCrossTableWidget };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAGA,IAAAI,aAAA,GAAAJ,OAAA;AAEA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAAgD,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhD,MAAMG,wBAAwB,GAAGC,IAAA,IASD;EAAA,IATE;IAChCC,UAAU;IACVC,YAAY;IACZC,UAAU;IACVC,QAAQ;IACRC,MAAM;IACNC,KAAK;IACLC,YAAY;IACZC;EACwB,CAAC,GAAAR,IAAA;EACzB,MAAMS,MAAM,GAAG,IAAIC,oBAAY,CAAC;IAC9BC,GAAG,EAAEV,UAAU;IACfW,KAAK,EAAE,IAAIC,qBAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,MAAMC,YAAY,GAAGV,QAAQ,KAAKW,iBAAQ,CAACC,GAAG,GAAGD,iBAAQ,CAACE,GAAG,GAAGb,QAAQ;EACxE,MAAMc,UAAU,GAAGJ,YAAY,KAAKC,iBAAQ,CAACE,GAAG,GAAG,KAAK,GAAG,KAAK;EAEhE,OACE9B,MAAA,CAAAW,OAAA,CAAAqB,aAAA,CAAC3B,iBAAA,CAAA4B,aAAa;IAACZ,aAAa,EAAEA,aAAc;IAACF,KAAK,EAAEA;EAAM,GACxDnB,MAAA,CAAAW,OAAA,CAAAqB,aAAA,CAAC5B,SAAA,CAAA8B,cAAc;IAAChB,MAAM,EAAE,IAAAiB,2BAAS,EAACjB,MAAM,CAAE;IAACkB,YAAY,EAAEA;EAAa,GACpEpC,MAAA,CAAAW,OAAA,CAAAqB,aAAA,CAAC3B,iBAAA,CAAAgC,iBAAiB;IAChBC,GAAG,EAAEvB,YAAa;IAClBwB,OAAO,EAAE;MAAEZ,YAAY;MAAEI;IAAW;EAAE,GAEtC/B,MAAA,CAAAW,OAAA,CAAAqB,aAAA,CAAC7B,OAAA,CAAAqC,cAAc;IAAClB,MAAM,EAAEA;EAAO,GAC7BtB,MAAA,CAAAW,OAAA,CAAAqB,aAAA,CAACzB,kBAAA,CAAAkC,iBAAiB;IAChBzB,UAAU,EAAEA,UAAW;IACvBC,QAAQ,EAAEA,QAAS;IACnBG,YAAY,EAAEA;EAAa,CAC5B,CACa,CACC,CACL,CACH,CAAC;AAEpB,CAAC;AAACsB,OAAA,CAAA9B,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"file":"CurrencyCrossTableWidget.js","names":["_react","_interopRequireWildcard","require","_client","_monoI18n","_labsWidgetCommon","_translations","_ValidationWrapper","_graphql","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CurrencyCrossTableWidget","_ref","graphqlUrl","liveRatesUrl","currencies","division","locale","theme","isParamError","removePadding","client","ApolloClient","uri","cache","InMemoryCache","divisionCode","Division","Opt","Ogm","dataSource","createElement","LocaleProvider","getLocale","translations","LiveRatesProvider","url","options","ApolloProvider","Suspense","ThemeProvider","ValidationWrapper","exports"],"sources":["../../../src/CurrencyCrossTableWidget/CurrencyCrossTableWidget.tsx"],"sourcesContent":["import React, { Suspense } from 'react';\nimport { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';\nimport { LocaleProvider } from '@oanda/mono-i18n';\nimport {\n LiveRatesProvider, ThemeProvider, getLocale,\n} from '@oanda/labs-widget-common';\nimport { translations } from '../translations';\nimport { CurrencyCrossTableConfig } from './types';\nimport { ValidationWrapper } from './ValidationWrapper';\nimport { Division } from '../gql/types/graphql';\n\nconst CurrencyCrossTableWidget = ({\n graphqlUrl,\n liveRatesUrl,\n currencies,\n division,\n locale,\n theme,\n isParamError,\n removePadding,\n}: CurrencyCrossTableConfig) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n const divisionCode = division === Division.Opt ? Division.Ogm : division;\n const dataSource = divisionCode === Division.Ogm ? 'MT5' : 'V20';\n\n return (\n <LocaleProvider locale={getLocale(locale)} translations={translations}>\n <LiveRatesProvider\n url={liveRatesUrl}\n options={{ divisionCode, dataSource }}\n >\n <ApolloProvider client={client}>\n <Suspense>\n <ThemeProvider removePadding={removePadding} theme={theme}>\n <ValidationWrapper\n currencies={currencies}\n division={division}\n isParamError={isParamError}\n />\n </ThemeProvider>\n </Suspense>\n </ApolloProvider>\n </LiveRatesProvider>\n </LocaleProvider>\n );\n};\n\nexport { CurrencyCrossTableWidget };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAG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CAAC;AAACuB,OAAA,CAAA/B,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -7,30 +7,26 @@ exports.Main = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _labsWidgetCommon = require("@oanda/labs-widget-common");
9
9
  var _components = require("./components");
10
- var _CellValidationWrapper = require("./components/CellValidationWrapper");
11
10
  var _utils = require("./utils");
12
11
  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); }
13
12
  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; }
14
13
  const Main = _ref => {
15
14
  let {
16
- instruments,
17
15
  currencies,
16
+ validInstruments,
18
17
  division
19
18
  } = _ref;
20
19
  const [selectedCurrency, setSelectedCurrency] = (0, _react.useState)('');
21
20
  const [selectedPair, setSelectedPair] = (0, _react.useState)('');
22
- const hasInstruments = instruments.length > 0;
23
21
  const {
24
22
  target,
25
23
  setQuery
26
24
  } = (0, _labsWidgetCommon.useLiveRatesQuery)();
27
25
  (0, _react.useEffect)(() => {
28
- if (hasInstruments) {
29
- setQuery({
30
- instruments
31
- });
32
- }
33
- }, instruments);
26
+ setQuery({
27
+ instruments: validInstruments
28
+ });
29
+ }, validInstruments);
34
30
  return _react.default.createElement("div", {
35
31
  "data-testid": "currency-cross-table-wrapper",
36
32
  className: "lw-w-full lw-overflow-x-auto lw-overflow-y-hidden lw-border lw-border-b-0 lw-border-solid lw-border-border-primary"
@@ -51,15 +47,15 @@ const Main = _ref => {
51
47
  sticky: true
52
48
  }), arr.map(pair => _react.default.createElement(_react.Fragment, {
53
49
  key: `${currency}_${pair}`
54
- }, currency !== pair ? _react.default.createElement(_react.Suspense, null, _react.default.createElement(_CellValidationWrapper.CellValidationWrapper, {
50
+ }, currency !== pair ? _react.default.createElement(_components.CellWithData, {
55
51
  currency: currency,
56
52
  pair: pair,
57
- instrument: `${currency}${(0, _utils.divisionMapper)(division)}${pair}`,
53
+ isValid: validInstruments.includes(`${currency}${(0, _utils.divisionMapper)(division)}${pair}`),
58
54
  target: target,
59
55
  setSelectedCurrency: setSelectedCurrency,
60
56
  setSelectedPair: setSelectedPair,
61
57
  division: division
62
- })) : _react.default.createElement(_components.TextCell, {
58
+ }) : _react.default.createElement(_components.TextCell, {
63
59
  emptyIndicator: true
64
60
  }))))));
65
61
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Main.js","names":["_react","_interopRequireWildcard","require","_labsWidgetCommon","_components","_CellValidationWrapper","_utils","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Main","_ref","instruments","currencies","division","selectedCurrency","setSelectedCurrency","useState","selectedPair","setSelectedPair","hasInstruments","length","target","setQuery","useLiveRatesQuery","useEffect","createElement","className","TextCell","sticky","map","pair","key","label","hovered","currency","index","arr","Fragment","Suspense","CellValidationWrapper","instrument","divisionMapper","emptyIndicator","exports"],"sources":["../../../src/CurrencyCrossTableWidget/Main.tsx"],"sourcesContent":["import React, {\n Fragment, Suspense, useEffect, useState,\n} from 'react';\nimport { useLiveRatesQuery } from '@oanda/labs-widget-common';\nimport { MainProps } from './types';\nimport { TextCell } from './components';\nimport { CellValidationWrapper } from './components/CellValidationWrapper';\nimport { divisionMapper } from './utils';\n\nconst Main = ({\n instruments,\n currencies,\n division,\n}: MainProps) => {\n const [selectedCurrency, setSelectedCurrency] = useState('');\n const [selectedPair, setSelectedPair] = useState('');\n\n const hasInstruments = instruments.length > 0;\n\n const { target, setQuery } = useLiveRatesQuery();\n\n useEffect(() => {\n if (hasInstruments) {\n setQuery({ instruments });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, instruments);\n\n return (\n <div data-testid=\"currency-cross-table-wrapper\" className=\"lw-w-full lw-overflow-x-auto lw-overflow-y-hidden lw-border lw-border-b-0 lw-border-solid lw-border-border-primary\">\n <div className=\"lw-flex lw-w-max lw-min-w-full\">\n <TextCell sticky />\n {currencies.map(((pair) => (\n <TextCell\n key={pair}\n label={pair}\n hovered={pair === selectedPair}\n />\n )))}\n </div>\n {currencies.map(((currency, index, arr) => (\n <div\n key={currency}\n className=\"lw-flex lw-w-max lw-min-w-full\"\n >\n <TextCell\n label={currency}\n hovered={currency === selectedCurrency}\n sticky\n />\n {arr.map((pair) => (\n <Fragment key={`${currency}_${pair}`}>\n {currency !== pair ? (\n <Suspense>\n <CellValidationWrapper\n currency={currency}\n pair={pair}\n instrument={`${currency}${divisionMapper(division)}${pair}`}\n target={target}\n setSelectedCurrency={setSelectedCurrency}\n setSelectedPair={setSelectedPair}\n division={division}\n />\n </Suspense>\n ) : (\n <TextCell\n emptyIndicator\n />\n )}\n </Fragment>\n ))}\n </div>\n )))}\n </div>\n );\n};\n\nexport { Main };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,iBAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAAyC,SAAAK,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,SAAAP,wBAAAO,CAAA,EAAAE,CAAA,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,MAAA,CAAAwD,QAAQ,QACPxD,MAAA,CAAAa,OAAA,CAAA8B,aAAA,CAACtC,sBAAA,CAAAoD,qBAAqB;IACpBL,QAAQ,EAAEA,QAAS;IACnBJ,IAAI,EAAEA,IAAK;IACXU,UAAU,EAAE,GAAGN,QAAQ,GAAG,IAAAO,qBAAc,EAAC5B,QAAQ,CAAC,GAAGiB,IAAI,EAAG;IAC5DT,MAAM,EAAEA,MAAO;IACfN,mBAAmB,EAAEA,mBAAoB;IACzCG,eAAe,EAAEA,eAAgB;IACjCL,QAAQ,EAAEA;EAAS,CACpB,CACO,CAAC,GAEX/B,MAAA,CAAAa,OAAA,CAAA8B,aAAA,CAACvC,WAAA,CAAAyC,QAAQ;IACPe,cAAc;EAAA,CACf,CAEK,CACX,CACE,CACL,CACC,CAAC;AAEV,CAAC;AAACC,OAAA,CAAAlC,IAAA,GAAAA,IAAA","ignoreList":[]}
1
+ {"version":3,"file":"Main.js","names":["_react","_interopRequireWildcard","require","_labsWidgetCommon","_components","_utils","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Main","_ref","currencies","validInstruments","division","selectedCurrency","setSelectedCurrency","useState","selectedPair","setSelectedPair","target","setQuery","useLiveRatesQuery","useEffect","instruments","createElement","className","TextCell","sticky","map","pair","key","label","hovered","currency","index","arr","Fragment","CellWithData","isValid","includes","divisionMapper","emptyIndicator","exports"],"sources":["../../../src/CurrencyCrossTableWidget/Main.tsx"],"sourcesContent":["import React, {\n Fragment, useEffect, useState,\n} from 'react';\nimport { useLiveRatesQuery } from '@oanda/labs-widget-common';\nimport { MainProps } from './types';\nimport { CellWithData, TextCell } from './components';\nimport { divisionMapper } from './utils';\n\nconst Main = ({\n currencies,\n validInstruments,\n division,\n}: MainProps) => {\n const [selectedCurrency, setSelectedCurrency] = useState('');\n const [selectedPair, setSelectedPair] = useState('');\n const { target, setQuery } = useLiveRatesQuery();\n\n useEffect(() => {\n setQuery({ instruments: validInstruments });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, validInstruments);\n\n return (\n <div data-testid=\"currency-cross-table-wrapper\" className=\"lw-w-full lw-overflow-x-auto lw-overflow-y-hidden lw-border lw-border-b-0 lw-border-solid lw-border-border-primary\">\n <div className=\"lw-flex lw-w-max lw-min-w-full\">\n <TextCell sticky />\n {currencies.map(((pair) => (\n <TextCell\n key={pair}\n label={pair}\n hovered={pair === selectedPair}\n />\n )))}\n </div>\n {currencies.map(((currency, index, arr) => (\n <div\n key={currency}\n className=\"lw-flex lw-w-max lw-min-w-full\"\n >\n <TextCell\n label={currency}\n hovered={currency === selectedCurrency}\n sticky\n />\n {arr.map((pair) => (\n <Fragment key={`${currency}_${pair}`}>\n {currency !== pair ? (\n <CellWithData\n currency={currency}\n pair={pair}\n isValid={validInstruments.includes(`${currency}${divisionMapper(division)}${pair}`)}\n target={target}\n setSelectedCurrency={setSelectedCurrency}\n setSelectedPair={setSelectedPair}\n division={division}\n />\n ) : (\n <TextCell emptyIndicator />\n )}\n </Fragment>\n ))}\n </div>\n )))}\n </div>\n );\n};\n\nexport { Main };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,iBAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAyC,SAAAI,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,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAA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gB,IAAI,EAAE,CAAE;IACpFV,MAAM,EAAEA,MAAO;IACfJ,mBAAmB,EAAEA,mBAAoB;IACzCG,eAAe,EAAEA,eAAgB;IACjCL,QAAQ,EAAEA;EAAS,CACpB,CAAC,GAEF9B,MAAA,CAAAY,OAAA,CAAA6B,aAAA,CAACrC,WAAA,CAAAuC,QAAQ;IAACe,cAAc;EAAA,CAAE,CAEpB,CACX,CACE,CACL,CACC,CAAC;AAEV,CAAC;AAACC,OAAA,CAAAjC,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -7,6 +7,8 @@ exports.ValidationWrapper = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _classnames = _interopRequireDefault(require("classnames"));
9
9
  var _labsWidgetCommon = require("@oanda/labs-widget-common");
10
+ var _client = require("@apollo/client");
11
+ var _validateInstruments = require("../gql/validateInstruments");
10
12
  var _utils = require("./utils");
11
13
  var _Main = require("./Main");
12
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -16,11 +18,24 @@ const ValidationWrapper = _ref => {
16
18
  division,
17
19
  isParamError
18
20
  } = _ref;
19
- const showError = !(0, _utils.validCurrencies)(currencies) || isParamError;
21
+ const instruments = (0, _utils.currenciesToInstruments)(currencies, division);
22
+ const {
23
+ data,
24
+ error
25
+ } = (0, _client.useSuspenseQuery)(_validateInstruments.validateInstruments, {
26
+ variables: {
27
+ instruments,
28
+ division
29
+ },
30
+ fetchPolicy: 'network-only',
31
+ errorPolicy: 'all'
32
+ });
33
+ const validInstruments = data?.resolveInstrumentsByDivision?.map(instrument => instrument.name);
34
+ const showError = !(0, _utils.validCurrencies)(currencies) || isParamError || error || !validInstruments || validInstruments.length === 0;
20
35
  return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement("div", {
21
36
  className: "lw-flex lw-w-full lw-text-sm lw-tracking-normal lw-text-text-primary"
22
37
  }, !showError && _react.default.createElement(_Main.Main, {
23
- instruments: (0, _utils.currenciesToInstruments)(currencies, division),
38
+ validInstruments: validInstruments,
24
39
  currencies: currencies,
25
40
  division: division
26
41
  }), showError && _react.default.createElement("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationWrapper.js","names":["_react","_interopRequireDefault","require","_classnames","_labsWidgetCommon","_utils","_Main","e","__esModule","default","ValidationWrapper","_ref","currencies","division","isParamError","showError","validCurrencies","createElement","Fragment","className","Main","instruments","currenciesToInstruments","classnames","ChartError","exports"],"sources":["../../../src/CurrencyCrossTableWidget/ValidationWrapper.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport { ChartError } from '@oanda/labs-widget-common';\nimport { currenciesToInstruments, validCurrencies } from './utils';\nimport { ValidationWrapperProps } from './types';\nimport { Main } from './Main';\n\nconst ValidationWrapper = ({\n currencies,\n division,\n isParamError,\n}: ValidationWrapperProps) => {\n const showError = !validCurrencies(currencies) || isParamError;\n\n return (\n <>\n <div\n className=\"lw-flex lw-w-full lw-text-sm lw-tracking-normal lw-text-text-primary\"\n >\n {!showError && (\n <Main\n instruments={currenciesToInstruments(currencies, division)}\n currencies={currencies}\n division={division}\n />\n )}\n {showError && (\n <div className={classnames('lw-flex lw-h-[250px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary')}>\n <ChartError />\n </div>\n )}\n </div>\n </>\n );\n};\n\nexport { ValidationWrapper };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAJ,OAAA;AAA8B,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9B,MAAMG,iBAAiB,GAAGC,IAAA,IAII;EAAA,IAJH;IACzBC,UAAU;IACVC,QAAQ;IACRC;EACsB,CAAC,GAAAH,IAAA;EACvB,MAAMI,SAAS,GAAG,CAAC,IAAAC,sBAAe,EAACJ,UAAU,CAAC,IAAIE,YAAY;EAE9D,OACEd,MAAA,CAAAS,OAAA,CAAAQ,aAAA,CAAAjB,MAAA,CAAAS,OAAA,CAAAS,QAAA,QACElB,MAAA,CAAAS,OAAA,CAAAQ,aAAA;IACEE,SAAS,EAAC;EAAsE,GAE/E,CAACJ,SAAS,IACTf,MAAA,CAAAS,OAAA,CAAAQ,aAAA,CAACX,KAAA,CAAAc,IAAI;IACHC,WAAW,EAAE,IAAAC,8BAAuB,EAACV,UAAU,EAAEC,QAAQ,CAAE;IAC3DD,UAAU,EAAEA,UAAW;IACvBC,QAAQ,EAAEA;EAAS,CACpB,CACF,EACAE,SAAS,IACRf,MAAA,CAAAS,OAAA,CAAAQ,aAAA;IAAKE,SAAS,EAAE,IAAAI,mBAAU,EAAC,mGAAmG;EAAE,GAC9HvB,MAAA,CAAAS,OAAA,CAAAQ,aAAA,CAACb,iBAAA,CAAAoB,UAAU,MAAE,CACV,CAEJ,CACL,CAAC;AAEP,CAAC;AAACC,OAAA,CAAAf,iBAAA,GAAAA,iBAAA","ignoreList":[]}
1
+ {"version":3,"file":"ValidationWrapper.js","names":["_react","_interopRequireDefault","require","_classnames","_labsWidgetCommon","_client","_validateInstruments","_utils","_Main","e","__esModule","default","ValidationWrapper","_ref","currencies","division","isParamError","instruments","currenciesToInstruments","data","error","useSuspenseQuery","validateInstruments","variables","fetchPolicy","errorPolicy","validInstruments","resolveInstrumentsByDivision","map","instrument","name","showError","validCurrencies","length","createElement","Fragment","className","Main","classnames","ChartError","exports"],"sources":["../../../src/CurrencyCrossTableWidget/ValidationWrapper.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport { ChartError } from '@oanda/labs-widget-common';\nimport { useSuspenseQuery } from '@apollo/client';\nimport { ValidateInstrumentsQuery, ValidateInstrumentsQueryVariables } from '../gql/types/graphql';\nimport { validateInstruments } from '../gql/validateInstruments';\nimport { currenciesToInstruments, validCurrencies } from './utils';\nimport { ValidationWrapperProps } from './types';\nimport { Main } from './Main';\n\nconst ValidationWrapper = ({\n currencies,\n division,\n isParamError,\n}: ValidationWrapperProps) => {\n const instruments = currenciesToInstruments(currencies, division);\n\n const { data, error } = useSuspenseQuery<\n ValidateInstrumentsQuery,\n ValidateInstrumentsQueryVariables\n >(validateInstruments, {\n variables: {\n instruments,\n division,\n },\n fetchPolicy: 'network-only',\n errorPolicy: 'all',\n });\n\n const validInstruments = data\n ?.resolveInstrumentsByDivision\n ?.map((instrument) => instrument.name);\n const showError = !validCurrencies(currencies)\n || isParamError\n || error\n || !validInstruments\n || validInstruments.length === 0;\n\n return (\n <>\n <div\n className=\"lw-flex lw-w-full lw-text-sm lw-tracking-normal lw-text-text-primary\"\n >\n {!showError && (\n <Main\n validInstruments={validInstruments}\n currencies={currencies}\n division={division}\n />\n )}\n {showError && (\n <div className={classnames('lw-flex lw-h-[250px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary')}>\n <ChartError />\n </div>\n )}\n </div>\n </>\n );\n};\n\nexport { ValidationWrapper };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAN,OAAA;AAA8B,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9B,MAAMG,iBAAiB,GAAGC,IAAA,IAII;EAAA,IAJH;IACzBC,UAAU;IACVC,QAAQ;IACRC;EACsB,CAAC,GAAAH,IAAA;EACvB,MAAMI,WAAW,GAAG,IAAAC,8BAAuB,EAACJ,UAAU,EAAEC,QAAQ,CAAC;EAEjE,MAAM;IAAEI,IAAI;IAAEC;EAAM,CAAC,GAAG,IAAAC,wBAAgB,EAGtCC,wCAAmB,EAAE;IACrBC,SAAS,EAAE;MACTN,WAAW;MACXF;IACF,CAAC;IACDS,WAAW,EAAE,cAAc;IAC3BC,WAAW,EAAE;EACf,CAAC,CAAC;EAEF,MAAMC,gBAAgB,GAAGP,IAAI,EACzBQ,4BAA4B,EAC5BC,GAAG,CAAEC,UAAU,IAAKA,UAAU,CAACC,IAAI,CAAC;EACxC,MAAMC,SAAS,GAAG,CAAC,IAAAC,sBAAe,EAAClB,UAAU,CAAC,IACzCE,YAAY,IACZI,KAAK,IACL,CAACM,gBAAgB,IACjBA,gBAAgB,CAACO,MAAM,KAAK,CAAC;EAElC,OACEjC,MAAA,CAAAW,OAAA,CAAAuB,aAAA,CAAAlC,MAAA,CAAAW,OAAA,CAAAwB,QAAA,QACEnC,MAAA,CAAAW,OAAA,CAAAuB,aAAA;IACEE,SAAS,EAAC;EAAsE,GAE/E,CAACL,SAAS,IACT/B,MAAA,CAAAW,OAAA,CAAAuB,aAAA,CAAC1B,KAAA,CAAA6B,IAAI;IACHX,gBAAgB,EAAEA,gBAAiB;IACnCZ,UAAU,EAAEA,UAAW;IACvBC,QAAQ,EAAEA;EAAS,CACpB,CACF,EACAgB,SAAS,IACR/B,MAAA,CAAAW,OAAA,CAAAuB,aAAA;IAAKE,SAAS,EAAE,IAAAE,mBAAU,EAAC,mGAAmG;EAAE,GAC9HtC,MAAA,CAAAW,OAAA,CAAAuB,aAAA,CAAC9B,iBAAA,CAAAmC,UAAU,MAAE,CACV,CAEJ,CACL,CAAC;AAEP,CAAC;AAACC,OAAA,CAAA5B,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -14,24 +14,25 @@ const CellWithData = _ref => {
14
14
  let {
15
15
  currency,
16
16
  pair,
17
- record,
18
- instrumentForCalculations,
17
+ isValid,
19
18
  target,
19
+ division,
20
20
  setSelectedCurrency,
21
21
  setSelectedPair
22
22
  } = _ref;
23
23
  const [hovered, setHovered] = (0, _react.useState)(false);
24
- const instrumentForUpdates = instrumentForCalculations || record.instrument;
24
+ const instrument = `${currency}${(0, _utils.divisionMapper)(division)}${pair}`;
25
+ const instrumentForUpdates = isValid ? instrument : `${pair}${(0, _utils.divisionMapper)(division)}${currency}`;
25
26
  const {
26
27
  update,
27
28
  error: liveRatesError
28
29
  } = (0, _labsWidgetCommon.useLiveRatesMessage)(instrumentForUpdates, target);
29
30
  const updatedRecord = {
30
- displayName: record.displayName,
31
- instrument: record.instrument,
31
+ displayName: `${currency}/${pair}`,
32
+ instrument,
32
33
  buy: update?.ask,
33
34
  buyPriceMovement: update?.askPriceMovement,
34
- displayPrecision: update?.displayPrecision
35
+ displayPrecision: currency === 'JPY' && !isValid ? 6 : update?.displayPrecision
35
36
  };
36
37
  const checkLoading = id => !liveRatesError && updatedRecord?.[id] === undefined;
37
38
  const handleMouseEnter = () => {
@@ -51,9 +52,9 @@ const CellWithData = _ref => {
51
52
  mouseEnterHandler: handleMouseEnter,
52
53
  mouseLeaveHandler: handleMouseLeave
53
54
  }, _react.default.createElement(_labsWidgetCommon.Price, {
54
- priceMovement: (0, _utils.getPriceMovement)(updatedRecord.buyPriceMovement, !!instrumentForCalculations),
55
+ priceMovement: (0, _utils.getPriceMovement)(updatedRecord.buyPriceMovement, !isValid),
55
56
  movementIndicator: "background"
56
- }, _react.default.createElement("span", null, (0, _utils.getBuyPrice)(updatedRecord.buy, !!instrumentForCalculations).toFixed(updatedRecord.displayPrecision))));
57
+ }, _react.default.createElement("span", null, (0, _utils.getBuyPrice)(updatedRecord.buy, !isValid).toFixed(updatedRecord.displayPrecision))));
57
58
  };
58
59
  exports.CellWithData = CellWithData;
59
60
  //# sourceMappingURL=CellWithData.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CellWithData.js","names":["_react","_interopRequireWildcard","require","_labsWidgetCommon","_Cell","_utils","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CellWithData","_ref","currency","pair","record","instrumentForCalculations","target","setSelectedCurrency","setSelectedPair","hovered","setHovered","useState","instrumentForUpdates","instrument","update","error","liveRatesError","useLiveRatesMessage","updatedRecord","displayName","buy","ask","buyPriceMovement","askPriceMovement","displayPrecision","checkLoading","id","undefined","handleMouseEnter","handleMouseLeave","createElement","Cell","isLoading","isError","mouseEnterHandler","mouseLeaveHandler","Price","priceMovement","getPriceMovement","movementIndicator","getBuyPrice","toFixed","exports"],"sources":["../../../../src/CurrencyCrossTableWidget/components/CellWithData.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Price, useLiveRatesMessage } from '@oanda/labs-widget-common';\nimport { Cell } from './Cell';\nimport { CellWithDataProps } from './types';\nimport { getBuyPrice, getPriceMovement } from '../utils';\n\nconst CellWithData = ({\n currency,\n pair,\n record,\n instrumentForCalculations,\n target,\n setSelectedCurrency,\n setSelectedPair,\n}: CellWithDataProps) => {\n const [hovered, setHovered] = useState(false);\n\n const instrumentForUpdates = instrumentForCalculations || record.instrument;\n\n const { update, error: liveRatesError } = useLiveRatesMessage(\n instrumentForUpdates,\n target,\n );\n\n const updatedRecord: Record<string, any> = {\n displayName: record.displayName,\n instrument: record.instrument,\n buy: update?.ask,\n buyPriceMovement: update?.askPriceMovement,\n displayPrecision: update?.displayPrecision,\n };\n\n const checkLoading = (id: string) => (!liveRatesError && updatedRecord?.[id] === undefined);\n\n const handleMouseEnter = () => {\n setHovered(true);\n setSelectedCurrency(currency);\n setSelectedPair(pair);\n };\n\n const handleMouseLeave = () => {\n setHovered(false);\n setSelectedCurrency('');\n setSelectedPair('');\n };\n\n return (\n <Cell\n isLoading={checkLoading('buy')}\n isError={!!liveRatesError}\n hovered={hovered}\n mouseEnterHandler={handleMouseEnter}\n mouseLeaveHandler={handleMouseLeave}\n >\n <Price priceMovement={getPriceMovement(updatedRecord.buyPriceMovement, !!instrumentForCalculations)} movementIndicator=\"background\">\n <span>\n {getBuyPrice(\n updatedRecord.buy,\n !!instrumentForCalculations,\n ).toFixed(updatedRecord.displayPrecision)}\n </span>\n </Price>\n </Cell>\n );\n};\n\nexport { CellWithData };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AAAyD,SAAAI,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,SAAAN,wBAAAM,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,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,CAAC;EACrB,CAAC;EAED,OACElC,MAAA,CAAAY,OAAA,CAAA4C,aAAA,CAACpD,KAAA,CAAAqD,IAAI;IACHC,SAAS,EAAEP,YAAY,CAAC,KAAK,CAAE;IAC/BQ,OAAO,EAAE,CAAC,CAACjB,cAAe;IAC1BP,OAAO,EAAEA,OAAQ;IACjByB,iBAAiB,EAAEN,gBAAiB;IACpCO,iBAAiB,EAAEN;EAAiB,GAEpCvD,MAAA,CAAAY,OAAA,CAAA4C,aAAA,CAACrD,iBAAA,CAAA2D,KAAK;IAACC,aAAa,EAAE,IAAAC,uBAAgB,EAACpB,aAAa,CAACI,gBAAgB,EAAE,CAAC,CAACjB,yBAAyB,CAAE;IAACkC,iBAAiB,EAAC;EAAY,GACjIjE,MAAA,CAAAY,OAAA,CAAA4C,aAAA,eACG,IAAAU,kBAAW,EACVtB,aAAa,CAACE,GAAG,EACjB,CAAC,CAACf,yBACJ,CAAC,CAACoC,OAAO,CAACvB,aAAa,CAACM,gBAAgB,CACpC,CACD,CACH,CAAC;AAEX,CAAC;AAACkB,OAAA,CAAA1C,YAAA,GAAAA,YAAA","ignoreList":[]}
1
+ {"version":3,"file":"CellWithData.js","names":["_react","_interopRequireWildcard","require","_labsWidgetCommon","_Cell","_utils","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CellWithData","_ref","currency","pair","isValid","target","division","setSelectedCurrency","setSelectedPair","hovered","setHovered","useState","instrument","divisionMapper","instrumentForUpdates","update","error","liveRatesError","useLiveRatesMessage","updatedRecord","displayName","buy","ask","buyPriceMovement","askPriceMovement","displayPrecision","checkLoading","id","undefined","handleMouseEnter","handleMouseLeave","createElement","Cell","isLoading","isError","mouseEnterHandler","mouseLeaveHandler","Price","priceMovement","getPriceMovement","movementIndicator","getBuyPrice","toFixed","exports"],"sources":["../../../../src/CurrencyCrossTableWidget/components/CellWithData.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Price, useLiveRatesMessage } from '@oanda/labs-widget-common';\nimport { Cell } from './Cell';\nimport { CellWithDataProps } from './types';\nimport { divisionMapper, getBuyPrice, getPriceMovement } from '../utils';\n\nconst CellWithData = ({\n currency,\n pair,\n isValid,\n target,\n division,\n setSelectedCurrency,\n setSelectedPair,\n}: CellWithDataProps) => {\n const [hovered, setHovered] = useState(false);\n\n const instrument = `${currency}${divisionMapper(division)}${pair}`;\n const instrumentForUpdates = isValid ? instrument : `${pair}${divisionMapper(division)}${currency}`;\n\n const { update, error: liveRatesError } = useLiveRatesMessage(\n instrumentForUpdates,\n target,\n );\n\n const updatedRecord: Record<string, any> = {\n displayName: `${currency}/${pair}`,\n instrument,\n buy: update?.ask,\n buyPriceMovement: update?.askPriceMovement,\n displayPrecision: currency === 'JPY' && !isValid ? 6 : update?.displayPrecision,\n };\n\n const checkLoading = (id: string) => (!liveRatesError && updatedRecord?.[id] === undefined);\n\n const handleMouseEnter = () => {\n setHovered(true);\n setSelectedCurrency(currency);\n setSelectedPair(pair);\n };\n\n const handleMouseLeave = () => {\n setHovered(false);\n setSelectedCurrency('');\n setSelectedPair('');\n };\n\n return (\n <Cell\n isLoading={checkLoading('buy')}\n isError={!!liveRatesError}\n hovered={hovered}\n mouseEnterHandler={handleMouseEnter}\n mouseLeaveHandler={handleMouseLeave}\n >\n <Price priceMovement={getPriceMovement(updatedRecord.buyPriceMovement, !isValid)} movementIndicator=\"background\">\n <span>\n {getBuyPrice(\n updatedRecord.buy,\n !isValid,\n ).toFixed(updatedRecord.displayPrecision)}\n </span>\n </Price>\n </Cell>\n );\n};\n\nexport { CellWithData };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AAAyE,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBA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BR,OAAO,EAAEA,OAAQ;IACjB0B,iBAAiB,EAAEN,gBAAiB;IACpCO,iBAAiB,EAAEN;EAAiB,GAEpCxD,MAAA,CAAAY,OAAA,CAAA6C,aAAA,CAACtD,iBAAA,CAAA4D,KAAK;IAACC,aAAa,EAAE,IAAAC,uBAAgB,EAACpB,aAAa,CAACI,gBAAgB,EAAE,CAACnB,OAAO,CAAE;IAACoC,iBAAiB,EAAC;EAAY,GAC9GlE,MAAA,CAAAY,OAAA,CAAA6C,aAAA,eACG,IAAAU,kBAAW,EACVtB,aAAa,CAACE,GAAG,EACjB,CAACjB,OACH,CAAC,CAACsC,OAAO,CAACvB,aAAa,CAACM,gBAAgB,CACpC,CACD,CACH,CAAC;AAEX,CAAC;AAACkB,OAAA,CAAA3C,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../../src/CurrencyCrossTableWidget/components/types.ts"],"sourcesContent":["import { DataRecord, LoaderSize } from '@oanda/labs-widget-common';\nimport { Division } from '../../gql/types/graphql';\n\nexport interface CellValidationWrapperProps {\n currency: string;\n pair: string;\n instrument: string;\n target: EventTarget | null;\n division: Division;\n setSelectedCurrency: React.Dispatch<React.SetStateAction<string>>;\n setSelectedPair: React.Dispatch<React.SetStateAction<string>>;\n}\nexport interface CellWithDataProps {\n currency: string;\n pair: string;\n instrumentForCalculations: string;\n record: DataRecord;\n target: EventTarget | null;\n division: Division;\n setSelectedCurrency: React.Dispatch<React.SetStateAction<string>>;\n setSelectedPair: React.Dispatch<React.SetStateAction<string>>;\n}\n\nexport interface CellProps {\n children: React.ReactNode;\n isLoading?: boolean;\n isError?: boolean;\n loaderSize?: LoaderSize;\n hovered: boolean;\n mouseEnterHandler: () => void;\n mouseLeaveHandler: () => void;\n}\n\nexport interface TextCellProps {\n label?: string;\n emptyIndicator?: boolean;\n hovered?: boolean;\n sticky?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../src/CurrencyCrossTableWidget/components/types.ts"],"sourcesContent":["import { LoaderSize } from '@oanda/labs-widget-common';\nimport { Division } from '../../gql/types/graphql';\n\nexport interface CellWithDataProps {\n currency: string;\n pair: string;\n isValid: boolean;\n target: EventTarget | null;\n division: Division;\n setSelectedCurrency: React.Dispatch<React.SetStateAction<string>>;\n setSelectedPair: React.Dispatch<React.SetStateAction<string>>;\n}\n\nexport interface CellProps {\n children: React.ReactNode;\n isLoading?: boolean;\n isError?: boolean;\n loaderSize?: LoaderSize;\n hovered: boolean;\n mouseEnterHandler: () => void;\n mouseLeaveHandler: () => void;\n}\n\nexport interface TextCellProps {\n label?: string;\n emptyIndicator?: boolean;\n hovered?: boolean;\n sticky?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["_monoI18n","require"],"sources":["../../../src/CurrencyCrossTableWidget/types.tsx"],"sourcesContent":["import { Locale } from '@oanda/mono-i18n';\nimport { Theme } from '@oanda/labs-widget-common';\nimport { Division } from '../gql/types/graphql';\n\nexport { Locale } from '@oanda/mono-i18n';\n\nexport interface CurrencyCrossTableConfig {\n division: Division;\n graphqlUrl: string;\n liveRatesUrl: string;\n currencies: string[];\n locale: Locale;\n theme?: Theme;\n isParamError?: boolean;\n removePadding?: boolean;\n}\n\nexport interface ValidationWrapperProps {\n currencies: string[];\n division: Division;\n isParamError?: boolean;\n}\nexport interface MainProps {\n currencies: string[];\n instruments: string[];\n division: Division;\n}\n"],"mappings":";;;;;;;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["_monoI18n","require"],"sources":["../../../src/CurrencyCrossTableWidget/types.tsx"],"sourcesContent":["import { Locale } from '@oanda/mono-i18n';\nimport { Theme } from '@oanda/labs-widget-common';\nimport { Division } from '../gql/types/graphql';\n\nexport { Locale } from '@oanda/mono-i18n';\n\nexport interface CurrencyCrossTableConfig {\n division: Division;\n graphqlUrl: string;\n liveRatesUrl: string;\n currencies: string[];\n locale: Locale;\n theme?: Theme;\n isParamError?: boolean;\n removePadding?: boolean;\n}\n\nexport interface ValidationWrapperProps {\n currencies: string[];\n division: Division;\n isParamError?: boolean;\n}\nexport interface MainProps {\n currencies: string[];\n validInstruments: string[];\n division: Division;\n}\n"],"mappings":";;;;;;;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA","ignoreList":[]}
@@ -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 validateInstruments($instruments: [String]!, $division: Division) {\n mapInstrumentNames(instruments: $instruments, division: $division) {\n name\n displayName\n }\n }\n": types.ValidateInstrumentsDocument
11
+ "\n query validateInstruments($instruments: [String]!, $division: Division!) {\n resolveInstrumentsByDivision(instruments: $instruments, division: $division) {\n name\n displayName\n }\n }\n": types.ValidateInstrumentsDocument
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","ValidateInstrumentsDocument","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 validateInstruments($instruments: [String]!, $division: Division) {\\n mapInstrumentNames(instruments: $instruments, division: $division) {\\n name\\n displayName\\n }\\n }\\n\": types.ValidateInstrumentsDocument,\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 validateInstruments($instruments: [String]!, $division: Division) {\\n mapInstrumentNames(instruments: $instruments, division: $division) {\\n name\\n displayName\\n }\\n }\\n\"): (typeof documents)[\"\\n query validateInstruments($instruments: [String]!, $division: Division) {\\n mapInstrumentNames(instruments: $instruments, division: $division) {\\n name\\n displayName\\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>> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;"],"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;EACd,sMAAsM,EAAEvB,KAAK,CAACwB;AAClN,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","ValidateInstrumentsDocument","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 validateInstruments($instruments: [String]!, $division: Division!) {\\n resolveInstrumentsByDivision(instruments: $instruments, division: $division) {\\n name\\n displayName\\n }\\n }\\n\": types.ValidateInstrumentsDocument,\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 validateInstruments($instruments: [String]!, $division: Division!) {\\n resolveInstrumentsByDivision(instruments: $instruments, division: $division) {\\n name\\n displayName\\n }\\n }\\n\"): (typeof documents)[\"\\n query validateInstruments($instruments: [String]!, $division: Division!) {\\n resolveInstrumentsByDivision(instruments: $instruments, division: $division) {\\n name\\n displayName\\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>> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAmC,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAA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Document = {
158
158
  }
159
159
  },
160
160
  "type": {
161
- "kind": "NamedType",
162
- "name": {
163
- "kind": "Name",
164
- "value": "Division"
161
+ "kind": "NonNullType",
162
+ "type": {
163
+ "kind": "NamedType",
164
+ "name": {
165
+ "kind": "Name",
166
+ "value": "Division"
167
+ }
165
168
  }
166
169
  }
167
170
  }],
@@ -171,7 +174,7 @@ const ValidateInstrumentsDocument = exports.ValidateInstrumentsDocument = {
171
174
  "kind": "Field",
172
175
  "name": {
173
176
  "kind": "Name",
174
- "value": "mapInstrumentNames"
177
+ "value": "resolveInstrumentsByDivision"
175
178
  },
176
179
  "arguments": [{
177
180
  "kind": "Argument",
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.js","names":["AssetClassName","exports","BookType","CorrelationTimeUnit","CurrencyName","CurrencyPowerBalanceTimeUnit","DataSource","Division","Region","Sort","TopicalSort","ValueAtRiskBars","ValueAtRiskDuration","VolatilityChartTimeSpan","VolatilityChartTimeUnit","ValidateInstrumentsDocument"],"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 isAllowedPartner?: Maybe<Scalars['Boolean']['output']>;\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 QueryIsAllowedPartnerArgs = {\n url: Scalars['String']['input'];\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 ValidateInstrumentsQueryVariables = Exact<{\n instruments: Array<InputMaybe<Scalars['String']['input']>> | InputMaybe<Scalars['String']['input']>;\n division?: InputMaybe<Division>;\n}>;\n\n\nexport type ValidateInstrumentsQuery = { __typename?: 'Query', mapInstrumentNames?: Array<{ __typename?: 'Instrument', name: string, displayName: string } | null> | null };\n\n\nexport const ValidateInstrumentsDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"validateInstruments\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"ListType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Division\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"mapInstrumentNames\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"displayName\"}}]}}]}}]} as unknown as DocumentNode<ValidateInstrumentsQuery, ValidateInstrumentsQueryVariables>;"],"mappings":";;;;;;IAwBYA,cAAc,GAAAC,OAAA,CAAAD,cAAA,aAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAd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U;UAAC;QAAC,CAAC,CAAC;QAAC,cAAc,EAAC;UAAC,MAAM,EAAC,cAAc;UAAC,YAAY,EAAC,CAAC;YAAC,MAAM,EAAC,OAAO;YAAC,MAAM,EAAC;cAAC,MAAM,EAAC,MAAM;cAAC,OAAO,EAAC;YAAM;UAAC,CAAC,EAAC;YAAC,MAAM,EAAC,OAAO;YAAC,MAAM,EAAC;cAAC,MAAM,EAAC,MAAM;cAAC,OAAO,EAAC;YAAa;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","ValidateInstrumentsDocument"],"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 isAllowedPartner?: Maybe<Scalars['Boolean']['output']>;\n mapInstrumentNames?: Maybe<Array<Maybe<Instrument>>>;\n orderPositionBooks: Array<Maybe<OrderPositionData>>;\n resolveInstrumentsByDivision?: Maybe<Array<Instrument>>;\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 QueryIsAllowedPartnerArgs = {\n url: Scalars['String']['input'];\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 QueryResolveInstrumentsByDivisionArgs = {\n division: Division;\n instruments: Array<InputMaybe<Scalars['String']['input']>>;\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 ValidateInstrumentsQueryVariables = Exact<{\n instruments: Array<InputMaybe<Scalars['String']['input']>> | InputMaybe<Scalars['String']['input']>;\n division: Division;\n}>;\n\n\nexport type ValidateInstrumentsQuery = { __typename?: 'Query', resolveInstrumentsByDivision?: Array<{ __typename?: 'Instrument', name: string, displayName: string }> | null };\n\n\nexport const ValidateInstrumentsDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"validateInstruments\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"ListType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Division\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"resolveInstrumentsByDivision\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"displayName\"}}]}}]}}]} as unknown as DocumentNode<ValidateInstrumentsQuery, ValidateInstrumentsQueryVariables>;"],"mappings":";;;;;;IAwBYA,cAAc,GAAAC,OAAA,CAAAD,cAA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