@oanda/labs-crowd-view-widget 1.0.43 → 1.0.45

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 (180) hide show
  1. package/CHANGELOG.md +364 -0
  2. package/dist/main/CrowdViewWidget/CrowdViewWidget.js +3 -3
  3. package/dist/main/CrowdViewWidget/CrowdViewWidget.js.map +1 -1
  4. package/dist/main/CrowdViewWidget/Main.js +22 -12
  5. package/dist/main/CrowdViewWidget/Main.js.map +1 -1
  6. package/dist/main/CrowdViewWidget/components/Chart/Chart.js +16 -17
  7. package/dist/main/CrowdViewWidget/components/Chart/Chart.js.map +1 -1
  8. package/dist/main/CrowdViewWidget/components/Chart/ChartWithData.js +16 -13
  9. package/dist/main/CrowdViewWidget/components/Chart/ChartWithData.js.map +1 -1
  10. package/dist/main/CrowdViewWidget/components/Chart/{getOption.js → chartOptions.js} +79 -62
  11. package/dist/main/CrowdViewWidget/components/Chart/chartOptions.js.map +1 -0
  12. package/dist/main/CrowdViewWidget/components/Chart/index.js +44 -0
  13. package/dist/main/CrowdViewWidget/components/Chart/index.js.map +1 -1
  14. package/dist/main/CrowdViewWidget/components/Chart/types.js.map +1 -1
  15. package/dist/main/CrowdViewWidget/components/Chart/useCrowdViewData.js +184 -0
  16. package/dist/main/CrowdViewWidget/components/Chart/useCrowdViewData.js.map +1 -0
  17. package/dist/main/CrowdViewWidget/components/Chart/utils/chartUtils.js +107 -0
  18. package/dist/main/CrowdViewWidget/components/Chart/utils/chartUtils.js.map +1 -0
  19. package/dist/main/CrowdViewWidget/components/Legend/Legend.js +3 -2
  20. package/dist/main/CrowdViewWidget/components/Legend/Legend.js.map +1 -1
  21. package/dist/main/CrowdViewWidget/components/Legend/LegendBar.js +9 -11
  22. package/dist/main/CrowdViewWidget/components/Legend/LegendBar.js.map +1 -1
  23. package/dist/main/CrowdViewWidget/constants.js +31 -0
  24. package/dist/main/CrowdViewWidget/constants.js.map +1 -0
  25. package/dist/main/CrowdViewWidget/render.js +1 -0
  26. package/dist/main/CrowdViewWidget/render.js.map +1 -1
  27. package/dist/main/CrowdViewWidget/selectConfig.js +121 -0
  28. package/dist/main/CrowdViewWidget/selectConfig.js.map +1 -0
  29. package/dist/main/CrowdViewWidget/types/index.js +17 -0
  30. package/dist/main/CrowdViewWidget/types/index.js.map +1 -0
  31. package/dist/main/CrowdViewWidget/types/instruments.js +45 -0
  32. package/dist/main/CrowdViewWidget/types/instruments.js.map +1 -0
  33. package/dist/main/CrowdViewWidget/types.js +0 -44
  34. package/dist/main/CrowdViewWidget/types.js.map +1 -1
  35. package/dist/main/CrowdViewWidget/utils/instrumentUtils.js +13 -0
  36. package/dist/main/CrowdViewWidget/utils/instrumentUtils.js.map +1 -0
  37. package/dist/main/gql/getOrderPositionBooks.js +1 -1
  38. package/dist/main/gql/getOrderPositionBooks.js.map +1 -1
  39. package/dist/main/gql/getPriceCandles.js +11 -0
  40. package/dist/main/gql/getPriceCandles.js.map +1 -0
  41. package/dist/main/gql/types/gql.js +2 -3
  42. package/dist/main/gql/types/gql.js.map +1 -1
  43. package/dist/main/gql/types/graphql.js +161 -160
  44. package/dist/main/gql/types/graphql.js.map +1 -1
  45. package/dist/main/translations/sources/en.json +24 -0
  46. package/dist/module/CrowdViewWidget/CrowdViewWidget.js +3 -3
  47. package/dist/module/CrowdViewWidget/CrowdViewWidget.js.map +1 -1
  48. package/dist/module/CrowdViewWidget/Main.js +23 -13
  49. package/dist/module/CrowdViewWidget/Main.js.map +1 -1
  50. package/dist/module/CrowdViewWidget/components/Chart/Chart.js +15 -16
  51. package/dist/module/CrowdViewWidget/components/Chart/Chart.js.map +1 -1
  52. package/dist/module/CrowdViewWidget/components/Chart/ChartWithData.js +16 -12
  53. package/dist/module/CrowdViewWidget/components/Chart/ChartWithData.js.map +1 -1
  54. package/dist/module/CrowdViewWidget/components/Chart/{getOption.js → chartOptions.js} +77 -59
  55. package/dist/module/CrowdViewWidget/components/Chart/chartOptions.js.map +1 -0
  56. package/dist/module/CrowdViewWidget/components/Chart/index.js +4 -0
  57. package/dist/module/CrowdViewWidget/components/Chart/index.js.map +1 -1
  58. package/dist/module/CrowdViewWidget/components/Chart/types.js.map +1 -1
  59. package/dist/module/CrowdViewWidget/components/Chart/useCrowdViewData.js +177 -0
  60. package/dist/module/CrowdViewWidget/components/Chart/useCrowdViewData.js.map +1 -0
  61. package/dist/module/CrowdViewWidget/components/Chart/utils/chartUtils.js +94 -0
  62. package/dist/module/CrowdViewWidget/components/Chart/utils/chartUtils.js.map +1 -0
  63. package/dist/module/CrowdViewWidget/components/Legend/Legend.js +3 -2
  64. package/dist/module/CrowdViewWidget/components/Legend/Legend.js.map +1 -1
  65. package/dist/module/CrowdViewWidget/components/Legend/LegendBar.js +9 -11
  66. package/dist/module/CrowdViewWidget/components/Legend/LegendBar.js.map +1 -1
  67. package/dist/module/CrowdViewWidget/constants.js +25 -0
  68. package/dist/module/CrowdViewWidget/constants.js.map +1 -0
  69. package/dist/module/CrowdViewWidget/render.js +1 -0
  70. package/dist/module/CrowdViewWidget/render.js.map +1 -1
  71. package/dist/module/CrowdViewWidget/selectConfig.js +116 -0
  72. package/dist/module/CrowdViewWidget/selectConfig.js.map +1 -0
  73. package/dist/module/CrowdViewWidget/types/index.js +2 -0
  74. package/dist/module/CrowdViewWidget/types/index.js.map +1 -0
  75. package/dist/module/CrowdViewWidget/types/instruments.js +39 -0
  76. package/dist/module/CrowdViewWidget/types/instruments.js.map +1 -0
  77. package/dist/module/CrowdViewWidget/types.js +1 -43
  78. package/dist/module/CrowdViewWidget/types.js.map +1 -1
  79. package/dist/module/CrowdViewWidget/utils/instrumentUtils.js +6 -0
  80. package/dist/module/CrowdViewWidget/utils/instrumentUtils.js.map +1 -0
  81. package/dist/module/gql/getOrderPositionBooks.js +1 -1
  82. package/dist/module/gql/getOrderPositionBooks.js.map +1 -1
  83. package/dist/module/gql/getPriceCandles.js +6 -0
  84. package/dist/module/gql/getPriceCandles.js.map +1 -0
  85. package/dist/module/gql/types/gql.js +2 -3
  86. package/dist/module/gql/types/gql.js.map +1 -1
  87. package/dist/module/gql/types/graphql.js +160 -159
  88. package/dist/module/gql/types/graphql.js.map +1 -1
  89. package/dist/module/translations/sources/en.json +24 -0
  90. package/dist/types/CrowdViewWidget/CrowdViewWidget.d.ts +1 -1
  91. package/dist/types/CrowdViewWidget/components/Chart/ChartWithData.d.ts +1 -1
  92. package/dist/types/CrowdViewWidget/components/Chart/index.d.ts +4 -0
  93. package/dist/types/CrowdViewWidget/components/Chart/types.d.ts +23 -16
  94. package/dist/types/CrowdViewWidget/components/Chart/useCrowdViewData.d.ts +2 -0
  95. package/dist/types/CrowdViewWidget/components/Chart/{utils.d.ts → utils/chartUtils.d.ts} +9 -11
  96. package/dist/types/CrowdViewWidget/components/Legend/Legend.d.ts +3 -3
  97. package/dist/types/CrowdViewWidget/constants.d.ts +24 -0
  98. package/dist/types/CrowdViewWidget/selectConfig.d.ts +19 -0
  99. package/dist/types/CrowdViewWidget/types/index.d.ts +1 -0
  100. package/dist/types/CrowdViewWidget/types/instruments.d.ts +36 -0
  101. package/dist/types/CrowdViewWidget/types.d.ts +2 -50
  102. package/dist/types/CrowdViewWidget/utils/instrumentUtils.d.ts +8 -0
  103. package/dist/types/gql/types/gql.d.ts +10 -14
  104. package/dist/types/gql/types/graphql.d.ts +71 -63
  105. package/lokalise.config.json +1 -1
  106. package/package.json +6 -4
  107. package/src/CrowdViewWidget/CrowdViewWidget.tsx +2 -2
  108. package/src/CrowdViewWidget/Main.tsx +32 -22
  109. package/src/CrowdViewWidget/components/Chart/Chart.tsx +21 -17
  110. package/src/CrowdViewWidget/components/Chart/ChartWithData.tsx +12 -12
  111. package/src/CrowdViewWidget/components/Chart/chartOptions.ts +205 -0
  112. package/src/CrowdViewWidget/components/Chart/index.ts +4 -0
  113. package/src/CrowdViewWidget/components/Chart/types.ts +30 -24
  114. package/src/CrowdViewWidget/components/Chart/useCrowdViewData.ts +288 -0
  115. package/src/CrowdViewWidget/components/Chart/utils/chartUtils.ts +161 -0
  116. package/src/CrowdViewWidget/components/Legend/Legend.tsx +7 -3
  117. package/src/CrowdViewWidget/components/Legend/LegendBar.tsx +16 -20
  118. package/src/CrowdViewWidget/constants.ts +28 -0
  119. package/src/CrowdViewWidget/render.tsx +1 -0
  120. package/src/CrowdViewWidget/{config.ts → selectConfig.ts} +65 -43
  121. package/src/CrowdViewWidget/types/index.ts +1 -0
  122. package/src/CrowdViewWidget/types/instruments.ts +37 -0
  123. package/src/CrowdViewWidget/types.ts +4 -55
  124. package/src/CrowdViewWidget/utils/instrumentUtils.ts +11 -0
  125. package/src/gql/getOrderPositionBooks.ts +9 -4
  126. package/src/gql/{mock/getPriceCandles.ts → getPriceCandles.ts} +5 -5
  127. package/src/gql/types/gql.ts +6 -14
  128. package/src/gql/types/graphql.ts +170 -160
  129. package/src/translations/sources/en.json +24 -0
  130. package/test/Main.test.tsx +73 -27
  131. package/test/components/Chart/utils/chartUtils.test.ts +172 -0
  132. package/test/components/Legend.test.tsx +3 -6
  133. package/test/components/LegendBar.test.tsx +7 -8
  134. package/test/utils/instrumentUtils.test.ts +52 -0
  135. package/dist/main/CrowdViewWidget/components/Chart/constants.js +0 -14
  136. package/dist/main/CrowdViewWidget/components/Chart/constants.js.map +0 -1
  137. package/dist/main/CrowdViewWidget/components/Chart/getOption.js.map +0 -1
  138. package/dist/main/CrowdViewWidget/components/Chart/getOrderPositionDataMock.js +0 -47
  139. package/dist/main/CrowdViewWidget/components/Chart/getOrderPositionDataMock.js.map +0 -1
  140. package/dist/main/CrowdViewWidget/components/Chart/getPriceCandlesMock.js +0 -36
  141. package/dist/main/CrowdViewWidget/components/Chart/getPriceCandlesMock.js.map +0 -1
  142. package/dist/main/CrowdViewWidget/components/Chart/utils.js +0 -166
  143. package/dist/main/CrowdViewWidget/components/Chart/utils.js.map +0 -1
  144. package/dist/main/CrowdViewWidget/config.js +0 -107
  145. package/dist/main/CrowdViewWidget/config.js.map +0 -1
  146. package/dist/main/gql/mock/getPriceCandles.js +0 -11
  147. package/dist/main/gql/mock/getPriceCandles.js.map +0 -1
  148. package/dist/main/gql/mock/schema.graphqls +0 -62
  149. package/dist/main/gql/validateInstruments.js +0 -11
  150. package/dist/main/gql/validateInstruments.js.map +0 -1
  151. package/dist/module/CrowdViewWidget/components/Chart/constants.js +0 -8
  152. package/dist/module/CrowdViewWidget/components/Chart/constants.js.map +0 -1
  153. package/dist/module/CrowdViewWidget/components/Chart/getOption.js.map +0 -1
  154. package/dist/module/CrowdViewWidget/components/Chart/getOrderPositionDataMock.js +0 -40
  155. package/dist/module/CrowdViewWidget/components/Chart/getOrderPositionDataMock.js.map +0 -1
  156. package/dist/module/CrowdViewWidget/components/Chart/getPriceCandlesMock.js +0 -29
  157. package/dist/module/CrowdViewWidget/components/Chart/getPriceCandlesMock.js.map +0 -1
  158. package/dist/module/CrowdViewWidget/components/Chart/utils.js +0 -156
  159. package/dist/module/CrowdViewWidget/components/Chart/utils.js.map +0 -1
  160. package/dist/module/CrowdViewWidget/config.js +0 -102
  161. package/dist/module/CrowdViewWidget/config.js.map +0 -1
  162. package/dist/module/gql/mock/getPriceCandles.js +0 -6
  163. package/dist/module/gql/mock/getPriceCandles.js.map +0 -1
  164. package/dist/module/gql/mock/schema.graphqls +0 -62
  165. package/dist/module/gql/validateInstruments.js +0 -5
  166. package/dist/module/gql/validateInstruments.js.map +0 -1
  167. package/dist/types/CrowdViewWidget/components/Chart/constants.d.ts +0 -7
  168. package/dist/types/CrowdViewWidget/components/Chart/getOrderPositionDataMock.d.ts +0 -14
  169. package/dist/types/CrowdViewWidget/components/Chart/getPriceCandlesMock.d.ts +0 -2
  170. package/dist/types/CrowdViewWidget/config.d.ts +0 -22
  171. package/dist/types/gql/validateInstruments.d.ts +0 -1
  172. package/src/CrowdViewWidget/components/Chart/constants.tsx +0 -8
  173. package/src/CrowdViewWidget/components/Chart/getOption.ts +0 -200
  174. package/src/CrowdViewWidget/components/Chart/getOrderPositionDataMock.ts +0 -66
  175. package/src/CrowdViewWidget/components/Chart/getPriceCandlesMock.ts +0 -43
  176. package/src/CrowdViewWidget/components/Chart/utils.ts +0 -191
  177. package/src/gql/mock/schema.graphqls +0 -62
  178. package/src/gql/validateInstruments.ts +0 -10
  179. /package/dist/types/CrowdViewWidget/components/Chart/{getOption.d.ts → chartOptions.d.ts} +0 -0
  180. /package/dist/types/gql/{mock/getPriceCandles.d.ts → getPriceCandles.d.ts} +0 -0
