@oanda/labs-spread-cost-calculator-widget 1.0.6 → 1.0.7

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 (76) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/main/SpreadCostCalculatorWidget/Main.js +21 -21
  3. package/dist/main/SpreadCostCalculatorWidget/Main.js.map +1 -1
  4. package/dist/main/SpreadCostCalculatorWidget/SpreadCostCalculatorWidget.js +12 -12
  5. package/dist/main/SpreadCostCalculatorWidget/SpreadCostCalculatorWidget.js.map +1 -1
  6. package/dist/main/SpreadCostCalculatorWidget/ValidationWrapper.js +2 -2
  7. package/dist/main/SpreadCostCalculatorWidget/ValidationWrapper.js.map +1 -1
  8. package/dist/main/SpreadCostCalculatorWidget/render.js +4 -4
  9. package/dist/main/SpreadCostCalculatorWidget/render.js.map +1 -1
  10. package/dist/main/SpreadCostCalculatorWidget/types.js.map +1 -1
  11. package/dist/main/SpreadCostCalculatorWidget/useCalculateSpread.js +1 -1
  12. package/dist/main/SpreadCostCalculatorWidget/useCalculateSpread.js.map +1 -1
  13. package/dist/main/SpreadCostCalculatorWidget/useInstrumentChange.js.map +1 -1
  14. package/dist/main/SpreadCostCalculatorWidget/utils.js.map +1 -1
  15. package/dist/main/gql/types/fragment-masking.js.map +1 -1
  16. package/dist/main/gql/types/gql.js +1 -1
  17. package/dist/main/gql/types/gql.js.map +1 -1
  18. package/dist/main/gql/types/graphql.js +71 -71
  19. package/dist/main/gql/types/graphql.js.map +1 -1
  20. package/dist/main/gql/types/index.js.map +1 -1
  21. package/dist/main/index.js +8 -8
  22. package/dist/main/index.js.map +1 -1
  23. package/dist/main/translations/index.js +1 -1
  24. package/dist/main/translations/index.js.map +1 -1
  25. package/dist/module/SpreadCostCalculatorWidget/Main.js +21 -21
  26. package/dist/module/SpreadCostCalculatorWidget/Main.js.map +1 -1
  27. package/dist/module/SpreadCostCalculatorWidget/SpreadCostCalculatorWidget.js +12 -12
  28. package/dist/module/SpreadCostCalculatorWidget/SpreadCostCalculatorWidget.js.map +1 -1
  29. package/dist/module/SpreadCostCalculatorWidget/ValidationWrapper.js +2 -2
  30. package/dist/module/SpreadCostCalculatorWidget/ValidationWrapper.js.map +1 -1
  31. package/dist/module/SpreadCostCalculatorWidget/render.js +4 -4
  32. package/dist/module/SpreadCostCalculatorWidget/render.js.map +1 -1
  33. package/dist/module/SpreadCostCalculatorWidget/types.js.map +1 -1
  34. package/dist/module/SpreadCostCalculatorWidget/useCalculateSpread.js +1 -1
  35. package/dist/module/SpreadCostCalculatorWidget/useCalculateSpread.js.map +1 -1
  36. package/dist/module/SpreadCostCalculatorWidget/useInstrumentChange.js.map +1 -1
  37. package/dist/module/SpreadCostCalculatorWidget/utils.js.map +1 -1
  38. package/dist/module/gql/types/fragment-masking.js.map +1 -1
  39. package/dist/module/gql/types/gql.js +1 -1
  40. package/dist/module/gql/types/gql.js.map +1 -1
  41. package/dist/module/gql/types/graphql.js +71 -71
  42. package/dist/module/gql/types/graphql.js.map +1 -1
  43. package/dist/module/gql/types/index.js +2 -2
  44. package/dist/module/gql/types/index.js.map +1 -1
  45. package/dist/module/index.js +1 -1
  46. package/dist/module/index.js.map +1 -1
  47. package/dist/module/translations/index.js +1 -1
  48. package/dist/module/translations/index.js.map +1 -1
  49. package/dist/types/SpreadCostCalculatorWidget/Main.d.ts +2 -2
  50. package/dist/types/SpreadCostCalculatorWidget/SpreadCostCalculatorWidget.d.ts +2 -2
  51. package/dist/types/SpreadCostCalculatorWidget/ValidationWrapper.d.ts +1 -1
  52. package/dist/types/SpreadCostCalculatorWidget/types.d.ts +6 -6
  53. package/dist/types/SpreadCostCalculatorWidget/useCalculateSpread.d.ts +3 -3
  54. package/dist/types/SpreadCostCalculatorWidget/useInstrumentChange.d.ts +3 -3
  55. package/dist/types/gql/types/gql.d.ts +2 -2
  56. package/dist/types/gql/types/index.d.ts +2 -2
  57. package/dist/types/index.d.ts +1 -1
  58. package/dist/types/translations/index.d.ts +2 -2
  59. package/package.json +3 -3
  60. package/src/SpreadCostCalculatorWidget/Main.tsx +32 -26
  61. package/src/SpreadCostCalculatorWidget/SpreadCostCalculatorWidget.tsx +12 -14
  62. package/src/SpreadCostCalculatorWidget/ValidationWrapper.tsx +24 -19
  63. package/src/SpreadCostCalculatorWidget/render.tsx +12 -12
  64. package/src/SpreadCostCalculatorWidget/types.ts +7 -6
  65. package/src/SpreadCostCalculatorWidget/useCalculateSpread.ts +25 -18
  66. package/src/SpreadCostCalculatorWidget/useInstrumentChange.ts +13 -7
  67. package/src/SpreadCostCalculatorWidget/utils.ts +2 -1
  68. package/src/gql/types/fragment-masking.ts +41 -21
  69. package/src/gql/types/gql.ts +7 -3
  70. package/src/gql/types/graphql.ts +126 -47
  71. package/src/gql/types/index.ts +2 -2
  72. package/src/index.ts +1 -1
  73. package/src/translations/index.ts +4 -4
  74. package/test/SpreadCostCalculator.test.tsx +8 -8
  75. package/test/useCalculateSpread.test.tsx +41 -34
  76. package/test/useInstrumentChange.test.tsx +11 -4
