@oanda/labs-instruments-price-chart-widget 1.0.48 → 1.0.50

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 (48) hide show
  1. package/CHANGELOG.md +306 -2626
  2. package/dist/module/InstrumentsPriceChartWidget/InstrumentsPriceChartWidget.js +19 -12
  3. package/dist/module/InstrumentsPriceChartWidget/InstrumentsPriceChartWidget.js.map +1 -1
  4. package/dist/module/InstrumentsPriceChartWidget/Main.js +32 -25
  5. package/dist/module/InstrumentsPriceChartWidget/Main.js.map +1 -1
  6. package/dist/module/InstrumentsPriceChartWidget/components/Chart.js +27 -18
  7. package/dist/module/InstrumentsPriceChartWidget/components/Chart.js.map +1 -1
  8. package/dist/module/InstrumentsPriceChartWidget/components/TimeZoneLabel.js +13 -5
  9. package/dist/module/InstrumentsPriceChartWidget/components/TimeZoneLabel.js.map +1 -1
  10. package/dist/module/InstrumentsPriceChartWidget/components/constants.js +11 -5
  11. package/dist/module/InstrumentsPriceChartWidget/components/constants.js.map +1 -1
  12. package/dist/module/InstrumentsPriceChartWidget/components/formatters.js +20 -11
  13. package/dist/module/InstrumentsPriceChartWidget/components/formatters.js.map +1 -1
  14. package/dist/module/InstrumentsPriceChartWidget/components/getOption.js +28 -21
  15. package/dist/module/InstrumentsPriceChartWidget/components/getOption.js.map +1 -1
  16. package/dist/module/InstrumentsPriceChartWidget/components/types.js +5 -1
  17. package/dist/module/InstrumentsPriceChartWidget/config.js +19 -14
  18. package/dist/module/InstrumentsPriceChartWidget/config.js.map +1 -1
  19. package/dist/module/InstrumentsPriceChartWidget/index.js +27 -2
  20. package/dist/module/InstrumentsPriceChartWidget/index.js.map +1 -1
  21. package/dist/module/InstrumentsPriceChartWidget/render.js +14 -11
  22. package/dist/module/InstrumentsPriceChartWidget/render.js.map +1 -1
  23. package/dist/module/InstrumentsPriceChartWidget/types.js +13 -7
  24. package/dist/module/InstrumentsPriceChartWidget/types.js.map +1 -1
  25. package/dist/module/InstrumentsPriceChartWidget/utils.js +11 -3
  26. package/dist/module/InstrumentsPriceChartWidget/utils.js.map +1 -1
  27. package/dist/module/gql/priceCandles.js +8 -3
  28. package/dist/module/gql/priceCandles.js.map +1 -1
  29. package/dist/module/gql/types/fragment-masking.js +11 -3
  30. package/dist/module/gql/types/fragment-masking.js.map +1 -1
  31. package/dist/module/gql/types/gql.js +9 -2
  32. package/dist/module/gql/types/gql.js.map +1 -1
  33. package/dist/module/gql/types/graphql.js +26 -20
  34. package/dist/module/gql/types/graphql.js.map +1 -1
  35. package/dist/module/gql/types/index.js +27 -2
  36. package/dist/module/gql/types/index.js.map +1 -1
  37. package/dist/module/gql/validateInstruments.js +8 -2
  38. package/dist/module/gql/validateInstruments.js.map +1 -1
  39. package/dist/module/index.js +16 -1
  40. package/dist/module/index.js.map +1 -1
  41. package/dist/module/translations/index.js +21 -14
  42. package/dist/module/translations/index.js.map +1 -1
  43. package/dist/module/translations/translations.js +7 -1
  44. package/dist/module/translations/translations.js.map +1 -1
  45. package/dist/types/gql/priceCandles.d.ts +1 -1
  46. package/dist/types/gql/validateInstruments.d.ts +1 -1
  47. package/package.json +8 -4
  48. package/tsconfig.types.json +2 -4
