@oanda/labs-currency-strength-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 (137) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/codegen.ts +15 -0
  3. package/dist/main/CurrencyStrengthWidget/ChartsWithData.js +50 -0
  4. package/dist/main/CurrencyStrengthWidget/ChartsWithData.js.map +1 -0
  5. package/dist/main/CurrencyStrengthWidget/CurrencyStrengthWidget.js +37 -0
  6. package/dist/main/CurrencyStrengthWidget/CurrencyStrengthWidget.js.map +1 -0
  7. package/dist/main/CurrencyStrengthWidget/Main.js +22 -0
  8. package/dist/main/CurrencyStrengthWidget/Main.js.map +1 -0
  9. package/dist/main/CurrencyStrengthWidget/components/Chart/Chart.js +50 -0
  10. package/dist/main/CurrencyStrengthWidget/components/Chart/Chart.js.map +1 -0
  11. package/dist/main/CurrencyStrengthWidget/components/Chart/constants.js +22 -0
  12. package/dist/main/CurrencyStrengthWidget/components/Chart/constants.js.map +1 -0
  13. package/dist/main/CurrencyStrengthWidget/components/Chart/formatters.js +18 -0
  14. package/dist/main/CurrencyStrengthWidget/components/Chart/formatters.js.map +1 -0
  15. package/dist/main/CurrencyStrengthWidget/components/Chart/getOption.js +121 -0
  16. package/dist/main/CurrencyStrengthWidget/components/Chart/getOption.js.map +1 -0
  17. package/dist/main/CurrencyStrengthWidget/components/Chart/index.js +17 -0
  18. package/dist/main/CurrencyStrengthWidget/components/Chart/index.js.map +1 -0
  19. package/dist/main/CurrencyStrengthWidget/components/Chart/types.js +6 -0
  20. package/dist/main/CurrencyStrengthWidget/components/Chart/types.js.map +1 -0
  21. package/dist/main/CurrencyStrengthWidget/index.js +17 -0
  22. package/dist/main/CurrencyStrengthWidget/index.js.map +1 -0
  23. package/dist/main/CurrencyStrengthWidget/render.js +34 -0
  24. package/dist/main/CurrencyStrengthWidget/render.js.map +1 -0
  25. package/dist/main/CurrencyStrengthWidget/types.js +6 -0
  26. package/dist/main/CurrencyStrengthWidget/types.js.map +1 -0
  27. package/dist/main/gql/getCurrencyStrength.js +11 -0
  28. package/dist/main/gql/getCurrencyStrength.js.map +1 -0
  29. package/dist/main/gql/types/fragment-masking.js +24 -0
  30. package/dist/main/gql/types/fragment-masking.js.map +1 -0
  31. package/dist/main/gql/types/gql.js +17 -0
  32. package/dist/main/gql/types/gql.js.map +1 -0
  33. package/dist/main/gql/types/graphql.js +137 -0
  34. package/dist/main/gql/types/graphql.js.map +1 -0
  35. package/dist/main/gql/types/index.js +28 -0
  36. package/dist/main/gql/types/index.js.map +1 -0
  37. package/dist/main/index.js +17 -0
  38. package/dist/main/index.js.map +1 -0
  39. package/dist/main/translations/index.js +19 -0
  40. package/dist/main/translations/index.js.map +1 -0
  41. package/dist/main/translations/sources/en.json +6 -0
  42. package/dist/main/translations/sources/zh_TW.json +6 -0
  43. package/dist/main/translations/translations.js +8 -0
  44. package/dist/main/translations/translations.js.map +1 -0
  45. package/dist/module/CurrencyStrengthWidget/ChartsWithData.js +41 -0
  46. package/dist/module/CurrencyStrengthWidget/ChartsWithData.js.map +1 -0
  47. package/dist/module/CurrencyStrengthWidget/CurrencyStrengthWidget.js +30 -0
  48. package/dist/module/CurrencyStrengthWidget/CurrencyStrengthWidget.js.map +1 -0
  49. package/dist/module/CurrencyStrengthWidget/Main.js +15 -0
  50. package/dist/module/CurrencyStrengthWidget/Main.js.map +1 -0
  51. package/dist/module/CurrencyStrengthWidget/components/Chart/Chart.js +41 -0
  52. package/dist/module/CurrencyStrengthWidget/components/Chart/Chart.js.map +1 -0
  53. package/dist/module/CurrencyStrengthWidget/components/Chart/constants.js +16 -0
  54. package/dist/module/CurrencyStrengthWidget/components/Chart/constants.js.map +1 -0
  55. package/dist/module/CurrencyStrengthWidget/components/Chart/formatters.js +11 -0
  56. package/dist/module/CurrencyStrengthWidget/components/Chart/formatters.js.map +1 -0
  57. package/dist/module/CurrencyStrengthWidget/components/Chart/getOption.js +114 -0
  58. package/dist/module/CurrencyStrengthWidget/components/Chart/getOption.js.map +1 -0
  59. package/dist/module/CurrencyStrengthWidget/components/Chart/index.js +2 -0
  60. package/dist/module/CurrencyStrengthWidget/components/Chart/index.js.map +1 -0
  61. package/dist/module/CurrencyStrengthWidget/components/Chart/types.js +2 -0
  62. package/dist/module/CurrencyStrengthWidget/components/Chart/types.js.map +1 -0
  63. package/dist/module/CurrencyStrengthWidget/index.js +2 -0
  64. package/dist/module/CurrencyStrengthWidget/index.js.map +1 -0
  65. package/dist/module/CurrencyStrengthWidget/render.js +31 -0
  66. package/dist/module/CurrencyStrengthWidget/render.js.map +1 -0
  67. package/dist/module/CurrencyStrengthWidget/types.js +2 -0
  68. package/dist/module/CurrencyStrengthWidget/types.js.map +1 -0
  69. package/dist/module/gql/getCurrencyStrength.js +6 -0
  70. package/dist/module/gql/getCurrencyStrength.js.map +1 -0
  71. package/dist/module/gql/types/fragment-masking.js +16 -0
  72. package/dist/module/gql/types/fragment-masking.js.map +1 -0
  73. package/dist/module/gql/types/gql.js +9 -0
  74. package/dist/module/gql/types/gql.js.map +1 -0
  75. package/dist/module/gql/types/graphql.js +131 -0
  76. package/dist/module/gql/types/graphql.js.map +1 -0
  77. package/dist/module/gql/types/index.js +3 -0
  78. package/dist/module/gql/types/index.js.map +1 -0
  79. package/dist/module/index.js +2 -0
  80. package/dist/module/index.js.map +1 -0
  81. package/dist/module/translations/index.js +12 -0
  82. package/dist/module/translations/index.js.map +1 -0
  83. package/dist/module/translations/sources/en.json +6 -0
  84. package/dist/module/translations/sources/zh_TW.json +6 -0
  85. package/dist/module/translations/translations.js +2 -0
  86. package/dist/module/translations/translations.js.map +1 -0
  87. package/dist/types/CurrencyStrengthWidget/ChartsWithData.d.ts +3 -0
  88. package/dist/types/CurrencyStrengthWidget/CurrencyStrengthWidget.d.ts +4 -0
  89. package/dist/types/CurrencyStrengthWidget/Main.d.ts +3 -0
  90. package/dist/types/CurrencyStrengthWidget/components/Chart/Chart.d.ts +4 -0
  91. package/dist/types/CurrencyStrengthWidget/components/Chart/constants.d.ts +14 -0
  92. package/dist/types/CurrencyStrengthWidget/components/Chart/formatters.d.ts +2 -0
  93. package/dist/types/CurrencyStrengthWidget/components/Chart/getOption.d.ts +169 -0
  94. package/dist/types/CurrencyStrengthWidget/components/Chart/index.d.ts +1 -0
  95. package/dist/types/CurrencyStrengthWidget/components/Chart/types.d.ts +22 -0
  96. package/dist/types/CurrencyStrengthWidget/index.d.ts +1 -0
  97. package/dist/types/CurrencyStrengthWidget/render.d.ts +1 -0
  98. package/dist/types/CurrencyStrengthWidget/types.d.ts +11 -0
  99. package/dist/types/gql/getCurrencyStrength.d.ts +2 -0
  100. package/dist/types/gql/types/fragment-masking.d.ts +15 -0
  101. package/dist/types/gql/types/gql.d.ts +36 -0
  102. package/dist/types/gql/types/graphql.d.ts +282 -0
  103. package/dist/types/gql/types/index.d.ts +2 -0
  104. package/dist/types/index.d.ts +1 -0
  105. package/dist/types/translations/index.d.ts +4 -0
  106. package/dist/types/translations/translations.d.ts +1 -0
  107. package/index.ts +1 -0
  108. package/lokalise.config.json +18 -0
  109. package/package.json +29 -0
  110. package/src/CurrencyStrengthWidget/ChartsWithData.tsx +53 -0
  111. package/src/CurrencyStrengthWidget/CurrencyStrengthWidget.tsx +32 -0
  112. package/src/CurrencyStrengthWidget/Main.tsx +18 -0
  113. package/src/CurrencyStrengthWidget/components/Chart/Chart.tsx +48 -0
  114. package/src/CurrencyStrengthWidget/components/Chart/constants.tsx +18 -0
  115. package/src/CurrencyStrengthWidget/components/Chart/formatters.ts +13 -0
  116. package/src/CurrencyStrengthWidget/components/Chart/getOption.ts +109 -0
  117. package/src/CurrencyStrengthWidget/components/Chart/index.ts +1 -0
  118. package/src/CurrencyStrengthWidget/components/Chart/types.ts +25 -0
  119. package/src/CurrencyStrengthWidget/index.ts +1 -0
  120. package/src/CurrencyStrengthWidget/render.tsx +34 -0
  121. package/src/CurrencyStrengthWidget/types.ts +13 -0
  122. package/src/gql/getCurrencyStrength.ts +15 -0
  123. package/src/gql/types/fragment-masking.ts +66 -0
  124. package/src/gql/types/gql.ts +42 -0
  125. package/src/gql/types/graphql.ts +290 -0
  126. package/src/gql/types/index.ts +2 -0
  127. package/src/index.ts +1 -0
  128. package/src/translations/index.ts +13 -0
  129. package/src/translations/sources/en.json +6 -0
  130. package/src/translations/sources/zh_TW.json +6 -0
  131. package/src/translations/translations.ts +3 -0
  132. package/test/Main.test.tsx +28 -0
  133. package/test/chartOptions.test.ts +18 -0
  134. package/test/mocks/currencyStrengthMock.ts +270 -0
  135. package/test/mocks/index.ts +2 -0
  136. package/test/mocks/responsesMocks.ts +19 -0
  137. package/tsconfig.types.json +12 -0