@@ -1 +1 @@
1
- {"version":3,"file":"render.js","names":["React","createRoot","validateLocale","validateToolParams","SpreadCostCalculatorWidget","graphqlUrl","liveRatesUrl","window","widgetsConfig","spreadCostCalculatorParamsElements","document","querySelectorAll","forEach","element","root","params","getAttribute","mode","locale","instruments","division","JSON","parse","isParamError","name","valueCheck","value","length","render","createElement","theme"],"sources":["../../../src/SpreadCostCalculatorWidget/render.tsx"],"sourcesContent":["import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { Theme, validateLocale, validateToolParams } from '@oanda/labs-widget-common';\nimport { SpreadCostCalculatorWidget } from './SpreadCostCalculatorWidget';\n\nconst {\n graphqlUrl,\n liveRatesUrl,\n} = window.widgetsConfig || {};\nconst spreadCostCalculatorParamsElements = document.querySelectorAll(\n 'div[data-spread-cost-calculator-params]',\n);\n\nspreadCostCalculatorParamsElements.forEach((element) => {\n const root = createRoot(element);\n const params = element.getAttribute('data-spread-cost-calculator-params');\n const mode = element.getAttribute('data-mode');\n const { locale, instruments, division } = JSON.parse(params as string);\n\n const isParamError = validateToolParams(\n {\n locale,\n graphqlUrl,\n instruments,\n division,\n liveRatesUrl,\n },\n [\n {\n name: 'locale',\n valueCheck: (value) => validateLocale(value),\n },\n {\n name: 'graphqlUrl',\n },\n {\n name: 'liveRatesUrl',\n },\n {\n name: 'division',\n },\n {\n name: 'instruments',\n valueCheck: (value) => (value as string[]).length > 0 && (value as string[]).length <= 10,\n },\n ],\n );\n\n root.render(\n <SpreadCostCalculatorWidget\n division={division}\n instruments={instruments}\n liveRatesUrl={liveRatesUrl}\n graphqlUrl={graphqlUrl}\n locale={locale}\n theme={mode as Theme}\n isParamError={isParamError}\n />,\n );\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAAgBC,cAAc,EAAEC,kBAAkB,QAAQ,2BAA2B;AACrF,SAASC,0BAA0B,QAAQ,8BAA8B;AAEzE,MAAM;EACJC,UAAU;EACVC;AACF,CAAC,GAAGC,MAAM,CAACC,aAAa,IAAI,CAAC,CAAC;AAC9B,MAAMC,kCAAkC,GAAGC,QAAQ,CAACC,gBAAgB,CAClE,yCACF,CAAC;AAEDF,kCAAkC,CAACG,OAAO,CAAEC,OAAO,IAAK;EACtD,MAAMC,IAAI,GAAGb,UAAU,CAACY,OAAO,CAAC;EAChC,MAAME,MAAM,GAAGF,OAAO,CAACG,YAAY,CAAC,oCAAoC,CAAC;EACzE,MAAMC,IAAI,GAAGJ,OAAO,CAACG,YAAY,CAAC,WAAW,CAAC;EAC9C,MAAM;IAAEE,MAAM;IAAEC,WAAW;IAAEC;EAAS,CAAC,GAAGC,IAAI,CAACC,KAAK,CAACP,MAAgB,CAAC;EAEtE,MAAMQ,YAAY,GAAGpB,kBAAkB,CACrC;IACEe,MAAM;IACNb,UAAU;IACVc,WAAW;IACXC,QAAQ;IACRd;EACF,CAAC,EACD,CACE;IACEkB,IAAI,EAAE,QAAQ;IACdC,UAAU,EAAGC,KAAK,IAAKxB,cAAc,CAACwB,KAAK;EAC7C,CAAC,EACD;IACEF,IAAI,EAAE;EACR,CAAC,EACD;IACEA,IAAI,EAAE;EACR,CAAC,EACD;IACEA,IAAI,EAAE;EACR,CAAC,EACD;IACEA,IAAI,EAAE,aAAa;IACnBC,UAAU,EAAGC,KAAK,IAAMA,KAAK,CAAcC,MAAM,GAAG,CAAC,IAAKD,KAAK,CAAcC,MAAM,IAAI;EACzF,CAAC,CAEL,CAAC;EAEDb,IAAI,CAACc,MAAM,CACT5B,KAAA,CAAA6B,aAAA,CAACzB,0BAA0B;IACzBgB,QAAQ,EAAEA,QAAS;IACnBD,WAAW,EAAEA,WAAY;IACzBb,YAAY,EAAEA,YAAa;IAC3BD,UAAU,EAAEA,UAAW;IACvBa,MAAM,EAAEA,MAAO;IACfY,KAAK,EAAEb,IAAc;IACrBM,YAAY,EAAEA;EAAa,CAC5B,CACH,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"render.js","names":["validateLocale","validateToolParams","React","createRoot","SpreadCostCalculatorWidget","graphqlUrl","liveRatesUrl","window","widgetsConfig","spreadCostCalculatorParamsElements","document","querySelectorAll","forEach","element","root","params","getAttribute","mode","locale","instruments","division","JSON","parse","isParamError","name","valueCheck","value","length","render","createElement","theme"],"sources":["../../../src/SpreadCostCalculatorWidget/render.tsx"],"sourcesContent":["import type { Theme } from '@oanda/labs-widget-common';\nimport { validateLocale, validateToolParams } from '@oanda/labs-widget-common';\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\n\nimport { SpreadCostCalculatorWidget } from './SpreadCostCalculatorWidget';\n\nconst { graphqlUrl, liveRatesUrl } = window.widgetsConfig || {};\nconst spreadCostCalculatorParamsElements = document.querySelectorAll(\n 'div[data-spread-cost-calculator-params]'\n);\n\nspreadCostCalculatorParamsElements.forEach((element) => {\n const root = createRoot(element);\n const params = element.getAttribute('data-spread-cost-calculator-params');\n const mode = element.getAttribute('data-mode');\n const { locale, instruments, division } = JSON.parse(params as string);\n\n const isParamError = validateToolParams(\n {\n locale,\n graphqlUrl,\n instruments,\n division,\n liveRatesUrl,\n },\n [\n {\n name: 'locale',\n valueCheck: (value: string | undefined) => validateLocale(value),\n },\n {\n name: 'graphqlUrl',\n },\n {\n name: 'liveRatesUrl',\n },\n {\n name: 'division',\n },\n {\n name: 'instruments',\n valueCheck: (value) =>\n (value as string[]).length > 0 && (value as string[]).length <= 10,\n },\n ]\n );\n\n root.render(\n <SpreadCostCalculatorWidget\n division={division}\n graphqlUrl={graphqlUrl}\n instruments={instruments}\n isParamError={isParamError}\n liveRatesUrl={liveRatesUrl}\n locale={locale}\n theme={mode as Theme}\n />\n );\n});\n"],"mappings":"AACA,SAASA,cAAc,EAAEC,kBAAkB,QAAQ,2BAA2B;AAC9E,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,kBAAkB;AAE7C,SAASC,0BAA0B,QAAQ,8BAA8B;AAEzE,MAAM;EAAEC,UAAU;EAAEC;AAAa,CAAC,GAAGC,MAAM,CAACC,aAAa,IAAI,CAAC,CAAC;AAC/D,MAAMC,kCAAkC,GAAGC,QAAQ,CAACC,gBAAgB,CAClE,yCACF,CAAC;AAEDF,kCAAkC,CAACG,OAAO,CAAEC,OAAO,IAAK;EACtD,MAAMC,IAAI,GAAGX,UAAU,CAACU,OAAO,CAAC;EAChC,MAAME,MAAM,GAAGF,OAAO,CAACG,YAAY,CAAC,oCAAoC,CAAC;EACzE,MAAMC,IAAI,GAAGJ,OAAO,CAACG,YAAY,CAAC,WAAW,CAAC;EAC9C,MAAM;IAAEE,MAAM;IAAEC,WAAW;IAAEC;EAAS,CAAC,GAAGC,IAAI,CAACC,KAAK,CAACP,MAAgB,CAAC;EAEtE,MAAMQ,YAAY,GAAGtB,kBAAkB,CACrC;IACEiB,MAAM;IACNb,UAAU;IACVc,WAAW;IACXC,QAAQ;IACRd;EACF,CAAC,EACD,CACE;IACEkB,IAAI,EAAE,QAAQ;IACdC,UAAU,EAAGC,KAAyB,IAAK1B,cAAc,CAAC0B,KAAK;EACjE,CAAC,EACD;IACEF,IAAI,EAAE;EACR,CAAC,EACD;IACEA,IAAI,EAAE;EACR,CAAC,EACD;IACEA,IAAI,EAAE;EACR,CAAC,EACD;IACEA,IAAI,EAAE,aAAa;IACnBC,UAAU,EAAGC,KAAK,IACfA,KAAK,CAAcC,MAAM,GAAG,CAAC,IAAKD,KAAK,CAAcC,MAAM,IAAI;EACpE,CAAC,CAEL,CAAC;EAEDb,IAAI,CAACc,MAAM,CACT1B,KAAA,CAAA2B,aAAA,CAACzB,0BAA0B;IACzBgB,QAAQ,EAAEA,QAAS;IACnBf,UAAU,EAAEA,UAAW;IACvBc,WAAW,EAAEA,WAAY;IACzBI,YAAY,EAAEA,YAAa;IAC3BjB,YAAY,EAAEA,YAAa;IAC3BY,MAAM,EAAEA,MAAO;IACfY,KAAK,EAAEb;EAAc,CACtB,CACH,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["Locale"],"sources":["../../../src/SpreadCostCalculatorWidget/types.ts"],"sourcesContent":["import { WidgetConfig } from '@oanda/labs-widget-common';\nimport { Division } from '../gql/types/graphql';\n\nexport { Locale } from '@oanda/mono-i18n';\n\nexport type SpreadCostCalculatorWidgetConfig = WidgetConfig & {\n liveRatesUrl: string;\n division: Division;\n instruments: string[];\n};\n\nexport type InstrumentResponse = {\n name: string;\n displayName: string;\n};\n\nexport type MainProps = {\n instruments: InstrumentResponse[];\n};\n\nexport interface ValidationWrapperProps {\n division: Division;\n instruments: string[];\n isParamError?: boolean;\n}\n"],"mappings":"AAGA,SAASA,MAAM,QAAQ,kBAAkB","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["Locale"],"sources":["../../../src/SpreadCostCalculatorWidget/types.ts"],"sourcesContent":["import type { WidgetConfig } from '@oanda/labs-widget-common';\n\nimport type { Division } from '../gql/types/graphql';\n\nexport { Locale } from '@oanda/mono-i18n';\n\nexport type SpreadCostCalculatorWidgetConfig = WidgetConfig & {\n liveRatesUrl: string;\n division: Division;\n instruments: string[];\n};\n\nexport interface InstrumentResponse {\n name: string;\n displayName: string;\n}\n\nexport interface MainProps {\n instruments: InstrumentResponse[];\n}\n\nexport interface ValidationWrapperProps {\n division: Division;\n instruments: string[];\n isParamError?: boolean;\n}\n"],"mappings":"AAIA,SAASA,MAAM,QAAQ,kBAAkB","ignoreList":[]}
@@ -1,6 +1,6 @@
1
- import { useDebounceValue } from 'usehooks-ts';
2
1
  import { useEffect } from 'react';
3
2
  import { numericFormatter } from 'react-number-format';
3
+ import { useDebounceValue } from 'usehooks-ts';
4
4
  import { CELL_EMPTY_VALUE } from './constant';
5
5
  const calculateAbsoluteSpreadCost = (unitsTraded, spread, pipLocation) => unitsTraded !== undefined && spread !== undefined && pipLocation !== undefined ? Math.ceil(unitsTraded * spread * Number((10 ** pipLocation).toFixed(Math.abs(pipLocation))) / 2 * 10000) / 10000 : undefined;
6
6
  export const useCalculateSpread = _ref => {
@@ -1 +1 @@
1
- {"version":3,"file":"useCalculateSpread.js","names":["useDebounceValue","useEffect","numericFormatter","CELL_EMPTY_VALUE","calculateAbsoluteSpreadCost","unitsTraded","spread","pipLocation","undefined","Math","ceil","Number","toFixed","abs","useCalculateSpread","_ref","delay","currency","debouncedValue","setValue","calculatedSpread","toString","thousandSeparator"],"sources":["../../../src/SpreadCostCalculatorWidget/useCalculateSpread.ts"],"sourcesContent":["import { useDebounceValue } from 'usehooks-ts';\nimport { useEffect } from 'react';\nimport { Voidable } from '@oanda/labs-widget-common';\nimport { numericFormatter } from 'react-number-format';\nimport { CELL_EMPTY_VALUE } from './constant';\n\nexport type UseCalculateSpreadInput = {\n spread: Voidable<number>;\n unitsTraded: Voidable<number>;\n pipLocation: Voidable<number>;\n delay?: number;\n currency: string;\n};\n\nconst calculateAbsoluteSpreadCost = (\n unitsTraded?: number,\n spread?: number,\n pipLocation?: number,\n): number | undefined => (unitsTraded !== undefined\n && spread !== undefined\n && pipLocation !== undefined\n ? Math.ceil(\n ((unitsTraded * spread * Number((10 ** pipLocation).toFixed(Math.abs(pipLocation)))) / 2)\n * 10000,\n ) / 10000\n : undefined);\n\nexport const useCalculateSpread = ({\n spread,\n unitsTraded,\n pipLocation,\n delay = 350,\n currency,\n}: UseCalculateSpreadInput) => {\n const [debouncedValue, setValue] = useDebounceValue(CELL_EMPTY_VALUE, delay);\n\n useEffect(() => {\n const calculatedSpread = calculateAbsoluteSpreadCost(unitsTraded, spread, pipLocation);\n setValue(\n calculatedSpread\n ? `${numericFormatter(calculatedSpread.toString(), {\n thousandSeparator: ',',\n })} ${currency}`\n : CELL_EMPTY_VALUE,\n );\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [spread, unitsTraded, pipLocation, setValue]);\n\n return debouncedValue;\n};\n"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,aAAa;AAC9C,SAASC,SAAS,QAAQ,OAAO;AAEjC,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,gBAAgB,QAAQ,YAAY;AAU7C,MAAMC,2BAA2B,GAAGA,CAClCC,WAAoB,EACpBC,MAAe,EACfC,WAAoB,KACIF,WAAW,KAAKG,SAAS,IAC9CF,MAAM,KAAKE,SAAS,IACpBD,WAAW,KAAKC,SAAS,GAC1BC,IAAI,CAACC,IAAI,CACPL,WAAW,GAAGC,MAAM,GAAGK,MAAM,CAAC,CAAC,EAAE,IAAIJ,WAAW,EAAEK,OAAO,CAACH,IAAI,CAACI,GAAG,CAACN,WAAW,CAAC,CAAC,CAAC,GAAI,CAAC,GAChF,KACV,CAAC,GAAG,KAAK,GACPC,SAAU;AAEd,OAAO,MAAMM,kBAAkB,GAAGC,IAAA,IAMH;EAAA,IANI;IACjCT,MAAM;IACND,WAAW;IACXE,WAAW;IACXS,KAAK,GAAG,GAAG;IACXC;EACuB,CAAC,GAAAF,IAAA;EACxB,MAAM,CAACG,cAAc,EAAEC,QAAQ,CAAC,GAAGnB,gBAAgB,CAACG,gBAAgB,EAAEa,KAAK,CAAC;EAE5Ef,SAAS,CAAC,MAAM;IACd,MAAMmB,gBAAgB,GAAGhB,2BAA2B,CAACC,WAAW,EAAEC,MAAM,EAAEC,WAAW,CAAC;IACtFY,QAAQ,CACNC,gBAAgB,GACZ,GAAGlB,gBAAgB,CAACkB,gBAAgB,CAACC,QAAQ,CAAC,CAAC,EAAE;MACjDC,iBAAiB,EAAE;IACrB,CAAC,CAAC,IAAIL,QAAQ,EAAE,GACdd,gBACN,CAAC;EAEH,CAAC,EAAE,CAACG,MAAM,EAAED,WAAW,EAAEE,WAAW,EAAEY,QAAQ,CAAC,CAAC;EAEhD,OAAOD,cAAc;AACvB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"useCalculateSpread.js","names":["useEffect","numericFormatter","useDebounceValue","CELL_EMPTY_VALUE","calculateAbsoluteSpreadCost","unitsTraded","spread","pipLocation","undefined","Math","ceil","Number","toFixed","abs","useCalculateSpread","_ref","delay","currency","debouncedValue","setValue","calculatedSpread","toString","thousandSeparator"],"sources":["../../../src/SpreadCostCalculatorWidget/useCalculateSpread.ts"],"sourcesContent":["import type { Voidable } from '@oanda/labs-widget-common';\nimport { useEffect } from 'react';\nimport { numericFormatter } from 'react-number-format';\nimport { useDebounceValue } from 'usehooks-ts';\n\nimport { CELL_EMPTY_VALUE } from './constant';\n\nexport interface UseCalculateSpreadInput {\n spread: Voidable<number>;\n unitsTraded: Voidable<number>;\n pipLocation: Voidable<number>;\n delay?: number;\n currency: string;\n}\n\nconst calculateAbsoluteSpreadCost = (\n unitsTraded?: number,\n spread?: number,\n pipLocation?: number\n): number | undefined =>\n unitsTraded !== undefined && spread !== undefined && pipLocation !== undefined\n ? Math.ceil(\n ((unitsTraded *\n spread *\n Number((10 ** pipLocation).toFixed(Math.abs(pipLocation)))) /\n 2) *\n 10000\n ) / 10000\n : undefined;\n\nexport const useCalculateSpread = ({\n spread,\n unitsTraded,\n pipLocation,\n delay = 350,\n currency,\n}: UseCalculateSpreadInput) => {\n const [debouncedValue, setValue] = useDebounceValue(CELL_EMPTY_VALUE, delay);\n\n useEffect(() => {\n const calculatedSpread = calculateAbsoluteSpreadCost(\n unitsTraded,\n spread,\n pipLocation\n );\n setValue(\n calculatedSpread\n ? `${numericFormatter(calculatedSpread.toString(), {\n thousandSeparator: ',',\n })} ${currency}`\n : CELL_EMPTY_VALUE\n );\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [spread, unitsTraded, pipLocation, setValue]);\n\n return debouncedValue;\n};\n"],"mappings":"AACA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,gBAAgB,QAAQ,aAAa;AAE9C,SAASC,gBAAgB,QAAQ,YAAY;AAU7C,MAAMC,2BAA2B,GAAGA,CAClCC,WAAoB,EACpBC,MAAe,EACfC,WAAoB,KAEpBF,WAAW,KAAKG,SAAS,IAAIF,MAAM,KAAKE,SAAS,IAAID,WAAW,KAAKC,SAAS,GAC1EC,IAAI,CAACC,IAAI,CACLL,WAAW,GACXC,MAAM,GACNK,MAAM,CAAC,CAAC,EAAE,IAAIJ,WAAW,EAAEK,OAAO,CAACH,IAAI,CAACI,GAAG,CAACN,WAAW,CAAC,CAAC,CAAC,GAC1D,CAAC,GACD,KACJ,CAAC,GAAG,KAAK,GACTC,SAAS;AAEf,OAAO,MAAMM,kBAAkB,GAAGC,IAAA,IAMH;EAAA,IANI;IACjCT,MAAM;IACND,WAAW;IACXE,WAAW;IACXS,KAAK,GAAG,GAAG;IACXC;EACuB,CAAC,GAAAF,IAAA;EACxB,MAAM,CAACG,cAAc,EAAEC,QAAQ,CAAC,GAAGjB,gBAAgB,CAACC,gBAAgB,EAAEa,KAAK,CAAC;EAE5EhB,SAAS,CAAC,MAAM;IACd,MAAMoB,gBAAgB,GAAGhB,2BAA2B,CAClDC,WAAW,EACXC,MAAM,EACNC,WACF,CAAC;IACDY,QAAQ,CACNC,gBAAgB,GACZ,GAAGnB,gBAAgB,CAACmB,gBAAgB,CAACC,QAAQ,CAAC,CAAC,EAAE;MAC/CC,iBAAiB,EAAE;IACrB,CAAC,CAAC,IAAIL,QAAQ,EAAE,GAChBd,gBACN,CAAC;EAEH,CAAC,EAAE,CAACG,MAAM,EAAED,WAAW,EAAEE,WAAW,EAAEY,QAAQ,CAAC,CAAC;EAEhD,OAAOD,cAAc;AACvB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useInstrumentChange.js","names":["useLiveRatesMessage","useLiveRatesQuery","useEffect","useState","getInstrumentCurrency","useInstrumentChange","_ref","initialInstrument","target","setQuery","closeQuery","loading","setLoading","selectedInstrument","setSelectedInstrument","pipLocation","setPipLocation","undefined","initialSpread","setSpread","currency","setCurrency","update","error","connectionError","id","symbol","spread","instruments","label"],"sources":["../../../src/SpreadCostCalculatorWidget/useInstrumentChange.ts"],"sourcesContent":["import { SelectOption, useLiveRatesMessage, useLiveRatesQuery } from '@oanda/labs-widget-common';\nimport { useEffect, useState } from 'react';\nimport { getInstrumentCurrency } from './utils';\n\nexport type UseInstrumentChangeInput = {\n initialInstrument: SelectOption;\n};\n\nexport const useInstrumentChange = ({\n initialInstrument,\n}: UseInstrumentChangeInput) => {\n const { target, setQuery, closeQuery } = useLiveRatesQuery();\n const [loading, setLoading] = useState(true);\n const [selectedInstrument, setSelectedInstrument] = useState(initialInstrument);\n const [pipLocation, setPipLocation] = useState<undefined | number>(undefined);\n const [initialSpread, setSpread] = useState<undefined | number>(undefined);\n const [currency, setCurrency] = useState('');\n\n const { update, error, connectionError } = useLiveRatesMessage(\n selectedInstrument.id,\n target,\n );\n\n useEffect(() => {\n if (selectedInstrument.id === update?.symbol) {\n setPipLocation(update.pipLocation);\n setSpread(update.spread);\n setLoading(false);\n closeQuery();\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [update]);\n\n useEffect(() => {\n setLoading(true);\n setQuery({ instruments: [selectedInstrument.id] });\n setCurrency(getInstrumentCurrency(selectedInstrument.label));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedInstrument.id]);\n\n return {\n selectedInstrument,\n setSelectedInstrument,\n pipLocation,\n initialSpread,\n loading,\n error: !!error || !!connectionError,\n currency,\n };\n};\n"],"mappings":"AAAA,SAAuBA,mBAAmB,EAAEC,iBAAiB,QAAQ,2BAA2B;AAChG,SAASC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,qBAAqB,QAAQ,SAAS;AAM/C,OAAO,MAAMC,mBAAmB,GAAGC,IAAA,IAEH;EAAA,IAFI;IAClCC;EACwB,CAAC,GAAAD,IAAA;EACzB,MAAM;IAAEE,MAAM;IAAEC,QAAQ;IAAEC;EAAW,CAAC,GAAGT,iBAAiB,CAAC,CAAC;EAC5D,MAAM,CAACU,OAAO,EAAEC,UAAU,CAAC,GAAGT,QAAQ,CAAC,IAAI,CAAC;EAC5C,MAAM,CAACU,kBAAkB,EAAEC,qBAAqB,CAAC,GAAGX,QAAQ,CAACI,iBAAiB,CAAC;EAC/E,MAAM,CAACQ,WAAW,EAAEC,cAAc,CAAC,GAAGb,QAAQ,CAAqBc,SAAS,CAAC;EAC7E,MAAM,CAACC,aAAa,EAAEC,SAAS,CAAC,GAAGhB,QAAQ,CAAqBc,SAAS,CAAC;EAC1E,MAAM,CAACG,QAAQ,EAAEC,WAAW,CAAC,GAAGlB,QAAQ,CAAC,EAAE,CAAC;EAE5C,MAAM;IAAEmB,MAAM;IAAEC,KAAK;IAAEC;EAAgB,CAAC,GAAGxB,mBAAmB,CAC5Da,kBAAkB,CAACY,EAAE,EACrBjB,MACF,CAAC;EAEDN,SAAS,CAAC,MAAM;IACd,IAAIW,kBAAkB,CAACY,EAAE,KAAKH,MAAM,EAAEI,MAAM,EAAE;MAC5CV,cAAc,CAACM,MAAM,CAACP,WAAW,CAAC;MAClCI,SAAS,CAACG,MAAM,CAACK,MAAM,CAAC;MACxBf,UAAU,CAAC,KAAK,CAAC;MACjBF,UAAU,CAAC,CAAC;IACd;EAGF,CAAC,EAAE,CAACY,MAAM,CAAC,CAAC;EAEZpB,SAAS,CAAC,MAAM;IACdU,UAAU,CAAC,IAAI,CAAC;IAChBH,QAAQ,CAAC;MAAEmB,WAAW,EAAE,CAACf,kBAAkB,CAACY,EAAE;IAAE,CAAC,CAAC;IAClDJ,WAAW,CAACjB,qBAAqB,CAACS,kBAAkB,CAACgB,KAAK,CAAC,CAAC;EAE9D,CAAC,EAAE,CAAChB,kBAAkB,CAACY,EAAE,CAAC,CAAC;EAE3B,OAAO;IACLZ,kBAAkB;IAClBC,qBAAqB;IACrBC,WAAW;IACXG,aAAa;IACbP,OAAO;IACPY,KAAK,EAAE,CAAC,CAACA,KAAK,IAAI,CAAC,CAACC,eAAe;IACnCJ;EACF,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"useInstrumentChange.js","names":["useLiveRatesMessage","useLiveRatesQuery","useEffect","useState","getInstrumentCurrency","useInstrumentChange","_ref","initialInstrument","target","setQuery","closeQuery","loading","setLoading","selectedInstrument","setSelectedInstrument","pipLocation","setPipLocation","undefined","initialSpread","setSpread","currency","setCurrency","update","error","connectionError","id","symbol","spread","instruments","label"],"sources":["../../../src/SpreadCostCalculatorWidget/useInstrumentChange.ts"],"sourcesContent":["import type { SelectOption } from '@oanda/labs-widget-common';\nimport {\n useLiveRatesMessage,\n useLiveRatesQuery,\n} from '@oanda/labs-widget-common';\nimport { useEffect, useState } from 'react';\n\nimport { getInstrumentCurrency } from './utils';\n\nexport interface UseInstrumentChangeInput {\n initialInstrument: SelectOption;\n}\n\nexport const useInstrumentChange = ({\n initialInstrument,\n}: UseInstrumentChangeInput) => {\n const { target, setQuery, closeQuery } = useLiveRatesQuery();\n const [loading, setLoading] = useState(true);\n const [selectedInstrument, setSelectedInstrument] =\n useState(initialInstrument);\n const [pipLocation, setPipLocation] = useState<undefined | number>(undefined);\n const [initialSpread, setSpread] = useState<undefined | number>(undefined);\n const [currency, setCurrency] = useState('');\n\n const { update, error, connectionError } = useLiveRatesMessage(\n selectedInstrument.id,\n target\n );\n\n useEffect(() => {\n if (selectedInstrument.id === update?.symbol) {\n setPipLocation(update.pipLocation);\n setSpread(update.spread);\n setLoading(false);\n closeQuery();\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [update]);\n\n useEffect(() => {\n setLoading(true);\n setQuery({ instruments: [selectedInstrument.id] });\n setCurrency(getInstrumentCurrency(selectedInstrument.label));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedInstrument.id]);\n\n return {\n selectedInstrument,\n setSelectedInstrument,\n pipLocation,\n initialSpread,\n loading,\n error: !!error || !!connectionError,\n currency,\n };\n};\n"],"mappings":"AACA,SACEA,mBAAmB,EACnBC,iBAAiB,QACZ,2BAA2B;AAClC,SAASC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAE3C,SAASC,qBAAqB,QAAQ,SAAS;AAM/C,OAAO,MAAMC,mBAAmB,GAAGC,IAAA,IAEH;EAAA,IAFI;IAClCC;EACwB,CAAC,GAAAD,IAAA;EACzB,MAAM;IAAEE,MAAM;IAAEC,QAAQ;IAAEC;EAAW,CAAC,GAAGT,iBAAiB,CAAC,CAAC;EAC5D,MAAM,CAACU,OAAO,EAAEC,UAAU,CAAC,GAAGT,QAAQ,CAAC,IAAI,CAAC;EAC5C,MAAM,CAACU,kBAAkB,EAAEC,qBAAqB,CAAC,GAC/CX,QAAQ,CAACI,iBAAiB,CAAC;EAC7B,MAAM,CAACQ,WAAW,EAAEC,cAAc,CAAC,GAAGb,QAAQ,CAAqBc,SAAS,CAAC;EAC7E,MAAM,CAACC,aAAa,EAAEC,SAAS,CAAC,GAAGhB,QAAQ,CAAqBc,SAAS,CAAC;EAC1E,MAAM,CAACG,QAAQ,EAAEC,WAAW,CAAC,GAAGlB,QAAQ,CAAC,EAAE,CAAC;EAE5C,MAAM;IAAEmB,MAAM;IAAEC,KAAK;IAAEC;EAAgB,CAAC,GAAGxB,mBAAmB,CAC5Da,kBAAkB,CAACY,EAAE,EACrBjB,MACF,CAAC;EAEDN,SAAS,CAAC,MAAM;IACd,IAAIW,kBAAkB,CAACY,EAAE,KAAKH,MAAM,EAAEI,MAAM,EAAE;MAC5CV,cAAc,CAACM,MAAM,CAACP,WAAW,CAAC;MAClCI,SAAS,CAACG,MAAM,CAACK,MAAM,CAAC;MACxBf,UAAU,CAAC,KAAK,CAAC;MACjBF,UAAU,CAAC,CAAC;IACd;EAGF,CAAC,EAAE,CAACY,MAAM,CAAC,CAAC;EAEZpB,SAAS,CAAC,MAAM;IACdU,UAAU,CAAC,IAAI,CAAC;IAChBH,QAAQ,CAAC;MAAEmB,WAAW,EAAE,CAACf,kBAAkB,CAACY,EAAE;IAAE,CAAC,CAAC;IAClDJ,WAAW,CAACjB,qBAAqB,CAACS,kBAAkB,CAACgB,KAAK,CAAC,CAAC;EAE9D,CAAC,EAAE,CAAChB,kBAAkB,CAACY,EAAE,CAAC,CAAC;EAE3B,OAAO;IACLZ,kBAAkB;IAClBC,qBAAqB;IACrBC,WAAW;IACXG,aAAa;IACbP,OAAO;IACPY,KAAK,EAAE,CAAC,CAACA,KAAK,IAAI,CAAC,CAACC,eAAe;IACnCJ;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["DEFAULT_CURRENCY","getInstrumentCurrency","instrument","split"],"sources":["../../../src/SpreadCostCalculatorWidget/utils.ts"],"sourcesContent":["import { DEFAULT_CURRENCY } from './constant';\n\nexport const getInstrumentCurrency = (instrument: string): string => instrument.split('/')[1] || DEFAULT_CURRENCY;\n"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,YAAY;AAE7C,OAAO,MAAMC,qBAAqB,GAAIC,UAAkB,IAAaA,UAAU,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAIH,gBAAgB","ignoreList":[]}
1
+ {"version":3,"file":"utils.js","names":["DEFAULT_CURRENCY","getInstrumentCurrency","instrument","split"],"sources":["../../../src/SpreadCostCalculatorWidget/utils.ts"],"sourcesContent":["import { DEFAULT_CURRENCY } from './constant';\n\nexport const getInstrumentCurrency = (instrument: string): string =>\n instrument.split('/')[1] || DEFAULT_CURRENCY;\n"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,YAAY;AAE7C,OAAO,MAAMC,qBAAqB,GAAIC,UAAkB,IACtDA,UAAU,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAIH,gBAAgB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"fragment-masking.js","names":["useFragment","_documentNode","fragmentType","makeFragmentData","data","_fragment","isFragmentReady","queryNode","fragmentNode","deferredFields","__meta__","fragDef","definitions","fragName","name","value","fields","length","every","field"],"sources":["../../../../src/gql/types/fragment-masking.ts"],"sourcesContent":["import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';\nimport { FragmentDefinitionNode } from 'graphql';\nimport { Incremental } from './graphql';\n\n\nexport type FragmentType<TDocumentType extends DocumentTypeDecoration<any, any>> = TDocumentType extends DocumentTypeDecoration<\n infer TType,\n any\n>\n ? [TType] extends [{ ' $fragmentName'?: infer TKey }]\n ? TKey extends string\n ? { ' $fragmentRefs'?: { [key in TKey]: TType } }\n : never\n : never\n : never;\n\n// return non-nullable if `fragmentType` is non-nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>\n): TType;\n// return nullable if `fragmentType` is nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null | undefined\n): TType | null | undefined;\n// return array of non-nullable if `fragmentType` is array of non-nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>\n): ReadonlyArray<TType>;\n// return array of nullable if `fragmentType` is array of nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined\n): ReadonlyArray<TType> | null | undefined;\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined\n): TType | ReadonlyArray<TType> | null | undefined {\n return fragmentType as any;\n}\n\n\nexport function makeFragmentData<\n F extends DocumentTypeDecoration<any, any>,\n FT extends ResultOf<F>\n>(data: FT, _fragment: F): FragmentType<F> {\n return data as FragmentType<F>;\n}\nexport function isFragmentReady<TQuery, TFrag>(\n queryNode: DocumentTypeDecoration<TQuery, any>,\n fragmentNode: TypedDocumentNode<TFrag>,\n data: FragmentType<TypedDocumentNode<Incremental<TFrag>, any>> | null | undefined\n): data is FragmentType<typeof fragmentNode> {\n const deferredFields = (queryNode as { __meta__?: { deferredFields: Record<string, (keyof TFrag)[]> } }).__meta__\n ?.deferredFields;\n\n if (!deferredFields) return true;\n\n const fragDef = fragmentNode.definitions[0] as FragmentDefinitionNode | undefined;\n const fragName = fragDef?.name?.value;\n\n const fields = (fragName && deferredFields[fragName]) || [];\n return fields.length > 0 && fields.every(field => data && field in data);\n}\n"],"mappings":"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;EAC3C,MAAMK,cAAc,GAAIF,SAAS,CAAwEG,QAAQ,EAC7GD,cAAc;EAElB,IAAI,CAACA,cAAc,EAAE,OAAO,IAAI;EAEhC,MAAME,OAAO,GAAGH,YAAY,CAACI,WAAW,CAAC,CAAC,CAAuC;EACjF,MAAMC,QAAQ,GAAGF,OAAO,EAAEG,IAAI,EAAEC,KAAK;EAErC,MAAMC,MAAM,GAAIH,QAAQ,IAAIJ,cAAc,CAACI,QAAQ,CAAC,IAAK,EAAE;EAC3D,OAAOG,MAAM,CAACC,MAAM,GAAG,CAAC,IAAID,MAAM,CAACE,KAAK,CAACC,KAAK,IAAIf,IAAI,IAAIe,KAAK,IAAIf,IAAI,CAAC;AAC1E","ignoreList":[]}
1
+ {"version":3,"file":"fragment-masking.js","names":["useFragment","_documentNode","fragmentType","makeFragmentData","data","_fragment","isFragmentReady","queryNode","fragmentNode","deferredFields","__meta__","fragDef","definitions","fragName","name","value","fields","length","every","field"],"sources":["../../../../src/gql/types/fragment-masking.ts"],"sourcesContent":["import {\n ResultOf,\n DocumentTypeDecoration,\n TypedDocumentNode,\n} from '@graphql-typed-document-node/core';\nimport { FragmentDefinitionNode } from 'graphql';\nimport { Incremental } from './graphql';\n\nexport type FragmentType<\n TDocumentType extends DocumentTypeDecoration<any, any>,\n> =\n TDocumentType extends DocumentTypeDecoration<infer TType, any>\n ? [TType] extends [{ ' $fragmentName'?: infer TKey }]\n ? TKey extends string\n ? { ' $fragmentRefs'?: { [key in TKey]: TType } }\n : never\n : never\n : never;\n\n// return non-nullable if `fragmentType` is non-nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>\n): TType;\n// return nullable if `fragmentType` is nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType:\n | FragmentType<DocumentTypeDecoration<TType, any>>\n | null\n | undefined\n): TType | null | undefined;\n// return array of non-nullable if `fragmentType` is array of non-nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>\n): ReadonlyArray<TType>;\n// return array of nullable if `fragmentType` is array of nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType:\n | ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>\n | null\n | undefined\n): ReadonlyArray<TType> | null | undefined;\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType:\n | FragmentType<DocumentTypeDecoration<TType, any>>\n | ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>\n | null\n | undefined\n): TType | ReadonlyArray<TType> | null | undefined {\n return fragmentType as any;\n}\n\nexport function makeFragmentData<\n F extends DocumentTypeDecoration<any, any>,\n FT extends ResultOf<F>,\n>(data: FT, _fragment: F): FragmentType<F> {\n return data as FragmentType<F>;\n}\nexport function isFragmentReady<TQuery, TFrag>(\n queryNode: DocumentTypeDecoration<TQuery, any>,\n fragmentNode: TypedDocumentNode<TFrag>,\n data:\n | FragmentType<TypedDocumentNode<Incremental<TFrag>, any>>\n | null\n | undefined\n): data is FragmentType<typeof fragmentNode> {\n const deferredFields = (\n queryNode as {\n __meta__?: { deferredFields: Record<string, (keyof TFrag)[]> };\n }\n ).__meta__?.deferredFields;\n\n if (!deferredFields) return true;\n\n const fragDef = fragmentNode.definitions[0] as\n | FragmentDefinitionNode\n | undefined;\n const fragName = fragDef?.name?.value;\n\n const fields = (fragName && deferredFields[fragName]) || [];\n return fields.length > 0 && fields.every((field) => data && field in data);\n}\n"],"mappings":"AA6CA,OAAO,SAASA,WAAWA,CACzBC,aAAiD,EACjDC,YAIa,EACoC;EACjD,OAAOA,YAAY;AACrB;AAEA,OAAO,SAASC,gBAAgBA,CAG9BC,IAAQ,EAAEC,SAAY,EAAmB;EACzC,OAAOD,IAAI;AACb;AACA,OAAO,SAASE,eAAeA,CAC7BC,SAA8C,EAC9CC,YAAsC,EACtCJ,IAGa,EAC8B;EAC3C,MAAMK,cAAc,GAClBF,SAAS,CAGTG,QAAQ,EAAED,cAAc;EAE1B,IAAI,CAACA,cAAc,EAAE,OAAO,IAAI;EAEhC,MAAME,OAAO,GAAGH,YAAY,CAACI,WAAW,CAAC,CAAC,CAE7B;EACb,MAAMC,QAAQ,GAAGF,OAAO,EAAEG,IAAI,EAAEC,KAAK;EAErC,MAAMC,MAAM,GAAIH,QAAQ,IAAIJ,cAAc,CAACI,QAAQ,CAAC,IAAK,EAAE;EAC3D,OAAOG,MAAM,CAACC,MAAM,GAAG,CAAC,IAAID,MAAM,CAACE,KAAK,CAAEC,KAAK,IAAKf,IAAI,IAAIe,KAAK,IAAIf,IAAI,CAAC;AAC5E","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import * as types from './graphql';
2
2
  const documents = {
3
- "\n query validateInstruments($instruments: [String]!, $division: Division) {\n mapInstrumentNames(instruments: $instruments, division: $division) {\n name\n displayName\n }\n }\n": types.ValidateInstrumentsDocument
3
+ '\n query validateInstruments($instruments: [String]!, $division: Division) {\n mapInstrumentNames(instruments: $instruments, division: $division) {\n name\n displayName\n }\n }\n': types.ValidateInstrumentsDocument
4
4
  };
5
5
  export function graphql(source) {
6
6
  return documents[source] ?? {};
@@ -1 +1 @@
1
- {"version":3,"file":"gql.js","names":["types","documents","ValidateInstrumentsDocument","graphql","source"],"sources":["../../../../src/gql/types/gql.ts"],"sourcesContent":["/* eslint-disable */\nimport * as types from './graphql';\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n\n/**\n * Map of all GraphQL operations in the project.\n *\n * This map has several performance disadvantages:\n * 1. It is not tree-shakeable, so it will include all operations in the project.\n * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.\n * 3. It does not support dead code elimination, so it will add unused operations.\n *\n * Therefore it is highly recommended to use the babel or swc plugin for production.\n */\nconst documents = {\n \"\\n query validateInstruments($instruments: [String]!, $division: Division) {\\n mapInstrumentNames(instruments: $instruments, division: $division) {\\n name\\n displayName\\n }\\n }\\n\": types.ValidateInstrumentsDocument,\n};\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n *\n *\n * @example\n * ```ts\n * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);\n * ```\n *\n * The query argument is unknown!\n * Please regenerate the types.\n */\nexport function graphql(source: string): unknown;\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\n query validateInstruments($instruments: [String]!, $division: Division) {\\n mapInstrumentNames(instruments: $instruments, division: $division) {\\n name\\n displayName\\n }\\n }\\n\"): (typeof documents)[\"\\n query validateInstruments($instruments: [String]!, $division: Division) {\\n mapInstrumentNames(instruments: $instruments, division: $division) {\\n name\\n displayName\\n }\\n }\\n\"];\n\nexport function graphql(source: string) {\n return (documents as any)[source] ?? {};\n}\n\nexport type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,WAAW;AAalC,MAAMC,SAAS,GAAG;EACd,sMAAsM,EAAED,KAAK,CAACE;AAClN,CAAC;AAqBD,OAAO,SAASC,OAAOA,CAACC,MAAc,EAAE;EACtC,OAAQH,SAAS,CAASG,MAAM,CAAC,IAAI,CAAC,CAAC;AACzC","ignoreList":[]}
1
+ {"version":3,"file":"gql.js","names":["types","documents","ValidateInstrumentsDocument","graphql","source"],"sources":["../../../../src/gql/types/gql.ts"],"sourcesContent":["/* eslint-disable */\nimport * as types from './graphql';\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n\n/**\n * Map of all GraphQL operations in the project.\n *\n * This map has several performance disadvantages:\n * 1. It is not tree-shakeable, so it will include all operations in the project.\n * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.\n * 3. It does not support dead code elimination, so it will add unused operations.\n *\n * Therefore it is highly recommended to use the babel or swc plugin for production.\n */\nconst documents = {\n '\\n query validateInstruments($instruments: [String]!, $division: Division) {\\n mapInstrumentNames(instruments: $instruments, division: $division) {\\n name\\n displayName\\n }\\n }\\n':\n types.ValidateInstrumentsDocument,\n};\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n *\n *\n * @example\n * ```ts\n * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);\n * ```\n *\n * The query argument is unknown!\n * Please regenerate the types.\n */\nexport function graphql(source: string): unknown;\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(\n source: '\\n query validateInstruments($instruments: [String]!, $division: Division) {\\n mapInstrumentNames(instruments: $instruments, division: $division) {\\n name\\n displayName\\n }\\n }\\n'\n): (typeof documents)['\\n query validateInstruments($instruments: [String]!, $division: Division) {\\n mapInstrumentNames(instruments: $instruments, division: $division) {\\n name\\n displayName\\n }\\n }\\n'];\n\nexport function graphql(source: string) {\n return (documents as any)[source] ?? {};\n}\n\nexport type DocumentType<TDocumentNode extends DocumentNode<any, any>> =\n TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;\n"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,WAAW;AAalC,MAAMC,SAAS,GAAG;EAChB,sMAAsM,EACpMD,KAAK,CAACE;AACV,CAAC;AAuBD,OAAO,SAASC,OAAOA,CAACC,MAAc,EAAE;EACtC,OAAQH,SAAS,CAASG,MAAM,CAAC,IAAI,CAAC,CAAC;AACzC","ignoreList":[]}
@@ -112,101 +112,101 @@ export let VolatilityChartTimeUnit = function (VolatilityChartTimeUnit) {
112
112
  return VolatilityChartTimeUnit;
113
113
  }({});
114
114
  export const ValidateInstrumentsDocument = {
115
- "kind": "Document",
116
- "definitions": [{
117
- "kind": "OperationDefinition",
118
- "operation": "query",
119
- "name": {
120
- "kind": "Name",
121
- "value": "validateInstruments"
115
+ kind: 'Document',
116
+ definitions: [{
117
+ kind: 'OperationDefinition',
118
+ operation: 'query',
119
+ name: {
120
+ kind: 'Name',
121
+ value: 'validateInstruments'
122
122
  },
123
- "variableDefinitions": [{
124
- "kind": "VariableDefinition",
125
- "variable": {
126
- "kind": "Variable",
127
- "name": {
128
- "kind": "Name",
129
- "value": "instruments"
123
+ variableDefinitions: [{
124
+ kind: 'VariableDefinition',
125
+ variable: {
126
+ kind: 'Variable',
127
+ name: {
128
+ kind: 'Name',
129
+ value: 'instruments'
130
130
  }
131
131
  },
132
- "type": {
133
- "kind": "NonNullType",
134
- "type": {
135
- "kind": "ListType",
136
- "type": {
137
- "kind": "NamedType",
138
- "name": {
139
- "kind": "Name",
140
- "value": "String"
132
+ type: {
133
+ kind: 'NonNullType',
134
+ type: {
135
+ kind: 'ListType',
136
+ type: {
137
+ kind: 'NamedType',
138
+ name: {
139
+ kind: 'Name',
140
+ value: 'String'
141
141
  }
142
142
  }
143
143
  }
144
144
  }
145
145
  }, {
146
- "kind": "VariableDefinition",
147
- "variable": {
148
- "kind": "Variable",
149
- "name": {
150
- "kind": "Name",
151
- "value": "division"
146
+ kind: 'VariableDefinition',
147
+ variable: {
148
+ kind: 'Variable',
149
+ name: {
150
+ kind: 'Name',
151
+ value: 'division'
152
152
  }
153
153
  },
154
- "type": {
155
- "kind": "NamedType",
156
- "name": {
157
- "kind": "Name",
158
- "value": "Division"
154
+ type: {
155
+ kind: 'NamedType',
156
+ name: {
157
+ kind: 'Name',
158
+ value: 'Division'
159
159
  }
160
160
  }
161
161
  }],
162
- "selectionSet": {
163
- "kind": "SelectionSet",
164
- "selections": [{
165
- "kind": "Field",
166
- "name": {
167
- "kind": "Name",
168
- "value": "mapInstrumentNames"
162
+ selectionSet: {
163
+ kind: 'SelectionSet',
164
+ selections: [{
165
+ kind: 'Field',
166
+ name: {
167
+ kind: 'Name',
168
+ value: 'mapInstrumentNames'
169
169
  },
170
- "arguments": [{
171
- "kind": "Argument",
172
- "name": {
173
- "kind": "Name",
174
- "value": "instruments"
170
+ arguments: [{
171
+ kind: 'Argument',
172
+ name: {
173
+ kind: 'Name',
174
+ value: 'instruments'
175
175
  },
176
- "value": {
177
- "kind": "Variable",
178
- "name": {
179
- "kind": "Name",
180
- "value": "instruments"
176
+ value: {
177
+ kind: 'Variable',
178
+ name: {
179
+ kind: 'Name',
180
+ value: 'instruments'
181
181
  }
182
182
  }
183
183
  }, {
184
- "kind": "Argument",
185
- "name": {
186
- "kind": "Name",
187
- "value": "division"
184
+ kind: 'Argument',
185
+ name: {
186
+ kind: 'Name',
187
+ value: 'division'
188
188
  },
189
- "value": {
190
- "kind": "Variable",
191
- "name": {
192
- "kind": "Name",
193
- "value": "division"
189
+ value: {
190
+ kind: 'Variable',
191
+ name: {
192
+ kind: 'Name',
193
+ value: 'division'
194
194
  }
195
195
  }
196
196
  }],
197
- "selectionSet": {
198
- "kind": "SelectionSet",
199
- "selections": [{
200
- "kind": "Field",
201
- "name": {
202
- "kind": "Name",
203
- "value": "name"
197
+ selectionSet: {
198
+ kind: 'SelectionSet',
199
+ selections: [{
200
+ kind: 'Field',
201
+ name: {
202
+ kind: 'Name',
203
+ value: 'name'
204
204
  }
205
205
  }, {
206
- "kind": "Field",
207
- "name": {
208
- "kind": "Name",
209
- "value": "displayName"
206
+ kind: 'Field',
207
+ name: {
208
+ kind: 'Name',
209
+ value: 'displayName'
210
210
  }
211
211
  }]
212
212
  }
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.js","names":["AssetClassName","BookType","CorrelationTimeUnit","CurrencyName","CurrencyPowerBalanceTimeUnit","DataSource","Division","Region","Sort","TopicalSort","ValueAtRiskBars","ValueAtRiskDuration","VolatilityChartTimeSpan","VolatilityChartTimeUnit","ValidateInstrumentsDocument"],"sources":["../../../../src/gql/types/graphql.ts"],"sourcesContent":["/* eslint-disable */\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: number; }\n};\n\nexport type AssetClass = {\n __typename?: 'AssetClass';\n instruments: Array<Instrument>;\n name: Scalars['String']['output'];\n};\n\nexport enum AssetClassName {\n Commodities = 'COMMODITIES',\n Cryptocurrency = 'CRYPTOCURRENCY',\n Currency = 'CURRENCY',\n EquityShares = 'EQUITY_SHARES',\n Indices = 'INDICES',\n Rates = 'RATES'\n}\n\nexport enum BookType {\n Order = 'ORDER',\n Position = 'POSITION'\n}\n\nexport type CorrelationHeatmap = {\n __typename?: 'CorrelationHeatmap';\n baseInstrument: Instrument;\n heatmap: Array<Heatmap>;\n};\n\nexport type CorrelationMatrix = {\n __typename?: 'CorrelationMatrix';\n baseTimeUnit: CorrelationTimeUnit;\n matrix: Array<Matrix>;\n};\n\nexport enum CorrelationTimeUnit {\n H1 = 'H1',\n H4 = 'H4',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n M6 = 'M6',\n W1 = 'W1',\n Y1 = 'Y1'\n}\n\nexport enum CurrencyName {\n Aud = 'AUD',\n Cad = 'CAD',\n Chf = 'CHF',\n Eur = 'EUR',\n Gbp = 'GBP',\n Jpy = 'JPY',\n Nzd = 'NZD',\n Usd = 'USD'\n}\n\nexport type CurrencyPower = {\n __typename?: 'CurrencyPower';\n /** UTC Timestamp */\n point: Scalars['String']['output'];\n price: Scalars['Float']['output'];\n};\n\nexport type CurrencyPowerBalance = {\n __typename?: 'CurrencyPowerBalance';\n currency: CurrencyName;\n power: Array<CurrencyPower>;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum CurrencyPowerBalanceTimeUnit {\n CurrentDay = 'CURRENT_DAY',\n H4 = 'H4',\n H8 = 'H8',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n PreviousDay = 'PREVIOUS_DAY',\n W1 = 'W1'\n}\n\nexport type CurrencyStrength = {\n __typename?: 'CurrencyStrength';\n currency: CurrencyName;\n strengthRelation?: Maybe<Array<StrengthRelation>>;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum DataSource {\n Ny4 = 'NY4',\n Ty3 = 'TY3'\n}\n\nexport enum Division {\n Oap = 'OAP',\n Oau = 'OAU',\n Oc = 'OC',\n Ocan = 'OCAN',\n Oel = 'OEL',\n Ogm = 'OGM',\n Oj = 'OJ',\n Opt = 'OPT',\n Otms = 'OTMS'\n}\n\nexport type Heatmap = {\n __typename?: 'Heatmap';\n instrument: Instrument;\n timeCorrelation: Array<TimeCorrelation>;\n};\n\nexport type Instrument = {\n __typename?: 'Instrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n};\n\nexport type InstrumentCorrelation = {\n __typename?: 'InstrumentCorrelation';\n instrument: Instrument;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type Matrix = {\n __typename?: 'Matrix';\n instrument: Instrument;\n instrumentCorrelation: Array<InstrumentCorrelation>;\n};\n\nexport type OrderPositionBucket = {\n __typename?: 'OrderPositionBucket';\n longCountPercent: Scalars['Float']['output'];\n price: Scalars['Float']['output'];\n shortCountPercent: Scalars['Float']['output'];\n};\n\nexport type OrderPositionData = {\n __typename?: 'OrderPositionData';\n bucketWidth: Scalars['Float']['output'];\n buckets: Array<Maybe<OrderPositionBucket>>;\n dataSource?: Maybe<Scalars['String']['output']>;\n instrument: Scalars['String']['output'];\n price?: Maybe<Scalars['Float']['output']>;\n region?: Maybe<Scalars['String']['output']>;\n time: Scalars['String']['output'];\n unixTime: Scalars['Int']['output'];\n};\n\nexport type Query = {\n __typename?: 'Query';\n assetClasses?: Maybe<Array<Maybe<AssetClass>>>;\n correlationHeatmap: CorrelationHeatmap;\n correlationMatrix: CorrelationMatrix;\n currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;\n currencyStrength?: Maybe<Array<CurrencyStrength>>;\n isAllowedPartner?: Maybe<Scalars['Boolean']['output']>;\n mapInstrumentNames?: Maybe<Array<Maybe<Instrument>>>;\n orderPositionBooks: Array<Maybe<OrderPositionData>>;\n resolveInstrumentsByDivision?: Maybe<Array<Instrument>>;\n sentiment?: Maybe<Array<SentimentInstrument>>;\n sentimentList?: Maybe<Array<SentimentInstrument>>;\n topicalInstruments?: Maybe<Array<TopicalInstrument>>;\n topicalInstrumentsCharts?: Maybe<Array<TopicalInstrumentChart>>;\n topicalInstrumentsTotalCount: Scalars['Int']['output'];\n valueAtRiskAssetClasses?: Maybe<Array<AssetClass>>;\n valueAtRiskChart?: Maybe<ValueAtRiskChart>;\n volatilityChart?: Maybe<Array<Maybe<VolatilityChart>>>;\n volatilityChartAssetClasses?: Maybe<Array<AssetClass>>;\n};\n\n\nexport type QueryAssetClassesArgs = {\n division: Division;\n};\n\n\nexport type QueryCorrelationHeatmapArgs = {\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n timeSpans?: InputMaybe<Array<InputMaybe<CorrelationTimeUnit>>>;\n};\n\n\nexport type QueryCorrelationMatrixArgs = {\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n};\n\n\nexport type QueryCurrencyPowerBalanceArgs = {\n timeUnit: CurrencyPowerBalanceTimeUnit;\n};\n\n\nexport type QueryIsAllowedPartnerArgs = {\n url: Scalars['String']['input'];\n};\n\n\nexport type QueryMapInstrumentNamesArgs = {\n division?: InputMaybe<Division>;\n instruments: Array<InputMaybe<Scalars['String']['input']>>;\n};\n\n\nexport type QueryOrderPositionBooksArgs = {\n bookType: BookType;\n dataSource?: InputMaybe<DataSource>;\n instrument: Scalars['String']['input'];\n recentHours?: InputMaybe<Scalars['Int']['input']>;\n region?: InputMaybe<Region>;\n};\n\n\nexport type QueryResolveInstrumentsByDivisionArgs = {\n division: Division;\n instruments: Array<InputMaybe<Scalars['String']['input']>>;\n};\n\n\nexport type QuerySentimentArgs = {\n division?: InputMaybe<Division>;\n name: Scalars['String']['input'];\n};\n\n\nexport type QuerySentimentListArgs = {\n division?: InputMaybe<Division>;\n sort?: InputMaybe<Sort>;\n};\n\n\nexport type QueryTopicalInstrumentsArgs = {\n assetClass?: InputMaybe<AssetClassName>;\n count?: InputMaybe<Scalars['Int']['input']>;\n division?: InputMaybe<Division>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n sort: TopicalSort;\n};\n\n\nexport type QueryTopicalInstrumentsChartsArgs = {\n division?: InputMaybe<Division>;\n instruments?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\n\nexport type QueryTopicalInstrumentsTotalCountArgs = {\n assetClass?: InputMaybe<AssetClassName>;\n division?: InputMaybe<Division>;\n sort: TopicalSort;\n};\n\n\nexport type QueryValueAtRiskAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\n\nexport type QueryValueAtRiskChartArgs = {\n bars: ValueAtRiskBars;\n division?: InputMaybe<Division>;\n duration: ValueAtRiskDuration;\n instrument: Scalars['String']['input'];\n};\n\n\nexport type QueryVolatilityChartArgs = {\n division?: InputMaybe<Division>;\n instrument: Scalars['String']['input'];\n timeSpan: VolatilityChartTimeSpan;\n timeUnit: VolatilityChartTimeUnit;\n};\n\n\nexport type QueryVolatilityChartAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\nexport enum Region {\n Amer = 'AMER',\n Apac = 'APAC',\n Emea = 'EMEA'\n}\n\nexport type Sentiment = {\n __typename?: 'Sentiment';\n longPercent: Scalars['Float']['output'];\n shortPercent: Scalars['Float']['output'];\n};\n\nexport type SentimentInstrument = {\n __typename?: 'SentimentInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum Sort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH'\n}\n\nexport type StrengthRelation = {\n __typename?: 'StrengthRelation';\n currency: CurrencyName;\n percentage: Scalars['Float']['output'];\n};\n\nexport type TimeCorrelation = {\n __typename?: 'TimeCorrelation';\n timeUnit: CorrelationTimeUnit;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type TopicalInstrument = {\n __typename?: 'TopicalInstrument';\n assetClass?: Maybe<AssetClassName>;\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport type TopicalInstrumentChart = {\n __typename?: 'TopicalInstrumentChart';\n chart?: Maybe<Array<Scalars['Float']['output']>>;\n name: Scalars['String']['output'];\n};\n\nexport enum TopicalSort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH',\n Hot = 'HOT',\n Popular = 'POPULAR',\n Volatile = 'VOLATILE'\n}\n\nexport enum ValueAtRiskBars {\n C100 = 'C100',\n C200 = 'C200',\n C300 = 'C300'\n}\n\nexport type ValueAtRiskChart = {\n __typename?: 'ValueAtRiskChart';\n down: ValueAtRiskChartData;\n up: ValueAtRiskChartData;\n};\n\nexport type ValueAtRiskChartData = {\n __typename?: 'ValueAtRiskChartData';\n average: Scalars['Float']['output'];\n max: Scalars['Float']['output'];\n median: Scalars['Float']['output'];\n points?: Maybe<Array<ValueAtRiskChartPoint>>;\n threshold: Scalars['Float']['output'];\n};\n\nexport type ValueAtRiskChartPoint = {\n __typename?: 'ValueAtRiskChartPoint';\n percent: Scalars['Float']['output'];\n pips: Scalars['Float']['output'];\n};\n\nexport enum ValueAtRiskDuration {\n C1 = 'C1',\n C2 = 'C2',\n C3 = 'C3',\n C4 = 'C4',\n C5 = 'C5',\n C10 = 'C10'\n}\n\nexport type VolatilityChart = {\n __typename?: 'VolatilityChart';\n pips: Scalars['Float']['output'];\n /** Time point - hour in format hh:mm, Date in UTC, Week in format 'Mo' */\n point: Scalars['String']['output'];\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum VolatilityChartTimeSpan {\n /** Valid for: H */\n D5 = 'D5',\n /** Valid for: H */\n D10 = 'D10',\n /** Valid for: D */\n M1 = 'M1',\n /** Valid for: D */\n M3 = 'M3',\n /** Valid for: W */\n W5 = 'W5',\n /** Valid for: W */\n W10 = 'W10'\n}\n\nexport enum VolatilityChartTimeUnit {\n D = 'D',\n H = 'H',\n W = 'W'\n}\n\nexport type ValidateInstrumentsQueryVariables = Exact<{\n instruments: Array<InputMaybe<Scalars['String']['input']>> | InputMaybe<Scalars['String']['input']>;\n division?: InputMaybe<Division>;\n}>;\n\n\nexport type ValidateInstrumentsQuery = { __typename?: 'Query', mapInstrumentNames?: Array<{ __typename?: 'Instrument', name: string, displayName: string } | null> | null };\n\n\nexport const ValidateInstrumentsDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"validateInstruments\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"ListType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Division\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"mapInstrumentNames\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"instruments\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"division\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"displayName\"}}]}}]}}]} as unknown as DocumentNode<ValidateInstrumentsQuery, ValidateInstrumentsQueryVariables>;"],"mappings":"AAwBA,WAAYA,cAAc,aAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAS1B,WAAYC,QAAQ,aAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAiBpB,WAAYC,mBAAmB,aAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAW/B,WAAYC,YAAY,aAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAyBxB,WAAYC,4BAA4B,aAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAAA,OAA5BA,4BAA4B;AAAA;AAkBxC,WAAYC,UAAU,aAAVA,UAAU;E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YAAC,OAAO,EAAC;UAAU,CAAC;UAAC,OAAO,EAAC;YAAC,MAAM,EAAC,UAAU;YAAC,MAAM,EAAC;cAAC,MAAM,EAAC,MAAM;cAAC,OAAO,EAAC;YAAU;UAAC;QAAC,CAAC,CAAC;QAAC,cAAc,EAAC;UAAC,MAAM,EAAC,cAAc;UAAC,YAAY,EAAC,CAAC;YAAC,MAAM,EAAC,OAAO;YAAC,MAAM,EAAC;cAAC,MAAM,EAAC,MAAM;cAAC,OAAO,EAAC;YAAM;UAAC,CAAC,EAAC;YAAC,MAAM,EAAC,OAAO;YAAC,MAAM,EAAC;cAAC,MAAM,EAAC,MAAM;cAAC,OAAO,EAAC;YAAa;UAAC,CAAC;QAAC;MAAC,CAAC;IAAC;EAAC,CAAC;AAAC,CAAyF","ignoreList":[]}
1
+ {"version":3,"file":"graphql.js","names":["AssetClassName","BookType","CorrelationTimeUnit","CurrencyName","CurrencyPowerBalanceTimeUnit","DataSource","Division","Region","Sort","TopicalSort","ValueAtRiskBars","ValueAtRiskDuration","VolatilityChartTimeSpan","VolatilityChartTimeUnit","ValidateInstrumentsDocument","kind","definitions","operation","name","value","variableDefinitions","variable","type","selectionSet","selections","arguments"],"sources":["../../../../src/gql/types/graphql.ts"],"sourcesContent":["/* eslint-disable */\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = {\n [K in keyof T]: T[K];\n};\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & {\n [SubKey in K]?: Maybe<T[SubKey]>;\n};\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {\n [SubKey in K]: Maybe<T[SubKey]>;\n};\nexport type MakeEmpty<\n T extends { [key: string]: unknown },\n K extends keyof T,\n> = { [_ in K]?: never };\nexport type Incremental<T> =\n | T\n | {\n [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;\n };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string };\n String: { input: string; output: string };\n Boolean: { input: boolean; output: boolean };\n Int: { input: number; output: number };\n Float: { input: number; output: number };\n};\n\nexport type AssetClass = {\n __typename?: 'AssetClass';\n instruments: Array<Instrument>;\n name: Scalars['String']['output'];\n};\n\nexport enum AssetClassName {\n Commodities = 'COMMODITIES',\n Cryptocurrency = 'CRYPTOCURRENCY',\n Currency = 'CURRENCY',\n EquityShares = 'EQUITY_SHARES',\n Indices = 'INDICES',\n Rates = 'RATES',\n}\n\nexport enum BookType {\n Order = 'ORDER',\n Position = 'POSITION',\n}\n\nexport type CorrelationHeatmap = {\n __typename?: 'CorrelationHeatmap';\n baseInstrument: Instrument;\n heatmap: Array<Heatmap>;\n};\n\nexport type CorrelationMatrix = {\n __typename?: 'CorrelationMatrix';\n baseTimeUnit: CorrelationTimeUnit;\n matrix: Array<Matrix>;\n};\n\nexport enum CorrelationTimeUnit {\n H1 = 'H1',\n H4 = 'H4',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n M6 = 'M6',\n W1 = 'W1',\n Y1 = 'Y1',\n}\n\nexport enum CurrencyName {\n Aud = 'AUD',\n Cad = 'CAD',\n Chf = 'CHF',\n Eur = 'EUR',\n Gbp = 'GBP',\n Jpy = 'JPY',\n Nzd = 'NZD',\n Usd = 'USD',\n}\n\nexport type CurrencyPower = {\n __typename?: 'CurrencyPower';\n /** UTC Timestamp */\n point: Scalars['String']['output'];\n price: Scalars['Float']['output'];\n};\n\nexport type CurrencyPowerBalance = {\n __typename?: 'CurrencyPowerBalance';\n currency: CurrencyName;\n power: Array<CurrencyPower>;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum CurrencyPowerBalanceTimeUnit {\n CurrentDay = 'CURRENT_DAY',\n H4 = 'H4',\n H8 = 'H8',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n PreviousDay = 'PREVIOUS_DAY',\n W1 = 'W1',\n}\n\nexport type CurrencyStrength = {\n __typename?: 'CurrencyStrength';\n currency: CurrencyName;\n strengthRelation?: Maybe<Array<StrengthRelation>>;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum DataSource {\n Ny4 = 'NY4',\n Ty3 = 'TY3',\n}\n\nexport enum Division {\n Oap = 'OAP',\n Oau = 'OAU',\n Oc = 'OC',\n Ocan = 'OCAN',\n Oel = 'OEL',\n Ogm = 'OGM',\n Oj = 'OJ',\n Opt = 'OPT',\n Otms = 'OTMS',\n}\n\nexport type Heatmap = {\n __typename?: 'Heatmap';\n instrument: Instrument;\n timeCorrelation: Array<TimeCorrelation>;\n};\n\nexport type Instrument = {\n __typename?: 'Instrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n};\n\nexport type InstrumentCorrelation = {\n __typename?: 'InstrumentCorrelation';\n instrument: Instrument;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type Matrix = {\n __typename?: 'Matrix';\n instrument: Instrument;\n instrumentCorrelation: Array<InstrumentCorrelation>;\n};\n\nexport type OrderPositionBucket = {\n __typename?: 'OrderPositionBucket';\n longCountPercent: Scalars['Float']['output'];\n price: Scalars['Float']['output'];\n shortCountPercent: Scalars['Float']['output'];\n};\n\nexport type OrderPositionData = {\n __typename?: 'OrderPositionData';\n bucketWidth: Scalars['Float']['output'];\n buckets: Array<Maybe<OrderPositionBucket>>;\n dataSource?: Maybe<Scalars['String']['output']>;\n instrument: Scalars['String']['output'];\n price?: Maybe<Scalars['Float']['output']>;\n region?: Maybe<Scalars['String']['output']>;\n time: Scalars['String']['output'];\n unixTime: Scalars['Int']['output'];\n};\n\nexport type Query = {\n __typename?: 'Query';\n assetClasses?: Maybe<Array<Maybe<AssetClass>>>;\n correlationHeatmap: CorrelationHeatmap;\n correlationMatrix: CorrelationMatrix;\n currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;\n currencyStrength?: Maybe<Array<CurrencyStrength>>;\n isAllowedPartner?: Maybe<Scalars['Boolean']['output']>;\n mapInstrumentNames?: Maybe<Array<Maybe<Instrument>>>;\n orderPositionBooks: Array<Maybe<OrderPositionData>>;\n resolveInstrumentsByDivision?: Maybe<Array<Instrument>>;\n sentiment?: Maybe<Array<SentimentInstrument>>;\n sentimentList?: Maybe<Array<SentimentInstrument>>;\n topicalInstruments?: Maybe<Array<TopicalInstrument>>;\n topicalInstrumentsCharts?: Maybe<Array<TopicalInstrumentChart>>;\n topicalInstrumentsTotalCount: Scalars['Int']['output'];\n valueAtRiskAssetClasses?: Maybe<Array<AssetClass>>;\n valueAtRiskChart?: Maybe<ValueAtRiskChart>;\n volatilityChart?: Maybe<Array<Maybe<VolatilityChart>>>;\n volatilityChartAssetClasses?: Maybe<Array<AssetClass>>;\n};\n\nexport type QueryAssetClassesArgs = {\n division: Division;\n};\n\nexport type QueryCorrelationHeatmapArgs = {\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n timeSpans?: InputMaybe<Array<InputMaybe<CorrelationTimeUnit>>>;\n};\n\nexport type QueryCorrelationMatrixArgs = {\n division: Division;\n instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n};\n\nexport type QueryCurrencyPowerBalanceArgs = {\n timeUnit: CurrencyPowerBalanceTimeUnit;\n};\n\nexport type QueryIsAllowedPartnerArgs = {\n url: Scalars['String']['input'];\n};\n\nexport type QueryMapInstrumentNamesArgs = {\n division?: InputMaybe<Division>;\n instruments: Array<InputMaybe<Scalars['String']['input']>>;\n};\n\nexport type QueryOrderPositionBooksArgs = {\n bookType: BookType;\n dataSource?: InputMaybe<DataSource>;\n instrument: Scalars['String']['input'];\n recentHours?: InputMaybe<Scalars['Int']['input']>;\n region?: InputMaybe<Region>;\n};\n\nexport type QueryResolveInstrumentsByDivisionArgs = {\n division: Division;\n instruments: Array<InputMaybe<Scalars['String']['input']>>;\n};\n\nexport type QuerySentimentArgs = {\n division?: InputMaybe<Division>;\n name: Scalars['String']['input'];\n};\n\nexport type QuerySentimentListArgs = {\n division?: InputMaybe<Division>;\n sort?: InputMaybe<Sort>;\n};\n\nexport type QueryTopicalInstrumentsArgs = {\n assetClass?: InputMaybe<AssetClassName>;\n count?: InputMaybe<Scalars['Int']['input']>;\n division?: InputMaybe<Division>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n sort: TopicalSort;\n};\n\nexport type QueryTopicalInstrumentsChartsArgs = {\n division?: InputMaybe<Division>;\n instruments?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\nexport type QueryTopicalInstrumentsTotalCountArgs = {\n assetClass?: InputMaybe<AssetClassName>;\n division?: InputMaybe<Division>;\n sort: TopicalSort;\n};\n\nexport type QueryValueAtRiskAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\nexport type QueryValueAtRiskChartArgs = {\n bars: ValueAtRiskBars;\n division?: InputMaybe<Division>;\n duration: ValueAtRiskDuration;\n instrument: Scalars['String']['input'];\n};\n\nexport type QueryVolatilityChartArgs = {\n division?: InputMaybe<Division>;\n instrument: Scalars['String']['input'];\n timeSpan: VolatilityChartTimeSpan;\n timeUnit: VolatilityChartTimeUnit;\n};\n\nexport type QueryVolatilityChartAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\nexport enum Region {\n Amer = 'AMER',\n Apac = 'APAC',\n Emea = 'EMEA',\n}\n\nexport type Sentiment = {\n __typename?: 'Sentiment';\n longPercent: Scalars['Float']['output'];\n shortPercent: Scalars['Float']['output'];\n};\n\nexport type SentimentInstrument = {\n __typename?: 'SentimentInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum Sort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH',\n}\n\nexport type StrengthRelation = {\n __typename?: 'StrengthRelation';\n currency: CurrencyName;\n percentage: Scalars['Float']['output'];\n};\n\nexport type TimeCorrelation = {\n __typename?: 'TimeCorrelation';\n timeUnit: CorrelationTimeUnit;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type TopicalInstrument = {\n __typename?: 'TopicalInstrument';\n assetClass?: Maybe<AssetClassName>;\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport type TopicalInstrumentChart = {\n __typename?: 'TopicalInstrumentChart';\n chart?: Maybe<Array<Scalars['Float']['output']>>;\n name: Scalars['String']['output'];\n};\n\nexport enum TopicalSort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH',\n Hot = 'HOT',\n Popular = 'POPULAR',\n Volatile = 'VOLATILE',\n}\n\nexport enum ValueAtRiskBars {\n C100 = 'C100',\n C200 = 'C200',\n C300 = 'C300',\n}\n\nexport type ValueAtRiskChart = {\n __typename?: 'ValueAtRiskChart';\n down: ValueAtRiskChartData;\n up: ValueAtRiskChartData;\n};\n\nexport type ValueAtRiskChartData = {\n __typename?: 'ValueAtRiskChartData';\n average: Scalars['Float']['output'];\n max: Scalars['Float']['output'];\n median: Scalars['Float']['output'];\n points?: Maybe<Array<ValueAtRiskChartPoint>>;\n threshold: Scalars['Float']['output'];\n};\n\nexport type ValueAtRiskChartPoint = {\n __typename?: 'ValueAtRiskChartPoint';\n percent: Scalars['Float']['output'];\n pips: Scalars['Float']['output'];\n};\n\nexport enum ValueAtRiskDuration {\n C1 = 'C1',\n C2 = 'C2',\n C3 = 'C3',\n C4 = 'C4',\n C5 = 'C5',\n C10 = 'C10',\n}\n\nexport type VolatilityChart = {\n __typename?: 'VolatilityChart';\n pips: Scalars['Float']['output'];\n /** Time point - hour in format hh:mm, Date in UTC, Week in format 'Mo' */\n point: Scalars['String']['output'];\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum VolatilityChartTimeSpan {\n /** Valid for: H */\n D5 = 'D5',\n /** Valid for: H */\n D10 = 'D10',\n /** Valid for: D */\n M1 = 'M1',\n /** Valid for: D */\n M3 = 'M3',\n /** Valid for: W */\n W5 = 'W5',\n /** Valid for: W */\n W10 = 'W10',\n}\n\nexport enum VolatilityChartTimeUnit {\n D = 'D',\n H = 'H',\n W = 'W',\n}\n\nexport type ValidateInstrumentsQueryVariables = Exact<{\n instruments:\n | Array<InputMaybe<Scalars['String']['input']>>\n | InputMaybe<Scalars['String']['input']>;\n division?: InputMaybe<Division>;\n}>;\n\nexport type ValidateInstrumentsQuery = {\n __typename?: 'Query';\n mapInstrumentNames?: Array<{\n __typename?: 'Instrument';\n name: string;\n displayName: string;\n } | null> | null;\n};\n\nexport const ValidateInstrumentsDocument = {\n kind: 'Document',\n definitions: [\n {\n kind: 'OperationDefinition',\n operation: 'query',\n name: { kind: 'Name', value: 'validateInstruments' },\n variableDefinitions: [\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'instruments' },\n },\n type: {\n kind: 'NonNullType',\n type: {\n kind: 'ListType',\n type: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'String' },\n },\n },\n },\n },\n {\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'division' },\n },\n type: {\n kind: 'NamedType',\n name: { kind: 'Name', value: 'Division' },\n },\n },\n ],\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'mapInstrumentNames' },\n arguments: [\n {\n kind: 'Argument',\n name: { kind: 'Name', value: 'instruments' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'instruments' },\n },\n },\n {\n kind: 'Argument',\n name: { kind: 'Name', value: 'division' },\n value: {\n kind: 'Variable',\n name: { kind: 'Name', value: 'division' },\n },\n },\n ],\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n { kind: 'Field', name: { kind: 'Name', value: 'displayName' } },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<\n ValidateInstrumentsQuery,\n ValidateInstrumentsQueryVariables\n>;\n"],"mapp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AEJ,IAAI,EAAE,OAAO;YAAEG,IAAI,EAAE;cAAEH,IAAI,EAAE,MAAM;cAAEI,KAAK,EAAE;YAAc;UAAE,CAAC;QAEnE;MACF,CAAC;IAEL;EACF,CAAC;AAEL,CAGC","ignoreList":[]}
@@ -1,3 +1,3 @@
1
- export * from "./fragment-masking";
2
- export * from "./gql";
1
+ export * from './fragment-masking';
2
+ export * from './gql';
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +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","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/gql/types/index.ts"],"sourcesContent":["export * from './fragment-masking';\nexport * from './gql';\n"],"mappings":"AAAA,cAAc,oBAAoB;AAClC,cAAc,OAAO","ignoreList":[]}
@@ -1,3 +1,3 @@
1
- export * from './SpreadCostCalculatorWidget/types';
2
1
  export * from './SpreadCostCalculatorWidget/SpreadCostCalculatorWidget';
2
+ export * from './SpreadCostCalculatorWidget/types';
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from './SpreadCostCalculatorWidget/types';\nexport * from './SpreadCostCalculatorWidget/SpreadCostCalculatorWidget';\n"],"mappings":"AAAA,cAAc,oCAAoC;AAClD,cAAc,yDAAyD","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from './SpreadCostCalculatorWidget/SpreadCostCalculatorWidget';\nexport * from './SpreadCostCalculatorWidget/types';\n"],"mappings":"AAAA,cAAc,yDAAyD;AACvE,cAAc,oCAAoC","ignoreList":[]}
@@ -1,8 +1,8 @@
1
1
  import { Locale } from '@oanda/mono-i18n';
2
2
  import en from './sources/en.json';
3
- import zhTW from './sources/zh_TW.json';
4
3
  import es from './sources/es.json';
5
4
  import th from './sources/th.json';
5
+ import zhTW from './sources/zh_TW.json';
6
6
  export const translations = {
7
7
  [Locale.en]: {
8
8
  translation: en
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Locale","en","zhTW","es","th","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';\nimport es from './sources/es.json';\nimport th from './sources/th.json';\n\nimport { defaultTranslations } from './translations';\n\nexport type TranslationKey = keyof typeof defaultTranslations;\n\nexport const translations: Translations = {\n [Locale.en]: { translation: en },\n [Locale.zhTW]: { translation: zhTW },\n [Locale.es]: { translation: es },\n [Locale.th]: { translation: th },\n};\n"],"mappings":"AAAA,SAASA,MAAM,QAAsB,kBAAkB;AAEvD,OAAOC,EAAE,MAAM,mBAAmB;AAClC,OAAOC,IAAI,MAAM,sBAAsB;AACvC,OAAOC,EAAE,MAAM,mBAAmB;AAClC,OAAOC,EAAE,MAAM,mBAAmB;AAMlC,OAAO,MAAMC,YAA0B,GAAG;EACxC,CAACL,MAAM,CAACC,EAAE,GAAG;IAAEK,WAAW,EAAEL;EAAG,CAAC;EAChC,CAACD,MAAM,CAACE,IAAI,GAAG;IAAEI,WAAW,EAAEJ;EAAK,CAAC;EACpC,CAACF,MAAM,CAACG,EAAE,GAAG;IAAEG,WAAW,EAAEH;EAAG,CAAC;EAChC,CAACH,MAAM,CAACI,EAAE,GAAG;IAAEE,WAAW,EAAEF;EAAG;AACjC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["Locale","en","es","th","zhTW","translations","translation"],"sources":["../../../src/translations/index.ts"],"sourcesContent":["import type { Translations } from '@oanda/mono-i18n';\nimport { Locale } from '@oanda/mono-i18n';\n\nimport en from './sources/en.json';\nimport es from './sources/es.json';\nimport th from './sources/th.json';\nimport zhTW from './sources/zh_TW.json';\nimport type { defaultTranslations } from './translations';\n\nexport type TranslationKey = keyof typeof defaultTranslations;\n\nexport const translations: Translations = {\n [Locale.en]: { translation: en },\n [Locale.zhTW]: { translation: zhTW },\n [Locale.es]: { translation: es },\n [Locale.th]: { translation: th },\n};\n"],"mappings":"AACA,SAASA,MAAM,QAAQ,kBAAkB;AAEzC,OAAOC,EAAE,MAAM,mBAAmB;AAClC,OAAOC,EAAE,MAAM,mBAAmB;AAClC,OAAOC,EAAE,MAAM,mBAAmB;AAClC,OAAOC,IAAI,MAAM,sBAAsB;AAKvC,OAAO,MAAMC,YAA0B,GAAG;EACxC,CAACL,MAAM,CAACC,EAAE,GAAG;IAAEK,WAAW,EAAEL;EAAG,CAAC;EAChC,CAACD,MAAM,CAACI,IAAI,GAAG;IAAEE,WAAW,EAAEF;EAAK,CAAC;EACpC,CAACJ,MAAM,CAACE,EAAE,GAAG;IAAEI,WAAW,EAAEJ;EAAG,CAAC;EAChC,CAACF,MAAM,CAACG,EAAE,GAAG;IAAEG,WAAW,EAAEH;EAAG;AACjC,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
2
- import { MainProps } from './types';
1
+ import type { FC } from 'react';
2
+ import type { MainProps } from './types';
3
3
  declare const Main: FC<MainProps>;
4
4
  export { Main };
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
2
- import { SpreadCostCalculatorWidgetConfig } from './types';
1
+ import type { FC } from 'react';
2
+ import type { SpreadCostCalculatorWidgetConfig } from './types';
3
3
  declare const SpreadCostCalculatorWidget: FC<SpreadCostCalculatorWidgetConfig>;
4
4
  export { SpreadCostCalculatorWidget };
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { ValidationWrapperProps } from './types';
2
+ import type { ValidationWrapperProps } from './types';
3
3
  declare const ValidationWrapper: ({ division, instruments, isParamError, }: ValidationWrapperProps) => React.JSX.Element;
4
4
  export { ValidationWrapper };
@@ -1,18 +1,18 @@
1
- import { WidgetConfig } from '@oanda/labs-widget-common';
2
- import { Division } from '../gql/types/graphql';
1
+ import type { WidgetConfig } from '@oanda/labs-widget-common';
2
+ import type { Division } from '../gql/types/graphql';
3
3
  export { Locale } from '@oanda/mono-i18n';
4
4
  export type SpreadCostCalculatorWidgetConfig = WidgetConfig & {
5
5
  liveRatesUrl: string;
6
6
  division: Division;
7
7
  instruments: string[];
8
8
  };
9
- export type InstrumentResponse = {
9
+ export interface InstrumentResponse {
10
10
  name: string;
11
11
  displayName: string;
12
- };
13
- export type MainProps = {
12
+ }
13
+ export interface MainProps {
14
14
  instruments: InstrumentResponse[];
15
- };
15
+ }
16
16
  export interface ValidationWrapperProps {
17
17
  division: Division;
18
18
  instruments: string[];
@@ -1,9 +1,9 @@
1
- import { Voidable } from '@oanda/labs-widget-common';
2
- export type UseCalculateSpreadInput = {
1
+ import type { Voidable } from '@oanda/labs-widget-common';
2
+ export interface UseCalculateSpreadInput {
3
3
  spread: Voidable<number>;
4
4
  unitsTraded: Voidable<number>;
5
5
  pipLocation: Voidable<number>;
6
6
  delay?: number;
7
7
  currency: string;
8
- };
8
+ }
9
9
  export declare const useCalculateSpread: ({ spread, unitsTraded, pipLocation, delay, currency, }: UseCalculateSpreadInput) => string;
@@ -1,7 +1,7 @@
1
- import { SelectOption } from '@oanda/labs-widget-common';
2
- export type UseInstrumentChangeInput = {
1
+ import type { SelectOption } from '@oanda/labs-widget-common';
2
+ export interface UseInstrumentChangeInput {
3
3
  initialInstrument: SelectOption;
4
- };
4
+ }
5
5
  export declare const useInstrumentChange: ({ initialInstrument, }: UseInstrumentChangeInput) => {
6
6
  selectedInstrument: SelectOption;
7
7
  setSelectedInstrument: import("react").Dispatch<import("react").SetStateAction<SelectOption>>;
@@ -11,7 +11,7 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
11
11
  * Therefore it is highly recommended to use the babel or swc plugin for production.
12
12
  */
13
13
  declare const documents: {
14
- "\n query validateInstruments($instruments: [String]!, $division: Division) {\n mapInstrumentNames(instruments: $instruments, division: $division) {\n name\n displayName\n }\n }\n": DocumentNode<types.ValidateInstrumentsQuery, types.Exact<{
14
+ '\n query validateInstruments($instruments: [String]!, $division: Division) {\n mapInstrumentNames(instruments: $instruments, division: $division) {\n name\n displayName\n }\n }\n': DocumentNode<types.ValidateInstrumentsQuery, types.Exact<{
15
15
  instruments: Array<types.InputMaybe<types.Scalars["String"]["input"]>> | types.InputMaybe<types.Scalars["String"]["input"]>;
16
16
  division?: types.InputMaybe<types.Division>;
17
17
  }>>;
@@ -32,6 +32,6 @@ export declare function graphql(source: string): unknown;
32
32
  /**
33
33
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
34
34
  */
35
- export declare function graphql(source: "\n query validateInstruments($instruments: [String]!, $division: Division) {\n mapInstrumentNames(instruments: $instruments, division: $division) {\n name\n displayName\n }\n }\n"): (typeof documents)["\n query validateInstruments($instruments: [String]!, $division: Division) {\n mapInstrumentNames(instruments: $instruments, division: $division) {\n name\n displayName\n }\n }\n"];
35
+ export declare function graphql(source: '\n query validateInstruments($instruments: [String]!, $division: Division) {\n mapInstrumentNames(instruments: $instruments, division: $division) {\n name\n displayName\n }\n }\n'): (typeof documents)['\n query validateInstruments($instruments: [String]!, $division: Division) {\n mapInstrumentNames(instruments: $instruments, division: $division) {\n name\n displayName\n }\n }\n'];
36
36
  export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;
37
37
  export {};
@@ -1,2 +1,2 @@
1
- export * from "./fragment-masking";
2
- export * from "./gql";
1
+ export * from './fragment-masking';
2
+ export * from './gql';
@@ -1,2 +1,2 @@
1
- export * from './SpreadCostCalculatorWidget/types';
2
1
  export * from './SpreadCostCalculatorWidget/SpreadCostCalculatorWidget';
2
+ export * from './SpreadCostCalculatorWidget/types';
@@ -1,4 +1,4 @@
1
- import { Translations } from '@oanda/mono-i18n';
2
- import { defaultTranslations } from './translations';
1
+ import type { Translations } from '@oanda/mono-i18n';
2
+ import type { defaultTranslations } from './translations';
3
3
  export type TranslationKey = keyof typeof defaultTranslations;
4
4
  export declare const translations: Translations;