@@ -1 +1 @@
1
- {"version":3,"file":"getOption.js","names":["colorPalette","getGridLines","getLineCommons","CHART_HEIGHT","CHART_INTERVAL","CHART_WIDTH","X_LABEL_SIZE","Y_LABEL_SIZE_DESKTOP","labelFormatter","showSplitLine","tooltipFormatter","getOption","_ref","values","isDark","lang","timeSpan","priceValues","map","d","high","gridLines","chartWidth","chartHeight","xLabelsSize","yLabelSize","bottomLeftBox","animation","tooltip","trigger","axisPointer","axis","formatter","params","p","Array","isArray","data","xAxis","type","boundaryGap","point","axisTick","show","axisLabel","padding","interval","splitLine","index","length","yAxis","position","min","value","Math","floor","max","ceil","axisLine","margin","dataMin","dataMax","toFixed","series","name","time","smooth","symbol","lineStyle","color","navyBlue","width","areaStyle","x","y","x2","y2","colorStops","offset","brightBlue30","brightBlue","grid","top","left","right","bottom","graphic","shape","x1","y1"],"sources":["../../../../src/InstrumentsPriceChartWidget/components/getOption.ts"],"sourcesContent":["import {\n colorPalette,\n getGridLines,\n getLineCommons,\n} from '@oanda/labs-widget-common';\n\nimport {\n CHART_HEIGHT,\n CHART_INTERVAL,\n CHART_WIDTH,\n X_LABEL_SIZE,\n Y_LABEL_SIZE_DESKTOP,\n} from './constants';\nimport { labelFormatter, showSplitLine, tooltipFormatter } from './formatters';\nimport type { ChartValue, GetOptionType } from './types';\n\nexport const getOption: GetOptionType = ({\n values,\n isDark,\n lang,\n timeSpan,\n}) => {\n const priceValues = values.map((d) => d.high);\n\n const gridLines = getGridLines({\n isDark,\n chartWidth: CHART_WIDTH,\n chartHeight: CHART_HEIGHT,\n xLabelsSize: X_LABEL_SIZE,\n yLabelSize: Y_LABEL_SIZE_DESKTOP,\n bottomLeftBox: false,\n });\n\n return {\n animation: false,\n tooltip: {\n trigger: 'axis',\n axisPointer: {\n axis: 'x',\n },\n formatter: (params) => {\n const p = Array.isArray(params) ? params[0] : params;\n const data = p.data as {\n point: string;\n open: number;\n high: number;\n low: number;\n close: number;\n };\n\n return tooltipFormatter({ lang, data });\n },\n },\n xAxis: {\n type: 'category',\n boundaryGap: false,\n data: values.map((d) => d.point),\n axisTick: { show: false },\n axisLabel: {\n padding: [0, 0, 0, 30],\n interval: 'auto',\n formatter: labelFormatter(timeSpan, values),\n },\n splitLine: {\n show: true,\n interval: (index: number) => showSplitLine(index, values.length),\n },\n },\n yAxis: {\n type: 'value',\n position: 'right',\n min: (value: ChartValue) =>\n Math.floor(value.min * 100) / 100 - CHART_INTERVAL,\n max: (value: ChartValue) =>\n Math.ceil(value.max * 100) / 100 + CHART_INTERVAL,\n interval: CHART_INTERVAL,\n axisLine: { show: false },\n axisTick: { show: false },\n axisLabel: {\n margin: 10,\n formatter: (value: number) => {\n const dataMin = Math.floor(Math.min(...priceValues) * 100) / 100;\n const dataMax = Math.ceil(Math.max(...priceValues) * 100) / 100;\n if (value < dataMin || value > dataMax) {\n return '';\n }\n return value.toFixed(2);\n },\n },\n splitLine: {\n show: true,\n },\n },\n series: [\n {\n name: 'price-close',\n type: 'line',\n data: values.map((d) => ({\n value: d.high,\n ...d,\n time: d.point,\n })),\n smooth: true,\n symbol: 'none',\n lineStyle: {\n color: colorPalette.navyBlue,\n width: 2,\n },\n areaStyle: {\n color: {\n type: 'linear',\n x: 0,\n y: 0,\n x2: 0,\n y2: 1,\n colorStops: [\n { offset: 0, color: colorPalette.brightBlue30 },\n { offset: 1, color: colorPalette.brightBlue },\n ],\n },\n },\n },\n ],\n grid: [\n {\n name: 'main-grid',\n top: 0,\n left: 0,\n right: `${Y_LABEL_SIZE_DESKTOP}px`,\n bottom: `${X_LABEL_SIZE}px`,\n },\n ],\n graphic: [\n ...gridLines,\n {\n ...getLineCommons(isDark),\n top: 0,\n right: 0,\n shape: {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: 0,\n },\n },\n ],\n };\n};\n"],"mappings":"AAAA,SACEA,YAAY,EACZC,YAAY,EACZC,cAAc,QACT,2BAA2B;AAElC,SACEC,YAAY,EACZC,cAAc,EACdC,WAAW,EACXC,YAAY,EACZC,oBAAoB,QACf,aAAa;AACpB,SAASC,cAAc,EAAEC,aAAa,EAAEC,gBAAgB,QAAQ,cAAc;AAG9E,OAAO,MAAMC,SAAwB,GAAGC,IAAA,IAKlC;EAAA,IALmC;IACvCC,MAAM;IACNC,MAAM;IACNC,IAAI;IACJC;EACF,CAAC,GAAAJ,IAAA;EACC,MAAMK,WAAW,GAAGJ,MAAM,CAACK,GAAG,CAAEC,CAAC,IAAKA,CAAC,CAACC,IAAI,CAAC;EAE7C,MAAMC,SAAS,GAAGpB,YAAY,CAAC;IAC7Ba,MAAM;IACNQ,UAAU,EAAEjB,WAAW;IACvBkB,WAAW,EAAEpB,YAAY;IACzBqB,WAAW,EAAElB,YAAY;IACzBmB,UAAU,EAAElB,oBAAoB;IAChCmB,aAAa,EAAE;E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AAE,CAAC;UACLC,UAAU,EAAE,CACV;YAAEC,MAAM,EAAE,CAAC;YAAET,KAAK,EAAErE,YAAY,CAAC+E;UAAa,CAAC,EAC/C;YAAED,MAAM,EAAE,CAAC;YAAET,KAAK,EAAErE,YAAY,CAACgF;UAAW,CAAC;QAEjD;MACF;IACF,CAAC,CACF;IACDC,IAAI,EAAE,CACJ;MACEjB,IAAI,EAAE,WAAW;MACjBkB,GAAG,EAAE,CAAC;MACNC,IAAI,EAAE,CAAC;MACPC,KAAK,EAAE,GAAG7E,oBAAoB,IAAI;MAClC8E,MAAM,EAAE,GAAG/E,YAAY;IACzB,CAAC,CACF;IACDgF,OAAO,EAAE,CACP,GAAGjE,SAAS,EACZ;MACE,GAAGnB,cAAc,CAACY,MAAM,CAAC;MACzBoE,GAAG,EAAE,CAAC;MACNE,KAAK,EAAE,CAAC;MACRG,KAAK,EAAE;QACLC,EAAE,EAAE,CAAC;QACLC,EAAE,EAAE,CAAC;QACLd,EAAE,EAAE,CAAC;QACLC,EAAE,EAAE;MACN;IACF,CAAC;EAEL,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"getOption.js","names":["_labsWidgetCommon","require","_constants","_formatters","getOption","_ref","values","isDark","lang","timeSpan","priceValues","map","d","high","gridLines","getGridLines","chartWidth","CHART_WIDTH","chartHeight","CHART_HEIGHT","xLabelsSize","X_LABEL_SIZE","yLabelSize","Y_LABEL_SIZE_DESKTOP","bottomLeftBox","animation","tooltip","trigger","axisPointer","axis","formatter","params","p","Array","isArray","data","tooltipFormatter","xAxis","type","boundaryGap","point","axisTick","show","axisLabel","padding","interval","labelFormatter","splitLine","index","showSplitLine","length","yAxis","position","min","value","Math","floor","CHART_INTERVAL","max","ceil","axisLine","margin","dataMin","dataMax","toFixed","series","name","time","smooth","symbol","lineStyle","color","colorPalette","navyBlue","width","areaStyle","x","y","x2","y2","colorStops","offset","brightBlue30","brightBlue","grid","top","left","right","bottom","graphic","getLineCommons","shape","x1","y1","exports"],"sources":["../../../../src/InstrumentsPriceChartWidget/components/getOption.ts"],"sourcesContent":["import {\n colorPalette,\n getGridLines,\n getLineCommons,\n} from '@oanda/labs-widget-common';\n\nimport {\n CHART_HEIGHT,\n CHART_INTERVAL,\n CHART_WIDTH,\n X_LABEL_SIZE,\n Y_LABEL_SIZE_DESKTOP,\n} from './constants';\nimport { labelFormatter, showSplitLine, tooltipFormatter } from './formatters';\nimport type { ChartValue, GetOptionType } from './types';\n\nexport const getOption: GetOptionType = ({\n values,\n isDark,\n lang,\n timeSpan,\n}) => {\n const priceValues = values.map((d) => d.high);\n\n const gridLines = getGridLines({\n isDark,\n chartWidth: CHART_WIDTH,\n chartHeight: CHART_HEIGHT,\n xLabelsSize: X_LABEL_SIZE,\n yLabelSize: Y_LABEL_SIZE_DESKTOP,\n bottomLeftBox: false,\n });\n\n return {\n animation: false,\n tooltip: {\n trigger: 'axis',\n axisPointer: {\n axis: 'x',\n },\n formatter: (params) => {\n const p = Array.isArray(params) ? params[0] : params;\n const data = p.data as {\n point: string;\n open: number;\n high: number;\n low: number;\n close: number;\n };\n\n return tooltipFormatter({ lang, data });\n },\n },\n xAxis: {\n type: 'category',\n boundaryGap: false,\n data: values.map((d) => d.point),\n axisTick: { show: false },\n axisLabel: {\n padding: [0, 0, 0, 30],\n interval: 'auto',\n formatter: labelFormatter(timeSpan, values),\n },\n splitLine: {\n show: true,\n interval: (index: number) => showSplitLine(index, values.length),\n },\n },\n yAxis: {\n type: 'value',\n position: 'right',\n min: (value: ChartValue) =>\n Math.floor(value.min * 100) / 100 - CHART_INTERVAL,\n max: (value: ChartValue) =>\n Math.ceil(value.max * 100) / 100 + CHART_INTERVAL,\n interval: CHART_INTERVAL,\n axisLine: { show: false },\n axisTick: { show: false },\n axisLabel: {\n margin: 10,\n formatter: (value: number) => {\n const dataMin = Math.floor(Math.min(...priceValues) * 100) / 100;\n const dataMax = Math.ceil(Math.max(...priceValues) * 100) / 100;\n if (value < dataMin || value > dataMax) {\n return '';\n }\n return value.toFixed(2);\n },\n },\n splitLine: {\n show: true,\n },\n },\n series: [\n {\n name: 'price-close',\n type: 'line',\n data: values.map((d) => ({\n value: d.high,\n ...d,\n time: d.point,\n })),\n smooth: true,\n symbol: 'none',\n lineStyle: {\n color: colorPalette.navyBlue,\n width: 2,\n },\n areaStyle: {\n color: {\n type: 'linear',\n x: 0,\n y: 0,\n x2: 0,\n y2: 1,\n colorStops: [\n { offset: 0, color: colorPalette.brightBlue30 },\n { offset: 1, color: colorPalette.brightBlue },\n ],\n },\n },\n },\n ],\n grid: [\n {\n name: 'main-grid',\n top: 0,\n left: 0,\n right: `${Y_LABEL_SIZE_DESKTOP}px`,\n bottom: `${X_LABEL_SIZE}px`,\n },\n ],\n graphic: [\n ...gridLines,\n {\n ...getLineCommons(isDark),\n top: 0,\n right: 0,\n shape: {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: 0,\n },\n },\n ],\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAMA,IAAAC,UAAA,GAAAD,OAAA;AAOA,IAAAE,WAAA,GAAAF,OAAA;AAGO,MAAMG,SAAwB,GAAGC,IAAA,IAKlC;EAAA,IALmC;IACvCC,MAAM;IACNC,MAAM;IACNC,IAAI;IACJC;EACF,CAAC,GAAAJ,IAAA;EACC,MAAMK,WAAW,GAAGJ,MAAM,CAACK,GAAG,CAAEC,CAAC,IAAKA,CAAC,CAACC,IAAI,CAAC;EAE7C,MAAMC,SAAS,GAAG,IAAAC,8BAAY,EAAC;IAC7BR,MAAM;IACNS,UAAU,EAAEC,sBAAW;IACvBC,WAAW,EAAEC,uBAAY;IACzBC,WAAW,EAAEC,uBAAY;IACzBC,UAAU,EAAEC,+BAAoB;IAChCC,aAAa,EAAE;EACjB,CAAC,CAAC;EAEF,OAAO;IACLC,SAAS,EAAE,KAAK;IAChBC,OAAO,EAAE;MACPC,OAAO,EAAE,MAAM;MACfC,WAAW,EAAE;QACXC,IAAI,EAAE;MAC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C/C;YAAED,MAAM,EAAE,CAAC;YAAEV,KAAK,EAAEC,8BAAY,CAACW;UAAW,CAAC;QAEjD;MACF;IACF,CAAC,CACF;IACDC,IAAI,EAAE,CACJ;MACElB,IAAI,EAAE,WAAW;MACjBmB,GAAG,EAAE,CAAC;MACNC,IAAI,EAAE,CAAC;MACPC,KAAK,EAAE,GAAGhE,+BAAoB,IAAI;MAClCiE,MAAM,EAAE,GAAGnE,uBAAY;IACzB,CAAC,CACF;IACDoE,OAAO,EAAE,CACP,GAAG3E,SAAS,EACZ;MACE,GAAG,IAAA4E,gCAAc,EAACnF,MAAM,CAAC;MACzB8E,GAAG,EAAE,CAAC;MACNE,KAAK,EAAE,CAAC;MACRI,KAAK,EAAE;QACLC,EAAE,EAAE,CAAC;QACLC,EAAE,EAAE,CAAC;QACLf,EAAE,EAAE,CAAC;QACLC,EAAE,EAAE;MACN;IACF,CAAC;EAEL,CAAC;AACH,CAAC;AAACe,OAAA,CAAA1F,SAAA,GAAAA,SAAA","ignoreList":[]}
@@ -1,2 +1,6 @@
1
- export {};
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
2
6
  //# sourceMappingURL=types.js.map
@@ -1,46 +1,51 @@
1
- import { Granularity, TimeSpan } from '../gql/types/graphql';
2
- const timeUnitConfig = [{
3
- value: TimeSpan.Day_1,
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.timeUnitConfig = exports.granularityForTimeSpan = void 0;
7
+ var _graphql = require("../gql/types/graphql");
8
+ const timeUnitConfig = exports.timeUnitConfig = [{
9
+ value: _graphql.TimeSpan.Day_1,
4
10
  label: '1d',
5
11
  tooltipLabel: {
6
12
  translationKey: 'day',
7
13
  count: 1
8
14
  }
9
15
  }, {
10
- value: TimeSpan.Week_1,
16
+ value: _graphql.TimeSpan.Week_1,
11
17
  label: '1w',
12
18
  tooltipLabel: {
13
19
  translationKey: 'week',
14
20
  count: 1
15
21
  }
16
22
  }, {
17
- value: TimeSpan.Month_1,
23
+ value: _graphql.TimeSpan.Month_1,
18
24
  label: '1m',
19
25
  tooltipLabel: {
20
26
  translationKey: 'month',
21
27
  count: 1
22
28
  }
23
29
  }, {
24
- value: TimeSpan.Month_6,
30
+ value: _graphql.TimeSpan.Month_6,
25
31
  label: '6m',
26
32
  tooltipLabel: {
27
33
  translationKey: 'month',
28
34
  count: 6
29
35
  }
30
36
  }, {
31
- value: TimeSpan.Year_1,
37
+ value: _graphql.TimeSpan.Year_1,
32
38
  label: '1y',
33
39
  tooltipLabel: {
34
40
  translationKey: 'year',
35
41
  count: 1
36
42
  }
37
43
  }];
38
- const granularityForTimeSpan = {
39
- [TimeSpan.Day_1]: Granularity.H1,
40
- [TimeSpan.Week_1]: Granularity.H4,
41
- [TimeSpan.Month_1]: Granularity.D1,
42
- [TimeSpan.Month_6]: Granularity.D1,
43
- [TimeSpan.Year_1]: Granularity.D1
44
+ const granularityForTimeSpan = exports.granularityForTimeSpan = {
45
+ [_graphql.TimeSpan.Day_1]: _graphql.Granularity.H1,
46
+ [_graphql.TimeSpan.Week_1]: _graphql.Granularity.H4,
47
+ [_graphql.TimeSpan.Month_1]: _graphql.Granularity.D1,
48
+ [_graphql.TimeSpan.Month_6]: _graphql.Granularity.D1,
49
+ [_graphql.TimeSpan.Year_1]: _graphql.Granularity.D1
44
50
  };
45
- export { granularityForTimeSpan, timeUnitConfig };
46
51
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","names":["Granularity","TimeSpan","timeUnitConfig","value","Day_1","label","tooltipLabel","translationKey","count","Week_1","Month_1","Month_6","Year_1","granularityForTimeSpan","H1","H4","D1"],"sources":["../../../src/InstrumentsPriceChartWidget/config.ts"],"sourcesContent":["import { Granularity, TimeSpan } from '../gql/types/graphql';\nimport type { TimeSpanSubset } from './types';\n\nconst timeUnitConfig = [\n {\n value: TimeSpan.Day_1,\n label: '1d',\n tooltipLabel: {\n translationKey: 'day',\n count: 1,\n },\n },\n {\n value: TimeSpan.Week_1,\n label: '1w',\n tooltipLabel: {\n translationKey: 'week',\n count: 1,\n },\n },\n {\n value: TimeSpan.Month_1,\n label: '1m',\n tooltipLabel: {\n translationKey: 'month',\n count: 1,\n },\n },\n\n {\n value: TimeSpan.Month_6,\n label: '6m',\n tooltipLabel: {\n translationKey: 'month',\n count: 6,\n },\n },\n {\n value: TimeSpan.Year_1,\n label: '1y',\n tooltipLabel: {\n translationKey: 'year',\n count: 1,\n },\n },\n];\n\nconst granularityForTimeSpan: Record<TimeSpanSubset, Granularity> = {\n [TimeSpan.Day_1]: Granularity.H1,\n [TimeSpan.Week_1]: Granularity.H4,\n [TimeSpan.Month_1]: Granularity.D1,\n [TimeSpan.Month_6]: Granularity.D1,\n [TimeSpan.Year_1]: Granularity.D1,\n};\n\nexport { granularityForTimeSpan, timeUnitConfig };\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,QAAQ,QAAQ,sBAAsB;AAG5D,MAAMC,cAAc,GAAG,CACrB;EACEC,KAAK,EAAEF,QAAQ,CAACG,KAAK;EACrBC,KAAK,EAAE,IAAI;EACXC,YAAY,EAAE;IACZC,cAAc,EAAE,KAAK;IACrBC,KAAK,EAAE;EACT;AACF,CAAC,EACD;EACEL,KAAK,EAAEF,QAAQ,CAACQ,MAAM;EACtBJ,KAAK,EAAE,IAAI;EACXC,YAAY,EAAE;IACZC,cAAc,EAAE,MAAM;IACtBC,KAAK,EAAE;EACT;AACF,CAAC,EACD;EACEL,KAAK,EAAEF,QAAQ,CAACS,OAAO;EACvBL,KAAK,EAAE,IAAI;EACXC,YAAY,EAAE;IACZC,cAAc,EAAE,OAAO;IACvBC,KAAK,EAAE;EACT;AACF,CAAC,EAED;EACEL,KAAK,EAAEF,QAAQ,CAACU,OAAO;EACvBN,KAAK,EAAE,IAAI;EACXC,YAAY,EAAE;IACZC,cAAc,EAAE,OAAO;IACvBC,KAAK,EAAE;EACT;AACF,CAAC,EACD;EACEL,KAAK,EAAEF,QAAQ,CAACW,MAAM;EACtBP,KAAK,EAAE,IAAI;EACXC,YAAY,EAAE;IACZC,cAAc,EAAE,MAAM;IACtBC,KAAK,EAAE;EACT;AACF,CAAC,CACF;AAED,MAAMK,sBAA2D,GAAG;EAClE,CAACZ,QAAQ,CAACG,KAAK,GAAGJ,WAAW,CAACc,EAAE;EAChC,CAACb,QAAQ,CAACQ,MAAM,GAAGT,WAAW,CAACe,EAAE;EACjC,CAACd,QAAQ,CAACS,OAAO,GAAGV,WAAW,CAACgB,EAAE;EAClC,CAACf,QAAQ,CAACU,OAAO,GAAGX,WAAW,CAACgB,EAAE;EAClC,CAACf,QAAQ,CAACW,MAAM,GAAGZ,WAAW,CAACgB;AACjC,CAAC;AAED,SAASH,sBAAsB,EAAEX,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"config.js","names":["_graphql","require","timeUnitConfig","exports","value","TimeSpan","Day_1","label","tooltipLabel","translationKey","count","Week_1","Month_1","Month_6","Year_1","granularityForTimeSpan","Granularity","H1","H4","D1"],"sources":["../../../src/InstrumentsPriceChartWidget/config.ts"],"sourcesContent":["import { Granularity, TimeSpan } from '../gql/types/graphql';\nimport type { TimeSpanSubset } from './types';\n\nconst timeUnitConfig = [\n {\n value: TimeSpan.Day_1,\n label: '1d',\n tooltipLabel: {\n translationKey: 'day',\n count: 1,\n },\n },\n {\n value: TimeSpan.Week_1,\n label: '1w',\n tooltipLabel: {\n translationKey: 'week',\n count: 1,\n },\n },\n {\n value: TimeSpan.Month_1,\n label: '1m',\n tooltipLabel: {\n translationKey: 'month',\n count: 1,\n },\n },\n\n {\n value: TimeSpan.Month_6,\n label: '6m',\n tooltipLabel: {\n translationKey: 'month',\n count: 6,\n },\n },\n {\n value: TimeSpan.Year_1,\n label: '1y',\n tooltipLabel: {\n translationKey: 'year',\n count: 1,\n },\n },\n];\n\nconst granularityForTimeSpan: Record<TimeSpanSubset, Granularity> = {\n [TimeSpan.Day_1]: Granularity.H1,\n [TimeSpan.Week_1]: Granularity.H4,\n [TimeSpan.Month_1]: Granularity.D1,\n [TimeSpan.Month_6]: Granularity.D1,\n [TimeSpan.Year_1]: Granularity.D1,\n};\n\nexport { granularityForTimeSpan, timeUnitConfig };\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAGA,MAAMC,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,CACrB;EACEE,KAAK,EAAEC,iBAAQ,CAACC,KAAK;EACrBC,KAAK,EAAE,IAAI;EACXC,YAAY,EAAE;IACZC,cAAc,EAAE,KAAK;IACrBC,KAAK,EAAE;EACT;AACF,CAAC,EACD;EACEN,KAAK,EAAEC,iBAAQ,CAACM,MAAM;EACtBJ,KAAK,EAAE,IAAI;EACXC,YAAY,EAAE;IACZC,cAAc,EAAE,MAAM;IACtBC,KAAK,EAAE;EACT;AACF,CAAC,EACD;EACEN,KAAK,EAAEC,iBAAQ,CAACO,OAAO;EACvBL,KAAK,EAAE,IAAI;EACXC,YAAY,EAAE;IACZC,cAAc,EAAE,OAAO;IACvBC,KAAK,EAAE;EACT;AACF,CAAC,EAED;EACEN,KAAK,EAAEC,iBAAQ,CAACQ,OAAO;EACvBN,KAAK,EAAE,IAAI;EACXC,YAAY,EAAE;IACZC,cAAc,EAAE,OAAO;IACvBC,KAAK,EAAE;EACT;AACF,CAAC,EACD;EACEN,KAAK,EAAEC,iBAAQ,CAACS,MAAM;EACtBP,KAAK,EAAE,IAAI;EACXC,YAAY,EAAE;IACZC,cAAc,EAAE,MAAM;IACtBC,KAAK,EAAE;EACT;AACF,CAAC,CACF;AAED,MAAMK,sBAA2D,GAAAZ,OAAA,CAAAY,sBAAA,GAAG;EAClE,CAACV,iBAAQ,CAACC,KAAK,GAAGU,oBAAW,CAACC,EAAE;EAChC,CAACZ,iBAAQ,CAACM,MAAM,GAAGK,oBAAW,CAACE,EAAE;EACjC,CAACb,iBAAQ,CAACO,OAAO,GAAGI,oBAAW,CAACG,EAAE;EAClC,CAACd,iBAAQ,CAACQ,OAAO,GAAGG,oBAAW,CAACG,EAAE;EAClC,CAACd,iBAAQ,CAACS,MAAM,GAAGE,oBAAW,CAACG;AACjC,CAAC","ignoreList":[]}
@@ -1,3 +1,28 @@
1
- export * from './InstrumentsPriceChartWidget';
2
- export * from './types';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _InstrumentsPriceChartWidget = require("./InstrumentsPriceChartWidget");
7
+ Object.keys(_InstrumentsPriceChartWidget).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _InstrumentsPriceChartWidget[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _InstrumentsPriceChartWidget[key];
14
+ }
15
+ });
16
+ });
17
+ var _types = require("./types");
18
+ Object.keys(_types).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _types[key];
25
+ }
26
+ });
27
+ });
3
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/InstrumentsPriceChartWidget/index.ts"],"sourcesContent":["export * from './InstrumentsPriceChartWidget';\nexport * from './types';\n"],"mappings":"AAAA,cAAc,+BAA+B;AAC7C,cAAc,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_InstrumentsPriceChartWidget","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_types"],"sources":["../../../src/InstrumentsPriceChartWidget/index.ts"],"sourcesContent":["export * from './InstrumentsPriceChartWidget';\nexport * from './types';\n"],"mappings":";;;;;AAAA,IAAAA,4BAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,4BAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,4BAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,4BAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,MAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,MAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,MAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1,14 +1,17 @@
1
- import { validateLocale, validateToolParams } from '@oanda/labs-widget-common';
2
- import React from 'react';
3
- import { createRoot } from 'react-dom/client';
4
- import { Division, InstrumentDataSource } from '../gql/types/graphql';
5
- import { InstrumentsPriceChartWidget } from './InstrumentsPriceChartWidget';
1
+ "use strict";
2
+
3
+ var _labsWidgetCommon = require("@oanda/labs-widget-common");
4
+ var _react = _interopRequireDefault(require("react"));
5
+ var _client = require("react-dom/client");
6
+ var _graphql = require("../gql/types/graphql");
7
+ var _InstrumentsPriceChartWidget = require("./InstrumentsPriceChartWidget");
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
6
9
  const {
7
10
  graphqlUrl
8
11
  } = window.widgetsConfig || {};