@@ -1,29 +1,36 @@
1
1
  import type { EChartsOption } from 'echarts';
2
- import type { BookType } from '../../../gql/types/graphql';
3
- import type { GranularityId } from '../../types';
4
- interface ChartOptionsProps {
2
+ import type { BookType, Division, Granularity } from '../../../gql/types/graphql';
3
+ export interface UseCrowdViewDataProps {
4
+ instrument: string;
5
+ bookType: BookType;
6
+ division: Division;
7
+ granularity: Granularity;
8
+ }
9
+ interface CrowdViewData {
5
10
  xAxisData: string[];
6
- ordersPositionsChartData: [
7
- string,
8
- number,
9
- number
10
- ][];
11
- ordersPositionsBucketWidth: number;
12
11
  candlesSeriesData: [number, number, number, number][];
12
+ orderPositionBooks: ([string, number, number] | null)[];
13
+ bucketWidth: number;
14
+ buckets: {
15
+ price: number;
16
+ sentiment: number;
17
+ }[][];
13
18
  }
14
- export type GetOptionType = (props: ChartOptionsProps, isDark: boolean) => EChartsOption;
19
+ export interface UseCrowdViewDataReturn {
20
+ data: CrowdViewData | null;
21
+ loading: boolean;
22
+ error: boolean;
23
+ }
24
+ export type GetOptionType = (props: CrowdViewData, isDark: boolean, labelCallback: (key: string, params?: Record<string, unknown>) => string) => EChartsOption;
15
25
  export interface ChartProps {
16
- data: ChartOptionsProps;
26
+ data: CrowdViewData;
17
27
  }
18
28
  export interface ChartWithDataProps {
19
29
  bookType: BookType;
30
+ division: Division;
20
31
  instrument: string;
21
- granularity: GranularityId;
22
- }
23
- interface TransformDataForChartTypeProps {
24
- granularity: GranularityId;
32
+ granularity: Granularity;
25
33
  }
26
- export type TransformDataForChartType = (props: TransformDataForChartTypeProps) => ChartOptionsProps;
27
34
  export interface GetLabelsDataProps {
28
35
  xAxisData: string[];
29
36
  isGreaterThanTwoWeeks: boolean;
@@ -0,0 +1,2 @@
1
+ import type { UseCrowdViewDataProps, UseCrowdViewDataReturn } from './types';
2
+ export declare const useCrowdViewData: ({ instrument, bookType, division, granularity, }: UseCrowdViewDataProps) => UseCrowdViewDataReturn;
@@ -1,13 +1,5 @@
1
- import type { GetLabelsDataProps, TransformDataForChartType } from './types';
2
- export declare const getRectColor: (sentiment: number) => string;
3
- export declare enum GranularityId {
4
- MINUTE_5 = "MINUTE_5",
5
- MINUTE_15 = "MINUTE_15",
6
- MINUTE_30 = "MINUTE_30",
7
- HOUR_1 = "HOUR_1",
8
- HOUR_4 = "HOUR_4",
9
- DAY_1 = "DAY_1"
10
- }
1
+ import { Granularity, TimeSpan } from '../../../../gql/types/graphql';
2
+ import type { GetLabelsDataProps } from '../types';
11
3
  export declare const getLabelData: ({ xAxisData, isGreaterThanTwoWeeks, }: GetLabelsDataProps) => {
12
4
  name: string;
13
5
  xAxis: string;
@@ -25,4 +17,10 @@ export declare const getLabelData: ({ xAxisData, isGreaterThanTwoWeeks, }: GetLa
25
17
  };
26
18
  }[];
27
19
  export declare const isDifferenceGreaterThanTwoWeeks: (startDate: string, endDate: string) => boolean;
28
- export declare const transformDataForChart: TransformDataForChartType;
20
+ export declare const getTimeSpanForGranularity: (granularity: Granularity) => TimeSpan;
21
+ export declare const getRectColor: (sentiment: number) => string;
22
+ export declare const getTooltipFormatter: (params: unknown, buckets: Array<Array<{
23
+ price: number;
24
+ sentiment: number;
25
+ }>>, bucketWidth: number, selectedPrice: number, labelCallback: (key: string) => string) => string;
26
+ export declare const formatXAxisLabel: (value: unknown, isGreaterThanTwoWeeks: boolean) => string;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  interface LegendProps {
3
- longValues: number[];
4
- shortValues: number[];
3
+ longValues?: [number, number];
4
+ shortValues?: [number, number];
5
5
  }
6
- export declare const Legend: ({ longValues, shortValues }: LegendProps) => React.JSX.Element;
6
+ export declare const Legend: ({ longValues, shortValues, }: LegendProps) => React.JSX.Element;
7
7
  export {};
@@ -0,0 +1,24 @@
1
+ export declare const BOOKS_THRESHOLDS: {
2
+ readonly MIN: 0.15;
3
+ readonly MAX: 0.55;
4
+ };
5
+ export declare const BUCKET_CONFIG: {
6
+ readonly DEFAULT_WIDTH: 0.0005;
7
+ readonly PRICE_PADDING_MULTIPLIER: 2;
8
+ };
9
+ export declare const TIME_THRESHOLDS: {
10
+ readonly TWO_WEEKS_MS: number;
11
+ };
12
+ export declare const CHART_CONFIG: {
13
+ readonly HEIGHT: 425;
14
+ readonly WIDTH: 9999;
15
+ readonly X_LABEL_SIZE: 40;
16
+ readonly Y_LABEL_SIZE_DESKTOP: 60;
17
+ readonly INITIAL_START_ZOOM: 0;
18
+ readonly INITIAL_END_ZOOM: 100;
19
+ readonly X_AXIS_DATE_PADDING: " ";
20
+ };
21
+ export declare const COLOR_MAP: {
22
+ readonly long: readonly ["#fcedca", "#FAB313"];
23
+ readonly short: readonly ["#c8ebfa", "#309DCC"];
24
+ };
@@ -0,0 +1,19 @@
1
+ import { BookType, Granularity } from '../gql/types/graphql';
2
+ import { InstrumentId, InstrumentIdOC } from './types/instruments';
3
+ declare const navigationConfig: {
4
+ id: BookType;
5
+ label: string;
6
+ }[];
7
+ declare const instrumentSelectConfigOC: {
8
+ id: InstrumentIdOC;
9
+ label: string;
10
+ }[];
11
+ declare const instrumentSelectConfig: {
12
+ id: InstrumentId;
13
+ label: string;
14
+ }[];
15
+ declare const granularitySelectConfig: {
16
+ id: Granularity;
17
+ label: string;
18
+ }[];
19
+ export { granularitySelectConfig, instrumentSelectConfig, instrumentSelectConfigOC, navigationConfig, };
@@ -0,0 +1 @@
1
+ export * from './instruments';
@@ -0,0 +1,36 @@
1
+ export declare enum InstrumentId {
2
+ EUR_AUD = "EURAUD",
3
+ EUR_GBP = "EURGBP",
4
+ EUR_JPY = "EURJPY",
5
+ EUR_USD = "EURUSD",
6
+ EUR_CHF = "EURCHF",
7
+ USD_CHF = "USDCHF",
8
+ USD_JPY = "USDJPY",
9
+ USD_CAD = "USDCAD",
10
+ GBP_USD = "GBPUSD",
11
+ GBP_JPY = "GBPJPY",
12
+ GBP_CHF = "GBPCHF",
13
+ AUD_JPY = "AUDJPY",
14
+ AUD_USD = "AUDUSD",
15
+ NZD_USD = "NZDUSD",
16
+ XAU_USD = "XAUUSD",
17
+ XAG_USD = "XAGUSD"
18
+ }
19
+ export declare enum InstrumentIdOC {
20
+ EUR_AUD = "EUR_AUD",
21
+ EUR_GBP = "EUR_GBP",
22
+ EUR_JPY = "EUR_JPY",
23
+ EUR_USD = "EUR_USD",
24
+ EUR_CHF = "EUR_CHF",
25
+ USD_CHF = "USD_CHF",
26
+ USD_JPY = "USD_JPY",
27
+ USD_CAD = "USD_CAD",
28
+ GBP_USD = "GBP_USD",
29
+ GBP_JPY = "GBP_JPY",
30
+ GBP_CHF = "GBP_CHF",
31
+ AUD_JPY = "AUD_JPY",
32
+ AUD_USD = "AUD_USD",
33
+ NZD_USD = "NZD_USD",
34
+ XAU_USD = "XAU_USD",
35
+ XAG_USD = "XAG_USD"
36
+ }
@@ -1,58 +1,10 @@
1
1
  import type { WidgetConfig } from '@oanda/labs-widget-common';
2
2
  import type { Division } from '../gql/types/graphql';
3
+ import type { InstrumentId } from './types/instruments';
3
4
  export interface CrowdViewConfig extends WidgetConfig {
5
+ division: Division;
4
6
  }
5
7
  export interface MainProps {
6
8
  instrument?: InstrumentId;
7
9
  division: Division;
8
10
  }
9
- export declare enum InstrumentId {
10
- EUR_AUD = "EURAUD",
11
- EUR_GBP = "EURGBP",
12
- EUR_JPY = "EURJPY",
13
- EUR_USD = "EURUSD",
14
- EUR_CHF = "EURCHF",
15
- USD_CHF = "USDCHF",
16
- USD_JPY = "USDJPY",
17
- USD_CAD = "USDCAD",
18
- GBP_USD = "GBPUSD",
19
- GBP_JPY = "GBPJPY",
20
- GBP_CHF = "GBPCHF",
21
- AUD_JPY = "AUDJPY",
22
- AUD_USD = "AUDUSD",
23
- NZD_USD = "NZDUSD",
24
- XAU_USD = "XAUUSD",
25
- XAG_USD = "XAGUSD"
26
- }
27
- export declare enum GranularityId {
28
- MINUTE_5 = "MINUTE_5",
29
- MINUTE_15 = "MINUTE_15",
30
- MINUTE_30 = "MINUTE_30",
31
- HOUR_1 = "HOUR_1",
32
- HOUR_4 = "HOUR_4",
33
- DAY_1 = "DAY_1"
34
- }
35
- export declare enum TimeSpanId {
36
- HOUR_1 = "HOUR_1",
37
- HOUR_12 = "HOUR_12",
38
- DAY_1 = "DAY_1",
39
- DAY_2 = "DAY_2",
40
- WEEK_1 = "WEEK_1",
41
- WEEK_2 = "WEEK_2",
42
- WEEK_3 = "WEEK_3",
43
- MONTH_1 = "MONTH_1",
44
- MONTH_3 = "MONTH_3",
45
- MONTH_6 = "MONTH_6",
46
- YEAR_1 = "YEAR_1",
47
- YEAR_5 = "YEAR_5"
48
- }
49
- export interface OrdersPositionsData {
50
- price: number;
51
- buckets: {
52
- price: number;
53
- longCountPercent: number;
54
- shortCountPercent: number;
55
- }[];
56
- bucketWidth: number;
57
- timestamp: number;
58
- }
@@ -0,0 +1,8 @@
1
+ import { Division } from '../../gql/types/graphql';
2
+ export declare const getInstrumentConfigForDivision: (division: Division) => {
3
+ id: import("../types").InstrumentIdOC;
4
+ label: string;
5
+ }[] | {
6
+ id: import("../types").InstrumentId;
7
+ label: string;
8
+ }[];
@@ -11,21 +11,21 @@ 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 GetOrderPositionBooks(\n $instrument: String!\n $bookType: BookType!\n $recentHours: Int\n ) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n recentHours: $recentHours\n ) {\n bucketWidth\n price\n time\n buckets {\n price\n longCountPercent\n shortCountPercent\n }\n }\n }\n': DocumentNode<types.GetOrderPositionBooksQuery, types.Exact<{
14
+ '\n query GetOrderPositionBooks(\n $instrument: String!\n $bookType: BookType!\n $timeSpan: TimeSpan!\n $granularity: Granularity!\n $maxBookPrice: Float\n $minBookPrice: Float\n ) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n timeSpan: $timeSpan\n granularity: $granularity\n maxBookPrice: $maxBookPrice\n minBookPrice: $minBookPrice\n ) {\n bucketWidth\n price\n time\n buckets {\n price\n sentiment\n }\n }\n }\n': DocumentNode<types.GetOrderPositionBooksQuery, types.Exact<{
15
15
  instrument: types.Scalars["String"]["input"];
16
16
  bookType: types.BookType;
17
- recentHours?: types.InputMaybe<types.Scalars["Int"]["input"]>;
17
+ timeSpan: types.TimeSpan;
18
+ granularity: types.Granularity;
19
+ maxBookPrice?: types.InputMaybe<types.Scalars["Float"]["input"]>;
20
+ minBookPrice?: types.InputMaybe<types.Scalars["Float"]["input"]>;
18
21
  }>>;
