@oanda/labs-currency-power-balance-widget 1.0.1

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 (176) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/codegen.ts +15 -0
  3. package/dist/main/CurrencyPowerBalanceWidget/ChartWithData.js +46 -0
  4. package/dist/main/CurrencyPowerBalanceWidget/ChartWithData.js.map +1 -0
  5. package/dist/main/CurrencyPowerBalanceWidget/CurrencyPowerBalance.js +28 -0
  6. package/dist/main/CurrencyPowerBalanceWidget/CurrencyPowerBalance.js.map +1 -0
  7. package/dist/main/CurrencyPowerBalanceWidget/Main.js +12 -0
  8. package/dist/main/CurrencyPowerBalanceWidget/Main.js.map +1 -0
  9. package/dist/main/CurrencyPowerBalanceWidget/Tool.js +28 -0
  10. package/dist/main/CurrencyPowerBalanceWidget/Tool.js.map +1 -0
  11. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/Chart.js +45 -0
  12. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/Chart.js.map +1 -0
  13. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/index.js +17 -0
  14. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/index.js.map +1 -0
  15. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/constants.js +31 -0
  16. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/constants.js.map +1 -0
  17. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/formatters.js +59 -0
  18. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/formatters.js.map +1 -0
  19. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/getOption.js +103 -0
  20. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/getOption.js.map +1 -0
  21. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.js +36 -0
  22. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.js.map +1 -0
  23. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/index.js +28 -0
  24. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/index.js.map +1 -0
  25. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/types.js +6 -0
  26. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/types.js.map +1 -0
  27. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/types.js +6 -0
  28. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/types.js.map +1 -0
  29. package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.js +53 -0
  30. package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.js.map +1 -0
  31. package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.js +46 -0
  32. package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.js.map +1 -0
  33. package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/index.js +17 -0
  34. package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/index.js.map +1 -0
  35. package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/types.js +6 -0
  36. package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/types.js.map +1 -0
  37. package/dist/main/CurrencyPowerBalanceWidget/config.js +39 -0
  38. package/dist/main/CurrencyPowerBalanceWidget/config.js.map +1 -0
  39. package/dist/main/CurrencyPowerBalanceWidget/constants.js +8 -0
  40. package/dist/main/CurrencyPowerBalanceWidget/constants.js.map +1 -0
  41. package/dist/main/CurrencyPowerBalanceWidget/index.js +17 -0
  42. package/dist/main/CurrencyPowerBalanceWidget/index.js.map +1 -0
  43. package/dist/main/CurrencyPowerBalanceWidget/render.js +28 -0
  44. package/dist/main/CurrencyPowerBalanceWidget/render.js.map +1 -0
  45. package/dist/main/CurrencyPowerBalanceWidget/types.js +6 -0
  46. package/dist/main/CurrencyPowerBalanceWidget/types.js.map +1 -0
  47. package/dist/main/gql/getCurrencyPowerBalance.js +11 -0
  48. package/dist/main/gql/getCurrencyPowerBalance.js.map +1 -0
  49. package/dist/main/gql/types/fragment-masking.js +24 -0
  50. package/dist/main/gql/types/fragment-masking.js.map +1 -0
  51. package/dist/main/gql/types/gql.js +17 -0
  52. package/dist/main/gql/types/gql.js.map +1 -0
  53. package/dist/main/gql/types/graphql.js +171 -0
  54. package/dist/main/gql/types/graphql.js.map +1 -0
  55. package/dist/main/gql/types/index.js +28 -0
  56. package/dist/main/gql/types/index.js.map +1 -0
  57. package/dist/main/index.js +17 -0
  58. package/dist/main/index.js.map +1 -0
  59. package/dist/module/CurrencyPowerBalanceWidget/ChartWithData.js +39 -0
  60. package/dist/module/CurrencyPowerBalanceWidget/ChartWithData.js.map +1 -0
  61. package/dist/module/CurrencyPowerBalanceWidget/CurrencyPowerBalance.js +21 -0
  62. package/dist/module/CurrencyPowerBalanceWidget/CurrencyPowerBalance.js.map +1 -0
  63. package/dist/module/CurrencyPowerBalanceWidget/Main.js +5 -0
  64. package/dist/module/CurrencyPowerBalanceWidget/Main.js.map +1 -0
  65. package/dist/module/CurrencyPowerBalanceWidget/Tool.js +20 -0
  66. package/dist/module/CurrencyPowerBalanceWidget/Tool.js.map +1 -0
  67. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/Chart.js +36 -0
  68. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/Chart.js.map +1 -0
  69. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/index.js +2 -0
  70. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/index.js.map +1 -0
  71. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/constants.js +26 -0
  72. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/constants.js.map +1 -0
  73. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/formatters.js +52 -0
  74. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/formatters.js.map +1 -0
  75. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/getOption.js +97 -0
  76. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/getOption.js.map +1 -0
  77. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.js +30 -0
  78. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.js.map +1 -0
  79. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/index.js +3 -0
  80. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/index.js.map +1 -0
  81. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/types.js +2 -0
  82. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/types.js.map +1 -0
  83. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/types.js +2 -0
  84. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/types.js.map +1 -0
  85. package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.js +46 -0
  86. package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.js.map +1 -0
  87. package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.js +39 -0
  88. package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.js.map +1 -0
  89. package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/index.js +2 -0
  90. package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/index.js.map +1 -0
  91. package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/types.js +2 -0
  92. package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/types.js.map +1 -0
  93. package/dist/module/CurrencyPowerBalanceWidget/config.js +34 -0
  94. package/dist/module/CurrencyPowerBalanceWidget/config.js.map +1 -0
  95. package/dist/module/CurrencyPowerBalanceWidget/constants.js +2 -0
  96. package/dist/module/CurrencyPowerBalanceWidget/constants.js.map +1 -0
  97. package/dist/module/CurrencyPowerBalanceWidget/index.js +2 -0
  98. package/dist/module/CurrencyPowerBalanceWidget/index.js.map +1 -0
  99. package/dist/module/CurrencyPowerBalanceWidget/render.js +25 -0
  100. package/dist/module/CurrencyPowerBalanceWidget/render.js.map +1 -0
  101. package/dist/module/CurrencyPowerBalanceWidget/types.js +2 -0
  102. package/dist/module/CurrencyPowerBalanceWidget/types.js.map +1 -0
  103. package/dist/module/gql/getCurrencyPowerBalance.js +5 -0
  104. package/dist/module/gql/getCurrencyPowerBalance.js.map +1 -0
  105. package/dist/module/gql/types/fragment-masking.js +16 -0
  106. package/dist/module/gql/types/fragment-masking.js.map +1 -0
  107. package/dist/module/gql/types/gql.js +9 -0
  108. package/dist/module/gql/types/gql.js.map +1 -0
  109. package/dist/module/gql/types/graphql.js +165 -0
  110. package/dist/module/gql/types/graphql.js.map +1 -0
  111. package/dist/module/gql/types/index.js +3 -0
  112. package/dist/module/gql/types/index.js.map +1 -0
  113. package/dist/module/index.js +2 -0
  114. package/dist/module/index.js.map +1 -0
  115. package/dist/types/CurrencyPowerBalanceWidget/ChartWithData.d.ts +4 -0
  116. package/dist/types/CurrencyPowerBalanceWidget/CurrencyPowerBalance.d.ts +4 -0
  117. package/dist/types/CurrencyPowerBalanceWidget/Main.d.ts +3 -0
  118. package/dist/types/CurrencyPowerBalanceWidget/Tool.d.ts +3 -0
  119. package/dist/types/CurrencyPowerBalanceWidget/components/Chart/Chart.d.ts +4 -0
  120. package/dist/types/CurrencyPowerBalanceWidget/components/Chart/index.d.ts +1 -0
  121. package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/constants.d.ts +24 -0
  122. package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/formatters.d.ts +5 -0
  123. package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/getOption.d.ts +74 -0
  124. package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.d.ts +110 -0
  125. package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/index.d.ts +2 -0
  126. package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/types.d.ts +5 -0
  127. package/dist/types/CurrencyPowerBalanceWidget/components/Chart/types.d.ts +5 -0
  128. package/dist/types/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.d.ts +4 -0
  129. package/dist/types/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.d.ts +4 -0
  130. package/dist/types/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/index.d.ts +1 -0
  131. package/dist/types/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/types.d.ts +12 -0
  132. package/dist/types/CurrencyPowerBalanceWidget/config.d.ts +11 -0
  133. package/dist/types/CurrencyPowerBalanceWidget/constants.d.ts +1 -0
  134. package/dist/types/CurrencyPowerBalanceWidget/index.d.ts +1 -0
  135. package/dist/types/CurrencyPowerBalanceWidget/render.d.ts +1 -0
  136. package/dist/types/CurrencyPowerBalanceWidget/types.d.ts +12 -0
  137. package/dist/types/gql/getCurrencyPowerBalance.d.ts +1 -0
  138. package/dist/types/gql/types/fragment-masking.d.ts +15 -0
  139. package/dist/types/gql/types/gql.d.ts +36 -0
  140. package/dist/types/gql/types/graphql.d.ts +274 -0
  141. package/dist/types/gql/types/index.d.ts +2 -0
  142. package/dist/types/index.d.ts +1 -0
  143. package/index.ts +1 -0
  144. package/package.json +27 -0
  145. package/src/CurrencyPowerBalanceWidget/ChartWithData.tsx +48 -0
  146. package/src/CurrencyPowerBalanceWidget/CurrencyPowerBalance.tsx +24 -0
  147. package/src/CurrencyPowerBalanceWidget/Main.tsx +10 -0
  148. package/src/CurrencyPowerBalanceWidget/Tool.tsx +27 -0
  149. package/src/CurrencyPowerBalanceWidget/components/Chart/Chart.tsx +45 -0
  150. package/src/CurrencyPowerBalanceWidget/components/Chart/index.ts +1 -0
  151. package/src/CurrencyPowerBalanceWidget/components/Chart/options/constants.tsx +41 -0
  152. package/src/CurrencyPowerBalanceWidget/components/Chart/options/formatters.ts +46 -0
  153. package/src/CurrencyPowerBalanceWidget/components/Chart/options/getOption.ts +82 -0
  154. package/src/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.ts +45 -0
  155. package/src/CurrencyPowerBalanceWidget/components/Chart/options/index.ts +2 -0
  156. package/src/CurrencyPowerBalanceWidget/components/Chart/options/types.ts +5 -0
  157. package/src/CurrencyPowerBalanceWidget/components/Chart/types.ts +6 -0
  158. package/src/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.tsx +24 -0
  159. package/src/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.tsx +58 -0
  160. package/src/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/index.ts +1 -0
  161. package/src/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/types.ts +14 -0
  162. package/src/CurrencyPowerBalanceWidget/config.ts +30 -0
  163. package/src/CurrencyPowerBalanceWidget/constants.ts +1 -0
  164. package/src/CurrencyPowerBalanceWidget/index.ts +1 -0
  165. package/src/CurrencyPowerBalanceWidget/render.tsx +36 -0
  166. package/src/CurrencyPowerBalanceWidget/types.ts +15 -0
  167. package/src/gql/getCurrencyPowerBalance.ts +13 -0
  168. package/src/gql/types/fragment-masking.ts +66 -0
  169. package/src/gql/types/gql.ts +42 -0
  170. package/src/gql/types/graphql.ts +283 -0
  171. package/src/gql/types/index.ts +2 -0
  172. package/src/index.ts +1 -0
  173. package/test/Main.test.tsx +29 -0
  174. package/test/chartFormatters.test.ts +59 -0
  175. package/test/responsesMocks.ts +223 -0
  176. package/tsconfig.types.json +12 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","names":["CURRENCY_POWER_BALANCE_TOOLTIP_ID"],"sources":["../../../src/CurrencyPowerBalanceWidget/constants.ts"],"sourcesContent":["export const CURRENCY_POWER_BALANCE_TOOLTIP_ID = 'currency-power-balance-widget-tooltip';\n"],"mappings":"AAAA,OAAO,MAAMA,iCAAiC,GAAG,uCAAuC"}