9
12
  const dataInstrumentsPriceChartParamsElements = document.querySelectorAll('div[data-instruments-price-chart-params]');
10
13
  dataInstrumentsPriceChartParamsElements.forEach(element => {
11
- const root = createRoot(element);
14
+ const root = (0, _client.createRoot)(element);
12
15
  const params = element.getAttribute('data-instruments-price-chart-params');
13
16
  const mode = element.getAttribute('data-mode');
14
17
  const {
@@ -17,24 +20,24 @@ dataInstrumentsPriceChartParamsElements.forEach(element => {
17
20
  instrument,
18
21
  dataSource
19
22
  } = JSON.parse(params);
20
- const isParamError = validateToolParams({
23
+ const isParamError = (0, _labsWidgetCommon.validateToolParams)({
21
24
  division,
22
25
  locale,
23
26
  graphqlUrl,
24
27
  dataSource
25
28
  }, [{
26
29
  name: 'locale',
27
- valueCheck: value => validateLocale(value)
30
+ valueCheck: value => (0, _labsWidgetCommon.validateLocale)(value)
28
31
  }, {
29
32
  name: 'division',
30
- valueCheck: value => Object.values(Division).includes(value)
33
+ valueCheck: value => Object.values(_graphql.Division).includes(value)
31
34
  }, {
32
35
  name: 'graphqlUrl'
33
36
  }, {
34
37
  name: 'dataSource',
35
- valueCheck: value => Object.values(InstrumentDataSource).includes(value)
38
+ valueCheck: value => Object.values(_graphql.InstrumentDataSource).includes(value)
36
39
  }]);
37
- root.render(React.createElement(InstrumentsPriceChartWidget, {
40
+ root.render(_react.default.createElement(_InstrumentsPriceChartWidget.InstrumentsPriceChartWidget, {
38
41
  dataSource: dataSource,
39
42
  division: division,
40
43
  graphqlUrl: graphqlUrl,
@@ -1 +1 @@
1
- {"version":3,"file":"render.js","names":["validateLocale","validateToolParams","React","createRoot","Division","InstrumentDataSource","InstrumentsPriceChartWidget","graphqlUrl","window","widgetsConfig","dataInstrumentsPriceChartParamsElements","document","querySelectorAll","forEach","element","root","params","getAttribute","mode","division","locale","instrument","dataSource","JSON","parse","isParamError","name","valueCheck","value","Object","values","includes","render","createElement","theme"],"sources":["../../../src/InstrumentsPriceChartWidget/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 { Division, InstrumentDataSource } from '../gql/types/graphql';\nimport { InstrumentsPriceChartWidget } from './InstrumentsPriceChartWidget';\n\nconst { graphqlUrl } = window.widgetsConfig || {};\n\nconst dataInstrumentsPriceChartParamsElements = document.querySelectorAll(\n 'div[data-instruments-price-chart-params]'\n);\n\ndataInstrumentsPriceChartParamsElements.forEach((element) => {\n const root = createRoot(element);\n const params = element.getAttribute('data-instruments-price-chart-params');\n const mode = element.getAttribute('data-mode');\n const { division, locale, instrument, dataSource } = JSON.parse(\n params as string\n );\n\n const isParamError = validateToolParams(\n {\n division,\n locale,\n graphqlUrl,\n dataSource,\n },\n [\n {\n name: 'locale',\n valueCheck: (value: string | undefined) => validateLocale(value),\n },\n {\n name: 'division',\n valueCheck: (value: Division) =>\n Object.values(Division).includes(value),\n },\n {\n name: 'graphqlUrl',\n },\n {\n name: 'dataSource',\n valueCheck: (value: InstrumentDataSource) =>\n Object.values(InstrumentDataSource).includes(value),\n },\n ]\n );\n\n root.render(\n <InstrumentsPriceChartWidget\n dataSource={dataSource}\n division={division}\n graphqlUrl={graphqlUrl}\n instrument={instrument}\n isParamError={isParamError}\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,QAAQ,EAAEC,oBAAoB,QAAQ,sBAAsB;AACrE,SAASC,2BAA2B,QAAQ,+BAA+B;AAE3E,MAAM;EAAEC;AAAW,CAAC,GAAGC,MAAM,CAACC,aAAa,IAAI,CAAC,CAAC;AAEjD,MAAMC,uCAAuC,GAAGC,QAAQ,CAACC,gBAAgB,CACvE,0CACF,CAAC;AAEDF,uCAAuC,CAACG,OAAO,CAAEC,OAAO,IAAK;EAC3D,MAAMC,IAAI,GAAGZ,UAAU,CAACW,OAAO,CAAC;EAChC,MAAME,MAAM,GAAGF,OAAO,CAACG,YAAY,CAAC,qCAAqC,CAAC;EAC1E,MAAMC,IAAI,GAAGJ,OAAO,CAACG,YAAY,CAAC,WAAW,CAAC;EAC9C,MAAM;IAAEE,QAAQ;IAAEC,MAAM;IAAEC,UAAU;IAAEC;EAAW,CAAC,GAAGC,IAAI,CAACC,KAAK,CAC7DR,MACF,CAAC;EAED,MAAMS,YAAY,GAAGxB,kBAAkB,CACrC;IACEkB,QAAQ;IACRC,MAAM;IACNb,UAAU;IACVe;EACF,CAAC,EACD,CACE;IACEI,IAAI,EAAE,QAAQ;IACdC,UAAU,EAAGC,KAAyB,IAAK5B,cAAc,CAAC4B,KAAK;EACjE,CAAC,EACD;IACEF,IAAI,EAAE,UAAU;IAChBC,UAAU,EAAGC,KAAe,IAC1BC,MAAM,CAACC,MAAM,CAAC1B,QAAQ,CAAC,CAAC2B,QAAQ,CAACH,KAAK;EAC1C,CAAC,EACD;IACEF,IAAI,EAAE;EACR,CAAC,EACD;IACEA,IAAI,EAAE,YAAY;IAClBC,UAAU,EAAGC,KAA2B,IACtCC,MAAM,CAACC,MAAM,CAACzB,oBAAoB,CAAC,CAAC0B,QAAQ,CAACH,KAAK;EACtD,CAAC,CAEL,CAAC;EAEDb,IAAI,CAACiB,MAAM,CACT9B,KAAA,CAAA+B,aAAA,CAAC3B,2BAA2B;IAC1BgB,UAAU,EAAEA,UAAW;IACvBH,QAAQ,EAAEA,QAAS;IACnBZ,UAAU,EAAEA,UAAW;IACvBc,UAAU,EAAEA,UAAW;IACvBI,YAAY,EAAEA,YAAa;IAC3BL,MAAM,EAAEA,MAAO;IACfc,KAAK,EAAEhB;EAAc,CACtB,CACH,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"render.js","names":["_labsWidgetCommon","require","_react","_interopRequireDefault","_client","_graphql","_InstrumentsPriceChartWidget","e","__esModule","default","graphqlUrl","window","widgetsConfig","dataInstrumentsPriceChartParamsElements","document","querySelectorAll","forEach","element","root","createRoot","params","getAttribute","mode","division","locale","instrument","dataSource","JSON","parse","isParamError","validateToolParams","name","valueCheck","value","validateLocale","Object","values","Division","includes","InstrumentDataSource","render","createElement","InstrumentsPriceChartWidget","theme"],"sources":["../../../src/InstrumentsPriceChartWidget/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 { Division, InstrumentDataSource } from '../gql/types/graphql';\nimport { InstrumentsPriceChartWidget } from './InstrumentsPriceChartWidget';\n\nconst { graphqlUrl } = window.widgetsConfig || {};\n\nconst dataInstrumentsPriceChartParamsElements = document.querySelectorAll(\n 'div[data-instruments-price-chart-params]'\n);\n\ndataInstrumentsPriceChartParamsElements.forEach((element) => {\n const root = createRoot(element);\n const params = element.getAttribute('data-instruments-price-chart-params');\n const mode = element.getAttribute('data-mode');\n const { division, locale, instrument, dataSource } = JSON.parse(\n params as string\n );\n\n const isParamError = validateToolParams(\n {\n division,\n locale,\n graphqlUrl,\n dataSource,\n },\n [\n {\n name: 'locale',\n valueCheck: (value: string | undefined) => validateLocale(value),\n },\n {\n name: 'division',\n valueCheck: (value: Division) =>\n Object.values(Division).includes(value),\n },\n {\n name: 'graphqlUrl',\n },\n {\n name: 'dataSource',\n valueCheck: (value: InstrumentDataSource) =>\n Object.values(InstrumentDataSource).includes(value),\n },\n ]\n );\n\n root.render(\n <InstrumentsPriceChartWidget\n dataSource={dataSource}\n division={division}\n graphqlUrl={graphqlUrl}\n instrument={instrument}\n isParamError={isParamError}\n locale={locale}\n theme={mode as Theme}\n />\n );\n});\n"],"mappings":";;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,4BAAA,GAAAL,OAAA;AAA4E,SAAAE,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAA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EA,UAAW;IACvBI,YAAY,EAAEA,YAAa;IAC3BL,MAAM,EAAEA,MAAO;IACfmB,KAAK,EAAErB;EAAc,CACtB,CACH,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
@@ -1,10 +1,16 @@
1
- import { TimeSpan } from '../gql/types/graphql';
2
- export let TimeSpanSubset = function (TimeSpanSubset) {
3
- TimeSpanSubset[TimeSpanSubset["Day_1"] = TimeSpan.Day_1] = "Day_1";
4
- TimeSpanSubset[TimeSpanSubset["Week_1"] = TimeSpan.Week_1] = "Week_1";
5
- TimeSpanSubset[TimeSpanSubset["Month_1"] = TimeSpan.Month_1] = "Month_1";
6
- TimeSpanSubset[TimeSpanSubset["Month_6"] = TimeSpan.Month_6] = "Month_6";
7
- TimeSpanSubset[TimeSpanSubset["Year_1"] = TimeSpan.Year_1] = "Year_1";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TimeSpanSubset = void 0;
7
+ var _graphql = require("../gql/types/graphql");
8
+ let TimeSpanSubset = exports.TimeSpanSubset = function (TimeSpanSubset) {
9
+ TimeSpanSubset[TimeSpanSubset["Day_1"] = _graphql.TimeSpan.Day_1] = "Day_1";
10
+ TimeSpanSubset[TimeSpanSubset["Week_1"] = _graphql.TimeSpan.Week_1] = "Week_1";
11
+ TimeSpanSubset[TimeSpanSubset["Month_1"] = _graphql.TimeSpan.Month_1] = "Month_1";
12
+ TimeSpanSubset[TimeSpanSubset["Month_6"] = _graphql.TimeSpan.Month_6] = "Month_6";
13
+ TimeSpanSubset[TimeSpanSubset["Year_1"] = _graphql.TimeSpan.Year_1] = "Year_1";
8
14
  return TimeSpanSubset;
9
15
  }({});
10
16
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["TimeSpan","TimeSpanSubset","Day_1","Week_1","Month_1","Month_6","Year_1"],"sources":["../../../src/InstrumentsPriceChartWidget/types.ts"],"sourcesContent":["import type { WidgetConfig } from '@oanda/labs-widget-common';\n\nimport type { Division, InstrumentDataSource } from '../gql/types/graphql';\nimport { TimeSpan } from '../gql/types/graphql';\n\nexport interface InstrumentsPriceChartConfig extends WidgetConfig {\n division: Division;\n instrument: string;\n dataSource: InstrumentDataSource;\n}\n\nexport interface MainProps {\n division: Division;\n instrument: string;\n dataSource: InstrumentDataSource;\n}\n\nexport enum TimeSpanSubset {\n Day_1 = TimeSpan.Day_1,\n Week_1 = TimeSpan.Week_1,\n Month_1 = TimeSpan.Month_1,\n Month_6 = TimeSpan.Month_6,\n Year_1 = TimeSpan.Year_1,\n}\n"],"mappings":"AAGA,SAASA,QAAQ,QAAQ,sBAAsB;AAc/C,WAAYC,cAAc,aAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc,YAChBD,QAAQ,CAACE,KAAK;EADZD,cAAc,CAAdA,cAAc,aAEfD,QAAQ,CAACG,MAAM;EAFdF,cAAc,CAAdA,cAAc,cAGdD,QAAQ,CAACI,OAAO;EAHhBH,cAAc,CAAdA,cAAc,cAIdD,QAAQ,CAACK,OAAO;EAJhBJ,cAAc,CAAdA,cAAc,aAKfD,QAAQ,CAACM,MAAM;EAAA,OALdL,cAAc;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["_graphql","require","TimeSpanSubset","exports","TimeSpan","Day_1","Week_1","Month_1","Month_6","Year_1"],"sources":["../../../src/InstrumentsPriceChartWidget/types.ts"],"sourcesContent":["import type { WidgetConfig } from '@oanda/labs-widget-common';\n\nimport type { Division, InstrumentDataSource } from '../gql/types/graphql';\nimport { TimeSpan } from '../gql/types/graphql';\n\nexport interface InstrumentsPriceChartConfig extends WidgetConfig {\n division: Division;\n instrument: string;\n dataSource: InstrumentDataSource;\n}\n\nexport interface MainProps {\n division: Division;\n instrument: string;\n dataSource: InstrumentDataSource;\n}\n\nexport enum TimeSpanSubset {\n Day_1 = TimeSpan.Day_1,\n Week_1 = TimeSpan.Week_1,\n Month_1 = TimeSpan.Month_1,\n Month_6 = TimeSpan.Month_6,\n Year_1 = TimeSpan.Year_1,\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAAgD,IAcpCC,cAAc,GAAAC,OAAA,CAAAD,cAAA,aAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc,YAChBE,iBAAQ,CAACC,KAAK;EADZH,cAAc,CAAdA,cAAc,aAEfE,iBAAQ,CAACE,MAAM;EAFdJ,cAAc,CAAdA,cAAc,cAGdE,iBAAQ,CAACG,OAAO;EAHhBL,cAAc,CAAdA,cAAc,cAIdE,iBAAQ,CAACI,OAAO;EAJhBN,cAAc,CAAdA,cAAc,aAKfE,iBAAQ,CAACK,MAAM;EAAA,OALdP,cAAc;AAAA","ignoreList":[]}
@@ -1,4 +1,12 @@
1
- import { granularityForTimeSpan } from './config';
2
- export const getGranularityForTimeSpan = timeSpan => granularityForTimeSpan[timeSpan];
3
- export const getCandles = data => data?.priceCandles.candle.filter(c => c !== null);
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getGranularityForTimeSpan = exports.getCandles = void 0;
7
+ var _config = require("./config");
8
+ const getGranularityForTimeSpan = timeSpan => _config.granularityForTimeSpan[timeSpan];
9
+ exports.getGranularityForTimeSpan = getGranularityForTimeSpan;
10
+ const getCandles = data => data?.priceCandles.candle.filter(c => c !== null);
11
+ exports.getCandles = getCandles;
4
12
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["granularityForTimeSpan","getGranularityForTimeSpan","timeSpan","getCandles","data","priceCandles","candle","filter","c"],"sources":["../../../src/InstrumentsPriceChartWidget/utils.ts"],"sourcesContent":["import type {\n Candle,\n Granularity,\n PriceCandlesQuery,\n TimeSpan,\n} from '../gql/types/graphql';\nimport { granularityForTimeSpan } from './config';\nimport type { TimeSpanSubset } from './types';\n\nexport const getGranularityForTimeSpan = (timeSpan: TimeSpan): Granularity =>\n granularityForTimeSpan[timeSpan as unknown as TimeSpanSubset];\n\nexport const getCandles = (\n data: PriceCandlesQuery | undefined\n): Candle[] | undefined =>\n data?.priceCandles.candle.filter((c): c is Candle => c !== null);\n"],"mappings":"AAMA,SAASA,sBAAsB,QAAQ,UAAU;AAGjD,OAAO,MAAMC,yBAAyB,GAAIC,QAAkB,IAC1DF,sBAAsB,CAACE,QAAQ,CAA8B;AAE/D,OAAO,MAAMC,UAAU,GACrBC,IAAmC,IAEnCA,IAAI,EAAEC,YAAY,CAACC,MAAM,CAACC,MAAM,CAAEC,CAAC,IAAkBA,CAAC,KAAK,IAAI,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"utils.js","names":["_config","require","getGranularityForTimeSpan","timeSpan","granularityForTimeSpan","exports","getCandles","data","priceCandles","candle","filter","c"],"sources":["../../../src/InstrumentsPriceChartWidget/utils.ts"],"sourcesContent":["import type {\n Candle,\n Granularity,\n PriceCandlesQuery,\n TimeSpan,\n} from '../gql/types/graphql';\nimport { granularityForTimeSpan } from './config';\nimport type { TimeSpanSubset } from './types';\n\nexport const getGranularityForTimeSpan = (timeSpan: TimeSpan): Granularity =>\n granularityForTimeSpan[timeSpan as unknown as TimeSpanSubset];\n\nexport const getCandles = (\n data: PriceCandlesQuery | undefined\n): Candle[] | undefined =>\n data?.priceCandles.candle.filter((c): c is Candle => c !== null);\n"],"mappings":";;;;;;AAMA,IAAAA,OAAA,GAAAC,OAAA;AAGO,MAAMC,yBAAyB,GAAIC,QAAkB,IAC1DC,8BAAsB,CAACD,QAAQ,CAA8B;AAACE,OAAA,CAAAH,yBAAA,GAAAA,yBAAA;AAEzD,MAAMI,UAAU,GACrBC,IAAmC,IAEnCA,IAAI,EAAEC,YAAY,CAACC,MAAM,CAACC,MAAM,CAAEC,CAAC,IAAkBA,CAAC,KAAK,IAAI,CAAC;AAACN,OAAA,CAAAC,UAAA,GAAAA,UAAA","ignoreList":[]}
@@ -1,5 +1,11 @@
1
- import { gql } from '@apollo/client';
2
- const priceCandles = gql`
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.priceCandles = void 0;
7
+ var _client = require("@apollo/client");
8
+ const priceCandles = exports.priceCandles = (0, _client.gql)`
3
9
  query PriceCandles(
4
10
  $division: Division!
5
11
  $dataSource: InstrumentDataSource!
@@ -25,5 +31,4 @@ const priceCandles = gql`
25
31
  }
26
32
  }
27
33
  `;
28
- export { priceCandles };
29
34
  //# sourceMappingURL=priceCandles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"priceCandles.js","names":["gql","priceCandles"],"sources":["../../../src/gql/priceCandles.ts"],"sourcesContent":["import { gql } from '@apollo/client';\n\nconst priceCandles = gql`\n query PriceCandles(\n $division: Division!\n $dataSource: InstrumentDataSource!\n $instrument: String!\n $granularity: Granularity!\n $timeSpan: TimeSpan!\n ) {\n priceCandles(\n division: $division\n dataSource: $dataSource\n instrument: $instrument\n granularity: $granularity\n timeSpan: $timeSpan\n ) {\n candle {\n point\n high\n low\n open\n close\n }\n timeSpan\n }\n }\n`;\n\nexport { priceCandles };\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,MAAMC,YAAY,GAAGD,GAAG;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,SAASC,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"priceCandles.js","names":["_client","require","priceCandles","exports","gql"],"sources":["../../../src/gql/priceCandles.ts"],"sourcesContent":["import { gql } from '@apollo/client';\n\nconst priceCandles = gql`\n query PriceCandles(\n $division: Division!\n $dataSource: InstrumentDataSource!\n $instrument: String!\n $granularity: Granularity!\n $timeSpan: TimeSpan!\n ) {\n priceCandles(\n division: $division\n dataSource: $dataSource\n instrument: $instrument\n granularity: $granularity\n timeSpan: $timeSpan\n ) {\n candle {\n point\n high\n low\n open\n close\n }\n timeSpan\n }\n }\n`;\n\nexport { priceCandles };\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,MAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,WAAG;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -1,10 +1,18 @@
1
- export function useFragment(_documentNode, fragmentType) {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isFragmentReady = isFragmentReady;
7
+ exports.makeFragmentData = makeFragmentData;
8
+ exports.useFragment = useFragment;
9
+ function useFragment(_documentNode, fragmentType) {
2
10
  return fragmentType;
3
11
  }
4
- export function makeFragmentData(data, _fragment) {
12
+ function makeFragmentData(data, _fragment) {
5
13
  return data;
6
14
  }
7
- export function isFragmentReady(queryNode, fragmentNode, data) {
15
+ function isFragmentReady(queryNode, fragmentNode, data) {
8
16
  const deferredFields = queryNode.__meta__?.deferredFields;
9
17
  if (!deferredFields) return true;
10
18
  const fragDef = fragmentNode.definitions[0];
@@ -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 {\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
+ {"version":3,"file":"fragment-masking.js","names":["useFragment","_documentNode","fragmentType","makeFragmentData","data","_fragment","isFragmentReady","queryNode","fragmentNode","deferredFields","__meta__","fragDef","definitions","fragName","name","value","fields","length","every","field"],"sources":["../../../../src/gql/types/fragment-masking.ts"],"sourcesContent":["import {\n ResultOf,\n DocumentTypeDecoration,\n TypedDocumentNode,\n} from '@graphql-typed-document-node/core';\nimport { FragmentDefinitionNode } from 'graphql';\nimport { Incremental } from './graphql';\n\nexport type FragmentType<\n TDocumentType extends DocumentTypeDecoration<any, any>,\n> =\n TDocumentType extends DocumentTypeDecoration<infer TType, any>\n ? [TType] extends [{ ' $fragmentName'?: infer TKey }]\n ? TKey extends string\n ? { ' $fragmentRefs'?: { [key in TKey]: TType } }\n : never\n : never\n : never;\n\n// return non-nullable if `fragmentType` is non-nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>\n): TType;\n// return nullable if `fragmentType` is nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType:\n | FragmentType<DocumentTypeDecoration<TType, any>>\n | null\n | undefined\n): TType | null | undefined;\n// return array of non-nullable if `fragmentType` is array of non-nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>\n): ReadonlyArray<TType>;\n// return array of nullable if `fragmentType` is array of nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType:\n | ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>\n | null\n | undefined\n): ReadonlyArray<TType> | null | undefined;\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType:\n | FragmentType<DocumentTypeDecoration<TType, any>>\n | ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>\n | null\n | undefined\n): TType | ReadonlyArray<TType> | null | undefined {\n return fragmentType as any;\n}\n\nexport function makeFragmentData<\n F extends DocumentTypeDecoration<any, any>,\n FT extends ResultOf<F>,\n>(data: FT, _fragment: F): FragmentType<F> {\n return data as FragmentType<F>;\n}\nexport function isFragmentReady<TQuery, TFrag>(\n queryNode: DocumentTypeDecoration<TQuery, any>,\n fragmentNode: TypedDocumentNode<TFrag>,\n data:\n | FragmentType<TypedDocumentNode<Incremental<TFrag>, any>>\n | null\n | undefined\n): data is FragmentType<typeof fragmentNode> {\n const deferredFields = (\n queryNode as {\n __meta__?: { deferredFields: Record<string, (keyof TFrag)[]> };\n }\n ).__meta__?.deferredFields;\n\n if (!deferredFields) return true;\n\n const fragDef = fragmentNode.definitions[0] as\n | FragmentDefinitionNode\n | undefined;\n const fragName = fragDef?.name?.value;\n\n const fields = (fragName && deferredFields[fragName]) || [];\n return fields.length > 0 && fields.every((field) => data && field in data);\n}\n"],"mappings":";;;;;;;;AA6CO,SAASA,WAAWA,CACzBC,aAAiD,EACjDC,YAIa,EACoC;EACjD,OAAOA,YAAY;AACrB;AAEO,SAASC,gBAAgBA,CAG9BC,IAAQ,EAAEC,SAAY,EAAmB;EACzC,OAAOD,IAAI;AACb;AACO,SAASE,eAAeA,CAC7BC,SAA8C,EAC9CC,YAAsC,EACtCJ,IAGa,EAC8B;EAC3C,MAAMK,cAAc,GAClBF,SAAS,CAGTG,QAAQ,EAAED,cAAc;EAE1B,IAAI,CAACA,cAAc,EAAE,OAAO,IAAI;EAEhC,MAAME,OAAO,GAAGH,YAAY,CAACI,WAAW,CAAC,CAAC,CAE7B;EACb,MAAMC,QAAQ,GAAGF,OAAO,EAAEG,IAAI,EAAEC,KAAK;EAErC,MAAMC,MAAM,GAAIH,QAAQ,IAAIJ,cAAc,CAACI,QAAQ,CAAC,IAAK,EAAE;EAC3D,OAAOG,MAAM,CAACC,MAAM,GAAG,CAAC,IAAID,MAAM,CAACE,KAAK,CAAEC,KAAK,IAAKf,IAAI,IAAIe,KAAK,IAAIf,IAAI,CAAC;AAC5E","ignoreList":[]}
@@ -1,9 +1,16 @@
1
- import * as types from './graphql';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.graphql = graphql;
7
+ var types = _interopRequireWildcard(require("./graphql"));
8
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
2
9
  const documents = {
3
10
  '\n query PriceCandles(\n $division: Division!\n $dataSource: InstrumentDataSource!\n $instrument: String!\n $granularity: Granularity!\n $timeSpan: TimeSpan!\n ) {\n priceCandles(\n division: $division\n dataSource: $dataSource\n instrument: $instrument\n granularity: $granularity\n timeSpan: $timeSpan\n ) {\n candle {\n point\n high\n low\n open\n close\n }\n timeSpan\n }\n }\n': types.PriceCandlesDocument,
4
11
  '\n query validateInstruments($instruments: [String]!, $division: Division) {\n mapInstrumentNames(instruments: $instruments, division: $division) {\n name\n displayName\n }\n }\n': types.ValidateInstrumentsDocument
5
12
  };
6
- export function graphql(source) {
13
+ function graphql(source) {
7
14
  return documents[source] ?? {};
8
15
  }
9
16
  //# sourceMappingURL=gql.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gql.js","names":["types","documents","PriceCandlesDocument","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 PriceCandles(\\n $division: Division!\\n $dataSource: InstrumentDataSource!\\n $instrument: String!\\n $granularity: Granularity!\\n $timeSpan: TimeSpan!\\n ) {\\n priceCandles(\\n division: $division\\n dataSource: $dataSource\\n instrument: $instrument\\n granularity: $granularity\\n timeSpan: $timeSpan\\n ) {\\n candle {\\n point\\n high\\n low\\n open\\n close\\n }\\n timeSpan\\n }\\n }\\n':\n types.PriceCandlesDocument,\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 PriceCandles(\\n $division: Division!\\n $dataSource: InstrumentDataSource!\\n $instrument: String!\\n $granularity: Granularity!\\n $timeSpan: TimeSpan!\\n ) {\\n priceCandles(\\n division: $division\\n dataSource: $dataSource\\n instrument: $instrument\\n granularity: $granularity\\n timeSpan: $timeSpan\\n ) {\\n candle {\\n point\\n high\\n low\\n open\\n close\\n }\\n timeSpan\\n }\\n }\\n'\n): (typeof documents)['\\n query PriceCandles(\\n $division: Division!\\n $dataSource: InstrumentDataSource!\\n $instrument: String!\\n $granularity: Granularity!\\n $timeSpan: TimeSpan!\\n ) {\\n priceCandles(\\n division: $division\\n dataSource: $dataSource\\n instrument: $instrument\\n granularity: $granularity\\n timeSpan: $timeSpan\\n ) {\\n candle {\\n point\\n high\\n low\\n open\\n close\\n }\\n timeSpan\\n }\\n }\\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,qeAAqe,EACneD,KAAK,CAACE,oBAAoB;EAC5B,sMAAsM,EACpMF,KAAK,CAACG;AACV,CAAC;AA6BD,OAAO,SAASC,OAAOA,CAACC,MAAc,EAAE;EACtC,OAAQJ,SAAS,CAASI,MAAM,CAAC,IAAI,CAAC,CAAC;AACzC","ignoreList":[]}
1
+ {"version":3,"file":"gql.js","names":["types","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","documents","PriceCandlesDocument","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 PriceCandles(\\n $division: Division!\\n $dataSource: InstrumentDataSource!\\n $instrument: String!\\n $granularity: Granularity!\\n $timeSpan: TimeSpan!\\n ) {\\n priceCandles(\\n division: $division\\n dataSource: $dataSource\\n instrument: $instrument\\n granularity: $granularity\\n timeSpan: $timeSpan\\n ) {\\n candle {\\n point\\n high\\n low\\n open\\n close\\n }\\n timeSpan\\n }\\n }\\n':\n types.PriceCandlesDocument,\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 PriceCandles(\\n $division: Division!\\n $dataSource: InstrumentDataSource!\\n $instrument: String!\\n $granularity: Granularity!\\n $timeSpan: TimeSpan!\\n ) {\\n priceCandles(\\n division: $division\\n dataSource: $dataSource\\n instrument: $instrument\\n granularity: $granularity\\n timeSpan: $timeSpan\\n ) {\\n candle {\\n point\\n high\\n low\\n open\\n close\\n }\\n timeSpan\\n }\\n }\\n'\n): (typeof documents)['\\n query PriceCandles(\\n $division: Division!\\n $dataSource: InstrumentDataSource!\\n $instrument: String!\\n $granularity: Granularity!\\n $timeSpan: TimeSpan!\\n ) {\\n priceCandles(\\n division: $division\\n dataSource: $dataSource\\n instrument: $instrument\\n granularity: $granularity\\n timeSpan: $timeSpan\\n ) {\\n candle {\\n point\\n high\\n low\\n open\\n close\\n }\\n timeSpan\\n }\\n }\\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,IAAAA,KAAA,GAAAC,uBAAA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(AssetClassName) {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VolatilityChartTimeUnit = exports.VolatilityChartTimeSpan = exports.ValueAtRiskDuration = exports.ValueAtRiskBars = exports.ValidateInstrumentsDocument = exports.TradeMode = exports.TopicalSort = exports.TimeSpan = exports.Sort = exports.Region = exports.PriceCandlesDocument = exports.InstrumentDataSource = exports.Granularity = exports.Division = exports.DataSource = exports.CurrencyPowerBalanceTimeUnit = exports.CurrencyName = exports.CorrelationTimeUnit = exports.BookType = exports.AssetClassName = void 0;
7
+ let AssetClassName = exports.AssetClassName = function (AssetClassName) {
2
8
  AssetClassName["Commodities"] = "COMMODITIES";
3
9
  AssetClassName["Cryptocurrency"] = "CRYPTOCURRENCY";
4
10
  AssetClassName["Currency"] = "CURRENCY";
@@ -8,12 +14,12 @@ export let AssetClassName = function (AssetClassName) {
8
14
  AssetClassName["Rates"] = "RATES";
9
15
  return AssetClassName;
10
16
  }({});
11
- export let BookType = function (BookType) {
17
+ let BookType = exports.BookType = function (BookType) {
12
18
  BookType["Order"] = "ORDER";
13
19
  BookType["Position"] = "POSITION";
14
20
  return BookType;
15
21
  }({});
16
- export let CorrelationTimeUnit = function (CorrelationTimeUnit) {
22
+ let CorrelationTimeUnit = exports.CorrelationTimeUnit = function (CorrelationTimeUnit) {
17
23
  CorrelationTimeUnit["H1"] = "H1";
18
24
  CorrelationTimeUnit["H4"] = "H4";
19
25
  CorrelationTimeUnit["H24"] = "H24";
@@ -24,7 +30,7 @@ export let CorrelationTimeUnit = function (CorrelationTimeUnit) {
24
30
  CorrelationTimeUnit["Y1"] = "Y1";
25
31
  return CorrelationTimeUnit;
26
32
  }({});
27
- export let CurrencyName = function (CurrencyName) {
33
+ let CurrencyName = exports.CurrencyName = function (CurrencyName) {
28
34
  CurrencyName["Aud"] = "AUD";
29
35
  CurrencyName["Cad"] = "CAD";
30
36
  CurrencyName["Chf"] = "CHF";
@@ -35,7 +41,7 @@ export let CurrencyName = function (CurrencyName) {
35
41
  CurrencyName["Usd"] = "USD";
36
42
  return CurrencyName;
37
43
  }({});
38
- export let CurrencyPowerBalanceTimeUnit = function (CurrencyPowerBalanceTimeUnit) {
44
+ let CurrencyPowerBalanceTimeUnit = exports.CurrencyPowerBalanceTimeUnit = function (CurrencyPowerBalanceTimeUnit) {
39
45
  CurrencyPowerBalanceTimeUnit["CurrentDay"] = "CURRENT_DAY";
40
46
  CurrencyPowerBalanceTimeUnit["H4"] = "H4";
41
47
  CurrencyPowerBalanceTimeUnit["H8"] = "H8";
@@ -46,12 +52,12 @@ export let CurrencyPowerBalanceTimeUnit = function (CurrencyPowerBalanceTimeUnit
46
52
  CurrencyPowerBalanceTimeUnit["W1"] = "W1";
47
53
  return CurrencyPowerBalanceTimeUnit;
48
54
  }({});
49
- export let DataSource = function (DataSource) {
55
+ let DataSource = exports.DataSource = function (DataSource) {
50
56
  DataSource["Ny4"] = "NY4";
51
57
  DataSource["Ty3"] = "TY3";
52
58
  return DataSource;
53
59
  }({});
54
- export let Division = function (Division) {
60
+ let Division = exports.Division = function (Division) {
55
61
  Division["Oap"] = "OAP";
56
62
  Division["Oau"] = "OAU";
57
63
  Division["Oc"] = "OC";
@@ -63,7 +69,7 @@ export let Division = function (Division) {
63
69
  Division["Otms"] = "OTMS";
64
70
  return Division;
65
71
  }({});
66
- export let Granularity = function (Granularity) {
72
+ let Granularity = exports.Granularity = function (Granularity) {
67
73
  Granularity["D1"] = "D1";
68
74
  Granularity["H1"] = "H1";
69
75
  Granularity["H4"] = "H4";
@@ -71,23 +77,23 @@ export let Granularity = function (Granularity) {
71
77
  Granularity["M15"] = "M15";
72
78
  return Granularity;
73
79
  }({});
74
- export let InstrumentDataSource = function (InstrumentDataSource) {
80
+ let InstrumentDataSource = exports.InstrumentDataSource = function (InstrumentDataSource) {
75
81
  InstrumentDataSource["Mt5"] = "MT5";
76
82
  InstrumentDataSource["V20"] = "V20";
77
83
  return InstrumentDataSource;
78
84
  }({});
79
- export let Region = function (Region) {
85
+ let Region = exports.Region = function (Region) {
80
86
  Region["Amer"] = "AMER";
81
87
  Region["Apac"] = "APAC";
82
88
  Region["Emea"] = "EMEA";
83
89
  return Region;
84
90
  }({});
85
- export let Sort = function (Sort) {
91
+ let Sort = exports.Sort = function (Sort) {
86
92
  Sort["Bearish"] = "BEARISH";
87
93
  Sort["Bullish"] = "BULLISH";
88
94
  return Sort;
89
95
  }({});
90
- export let TimeSpan = function (TimeSpan) {
96
+ let TimeSpan = exports.TimeSpan = function (TimeSpan) {
91
97
  TimeSpan["Day_1"] = "DAY_1";
92
98
  TimeSpan["Day_2"] = "DAY_2";
93
99
  TimeSpan["Hour_1"] = "HOUR_1";
@@ -102,7 +108,7 @@ export let TimeSpan = function (TimeSpan) {
102
108
  TimeSpan["Year_5"] = "YEAR_5";
103
109
  return TimeSpan;
104
110
  }({});
105
- export let TopicalSort = function (TopicalSort) {
111
+ let TopicalSort = exports.TopicalSort = function (TopicalSort) {
106
112
  TopicalSort["Bearish"] = "BEARISH";
107
113
  TopicalSort["Bullish"] = "BULLISH";
108
114
  TopicalSort["Hot"] = "HOT";
@@ -110,7 +116,7 @@ export let TopicalSort = function (TopicalSort) {
110
116
  TopicalSort["Volatile"] = "VOLATILE";
111
117
  return TopicalSort;
112
118
  }({});
113
- export let TradeMode = function (TradeMode) {
119
+ let TradeMode = exports.TradeMode = function (TradeMode) {
114
120
  TradeMode["TradeCloseonly"] = "TRADE_CLOSEONLY";
115
121
  TradeMode["TradeDisabled"] = "TRADE_DISABLED";
116
122
  TradeMode["TradeFull"] = "TRADE_FULL";
@@ -119,13 +125,13 @@ export let TradeMode = function (TradeMode) {
119
125
  TradeMode["TradeUndefined"] = "TRADE_UNDEFINED";
120
126
  return TradeMode;
121
127
  }({});
122
- export let ValueAtRiskBars = function (ValueAtRiskBars) {
128
+ let ValueAtRiskBars = exports.ValueAtRiskBars = function (ValueAtRiskBars) {
123
129
  ValueAtRiskBars["C100"] = "C100";
124
130
  ValueAtRiskBars["C200"] = "C200";
125
131
  ValueAtRiskBars["C300"] = "C300";
126
132
  return ValueAtRiskBars;
127
133
  }({});
128
- export let ValueAtRiskDuration = function (ValueAtRiskDuration) {
134
+ let ValueAtRiskDuration = exports.ValueAtRiskDuration = function (ValueAtRiskDuration) {
129
135
  ValueAtRiskDuration["C1"] = "C1";
130
136
  ValueAtRiskDuration["C2"] = "C2";
131
137
  ValueAtRiskDuration["C3"] = "C3";
@@ -134,7 +140,7 @@ export let ValueAtRiskDuration = function (ValueAtRiskDuration) {
134
140
  ValueAtRiskDuration["C10"] = "C10";
135
141
  return ValueAtRiskDuration;
136
142
  }({});
137
- export let VolatilityChartTimeSpan = function (VolatilityChartTimeSpan) {
143
+ let VolatilityChartTimeSpan = exports.VolatilityChartTimeSpan = function (VolatilityChartTimeSpan) {
138
144
  VolatilityChartTimeSpan["D5"] = "D5";
139
145
  VolatilityChartTimeSpan["D10"] = "D10";
140
146
  VolatilityChartTimeSpan["M1"] = "M1";
@@ -143,13 +149,13 @@ export let VolatilityChartTimeSpan = function (VolatilityChartTimeSpan) {
143
149
  VolatilityChartTimeSpan["W10"] = "W10";
144
150
  return VolatilityChartTimeSpan;
145
151
  }({});
146
- export let VolatilityChartTimeUnit = function (VolatilityChartTimeUnit) {
152
+ let VolatilityChartTimeUnit = exports.VolatilityChartTimeUnit = function (VolatilityChartTimeUnit) {
147
153
  VolatilityChartTimeUnit["D"] = "D";
148
154
  VolatilityChartTimeUnit["H"] = "H";
149
155
  VolatilityChartTimeUnit["W"] = "W";
150
156
  return VolatilityChartTimeUnit;
151
157
  }({});
152
- export const PriceCandlesDocument = {
158
+ const PriceCandlesDocument = exports.PriceCandlesDocument = {
153
159
  kind: 'Document',
154
160
  definitions: [{
155
161
  kind: 'OperationDefinition',
@@ -382,7 +388,7 @@ export const PriceCandlesDocument = {
382
388
  }
383
389
  }]
384
390
  };
385
- export const ValidateInstrumentsDocument = {
391
+ const ValidateInstrumentsDocument = exports.ValidateInstrumentsDocument = {
386
392
  kind: 'Document',
387
393
  definitions: [{
388
394
  kind: 'OperationDefinition',