19
- '\n query GetPriceCandles(\n $division: Division\n $instrument: String!\n $granularity: Granularity!\n $timeSpan: TimeSpan!\n ) {\n getPriceCandles(\n division: $division\n instrument: $instrument\n granularity: $granularity\n timeSpan: $timeSpan\n ) {\n time\n unixTime\n candle {\n high\n low\n open\n close\n }\n timeSpan\n }\n }\n': DocumentNode<types.GetPriceCandlesQuery, types.Exact<{
20
- division?: types.InputMaybe<types.Division>;
22
+ '\n query GetPriceCandles(\n $dataSource: DataSource!\n $division: Division!\n $instrument: String!\n $granularity: Granularity!\n $timeSpan: TimeSpan!\n ) {\n priceCandles(\n dataSource: $dataSource\n division: $division\n instrument: $instrument\n granularity: $granularity\n timeSpan: $timeSpan\n ) {\n candle {\n point\n high\n low\n open\n close\n }\n }\n }\n': DocumentNode<types.GetPriceCandlesQuery, types.Exact<{
23
+ dataSource: types.DataSource;
24
+ division: types.Division;
21
25
  instrument: types.Scalars["String"]["input"];
22
26
  granularity: types.Granularity;
23
27
  timeSpan: types.TimeSpan;
24
28
  }>>;
25
- '\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<{
26
- instruments: Array<types.InputMaybe<types.Scalars["String"]["input"]>> | types.InputMaybe<types.Scalars["String"]["input"]>;
27
- division?: types.InputMaybe<types.Division>;
28
- }>>;
29
29
  };