@@ -0,0 +1,2 @@
1
+ export * from './CurrencyPowerBalance';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/CurrencyPowerBalanceWidget/index.ts"],"sourcesContent":["export * from './CurrencyPowerBalance';\n"],"mappings":"AAAA,cAAc,wBAAwB"}
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { render } from 'react-dom';
3
+ import { CurrencyPowerBalance } from './CurrencyPowerBalance';
4
+ const {
5
+ graphqlUrl: configGraphQl,
6
+ renderElementId: configRenderElementId
7
+ } = window.currencyPowerBalanceWidgetConfig || {};
8
+ const {
9
+ graphqlUrl
10
+ } = window.widgetsConfig || {};
11
+ const currencyPowerBalanceParamsElements = document.querySelectorAll('div[data-currency-power-balance-params]');
12
+ if (currencyPowerBalanceParamsElements.length > 0) {
13
+ currencyPowerBalanceParamsElements.forEach(element => {
14
+ const mode = element.getAttribute('data-mode');
15
+ render(React.createElement(CurrencyPowerBalance, {
16
+ graphqlUrl: graphqlUrl,
17
+ theme: mode
18
+ }), element);
19
+ });
20
+ } else {
21
+ render(React.createElement(CurrencyPowerBalance, {
22
+ graphqlUrl: configGraphQl
23
+ }), document.getElementById(configRenderElementId));
24
+ }
25
+ //# sourceMappingURL=render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.js","names":["React","render","CurrencyPowerBalance","graphqlUrl","configGraphQl","renderElementId","configRenderElementId","window","currencyPowerBalanceWidgetConfig","widgetsConfig","currencyPowerBalanceParamsElements","document","querySelectorAll","length","forEach","element","mode","getAttribute","createElement","theme","getElementById"],"sources":["../../../src/CurrencyPowerBalanceWidget/render.tsx"],"sourcesContent":["import React from 'react';\nimport { render } from 'react-dom';\nimport { Theme } from '@oanda/labs-widget-common';\nimport { CurrencyPowerBalance } from './CurrencyPowerBalance';\n\nconst {\n graphqlUrl: configGraphQl,\n renderElementId: configRenderElementId,\n} = window.currencyPowerBalanceWidgetConfig || {};\n\nconst {\n graphqlUrl,\n} = window.widgetsConfig || {};\n\nconst currencyPowerBalanceParamsElements = document.querySelectorAll('div[data-currency-power-balance-params]');\n\nif (currencyPowerBalanceParamsElements.length > 0) {\n currencyPowerBalanceParamsElements.forEach((element) => {\n const mode = element.getAttribute('data-mode');\n\n render(\n <CurrencyPowerBalance\n graphqlUrl={graphqlUrl}\n theme={mode as Theme}\n />,\n element,\n );\n });\n} else {\n render(\n <CurrencyPowerBalance\n graphqlUrl={configGraphQl}\n />,\n document.getElementById(configRenderElementId),\n );\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,QAAQ,WAAW;AAElC,SAASC,oBAAoB,QAAQ,wBAAwB;AAE7D,MAAM;EACJC,UAAU,EAAEC,aAAa;EACzBC,eAAe,EAAEC;AACnB,CAAC,GAAGC,MAAM,CAACC,gCAAgC,IAAI,CAAC,CAAC;AAEjD,MAAM;EACJL;AACF,CAAC,GAAGI,MAAM,CAACE,aAAa,IAAI,CAAC,CAAC;AAE9B,MAAMC,kCAAkC,GAAGC,QAAQ,CAACC,gBAAgB,CAAC,yCAAyC,CAAC;AAE/G,IAAIF,kCAAkC,CAACG,MAAM,GAAG,CAAC,EAAE;EACjDH,kCAAkC,CAACI,OAAO,CAAEC,OAAO,IAAK;IACtD,MAAMC,IAAI,GAAGD,OAAO,CAACE,YAAY,CAAC,WAAW,CAAC;IAE9ChB,MAAM,CACJD,KAAA,CAAAkB,aAAA,CAAChB,oBAAoB;MACnBC,UAAU,EAAEA,UAAW;MACvBgB,KAAK,EAAEH;IAAc,CACtB,CAAC,EACFD,OACF,CAAC;EACH,CAAC,CAAC;AACJ,CAAC,MAAM;EACLd,MAAM,CACJD,KAAA,CAAAkB,aAAA,CAAChB,oBAAoB;IACnBC,UAAU,EAAEC;EAAc,CAC3B,CAAC,EACFO,QAAQ,CAACS,cAAc,CAACd,qBAAqB,CAC/C,CAAC;AACH"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/CurrencyPowerBalanceWidget/types.ts"],"sourcesContent":["import { Theme } from '@oanda/labs-widget-common';\nimport { CurrencyPowerBalanceTimeUnit } from '../gql/types/graphql';\n\nexport interface CurrencyPowerBalanceConfig {\n graphqlUrl: string;\n theme?: Theme;\n}\n\nexport interface CurrencyPowerBalanceWrapperConfig extends CurrencyPowerBalanceConfig {\n renderElementId: string;\n}\n\nexport interface ChartWithDataProps {\n timeUnit: CurrencyPowerBalanceTimeUnit;\n}\n"],"mappings":""}
@@ -0,0 +1,5 @@
1
+ var _templateObject;
2
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
+ import { gql } from '@apollo/client';
4
+ export const getCurrencyPowerBalance = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query GetCurrencyPowerBalance($timeUnit: CurrencyPowerBalanceTimeUnit!) {\n currencyPowerBalance(timeUnit: $timeUnit) {\n currency\n power {\n point\n price\n }\n }\n }\n"])));
5
+ //# sourceMappingURL=getCurrencyPowerBalance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCurrencyPowerBalance.js","names":["gql","getCurrencyPowerBalance","_templateObject","_taggedTemplateLiteral"],"sources":["../../../src/gql/getCurrencyPowerBalance.ts"],"sourcesContent":["import { gql } from '@apollo/client';\n\nexport const getCurrencyPowerBalance = gql`\n query GetCurrencyPowerBalance($timeUnit: CurrencyPowerBalanceTimeUnit!) {\n currencyPowerBalance(timeUnit: $timeUnit) {\n currency\n power {\n point\n price\n }\n }\n }\n`;\n"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,OAAO,MAAMC,uBAAuB,GAAGD,GAAG,CAAAE,eAAA,KAAAA,eAAA,GAAAC,sBAAA,0NAUzC"}
@@ -0,0 +1,16 @@
1
+ export function useFragment(_documentNode, fragmentType) {
2
+ return fragmentType;
3
+ }
4
+ export function makeFragmentData(data, _fragment) {
5
+ return data;
6
+ }
7
+ export function isFragmentReady(queryNode, fragmentNode, data) {
8
+ var _meta__, _fragDef$name;
9
+ const deferredFields = (_meta__ = queryNode.__meta__) === null || _meta__ === void 0 ? void 0 : _meta__.deferredFields;
10
+ if (!deferredFields) return true;
11
+ const fragDef = fragmentNode.definitions[0];
12
+ const fragName = fragDef === null || fragDef === void 0 || (_fragDef$name = fragDef.name) === null || _fragDef$name === void 0 ? void 0 : _fragDef$name.value;
13
+ const fields = fragName && deferredFields[fragName] || [];
14
+ return fields.length > 0 && fields.every(field => data && field in data);
15
+ }
16
+ //# sourceMappingURL=fragment-masking.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fragment-masking.js","names":["useFragment","_documentNode","fragmentType","makeFragmentData","data","_fragment","isFragmentReady","queryNode","fragmentNode","_meta__","_fragDef$name","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":"AAoCA,OAAO,SAASA,WAAWA,CACzBC,aAAiD,EACjDC,YAAmJ,EAClG;EACjD,OAAOA,YAAY;AACrB;AAGA,OAAO,SAASC,gBAAgBA,CAG9BC,IAAQ,EAAEC,SAAY,EAAmB;EACzC,OAAOD,IAAI;AACb;AACA,OAAO,SAASE,eAAeA,CAC7BC,SAA8C,EAC9CC,YAAsC,EACtCJ,IAAiF,EACtC;EAAA,IAAAK,OAAA,EAAAC,aAAA;EAC3C,MAAMC,cAAc,IAAAF,OAAA,GAAIF,SAAS,CAAwEK,QAAQ,cAAAH,OAAA,uBAA1FA,OAAA,CACnBE,cAAc;EAElB,IAAI,CAACA,cAAc,EAAE,OAAO,IAAI;EAEhC,MAAME,OAAO,GAAGL,YAAY,CAACM,WAAW,CAAC,CAAC,CAAuC;EACjF,MAAMC,QAAQ,GAAGF,OAAO,aAAPA,OAAO,gBAAAH,aAAA,GAAPG,OAAO,CAAEG,IAAI,cAAAN,aAAA,uBAAbA,aAAA,CAAeO,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,IAAIjB,IAAI,IAAIiB,KAAK,IAAIjB,IAAI,CAAC;AAC1E"}
@@ -0,0 +1,9 @@
1
+ import * as types from './graphql';
2
+ const documents = {
3
+ "\n query GetCurrencyPowerBalance($timeUnit: CurrencyPowerBalanceTimeUnit!) {\n currencyPowerBalance(timeUnit: $timeUnit) {\n currency\n power {\n point\n price\n }\n }\n }\n": types.GetCurrencyPowerBalanceDocument
4
+ };
5
+ export function graphql(source) {
6
+ var _source;
7
+ return (_source = documents[source]) !== null && _source !== void 0 ? _source : {};
8
+ }
9
+ //# sourceMappingURL=gql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gql.js","names":["types","documents","GetCurrencyPowerBalanceDocument","graphql","source","_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 GetCurrencyPowerBalance($timeUnit: CurrencyPowerBalanceTimeUnit!) {\\n currencyPowerBalance(timeUnit: $timeUnit) {\\n currency\\n power {\\n point\\n price\\n }\\n }\\n }\\n\": types.GetCurrencyPowerBalanceDocument,\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 GetCurrencyPowerBalance($timeUnit: CurrencyPowerBalanceTimeUnit!) {\\n currencyPowerBalance(timeUnit: $timeUnit) {\\n currency\\n power {\\n point\\n price\\n }\\n }\\n }\\n\"): (typeof documents)[\"\\n query GetCurrencyPowerBalance($timeUnit: CurrencyPowerBalanceTimeUnit!) {\\n currencyPowerBalance(timeUnit: $timeUnit) {\\n currency\\n power {\\n point\\n price\\n }\\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,OAAO,KAAKA,KAAK,MAAM,WAAW;AAalC,MAAMC,SAAS,GAAG;EACd,oNAAoN,EAAED,KAAK,CAACE;AAChO,CAAC;AAqBD,OAAO,SAASC,OAAOA,CAACC,MAAc,EAAE;EAAA,IAAAC,OAAA;EACtC,QAAAA,OAAA,GAAQJ,SAAS,CAASG,MAAM,CAAC,cAAAC,OAAA,cAAAA,OAAA,GAAI,CAAC,CAAC;AACzC"}
@@ -0,0 +1,165 @@
1
+ export let BookType = function (BookType) {
2
+ BookType["Order"] = "ORDER";
3
+ BookType["Position"] = "POSITION";
4
+ return BookType;
5
+ }({});
6
+ export let CurrencyName = function (CurrencyName) {
7
+ CurrencyName["Aud"] = "AUD";
8
+ CurrencyName["Cad"] = "CAD";
9
+ CurrencyName["Chf"] = "CHF";
10
+ CurrencyName["Eur"] = "EUR";
11
+ CurrencyName["Gbp"] = "GBP";
12
+ CurrencyName["Jpy"] = "JPY";
13
+ CurrencyName["Nzd"] = "NZD";
14
+ CurrencyName["Usd"] = "USD";
15
+ return CurrencyName;
16
+ }({});
17
+ export let CurrencyPowerBalanceTimeUnit = function (CurrencyPowerBalanceTimeUnit) {
18
+ CurrencyPowerBalanceTimeUnit["CurrentDay"] = "CURRENT_DAY";
19
+ CurrencyPowerBalanceTimeUnit["H4"] = "H4";
20
+ CurrencyPowerBalanceTimeUnit["H8"] = "H8";
21
+ CurrencyPowerBalanceTimeUnit["H24"] = "H24";
22
+ CurrencyPowerBalanceTimeUnit["M1"] = "M1";
23
+ CurrencyPowerBalanceTimeUnit["M3"] = "M3";
24
+ CurrencyPowerBalanceTimeUnit["PreviousDay"] = "PREVIOUS_DAY";
25
+ CurrencyPowerBalanceTimeUnit["W1"] = "W1";
26
+ return CurrencyPowerBalanceTimeUnit;
27
+ }({});
28
+ export let DataSource = function (DataSource) {
29
+ DataSource["Ny4"] = "NY4";
30
+ DataSource["Ty3"] = "TY3";
31
+ return DataSource;
32
+ }({});
33
+ export let Division = function (Division) {
34
+ Division["Oap"] = "OAP";
35
+ Division["Oau"] = "OAU";
36
+ Division["Oc"] = "OC";
37
+ Division["Ocan"] = "OCAN";
38
+ Division["Oel"] = "OEL";
39
+ Division["Ogm"] = "OGM";
40
+ Division["Oj"] = "OJ";
41
+ Division["Otms"] = "OTMS";
42
+ return Division;
43
+ }({});
44
+ export let Region = function (Region) {
45
+ Region["Amer"] = "AMER";
46
+ Region["Apac"] = "APAC";
47
+ Region["Emea"] = "EMEA";
48
+ return Region;
49
+ }({});
50
+ export let Sort = function (Sort) {
51
+ Sort["Bearish"] = "BEARISH";
52
+ Sort["Bullish"] = "BULLISH";
53
+ return Sort;
54
+ }({});
55
+ export let TopicalSort = function (TopicalSort) {
56
+ TopicalSort["Bearish"] = "BEARISH";
57
+ TopicalSort["Bullish"] = "BULLISH";
58
+ TopicalSort["Hot"] = "HOT";
59
+ TopicalSort["Popular"] = "POPULAR";
60
+ TopicalSort["Volatile"] = "VOLATILE";
61
+ return TopicalSort;
62
+ }({});
63
+ export let VolatilityChartTimeSpan = function (VolatilityChartTimeSpan) {
64
+ VolatilityChartTimeSpan["D5"] = "D5";
65
+ VolatilityChartTimeSpan["D10"] = "D10";
66
+ VolatilityChartTimeSpan["M1"] = "M1";
67
+ VolatilityChartTimeSpan["M3"] = "M3";
68
+ VolatilityChartTimeSpan["W5"] = "W5";
69
+ VolatilityChartTimeSpan["W10"] = "W10";
70
+ return VolatilityChartTimeSpan;
71
+ }({});
72
+ export let VolatilityChartTimeUnit = function (VolatilityChartTimeUnit) {
73
+ VolatilityChartTimeUnit["D"] = "D";
74
+ VolatilityChartTimeUnit["H"] = "H";
75
+ VolatilityChartTimeUnit["W"] = "W";
76
+ return VolatilityChartTimeUnit;
77
+ }({});
78
+ export const GetCurrencyPowerBalanceDocument = {
79
+ "kind": "Document",
80
+ "definitions": [{
81
+ "kind": "OperationDefinition",
82
+ "operation": "query",
83
+ "name": {
84
+ "kind": "Name",
85
+ "value": "GetCurrencyPowerBalance"
86
+ },
87
+ "variableDefinitions": [{
88
+ "kind": "VariableDefinition",
89
+ "variable": {
90
+ "kind": "Variable",
91
+ "name": {
92
+ "kind": "Name",
93
+ "value": "timeUnit"
94
+ }
95
+ },
96
+ "type": {
97
+ "kind": "NonNullType",
98
+ "type": {
99
+ "kind": "NamedType",
100
+ "name": {
101
+ "kind": "Name",
102
+ "value": "CurrencyPowerBalanceTimeUnit"
103
+ }
104
+ }
105
+ }
106
+ }],
107
+ "selectionSet": {
108
+ "kind": "SelectionSet",
109
+ "selections": [{
110
+ "kind": "Field",
111
+ "name": {
112
+ "kind": "Name",
113
+ "value": "currencyPowerBalance"
114
+ },
115
+ "arguments": [{
116
+ "kind": "Argument",
117
+ "name": {
118
+ "kind": "Name",
119
+ "value": "timeUnit"
120
+ },
121
+ "value": {
122
+ "kind": "Variable",
123
+ "name": {
124
+ "kind": "Name",
125
+ "value": "timeUnit"
126
+ }
127
+ }
128
+ }],
129
+ "selectionSet": {
130
+ "kind": "SelectionSet",
131
+ "selections": [{
132
+ "kind": "Field",
133
+ "name": {
134
+ "kind": "Name",
135
+ "value": "currency"
136
+ }
137
+ }, {
138
+ "kind": "Field",
139
+ "name": {
140
+ "kind": "Name",
141
+ "value": "power"
142
+ },
143
+ "selectionSet": {
144
+ "kind": "SelectionSet",
145
+ "selections": [{
146
+ "kind": "Field",
147
+ "name": {
148
+ "kind": "Name",
149
+ "value": "point"
150
+ }
151
+ }, {
152
+ "kind": "Field",
153
+ "name": {
154
+ "kind": "Name",
155
+ "value": "price"
156
+ }
157
+ }]
158
+ }
159
+ }]
160
+ }
161
+ }]
162
+ }
163
+ }]
164
+ };
165
+ //# sourceMappingURL=graphql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql.js","names":["BookType","CurrencyName","CurrencyPowerBalanceTimeUnit","DataSource","Division","Region","Sort","TopicalSort","VolatilityChartTimeSpan","VolatilityChartTimeUnit","GetCurrencyPowerBalanceDocument"],"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?: Maybe<Array<Maybe<Instrument>>>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport enum BookType {\n Order = 'ORDER',\n Position = 'POSITION'\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};\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 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 Otms = 'OTMS'\n}\n\nexport type Instrument = {\n __typename?: 'Instrument';\n displayName?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\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: 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 currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;\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 volatilityChart?: Maybe<Array<Maybe<VolatilityChart>>>;\n volatilityChartAssetClasses?: Maybe<Array<VolatilityChartAssetClass>>;\n};\n\n\nexport type QueryAssetClassesArgs = {\n division: Division;\n};\n\n\nexport type QueryCurrencyPowerBalanceArgs = {\n timeUnit: CurrencyPowerBalanceTimeUnit;\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 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 division?: InputMaybe<Division>;\n sort: TopicalSort;\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};\n\nexport enum Sort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH'\n}\n\nexport type TopicalInstrument = {\n __typename?: 'TopicalInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: TopicalInstrumentSentiment;\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 type TopicalInstrumentSentiment = {\n __typename?: 'TopicalInstrumentSentiment';\n longPercent: Scalars['Float']['output'];\n shortPercent: Scalars['Float']['output'];\n};\n\nexport enum TopicalSort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH',\n Hot = 'HOT',\n Popular = 'POPULAR',\n Volatile = 'VOLATILE'\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};\n\nexport type VolatilityChartAssetClass = {\n __typename?: 'VolatilityChartAssetClass';\n instruments: Array<VolatilityChartInstrument>;\n name: Scalars['String']['output'];\n};\n\nexport type VolatilityChartInstrument = {\n __typename?: 'VolatilityChartInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n};\n\nexport enum VolatilityChartTimeSpan {\n D5 = 'D5',\n /** Valid for: H */\n D10 = 'D10',\n /** Valid for: H */\n M1 = 'M1',\n /** Valid for: D */\n M3 = 'M3',\n /** Valid for: D */\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 GetCurrencyPowerBalanceQueryVariables = Exact<{\n timeUnit: CurrencyPowerBalanceTimeUnit;\n}>;\n\n\nexport type GetCurrencyPowerBalanceQuery = { __typename?: 'Query', currencyPowerBalance?: Array<{ __typename?: 'CurrencyPowerBalance', currency: CurrencyName, power: Array<{ __typename?: 'CurrencyPower', point: string, price: number }> }> | null };\n\n\nexport const GetCurrencyPowerBalanceDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"GetCurrencyPowerBalance\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"timeUnit\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"CurrencyPowerBalanceTimeUnit\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"currencyPowerBalance\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"timeUnit\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"timeUnit\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"currency\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"power\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"point\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"price\"}}]}}]}}]}}]} as unknown as DocumentNode<GetCurrencyPowerBalanceQuery, GetCurrencyPowerBalanceQueryVariables>;"],"mappings":"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"}
@@ -0,0 +1,3 @@
1
+ export * from "./fragment-masking";
2
+ export * from "./gql";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/gql/types/index.ts"],"sourcesContent":["export * from \"./fragment-masking\";\nexport * from \"./gql\";"],"mappings":"AAAA,cAAc,oBAAoB;AAClC,cAAc,OAAO"}
@@ -0,0 +1,2 @@
1
+ export * from './CurrencyPowerBalanceWidget';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from './CurrencyPowerBalanceWidget';\n"],"mappings":"AAAA,cAAc,8BAA8B"}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { ChartWithDataProps } from './types';
3
+ declare const ChartWithData: ({ timeUnit }: ChartWithDataProps) => JSX.Element;
4
+ export { ChartWithData };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { CurrencyPowerBalanceConfig } from './types';
3
+ declare const CurrencyPowerBalance: ({ graphqlUrl, theme, }: CurrencyPowerBalanceConfig) => JSX.Element;
4
+ export { CurrencyPowerBalance };
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Main: () => JSX.Element;
3
+ export { Main };
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Tool: () => JSX.Element;
3
+ export { Tool };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { ChartProps } from './types';
3
+ declare const Chart: ({ values, timeUnit }: ChartProps) => JSX.Element;
4
+ export { Chart };
@@ -0,0 +1 @@
1
+ export * from './Chart';
@@ -0,0 +1,24 @@
1
+ declare const X_LABEL_SIZE = 90;
2
+ declare const X_LABEL_SIZE_MOBILE = 110;
3
+ declare const Y_LABEL_SIZE_MOBILE = 35;
4
+ declare const Y_LABEL_SIZE = 45;
5
+ declare const CHART_WIDTH = 9999;
6
+ declare const CHART_HEIGHT = 425;
7
+ declare const LEGEND_HEIGHT = 50;
8
+ declare const LEGEND_HEIGHT_MOBILE = 70;
9
+ declare const VERTICAL_LINE_COUNT = 10;
10
+ declare const COLOR_CONFIG: {
11
+ AUD: string;
12
+ JPY: string;
13
+ USD: string;
14
+ EUR: string;
15
+ GBP: string;
16
+ CHF: string;
17
+ CAD: string;
18
+ NZD: string;
19
+ };
20
+ declare const TOOLTIP_LINE_COLOR_CONFIG: {
21
+ DARK: string;
22
+ LIGHT: string;
23
+ };
24
+ export { X_LABEL_SIZE, X_LABEL_SIZE_MOBILE, Y_LABEL_SIZE_MOBILE, Y_LABEL_SIZE, CHART_WIDTH, CHART_HEIGHT, LEGEND_HEIGHT, LEGEND_HEIGHT_MOBILE, VERTICAL_LINE_COUNT, COLOR_CONFIG, TOOLTIP_LINE_COLOR_CONFIG, };
@@ -0,0 +1,5 @@
1
+ import { CurrencyPowerBalanceTimeUnit } from '../../../../gql/types/graphql';
2
+ import { TooltipFormatterParams } from './types';
3
+ declare const xAxisLabelFormatter: (label: string, timeUnit: CurrencyPowerBalanceTimeUnit) => string;
4
+ declare const tooltipFormatter: (values: TooltipFormatterParams[]) => string;
5
+ export { tooltipFormatter, xAxisLabelFormatter, };
@@ -0,0 +1,74 @@
1
+ import { CurrencyPowerBalance, CurrencyPowerBalanceTimeUnit } from '../../../../gql/types/graphql';
2
+ declare const getOption: (values: CurrencyPowerBalance[], timeUnit: CurrencyPowerBalanceTimeUnit, isDark: boolean) => {
3
+ animation: boolean;
4
+ legend: {
5
+ data: {
6
+ name: import("../../../../gql/types/graphql").CurrencyName;
7
+ itemStyle: {
8
+ color: string;
9
+ };
10
+ }[];
11
+ bottom: number;
12
+ icon: string;
13
+ };
14
+ tooltip: {
15
+ trigger: string;
16
+ axisPointer: {
17
+ axis: string;
18
+ z: number;
19
+ lineStyle: {
20
+ color: string;
21
+ };
22
+ };
23
+ formatter: (values: import("./types").TooltipFormatterParams[]) => string;
24
+ };
25
+ xAxis: {
26
+ type: string;
27
+ axisTick: {
28
+ show: boolean;
29
+ };
30
+ axisLine: {
31
+ show: boolean;
32
+ };
33
+ splitLine: {
34
+ show: boolean;
35
+ };
36
+ axisLabel: {
37
+ margin: number;
38
+ showMinLabel: boolean;
39
+ rotate: number;
40
+ interval: number;
41
+ formatter: (label: string) => string;
42
+ };
43
+ };
44
+ yAxis: {
45
+ type: string;
46
+ position: string;
47
+ splitNumber: number;
48
+ axisLine: {
49
+ show: boolean;
50
+ };
51
+ axisTick: {
52
+ show: boolean;
53
+ };
54
+ boundaryGap: string[];
55
+ axisLabel: {
56
+ showMaxLabel: boolean;
57
+ showMinLabel: boolean;
58
+ };
59
+ };
60
+ series: {
61
+ name: import("../../../../gql/types/graphql").CurrencyName;
62
+ type: string;
63
+ symbol: string;
64
+ showSymbol: boolean;
65
+ itemStyle: {
66
+ color: string;
67
+ };
68
+ lineStyle: {
69
+ color: string;
70
+ };
71
+ data: (string | number)[][];
72
+ }[];
73
+ };
74
+ export { getOption };
@@ -0,0 +1,110 @@
1
+ declare const getResponsiveOption: (isDesktop: boolean, isMobile: boolean, isDark: boolean) => {
2
+ yAxis: {
3
+ axisLabel: {
4
+ margin: number;
5
+ };
6
+ };
7
+ grid: {
8
+ name: string;
9
+ top: string;
10
+ left: string;
11
+ right: string;
12
+ bottom: string;
13
+ }[];
14
+ graphic: ({
15
+ top: number | undefined;
16
+ bottom: number | undefined;
17
+ left: number | undefined;
18
+ right: number | undefined;
19
+ shape: {
20
+ x1: number;
21
+ y1: number;
22
+ x2: number;
23
+ y2: number;
24
+ };
25
+ type: string;
26
+ silent: boolean;
27
+ z: number;
28
+ style: {
29
+ stroke: string;
30
+ lineWidth: number;
31
+ };
32
+ } | {
33
+ top: number;
34
+ shape: {
35
+ x1: number;
36
+ y1: number;
37
+ x2: number;
38
+ y2: number;
39
+ };
40
+ type: string;
41
+ silent: boolean;
42
+ z: number;
43
+ style: {
44
+ stroke: string;
45
+ lineWidth: number;
46
+ };
47
+ } | {
48
+ right: number;
49
+ shape: {
50
+ x1: number;
51
+ y1: number;
52
+ x2: number;
53
+ y2: number;
54
+ };
55
+ type: string;
56
+ silent: boolean;
57
+ z: number;
58
+ style: {
59
+ stroke: string;
60
+ lineWidth: number;
61
+ };
62
+ } | {
63
+ bottom: number;
64
+ shape: {
65
+ x1: number;
66
+ y1: number;
67
+ x2: number;
68
+ y2: number;
69
+ };
70
+ type: string;
71
+ silent: boolean;
72
+ z: number;
73
+ style: {
74
+ stroke: string;
75
+ lineWidth: number;
76
+ };
77
+ } | {
78
+ left: number;
79
+ shape: {
80
+ x1: number;
81
+ y1: number;
82
+ x2: number;
83
+ y2: number;
84
+ };
85
+ type: string;
86
+ silent: boolean;
87
+ z: number;
88
+ style: {
89
+ stroke: string;
90
+ lineWidth: number;
91
+ };
92
+ } | {
93
+ right: number;
94
+ bottom: number;
95
+ shape: {
96
+ x1: number;
97
+ y1: number;
98
+ x2: number;
99
+ y2: number;
100
+ };
101
+ type: string;
102
+ silent: boolean;
103
+ z: number;
104
+ style: {
105
+ stroke: string;
106
+ lineWidth: number;
107
+ };
108
+ })[];
109
+ };
110
+ export { getResponsiveOption };
@@ -0,0 +1,2 @@
1
+ export * from './getOption';
2
+ export * from './getResponsiveOption';
@@ -0,0 +1,5 @@
1
+ export interface TooltipFormatterParams {
2
+ marker: string;
3
+ seriesName: string;
4
+ value: string[];
5
+ }
@@ -0,0 +1,5 @@
1
+ import { CurrencyPowerBalance, CurrencyPowerBalanceTimeUnit } from '../../../gql/types/graphql';
2
+ export interface ChartProps {
3
+ values: CurrencyPowerBalance[];
4
+ timeUnit: CurrencyPowerBalanceTimeUnit;
5
+ }
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { TimeUnitSwitchProps } from './types';
3
+ declare const TimeUnitSelect: ({ selected, options, callback, }: TimeUnitSwitchProps) => JSX.Element;
4
+ export { TimeUnitSelect };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { TimeUnitSwitchProps } from './types';
3
+ declare const TimeUnitSwitch: ({ selected, options, callback, labelCallback, }: TimeUnitSwitchProps) => JSX.Element;
4
+ export { TimeUnitSwitch };
@@ -0,0 +1 @@
1
+ export * from './TimeUnitSwitch';
@@ -0,0 +1,12 @@
1
+ import { CurrencyPowerBalanceTimeUnit } from '../../../gql/types/graphql';
2
+ export interface TimeUnitOption {
3
+ value: CurrencyPowerBalanceTimeUnit;
4
+ label: string;
5
+ tooltip?: string;
6
+ }
7
+ export interface TimeUnitSwitchProps {
8
+ selected: CurrencyPowerBalanceTimeUnit;
9
+ options: TimeUnitOption[];
10
+ callback: (value: CurrencyPowerBalanceTimeUnit) => void;
11
+ labelCallback?: (value: string) => string;
12
+ }
@@ -0,0 +1,11 @@
1
+ import { CurrencyPowerBalanceTimeUnit } from '../gql/types/graphql';
2
+ declare const timeUnitConfig: ({
3
+ value: CurrencyPowerBalanceTimeUnit;
4
+ label: string;
5
+ tooltip: string;
6
+ } | {
7
+ value: CurrencyPowerBalanceTimeUnit;
8
+ label: string;
9
+ tooltip?: undefined;
10
+ })[];
11
+ export { timeUnitConfig };
@@ -0,0 +1 @@
1
+ export declare const CURRENCY_POWER_BALANCE_TOOLTIP_ID = "currency-power-balance-widget-tooltip";
@@ -0,0 +1 @@
1
+ export * from './CurrencyPowerBalance';