@@ -0,0 +1,2 @@
1
+ export * from './CurrencyStrengthWidget';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/CurrencyStrengthWidget/index.ts"],"sourcesContent":["export * from './CurrencyStrengthWidget';\n"],"mappings":"AAAA,cAAc,0BAA0B"}
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import { render } from 'react-dom';
3
+ import { validateToolParams } from '@oanda/labs-widget-common';
4
+ import { CurrencyStrengthWidget } from './CurrencyStrengthWidget';
5
+ const {
6
+ graphqlUrl
7
+ } = window.widgetsConfig || {};
8
+ const volatilityChartParamsElements = document.querySelectorAll('div[data-currency-strength-params]');
9
+ volatilityChartParamsElements.forEach(element => {
10
+ const params = element.getAttribute('data-currency-strength-params');
11
+ const mode = element.getAttribute('data-mode');
12
+ const {
13
+ locale
14
+ } = JSON.parse(params);
15
+ const isParamError = validateToolParams({
16
+ locale,
17
+ graphqlUrl
18
+ }, [{
19
+ name: 'locale',
20
+ valueCheck: value => value.split('-')[0] === 'en' || value.split('-')[0] === 'zh'
21
+ }, {
22
+ name: 'graphqlUrl'
23
+ }]);
24
+ render(React.createElement(CurrencyStrengthWidget, {
25
+ graphqlUrl: graphqlUrl,
26
+ locale: locale,
27
+ theme: mode,
28
+ isParamError: isParamError
29
+ }), element);
30
+ });
31
+ //# sourceMappingURL=render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.js","names":["React","render","validateToolParams","CurrencyStrengthWidget","graphqlUrl","window","widgetsConfig","volatilityChartParamsElements","document","querySelectorAll","forEach","element","params","getAttribute","mode","locale","JSON","parse","isParamError","name","valueCheck","value","split","createElement","theme"],"sources":["../../../src/CurrencyStrengthWidget/render.tsx"],"sourcesContent":["import React from 'react';\nimport { render } from 'react-dom';\nimport { Theme, validateToolParams } from '@oanda/labs-widget-common';\nimport { CurrencyStrengthWidget } from './CurrencyStrengthWidget';\n\nconst {\n graphqlUrl,\n} = window.widgetsConfig || {};\n\nconst volatilityChartParamsElements = document.querySelectorAll('div[data-currency-strength-params]');\n\nvolatilityChartParamsElements.forEach((element) => {\n const params = element.getAttribute('data-currency-strength-params');\n const mode = element.getAttribute('data-mode');\n const { locale } = JSON.parse(params as string);\n\n const isParamError = validateToolParams({ locale, graphqlUrl }, [\n {\n name: 'locale',\n valueCheck: (value) => value.split('-')[0] === 'en' || value.split('-')[0] === 'zh',\n }, {\n name: 'graphqlUrl',\n }]);\n\n render(\n <CurrencyStrengthWidget\n graphqlUrl={graphqlUrl}\n locale={locale}\n theme={mode as Theme}\n isParamError={isParamError}\n />,\n element,\n );\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,QAAQ,WAAW;AAClC,SAAgBC,kBAAkB,QAAQ,2BAA2B;AACrE,SAASC,sBAAsB,QAAQ,0BAA0B;AAEjE,MAAM;EACJC;AACF,CAAC,GAAGC,MAAM,CAACC,aAAa,IAAI,CAAC,CAAC;AAE9B,MAAMC,6BAA6B,GAAGC,QAAQ,CAACC,gBAAgB,CAAC,oCAAoC,CAAC;AAErGF,6BAA6B,CAACG,OAAO,CAAEC,OAAO,IAAK;EACjD,MAAMC,MAAM,GAAGD,OAAO,CAACE,YAAY,CAAC,+BAA+B,CAAC;EACpE,MAAMC,IAAI,GAAGH,OAAO,CAACE,YAAY,CAAC,WAAW,CAAC;EAC9C,MAAM;IAAEE;EAAO,CAAC,GAAGC,IAAI,CAACC,KAAK,CAACL,MAAgB,CAAC;EAE/C,MAAMM,YAAY,GAAGhB,kBAAkB,CAAC;IAAEa,MAAM;IAAEX;EAAW,CAAC,EAAE,CAC9D;IACEe,IAAI,EAAE,QAAQ;IACdC,UAAU,EAAGC,KAAK,IAAKA,KAAK,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,IAAID,KAAK,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK;EACjF,CAAC,EAAE;IACDH,IAAI,EAAE;EACR,CAAC,CAAC,CAAC;EAELlB,MAAM,CACJD,KAAA,CAAAuB,aAAA,CAACpB,sBAAsB;IACrBC,UAAU,EAAEA,UAAW;IACvBW,MAAM,EAAEA,MAAO;IACfS,KAAK,EAAEV,IAAc;IACrBI,YAAY,EAAEA;EAAa,CAC5B,CAAC,EACFP,OACF,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/CurrencyStrengthWidget/types.ts"],"sourcesContent":["import { Locale } from '@oanda/mono-i18n';\nimport { Theme } from '@oanda/labs-widget-common';\n\nexport interface VolatilityChartConfig {\n graphqlUrl: string;\n locale: Locale;\n theme?: Theme;\n isParamError?: boolean;\n}\n\nexport interface VolatilityChartWrapperConfig extends VolatilityChartConfig {\n renderElementId: string;\n}\n"],"mappings":""}
@@ -0,0 +1,6 @@
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
+ const getCurrencyStrength = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query GetCurrencyStrength {\n currencyStrength {\n currency\n strengthRelation {\n currency\n percentage\n }\n }\n }\n"])));
5
+ export { getCurrencyStrength };
6
+ //# sourceMappingURL=getCurrencyStrength.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCurrencyStrength.js","names":["gql","getCurrencyStrength","_templateObject","_taggedTemplateLiteral"],"sources":["../../../src/gql/getCurrencyStrength.ts"],"sourcesContent":["import { gql } from '@apollo/client';\n\nconst getCurrencyStrength = gql`\n query GetCurrencyStrength {\n currencyStrength {\n currency\n strengthRelation {\n currency\n percentage\n }\n }\n }\n`;\n\nexport { getCurrencyStrength };\n"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,MAAMC,mBAAmB,GAAGD,GAAG,CAAAE,eAAA,KAAAA,eAAA,GAAAC,sBAAA,sKAU9B;AAED,SAASF,mBAAmB"}
@@ -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 GetCurrencyStrength {\n currencyStrength {\n currency\n strengthRelation {\n currency\n percentage\n }\n }\n }\n": types.GetCurrencyStrengthDocument
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","GetCurrencyStrengthDocument","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 GetCurrencyStrength {\\n currencyStrength {\\n currency\\n strengthRelation {\\n currency\\n percentage\\n }\\n }\\n }\\n\": types.GetCurrencyStrengthDocument,\n};\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n *\n *\n * @example\n * ```ts\n * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);\n * ```\n *\n * The query argument is unknown!\n * Please regenerate the types.\n */\nexport function graphql(source: string): unknown;\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\n query GetCurrencyStrength {\\n currencyStrength {\\n currency\\n strengthRelation {\\n currency\\n percentage\\n }\\n }\\n }\\n\"): (typeof documents)[\"\\n query GetCurrencyStrength {\\n currencyStrength {\\n currency\\n strengthRelation {\\n currency\\n percentage\\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,gKAAgK,EAAED,KAAK,CAACE;AAC5K,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,131 @@
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 GetCurrencyStrengthDocument = {
79
+ "kind": "Document",
80
+ "definitions": [{
81
+ "kind": "OperationDefinition",
82
+ "operation": "query",
83
+ "name": {
84
+ "kind": "Name",
85
+ "value": "GetCurrencyStrength"
86
+ },
87
+ "selectionSet": {
88
+ "kind": "SelectionSet",
89
+ "selections": [{
90
+ "kind": "Field",
91
+ "name": {
92
+ "kind": "Name",
93
+ "value": "currencyStrength"
94
+ },
95
+ "selectionSet": {
96
+ "kind": "SelectionSet",
97
+ "selections": [{
98
+ "kind": "Field",
99
+ "name": {
100
+ "kind": "Name",
101
+ "value": "currency"
102
+ }
103
+ }, {
104
+ "kind": "Field",
105
+ "name": {
106
+ "kind": "Name",
107
+ "value": "strengthRelation"
108
+ },
109
+ "selectionSet": {
110
+ "kind": "SelectionSet",
111
+ "selections": [{
112
+ "kind": "Field",
113
+ "name": {
114
+ "kind": "Name",
115
+ "value": "currency"
116
+ }
117
+ }, {
118
+ "kind": "Field",
119
+ "name": {
120
+ "kind": "Name",
121
+ "value": "percentage"
122
+ }
123
+ }]
124
+ }
125
+ }]
126
+ }
127
+ }]
128
+ }
129
+ }]
130
+ };
131
+ //# sourceMappingURL=graphql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql.js","names":["BookType","CurrencyName","CurrencyPowerBalanceTimeUnit","DataSource","Division","Region","Sort","TopicalSort","VolatilityChartTimeSpan","VolatilityChartTimeUnit","GetCurrencyStrengthDocument"],"sources":["../../../../src/gql/types/graphql.ts"],"sourcesContent":["/* eslint-disable */\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: number; }\n};\n\nexport type AssetClass = {\n __typename?: 'AssetClass';\n instruments?: 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 type CurrencyStrength = {\n __typename?: 'CurrencyStrength';\n currency: CurrencyName;\n strengthRelation?: Maybe<Array<StrengthRelation>>;\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?: 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 currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;\n currencyStrength?: Maybe<Array<CurrencyStrength>>;\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 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 TopicalInstrument = {\n __typename?: 'TopicalInstrument';\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 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 /** Valid for: H */\n D5 = 'D5',\n /** Valid for: H */\n D10 = 'D10',\n /** Valid for: D */\n M1 = 'M1',\n /** Valid for: D */\n M3 = 'M3',\n /** Valid for: W */\n W5 = 'W5',\n /** Valid for: W */\n W10 = 'W10'\n}\n\nexport enum VolatilityChartTimeUnit {\n D = 'D',\n H = 'H',\n W = 'W'\n}\n\nexport type GetCurrencyStrengthQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type GetCurrencyStrengthQuery = { __typename?: 'Query', currencyStrength?: Array<{ __typename?: 'CurrencyStrength', currency: CurrencyName, strengthRelation?: Array<{ __typename?: 'StrengthRelation', currency: CurrencyName, percentage: number }> | null }> | null };\n\n\nexport const GetCurrencyStrengthDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"GetCurrencyStrength\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"currencyStrength\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"currency\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"strengthRelation\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"currency\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"percentage\"}}]}}]}}]}}]} as unknown as DocumentNode<GetCurrencyStrengthQuery, GetCurrencyStrengthQueryVariables>;"],"mappings":"AAwBA,WAAYA,QAAQ,aAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAKpB,WAAYC,YAAY,aAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAwBxB,WAAYC,4BAA4B,aAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAAA,OAA5BA,4BAA4B;AAAA;AAiBxC,WAAYC,UAAU,aAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAKtB,WAAYC,QAAQ,aAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAmHpB,WAAYC,MAAM,aAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;AAoBlB,WAAYC,IAAI,aAAJA,IAAI;EAAJA,IAAI;EAAJA,IAAI;EAAA,OAAJA,IAAI;AAAA;AAyBhB,WAAYC,WAAW,aAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AA2BvB,WAAYC,uBAAuB,aAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA;AAenC,WAAYC,uBAAuB,aAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA;AAYnC,OAAO,MAAMC,2BAA2B,GAAG;EAAC,MAAM,EAAC,UAAU;EAAC,aAAa,EAAC,CAAC;IAAC,MAAM,EAAC,qBAAqB;IAAC,WAAW,EAAC,OAAO;IAAC,MAAM,EAAC;MAAC,MAAM,EAAC,MAAM;MAAC,OAAO,EAAC;IAAqB,CAAC;IAAC,cAAc,EAAC;MAAC,MAAM,EAAC,cAAc;MAAC,YAAY,EAAC,CAAC;QAAC,MAAM,EAAC,OAAO;QAAC,MAAM,EAAC;UAAC,MAAM,EAAC,MAAM;UAAC,OAAO,EAAC;QAAkB,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;YAAU;UAAC,CAAC,EAAC;YAAC,MAAM,EAAC,OAAO;YAAC,MAAM,EAAC;cAAC,MAAM,EAAC,MAAM;cAAC,OAAO,EAAC;YAAkB,CAAC;YAAC,cAAc,EAAC;cAAC,MAAM,EAAC,cAAc;cAAC,YAAY,EAAC,CAAC;gBAAC,MAAM,EAAC,OAAO;gBAAC,MAAM,EAAC;kBAAC,MAAM,EAAC,MAAM;kBAAC,OAAO,EAAC;gBAAU;cAAC,CAAC,EAAC;gBAAC,MAAM,EAAC,OAAO;gBAAC,MAAM,EAAC;kBAAC,MAAM,EAAC,MAAM;kBAAC,OAAO,EAAC;gBAAY;cAAC,CAAC;YAAC;UAAC,CAAC;QAAC;MAAC,CAAC;IAAC;EAAC,CAAC;AAAC,CAAyF"}
@@ -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 './CurrencyStrengthWidget/CurrencyStrengthWidget';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from './CurrencyStrengthWidget/CurrencyStrengthWidget';\n"],"mappings":"AAAA,cAAc,iDAAiD"}
@@ -0,0 +1,12 @@
1
+ import { Locale } from '@oanda/mono-i18n';
2
+ import en from './sources/en.json';
3
+ import zhTW from './sources/zh_TW.json';
4
+ export const translations = {
5
+ [Locale.en]: {
6
+ translation: en
7
+ },
8
+ [Locale.zhTW]: {
9
+ translation: zhTW
10
+ }
11
+ };
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["Locale","en","zhTW","translations","translation"],"sources":["../../../src/translations/index.ts"],"sourcesContent":["import { Locale, Translations } from '@oanda/mono-i18n';\n\nimport en from './sources/en.json';\nimport zhTW from './sources/zh_TW.json';\n\nimport { defaultTranslations } from './translations';\n\nexport type TranslationKey = keyof typeof defaultTranslations;\n\nexport const translations: Translations = {\n [Locale.en]: { translation: en },\n [Locale.zhTW]: { translation: zhTW },\n};\n"],"mappings":"AAAA,SAASA,MAAM,QAAsB,kBAAkB;AAEvD,OAAOC,EAAE,MAAM,mBAAmB;AAClC,OAAOC,IAAI,MAAM,sBAAsB;AAMvC,OAAO,MAAMC,YAA0B,GAAG;EACxC,CAACH,MAAM,CAACC,EAAE,GAAG;IAAEG,WAAW,EAAEH;EAAG,CAAC;EAChC,CAACD,MAAM,CAACE,IAAI,GAAG;IAAEE,WAAW,EAAEF;EAAK;AACrC,CAAC"}
@@ -0,0 +1,6 @@
1
+ {
2
+ "data_unavailable": "Data unavailable",
3
+ "vs": "vs",
4
+ "5_minutes": "5 minutes",
5
+ "daily": "Daily"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "data_unavailable": "沒有數據",
3
+ "vs": "",
4
+ "5_minutes": "",
5
+ "daily": ""
6
+ }
@@ -0,0 +1,2 @@
1
+ export const defaultTranslations = {};
2
+ //# sourceMappingURL=translations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations.js","names":["defaultTranslations"],"sources":["../../../src/translations/translations.ts"],"sourcesContent":["export const defaultTranslations = {\n\n};\n"],"mappings":"AAAA,OAAO,MAAMA,mBAAmB,GAAG,CAEnC,CAAC"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const ChartWithData: () => JSX.Element;
3
+ export { ChartWithData };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { VolatilityChartConfig } from './types';
3
+ declare const CurrencyStrengthWidget: ({ graphqlUrl, locale, theme, isParamError, }: VolatilityChartConfig) => JSX.Element;
4
+ export { CurrencyStrengthWidget };
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Main: () => JSX.Element;
3
+ export { Main };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { ChartProps } from './types';
3
+ declare const Chart: ({ values, currency }: ChartProps) => JSX.Element;
4
+ export { Chart };
@@ -0,0 +1,14 @@
1
+ export declare const X_LABEL_SIZE = 24;
2
+ export declare const Y_LABEL_SIZE = 30;
3
+ export declare const CHART_WIDTH = 9999;
4
+ export declare const CHART_HEIGHT = 135;
5
+ export declare const darkBarColors: {
6
+ positive: string;
7
+ negative: string;
8
+ zero: string;
9
+ };
10
+ export declare const lightBarColors: {
11
+ positive: string;
12
+ negative: string;
13
+ zero: string;
14
+ };
@@ -0,0 +1,2 @@
1
+ import { TooltipFormatterParams } from './types';
2
+ export declare const tooltipFormatter: ({ marker, name, value, currency, lang, }: TooltipFormatterParams) => string;
@@ -0,0 +1,169 @@
1
+ import { GetOptionProps } from './types';
2
+ export declare const getOption: ({ values, currency, isDark, lang, }: GetOptionProps) => {
3
+ animation: boolean;
4
+ title: {
5
+ left: string;
6
+ text: string;
7
+ textStyle: {
8
+ fontSize: number;
9
+ lineHeight: number;
10
+ fontWeight: number;
11
+ };
12
+ };
13
+ grid: {
14
+ name: string;
15
+ top: string;
16
+ right: string;
17
+ left: string;
18
+ bottom: string;
19
+ }[];
20
+ graphic: ({
21
+ top: number | undefined;
22
+ bottom: number | undefined;
23
+ left: number | undefined;
24
+ right: number | undefined;
25
+ shape: {
26
+ x1: number;
27
+ y1: number;
28
+ x2: number;
29
+ y2: number;
30
+ };
31
+ type: string;
32
+ silent: boolean;
33
+ z: number;
34
+ style: {
35
+ stroke: string;
36
+ lineWidth: number;
37
+ };
38
+ } | {
39
+ top: number;
40
+ shape: {
41
+ x1: number;
42
+ y1: number;
43
+ x2: number;
44
+ y2: number;
45
+ };
46
+ type: string;
47
+ silent: boolean;
48
+ z: number;
49
+ style: {
50
+ stroke: string;
51
+ lineWidth: number;
52
+ };
53
+ } | {
54
+ right: number;
55
+ shape: {
56
+ x1: number;
57
+ y1: number;
58
+ x2: number;
59
+ y2: number;
60
+ };
61
+ type: string;
62
+ silent: boolean;
63
+ z: number;
64
+ style: {
65
+ stroke: string;
66
+ lineWidth: number;
67
+ };
68
+ } | {
69
+ bottom: number;
70
+ shape: {
71
+ x1: number;
72
+ y1: number;
73
+ x2: number;
74
+ y2: number;
75
+ };
76
+ type: string;
77
+ silent: boolean;
78
+ z: number;
79
+ style: {
80
+ stroke: string;
81
+ lineWidth: number;
82
+ };
83
+ } | {
84
+ left: number;
85
+ shape: {
86
+ x1: number;
87
+ y1: number;
88
+ x2: number;
89
+ y2: number;
90
+ };
91
+ type: string;
92
+ silent: boolean;
93
+ z: number;
94
+ style: {
95
+ stroke: string;
96
+ lineWidth: number;
97
+ };
98
+ } | {
99
+ right: number;
100
+ bottom: number;
101
+ shape: {
102
+ x1: number;
103
+ y1: number;
104
+ x2: number;
105
+ y2: number;
106
+ };
107
+ type: string;
108
+ silent: boolean;
109
+ z: number;
110
+ style: {
111
+ stroke: string;
112
+ lineWidth: number;
113
+ };
114
+ })[];
115
+ tooltip: {
116
+ trigger: string;
117
+ formatter: ([{ marker, name, value }]: {
118
+ marker: string;
119
+ name: string;
120
+ value: number;
121
+ }[]) => string;
122
+ axisPointer: {
123
+ axis: string;
124
+ };
125
+ extraCssText: string;
126
+ };
127
+ xAxis: {
128
+ type: string;
129
+ data: import("../../../gql/types/graphql").CurrencyName[];
130
+ axisTick: {
131
+ show: boolean;
132
+ };
133
+ axisLine: {
134
+ show: boolean;
135
+ };
136
+ splitLine: {
137
+ show: boolean;
138
+ };
139
+ axisLabel: {
140
+ fontSize: number;
141
+ };
142
+ };
143
+ yAxis: {
144
+ type: string;
145
+ position: string;
146
+ min: number;
147
+ max: number;
148
+ interval: number;
149
+ axisLine: {
150
+ show: boolean;
151
+ };
152
+ axisTick: {
153
+ show: boolean;
154
+ };
155
+ axisLabel: {
156
+ formatter: string;
157
+ fontSize: number;
158
+ };
159
+ };
160
+ series: {
161
+ data: number[];
162
+ type: string;
163
+ itemStyle: {
164
+ color: ({ data }: {
165
+ data: number;
166
+ }) => string;
167
+ };
168
+ }[];
169
+ };
@@ -0,0 +1 @@
1
+ export * from './Chart';
@@ -0,0 +1,22 @@
1
+ import { CurrencyName } from '../../../gql/types/graphql';
2
+ export interface CPBChartDataValues {
3
+ currency: CurrencyName;
4
+ percentage: number;
5
+ }
6
+ export interface ChartProps {
7
+ values: CPBChartDataValues[];
8
+ currency: CurrencyName;
9
+ }
10
+ export interface TooltipFormatterParams {
11
+ marker: string;
12
+ name: string;
13
+ value: number;
14
+ currency: CurrencyName;
15
+ lang: (label: string) => string;
16
+ }
17
+ export type GetOptionProps = {
18
+ values: CPBChartDataValues[];
19
+ currency: CurrencyName;
20
+ lang: (label: string) => string;
21
+ isDark: boolean;
22
+ };
@@ -0,0 +1 @@
1
+ export * from './CurrencyStrengthWidget';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import { Locale } from '@oanda/mono-i18n';
2
+ import { Theme } from '@oanda/labs-widget-common';
3
+ export interface VolatilityChartConfig {
4
+ graphqlUrl: string;
5
+ locale: Locale;
6
+ theme?: Theme;
7
+ isParamError?: boolean;
8
+ }
9
+ export interface VolatilityChartWrapperConfig extends VolatilityChartConfig {
10
+ renderElementId: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ declare const getCurrencyStrength: import("@apollo/client").DocumentNode;
2
+ export { getCurrencyStrength };
@@ -0,0 +1,15 @@
1
+ import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
2
+ import { Incremental } from './graphql';
3
+ export type FragmentType<TDocumentType extends DocumentTypeDecoration<any, any>> = TDocumentType extends DocumentTypeDecoration<infer TType, any> ? [TType] extends [{
4
+ ' $fragmentName'?: infer TKey;
5
+ }] ? TKey extends string ? {
6
+ ' $fragmentRefs'?: {
7
+ [key in TKey]: TType;
8
+ };
9
+ } : never : never : never;
10
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>): TType;
11
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null | undefined): TType | null | undefined;
12
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>): ReadonlyArray<TType>;
13
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined): ReadonlyArray<TType> | null | undefined;
14
+ export declare function makeFragmentData<F extends DocumentTypeDecoration<any, any>, FT extends ResultOf<F>>(data: FT, _fragment: F): FragmentType<F>;
15
+ export declare function isFragmentReady<TQuery, TFrag>(queryNode: DocumentTypeDecoration<TQuery, any>, fragmentNode: TypedDocumentNode<TFrag>, data: FragmentType<TypedDocumentNode<Incremental<TFrag>, any>> | null | undefined): data is FragmentType<typeof fragmentNode>;