30
30
  /**
31
31
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
@@ -43,14 +43,10 @@ export declare function graphql(source: string): unknown;
43
43
  /**
44
44
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
45
45
  */
46
- export declare function graphql(source: '\n query GetOrderPositionBooks(\n $instrument: String!\n $bookType: BookType!\n $recentHours: Int\n ) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n recentHours: $recentHours\n ) {\n bucketWidth\n price\n time\n buckets {\n price\n longCountPercent\n shortCountPercent\n }\n }\n }\n'): (typeof documents)['\n query GetOrderPositionBooks(\n $instrument: String!\n $bookType: BookType!\n $recentHours: Int\n ) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n recentHours: $recentHours\n ) {\n bucketWidth\n price\n time\n buckets {\n price\n longCountPercent\n shortCountPercent\n }\n }\n }\n'];
47
- /**
48
- * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
49
- */
50
- export declare function graphql(source: '\n query GetPriceCandles(\n $division: Division\n $instrument: String!\n $granularity: Granularity!\n $timeSpan: TimeSpan!\n ) {\n getPriceCandles(\n division: $division\n instrument: $instrument\n granularity: $granularity\n timeSpan: $timeSpan\n ) {\n time\n unixTime\n candle {\n high\n low\n open\n close\n }\n timeSpan\n }\n }\n'): (typeof documents)['\n query GetPriceCandles(\n $division: Division\n $instrument: String!\n $granularity: Granularity!\n $timeSpan: TimeSpan!\n ) {\n getPriceCandles(\n division: $division\n instrument: $instrument\n granularity: $granularity\n timeSpan: $timeSpan\n ) {\n time\n unixTime\n candle {\n high\n low\n open\n close\n }\n timeSpan\n }\n }\n'];
46
+ export declare function graphql(source: '\n query GetOrderPositionBooks(\n $instrument: String!\n $bookType: BookType!\n $timeSpan: TimeSpan!\n $granularity: Granularity!\n $maxBookPrice: Float\n $minBookPrice: Float\n ) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n timeSpan: $timeSpan\n granularity: $granularity\n maxBookPrice: $maxBookPrice\n minBookPrice: $minBookPrice\n ) {\n bucketWidth\n price\n time\n buckets {\n price\n sentiment\n }\n }\n }\n'): (typeof documents)['\n query GetOrderPositionBooks(\n $instrument: String!\n $bookType: BookType!\n $timeSpan: TimeSpan!\n $granularity: Granularity!\n $maxBookPrice: Float\n $minBookPrice: Float\n ) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n timeSpan: $timeSpan\n granularity: $granularity\n maxBookPrice: $maxBookPrice\n minBookPrice: $minBookPrice\n ) {\n bucketWidth\n price\n time\n buckets {\n price\n sentiment\n }\n }\n }\n'];
51
47
  /**
52
48
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
53
49
  */
54
- 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'];
50
+ export declare function graphql(source: '\n query GetPriceCandles(\n $dataSource: DataSource!\n $division: Division!\n $instrument: String!\n $granularity: Granularity!\n $timeSpan: TimeSpan!\n ) {\n priceCandles(\n dataSource: $dataSource\n division: $division\n instrument: $instrument\n granularity: $granularity\n timeSpan: $timeSpan\n ) {\n candle {\n point\n high\n low\n open\n close\n }\n }\n }\n'): (typeof documents)['\n query GetPriceCandles(\n $dataSource: DataSource!\n $division: Division!\n $instrument: String!\n $granularity: Granularity!\n $timeSpan: TimeSpan!\n ) {\n priceCandles(\n dataSource: $dataSource\n division: $division\n instrument: $instrument\n granularity: $granularity\n timeSpan: $timeSpan\n ) {\n candle {\n point\n high\n low\n open\n close\n }\n }\n }\n'];
55
51
  export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;
56
52
  export {};
@@ -67,13 +67,16 @@ export type Candle = {
67
67
  high: Scalars['Float']['output'];
68
68
  low: Scalars['Float']['output'];
69
69
  open: Scalars['Float']['output'];
70
+ /** UTC Timestamp */
71
+ point: Scalars['String']['output'];
70
72
  };
71
73
  export type CandlesData = {
72
74
  __typename?: 'CandlesData';
73
- candle: Candle;
74
- time: Scalars['String']['output'];
75
+ candle: Array<Maybe<Candle>>;
76
+ granularity: Granularity;
77
+ instrument: Instrument;
78
+ pipsLocation: Scalars['Int']['output'];
75
79
  timeSpan: TimeSpan;
76
- unixTime: Scalars['Int']['output'];
77
80
  };
78
81
  export type CorrelationHeatmap = {
79
82
  __typename?: 'CorrelationHeatmap';
@@ -134,8 +137,9 @@ export type CurrencyStrength = {
134
137
  updatedAt: Scalars['String']['output'];
135
138
  };
136
139
  export declare enum DataSource {
137
- Ny4 = "NY4",
138
- Ty3 = "TY3"
140
+ All = "ALL",
141
+ Mt5 = "MT5",
142
+ V20 = "V20"
139
143
  }
140
144
  export declare enum Division {
141
145
  Oap = "OAP",
@@ -150,17 +154,16 @@ export declare enum Division {
150
154
  }
151
155
  export type ExtendedInstrument = {
152
156
  __typename?: 'ExtendedInstrument';
157
+ dataSource: DataSource;
153
158
  displayName: Scalars['String']['output'];
154
159
  name: Scalars['String']['output'];
155
160
  tradeMode: TradeMode;
156
161
  };
157
162
  export declare enum Granularity {
158
- Day_1 = "DAY_1",
159
- Hour_1 = "HOUR_1",
160
- Hour_4 = "HOUR_4",
161
- Minute_5 = "MINUTE_5",
162
- Minute_15 = "MINUTE_15",
163
- Minute_30 = "MINUTE_30"
163
+ H1 = "H1",
164
+ H4 = "H4",
165
+ M5 = "M5",
166
+ M15 = "M15"
164
167
  }
165
168
  export type Heatmap = {
166
169
  __typename?: 'Heatmap';
@@ -177,26 +180,33 @@ export type InstrumentCorrelation = {
177
180
  instrument: Instrument;
178
181
  value?: Maybe<Scalars['Float']['output']>;
179
182
  };
180
- export declare enum InstrumentDataSource {
181
- Mt5 = "MT5",
182
- V20 = "V20"
183
- }
184
183
  export type InstrumentTableResult = {
185
184
  __typename?: 'InstrumentTableResult';
186
185
  instruments: Array<ExtendedInstrument>;
187
186
  totalCount: Scalars['Int']['output'];
188
187
  updatedAt: Scalars['String']['output'];
189
188
  };
189
+ export type MarginRate = {
190
+ __typename?: 'MarginRate';
191
+ instrument: Instrument;
192
+ rate: Scalars['Float']['output'];
193
+ };
190
194
  export type Matrix = {
191
195
  __typename?: 'Matrix';
192
196
  instrument: Instrument;
193
197
  instrumentCorrelation: Array<InstrumentCorrelation>;
194
198
  };
199
+ export declare enum OrderBookDataSource {
200
+ Ny4 = "NY4",
201
+ Ny4Mt5 = "NY4_MT5",
202
+ Ty3 = "TY3"
203
+ }
195
204
  export type OrderPositionBucket = {
196
205
  __typename?: 'OrderPositionBucket';
197
- longCountPercent: Scalars['Float']['output'];
206
+ longCountPercent?: Maybe<Scalars['Float']['output']>;
198
207
  price: Scalars['Float']['output'];
199
- shortCountPercent: Scalars['Float']['output'];
208
+ sentiment?: Maybe<Scalars['Float']['output']>;
209
+ shortCountPercent?: Maybe<Scalars['Float']['output']>;
200
210
  };
201
211
  export type OrderPositionData = {
202
212
  __typename?: 'OrderPositionData';
@@ -216,10 +226,12 @@ export type Query = {
216
226
  correlationMatrix: CorrelationMatrix;
217
227
  currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;
218
228
  currencyStrength?: Maybe<Array<CurrencyStrength>>;
219
- getPriceCandles: Array<CandlesData>;
220
229
  isAllowedPartner?: Maybe<Scalars['Boolean']['output']>;
221
230
  mapInstrumentNames?: Maybe<Array<Maybe<Instrument>>>;
231
+ marginRates?: Maybe<Array<MarginRate>>;
232
+ orderPositionBook: Array<Maybe<OrderPositionData>>;
222
233
  orderPositionBooks: Array<Maybe<OrderPositionData>>;
234
+ priceCandles: CandlesData;
223
235
  resolveInstrumentsByDivision?: Maybe<Array<Instrument>>;
224
236
  resolveInstrumentsWithFilters?: Maybe<InstrumentTableResult>;
225
237
  sentiment?: Maybe<Array<SentimentInstrument>>;
@@ -247,12 +259,6 @@ export type QueryCorrelationMatrixArgs = {
247
259
  export type QueryCurrencyPowerBalanceArgs = {
248
260
  timeUnit: CurrencyPowerBalanceTimeUnit;
249
261
  };
250
- export type QueryGetPriceCandlesArgs = {
251
- division?: InputMaybe<Division>;
252
- granularity: Granularity;
253
- instrument: Scalars['String']['input'];
254
- timeSpan: TimeSpan;
255
- };
256
262
  export type QueryIsAllowedPartnerArgs = {
257
263
  url: Scalars['String']['input'];
258
264
  };
@@ -260,12 +266,32 @@ export type QueryMapInstrumentNamesArgs = {
260
266
  division?: InputMaybe<Division>;
261
267
  instruments: Array<InputMaybe<Scalars['String']['input']>>;
262
268
  };
263
- export type QueryOrderPositionBooksArgs = {
269
+ export type QueryMarginRatesArgs = {
270
+ dataSource: DataSource;
271
+ division: Division;
272
+ instruments?: InputMaybe<Array<Scalars['String']['input']>>;
273
+ tradingGroup: Scalars['Int']['input'];
274
+ };
275
+ export type QueryOrderPositionBookArgs = {
264
276
  bookType: BookType;
265
- dataSource?: InputMaybe<DataSource>;
277
+ dataSource?: InputMaybe<OrderBookDataSource>;
266
278
  instrument: Scalars['String']['input'];
267
279
  recentHours?: InputMaybe<Scalars['Int']['input']>;
268
- region?: InputMaybe<Region>;
280
+ };
281
+ export type QueryOrderPositionBooksArgs = {
282
+ bookType: BookType;
283
+ granularity: Granularity;
284
+ instrument: Scalars['String']['input'];
285
+ maxBookPrice?: InputMaybe<Scalars['Float']['input']>;
286
+ minBookPrice?: InputMaybe<Scalars['Float']['input']>;
287
+ timeSpan: TimeSpan;
288
+ };
289
+ export type QueryPriceCandlesArgs = {
290
+ dataSource: DataSource;
291
+ division: Division;
292
+ granularity: Granularity;
293
+ instrument: Scalars['String']['input'];
294
+ timeSpan: TimeSpan;
269
295
  };
270
296
  export type QueryResolveInstrumentsByDivisionArgs = {
271
297
  division: Division;
@@ -274,7 +300,7 @@ export type QueryResolveInstrumentsByDivisionArgs = {
274
300
  export type QueryResolveInstrumentsWithFiltersArgs = {
275
301
  assetClass?: InputMaybe<Array<InputMaybe<AssetClassName>>>;
276
302
  count?: InputMaybe<Scalars['Int']['input']>;
277
- dataSource?: InputMaybe<InstrumentDataSource>;
303
+ dataSource: DataSource;
278
304
  division: Division;
279
305
  instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
280
306
  offset?: InputMaybe<Scalars['Int']['input']>;
@@ -355,17 +381,11 @@ export type TimeCorrelation = {
355
381
  value?: Maybe<Scalars['Float']['output']>;
356
382
  };
357
383
  export declare enum TimeSpan {
358
- Day_1 = "DAY_1",
359
- Day_2 = "DAY_2",
360
- Hour_1 = "HOUR_1",
361
- Hour_12 = "HOUR_12",
362
- Month_1 = "MONTH_1",
363
- Month_3 = "MONTH_3",
364
- Month_6 = "MONTH_6",
365
- Week_1 = "WEEK_1",
366
- Week_2 = "WEEK_2",
367
- Week_3 = "WEEK_3",
368
- Year_1 = "YEAR_1"
384
+ FiveDays = "FIVE_DAYS",
385
+ NinetyDays = "NINETY_DAYS",
386
+ TenDays = "TEN_DAYS",
387
+ TwentyDays = "TWENTY_DAYS",
388
+ TwoDays = "TWO_DAYS"
369
389
  }
370
390
  export type TopicalInstrument = {
371
391
  __typename?: 'TopicalInstrument';
@@ -455,7 +475,10 @@ export declare enum VolatilityChartTimeUnit {
455
475
  export type GetOrderPositionBooksQueryVariables = Exact<{
456
476
  instrument: Scalars['String']['input'];
457
477
  bookType: BookType;
458
- recentHours?: InputMaybe<Scalars['Int']['input']>;
478
+ timeSpan: TimeSpan;
479
+ granularity: Granularity;
480
+ maxBookPrice?: InputMaybe<Scalars['Float']['input']>;
481
+ minBookPrice?: InputMaybe<Scalars['Float']['input']>;
459
482
  }>;
460
483
  export type GetOrderPositionBooksQuery = {
461
484
  __typename?: 'Query';
@@ -467,45 +490,30 @@ export type GetOrderPositionBooksQuery = {
467
490
  buckets: Array<{
468
491
  __typename?: 'OrderPositionBucket';
469
492
  price: number;
470
- longCountPercent: number;
471
- shortCountPercent: number;
493
+ sentiment?: number | null;
472
494
  } | null>;
473
495
  } | null>;
474
496
  };
475
497
  export type GetPriceCandlesQueryVariables = Exact<{
476
- division?: InputMaybe<Division>;
498
+ dataSource: DataSource;
499
+ division: Division;
477
500
  instrument: Scalars['String']['input'];
478
501
  granularity: Granularity;
479
502
  timeSpan: TimeSpan;
480
503
  }>;
481
504
  export type GetPriceCandlesQuery = {
482
505
  __typename?: 'Query';
483
- getPriceCandles: Array<{
506
+ priceCandles: {
484
507
  __typename?: 'CandlesData';
485
- time: string;
486
- unixTime: number;
487
- timeSpan: TimeSpan;
488
- candle: {
508
+ candle: Array<{
489
509
  __typename?: 'Candle';
510
+ point: string;
490
511
  high: number;
491
512
  low: number;
492
513
  open: number;
493
514
  close: number;
494
- };
495
- }>;
496
- };
497
- export type ValidateInstrumentsQueryVariables = Exact<{
498
- instruments: Array<InputMaybe<Scalars['String']['input']>> | InputMaybe<Scalars['String']['input']>;
499
- division?: InputMaybe<Division>;
500
- }>;
501
- export type ValidateInstrumentsQuery = {
502
- __typename?: 'Query';
503
- mapInstrumentNames?: Array<{
504
- __typename?: 'Instrument';
505
- name: string;
506
- displayName: string;
507
- } | null> | null;
515
+ } | null>;
516
+ };
508
517
  };
509
518
  export declare const GetOrderPositionBooksDocument: DocumentNode<GetOrderPositionBooksQuery, GetOrderPositionBooksQueryVariables>;
510
519
  export declare const GetPriceCandlesDocument: DocumentNode<GetPriceCandlesQuery, GetPriceCandlesQueryVariables>;
511
- export declare const ValidateInstrumentsDocument: DocumentNode<ValidateInstrumentsQuery, ValidateInstrumentsQueryVariables>;
@@ -13,6 +13,6 @@
13
13
  "plural_format": "i18next",
14
14
  "export_empty_as": "skip",
15
15
  "include_tags": ["common_widgets"],
16
- "filter_langs": ["en", "zh_TW", "es", "th"]
16
+ "filter_langs": ["en"]
17
17
  }
18
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oanda/labs-crowd-view-widget",
3
- "version": "1.0.43",
3
+ "version": "1.0.45",
4
4
  "description": "Labs Crowd View Widget",
5
5
  "main": "dist/main/index.js",
6
6
  "module": "dist/module/index.js",
@@ -13,13 +13,15 @@
13
13
  "author": "OANDA",
14
14
  "license": "UNLICENSED",
15
15
  "dependencies": {
16
- "@oanda/labs-widget-common": "^1.0.225",
16
+ "@oanda/labs-widget-common": "^1.0.227",
17
17
  "@oanda/mono-i18n": "10.0.1",
18
+ "chroma-js": "^3.1.2",
18
19
  "graphql": "16.8.1"
19
20
  },
20
21
  "devDependencies": {
21
22
  "@graphql-codegen/cli": "5.0.0",
22
- "@graphql-codegen/client-preset": "4.1.0"
23
+ "@graphql-codegen/client-preset": "4.1.0",
24
+ "@types/chroma-js": "^3.1.2"
23
25
  },
24
- "gitHead": "525a82f19721a0c414b13117ed88021f172bbbd6"
26
+ "gitHead": "f9361b30919526b3d6248b5a4eef570c0759bc19"
25
27
  }
@@ -2,7 +2,6 @@ import { ApolloClient, InMemoryCache } from '@apollo/client';
2
2
  import { WidgetProvider, WidgetWrapper } from '@oanda/labs-widget-common';
3
3
  import React from 'react';
4
4
 
5
- import { Division } from '../gql/types/graphql';
6
5
  import { translations } from '../translations';
7
6
  import { Main } from './Main';
8
7
  import type { CrowdViewConfig } from './types';
@@ -13,6 +12,7 @@ const CrowdViewWidget = ({
13
12
  theme,
14
13
  isParamError,
15
14
  logoLink,
15
+ division,
16
16
  }: CrowdViewConfig) => {
17
17
  const client = new ApolloClient({
18
18
  uri: graphqlUrl,
@@ -31,7 +31,7 @@ const CrowdViewWidget = ({
31
31
  linkArea="logo"
32
32
  logoLink={logoLink}
33
33
  >
34
- <Main division={Division.Oc} />
34
+ <Main division={division} />
35
35
  </WidgetWrapper>
36
36
  </WidgetProvider>
37
37
  );