@oanda/labs-crowd-view-widget 1.0.69 → 1.0.71
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.
- package/CHANGELOG.md +458 -5120
- package/dist/main/CrowdViewWidget/components/Chart/chartUtils/getTooltipFormatter.js +2 -2
- package/dist/main/CrowdViewWidget/components/Chart/chartUtils/getTooltipFormatter.js.map +1 -1
- package/dist/main/translations/sources/ja.json +19 -18
- package/dist/module/CrowdViewWidget/CrowdViewWidget.js +19 -12
- package/dist/module/CrowdViewWidget/CrowdViewWidget.js.map +1 -1
- package/dist/module/CrowdViewWidget/Main.js +37 -30
- package/dist/module/CrowdViewWidget/Main.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/Chart.js +36 -29
- package/dist/module/CrowdViewWidget/components/Chart/Chart.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/ChartWithData.js +30 -23
- package/dist/module/CrowdViewWidget/components/Chart/ChartWithData.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getDataZoomConfig.js +11 -4
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getDataZoomConfig.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getGridConfig.js +10 -3
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getGridConfig.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getGridLines.js +21 -14
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getGridLines.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getLabelsConfig.js +23 -15
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getLabelsConfig.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getSeriesCandlestickConfig.js +16 -8
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getSeriesCandlestickConfig.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getSeriesHeatmapConfig.js +10 -3
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getSeriesHeatmapConfig.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getSeriesSentimentConfig.js +10 -3
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getSeriesSentimentConfig.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getTooltipConfig.js +12 -5
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getTooltipConfig.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getVisualMapConfig.js +13 -6
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getVisualMapConfig.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getXAxisConfig.js +13 -6
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getXAxisConfig.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getYAxisConfig.js +14 -7
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getYAxisConfig.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/index.js +126 -11
- package/dist/module/CrowdViewWidget/components/Chart/chartOptions/index.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/formatFullDate.js +8 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/formatFullDate.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/formatXAxisAdditionalLabel.js +8 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/formatXAxisAdditionalLabel.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/formatXAxisLabel.js +11 -4
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/formatXAxisLabel.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/formatYAxisLabel.js +10 -3
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/formatYAxisLabel.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getChartStyles.js +15 -8
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getChartStyles.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getGradientColor.js +11 -3
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getGradientColor.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getLabelData.js +8 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getLabelData.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getRectColor.js +12 -5
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getRectColor.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getTooltipFormatter.js +19 -12
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getTooltipFormatter.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/handleLabelUpdate.js +16 -9
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/handleLabelUpdate.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/handleTooltipUpdate.js +8 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/handleTooltipUpdate.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/index.js +148 -13
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/index.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/isDifferenceGreaterThanTwoWeeks.js +10 -3
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/isDifferenceGreaterThanTwoWeeks.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/normalizeLocale.js +8 -1
- package/dist/module/CrowdViewWidget/components/Chart/chartUtils/normalizeLocale.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/dataUtils/getBucketWidthMultiplayer.js +11 -4
- package/dist/module/CrowdViewWidget/components/Chart/dataUtils/getBucketWidthMultiplayer.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/dataUtils/getInstrumentConfig.js +14 -7
- package/dist/module/CrowdViewWidget/components/Chart/dataUtils/getInstrumentConfig.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/dataUtils/getTimeSpanForGranularity.js +14 -7
- package/dist/module/CrowdViewWidget/components/Chart/dataUtils/getTimeSpanForGranularity.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/dataUtils/index.js +82 -7
- package/dist/module/CrowdViewWidget/components/Chart/dataUtils/index.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/dataUtils/processOrderPositionBooks.js +8 -1
- package/dist/module/CrowdViewWidget/components/Chart/dataUtils/processOrderPositionBooks.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/dataUtils/processPriceCandles.js +8 -1
- package/dist/module/CrowdViewWidget/components/Chart/dataUtils/processPriceCandles.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/dataUtils/processSentiments.js +8 -1
- package/dist/module/CrowdViewWidget/components/Chart/dataUtils/processSentiments.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/dataUtils/validateData.js +8 -1
- package/dist/module/CrowdViewWidget/components/Chart/dataUtils/validateData.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/getOption.js +27 -20
- package/dist/module/CrowdViewWidget/components/Chart/getOption.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/index.js +71 -6
- package/dist/module/CrowdViewWidget/components/Chart/index.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/types.js +5 -1
- package/dist/module/CrowdViewWidget/components/Chart/useCrowdViewData.js +35 -28
- package/dist/module/CrowdViewWidget/components/Chart/useCrowdViewData.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Chart/useResizeObserver.js +13 -6
- package/dist/module/CrowdViewWidget/components/Chart/useResizeObserver.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Legend/Legend.js +23 -15
- package/dist/module/CrowdViewWidget/components/Legend/Legend.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Legend/LegendBar.js +17 -9
- package/dist/module/CrowdViewWidget/components/Legend/LegendBar.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/Legend/index.js +27 -2
- package/dist/module/CrowdViewWidget/components/Legend/index.js.map +1 -1
- package/dist/module/CrowdViewWidget/components/index.js +27 -2
- package/dist/module/CrowdViewWidget/components/index.js.map +1 -1
- package/dist/module/CrowdViewWidget/constants.js +38 -31
- package/dist/module/CrowdViewWidget/constants.js.map +1 -1
- package/dist/module/CrowdViewWidget/index.js +27 -2
- package/dist/module/CrowdViewWidget/index.js.map +1 -1
- package/dist/module/CrowdViewWidget/render.js +13 -10
- package/dist/module/CrowdViewWidget/render.js.map +1 -1
- package/dist/module/CrowdViewWidget/selectConfig.js +49 -43
- package/dist/module/CrowdViewWidget/selectConfig.js.map +1 -1
- package/dist/module/CrowdViewWidget/types.js +7 -1
- package/dist/module/CrowdViewWidget/types.js.map +1 -1
- package/dist/module/gql/getOrderPositionBooks.js +8 -3
- package/dist/module/gql/getOrderPositionBooks.js.map +1 -1
- package/dist/module/gql/getPriceCandles.js +8 -3
- package/dist/module/gql/getPriceCandles.js.map +1 -1
- package/dist/module/gql/getSentiments.js +8 -3
- package/dist/module/gql/getSentiments.js.map +1 -1
- package/dist/module/gql/types/fragment-masking.js +11 -3
- package/dist/module/gql/types/fragment-masking.js.map +1 -1
- package/dist/module/gql/types/gql.js +9 -2
- package/dist/module/gql/types/gql.js.map +1 -1
- package/dist/module/gql/types/graphql.js +27 -21
- package/dist/module/gql/types/graphql.js.map +1 -1
- package/dist/module/gql/types/index.js +27 -2
- package/dist/module/gql/types/index.js.map +1 -1
- package/dist/module/index.js +16 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/translations/index.js +15 -8
- package/dist/module/translations/index.js.map +1 -1
- package/dist/module/translations/sources/ja.json +19 -18
- package/dist/module/translations/translations.js +7 -1
- package/dist/module/translations/translations.js.map +1 -1
- package/dist/types/gql/getOrderPositionBooks.d.ts +1 -1
- package/dist/types/gql/getPriceCandles.d.ts +1 -1
- package/dist/types/gql/getSentiments.d.ts +1 -1
- package/package.json +8 -4
- package/src/CrowdViewWidget/components/Chart/chartUtils/getTooltipFormatter.ts +2 -2
- package/src/translations/sources/ja.json +19 -18
- package/tsconfig.types.json +2 -4
|
@@ -1,14 +1,149 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _formatFullDate = require("./formatFullDate");
|
|
7
|
+
Object.keys(_formatFullDate).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _formatFullDate[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _formatFullDate[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _formatXAxisAdditionalLabel = require("./formatXAxisAdditionalLabel");
|
|
18
|
+
Object.keys(_formatXAxisAdditionalLabel).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _formatXAxisAdditionalLabel[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _formatXAxisAdditionalLabel[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _formatXAxisLabel = require("./formatXAxisLabel");
|
|
29
|
+
Object.keys(_formatXAxisLabel).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _formatXAxisLabel[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _formatXAxisLabel[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
var _formatYAxisLabel = require("./formatYAxisLabel");
|
|
40
|
+
Object.keys(_formatYAxisLabel).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _formatYAxisLabel[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _formatYAxisLabel[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
var _getChartStyles = require("./getChartStyles");
|
|
51
|
+
Object.keys(_getChartStyles).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _getChartStyles[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _getChartStyles[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
var _getGradientColor = require("./getGradientColor");
|
|
62
|
+
Object.keys(_getGradientColor).forEach(function (key) {
|
|
63
|
+
if (key === "default" || key === "__esModule") return;
|
|
64
|
+
if (key in exports && exports[key] === _getGradientColor[key]) return;
|
|
65
|
+
Object.defineProperty(exports, key, {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () {
|
|
68
|
+
return _getGradientColor[key];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
var _getLabelData = require("./getLabelData");
|
|
73
|
+
Object.keys(_getLabelData).forEach(function (key) {
|
|
74
|
+
if (key === "default" || key === "__esModule") return;
|
|
75
|
+
if (key in exports && exports[key] === _getLabelData[key]) return;
|
|
76
|
+
Object.defineProperty(exports, key, {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () {
|
|
79
|
+
return _getLabelData[key];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
var _getRectColor = require("./getRectColor");
|
|
84
|
+
Object.keys(_getRectColor).forEach(function (key) {
|
|
85
|
+
if (key === "default" || key === "__esModule") return;
|
|
86
|
+
if (key in exports && exports[key] === _getRectColor[key]) return;
|
|
87
|
+
Object.defineProperty(exports, key, {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function () {
|
|
90
|
+
return _getRectColor[key];
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
var _getTooltipFormatter = require("./getTooltipFormatter");
|
|
95
|
+
Object.keys(_getTooltipFormatter).forEach(function (key) {
|
|
96
|
+
if (key === "default" || key === "__esModule") return;
|
|
97
|
+
if (key in exports && exports[key] === _getTooltipFormatter[key]) return;
|
|
98
|
+
Object.defineProperty(exports, key, {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function () {
|
|
101
|
+
return _getTooltipFormatter[key];
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
var _handleLabelUpdate = require("./handleLabelUpdate");
|
|
106
|
+
Object.keys(_handleLabelUpdate).forEach(function (key) {
|
|
107
|
+
if (key === "default" || key === "__esModule") return;
|
|
108
|
+
if (key in exports && exports[key] === _handleLabelUpdate[key]) return;
|
|
109
|
+
Object.defineProperty(exports, key, {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get: function () {
|
|
112
|
+
return _handleLabelUpdate[key];
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
var _handleTooltipUpdate = require("./handleTooltipUpdate");
|
|
117
|
+
Object.keys(_handleTooltipUpdate).forEach(function (key) {
|
|
118
|
+
if (key === "default" || key === "__esModule") return;
|
|
119
|
+
if (key in exports && exports[key] === _handleTooltipUpdate[key]) return;
|
|
120
|
+
Object.defineProperty(exports, key, {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () {
|
|
123
|
+
return _handleTooltipUpdate[key];
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
var _isDifferenceGreaterThanTwoWeeks = require("./isDifferenceGreaterThanTwoWeeks");
|
|
128
|
+
Object.keys(_isDifferenceGreaterThanTwoWeeks).forEach(function (key) {
|
|
129
|
+
if (key === "default" || key === "__esModule") return;
|
|
130
|
+
if (key in exports && exports[key] === _isDifferenceGreaterThanTwoWeeks[key]) return;
|
|
131
|
+
Object.defineProperty(exports, key, {
|
|
132
|
+
enumerable: true,
|
|
133
|
+
get: function () {
|
|
134
|
+
return _isDifferenceGreaterThanTwoWeeks[key];
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
var _normalizeLocale = require("./normalizeLocale");
|
|
139
|
+
Object.keys(_normalizeLocale).forEach(function (key) {
|
|
140
|
+
if (key === "default" || key === "__esModule") return;
|
|
141
|
+
if (key in exports && exports[key] === _normalizeLocale[key]) return;
|
|
142
|
+
Object.defineProperty(exports, key, {
|
|
143
|
+
enumerable: true,
|
|
144
|
+
get: function () {
|
|
145
|
+
return _normalizeLocale[key];
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
});
|
|
14
149
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/chartUtils/index.ts"],"sourcesContent":["export * from './formatFullDate';\nexport * from './formatXAxisAdditionalLabel';\nexport * from './formatXAxisLabel';\nexport * from './formatYAxisLabel';\nexport * from './getChartStyles';\nexport * from './getGradientColor';\nexport * from './getLabelData';\nexport * from './getRectColor';\nexport * from './getTooltipFormatter';\nexport * from './handleLabelUpdate';\nexport * from './handleTooltipUpdate';\nexport * from './isDifferenceGreaterThanTwoWeeks';\nexport * from './normalizeLocale';\n"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["_formatFullDate","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_formatXAxisAdditionalLabel","_formatXAxisLabel","_formatYAxisLabel","_getChartStyles","_getGradientColor","_getLabelData","_getRectColor","_getTooltipFormatter","_handleLabelUpdate","_handleTooltipUpdate","_isDifferenceGreaterThanTwoWeeks","_normalizeLocale"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/chartUtils/index.ts"],"sourcesContent":["export * from './formatFullDate';\nexport * from './formatXAxisAdditionalLabel';\nexport * from './formatXAxisLabel';\nexport * from './formatYAxisLabel';\nexport * from './getChartStyles';\nexport * from './getGradientColor';\nexport * from './getLabelData';\nexport * from './getRectColor';\nexport * from './getTooltipFormatter';\nexport * from './handleLabelUpdate';\nexport * from './handleTooltipUpdate';\nexport * from './isDifferenceGreaterThanTwoWeeks';\nexport * from './normalizeLocale';\n"],"mappings":";;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,eAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,eAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,eAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,2BAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,2BAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GA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AAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAW,gCAAA,CAAAf,GAAA;IAAA;EAAA;AAAA;AACA,IAAAgB,gBAAA,GAAApB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAkB,gBAAA,EAAAjB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAgB,gBAAA,CAAAhB,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAY,gBAAA,CAAAhB,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
package/dist/module/CrowdViewWidget/components/Chart/chartUtils/isDifferenceGreaterThanTwoWeeks.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isDifferenceGreaterThanTwoWeeks = void 0;
|
|
7
|
+
var _constants = require("../../../constants");
|
|
8
|
+
const isDifferenceGreaterThanTwoWeeks = (startDate, endDate) => {
|
|
3
9
|
const date1 = new Date(startDate);
|
|
4
10
|
const date2 = new Date(endDate);
|
|
5
11
|
const differenceInMs = Math.abs(date2.getTime() - date1.getTime());
|
|
6
|
-
return differenceInMs < TIME_THRESHOLDS.TWO_WEEKS_MS;
|
|
12
|
+
return differenceInMs < _constants.TIME_THRESHOLDS.TWO_WEEKS_MS;
|
|
7
13
|
};
|
|
14
|
+
exports.isDifferenceGreaterThanTwoWeeks = isDifferenceGreaterThanTwoWeeks;
|
|
8
15
|
//# sourceMappingURL=isDifferenceGreaterThanTwoWeeks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isDifferenceGreaterThanTwoWeeks.js","names":["
|
|
1
|
+
{"version":3,"file":"isDifferenceGreaterThanTwoWeeks.js","names":["_constants","require","isDifferenceGreaterThanTwoWeeks","startDate","endDate","date1","Date","date2","differenceInMs","Math","abs","getTime","TIME_THRESHOLDS","TWO_WEEKS_MS","exports"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/chartUtils/isDifferenceGreaterThanTwoWeeks.ts"],"sourcesContent":["import { TIME_THRESHOLDS } from '../../../constants';\n\nexport const isDifferenceGreaterThanTwoWeeks = (\n startDate: string,\n endDate: string\n) => {\n const date1 = new Date(startDate);\n const date2 = new Date(endDate);\n\n const differenceInMs = Math.abs(date2.getTime() - date1.getTime());\n\n return differenceInMs < TIME_THRESHOLDS.TWO_WEEKS_MS;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEO,MAAMC,+BAA+B,GAAGA,CAC7CC,SAAiB,EACjBC,OAAe,KACZ;EACH,MAAMC,KAAK,GAAG,IAAIC,IAAI,CAACH,SAAS,CAAC;EACjC,MAAMI,KAAK,GAAG,IAAID,IAAI,CAACF,OAAO,CAAC;EAE/B,MAAMI,cAAc,GAAGC,IAAI,CAACC,GAAG,CAACH,KAAK,CAACI,OAAO,CAAC,CAAC,GAAGN,KAAK,CAACM,OAAO,CAAC,CAAC,CAAC;EAElE,OAAOH,cAAc,GAAGI,0BAAe,CAACC,YAAY;AACtD,CAAC;AAACC,OAAA,CAAAZ,+BAAA,GAAAA,+BAAA","ignoreList":[]}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.normalizeLocale = void 0;
|
|
7
|
+
const normalizeLocale = locale => {
|
|
2
8
|
return locale === 'en' ? 'en-GB' : locale;
|
|
3
9
|
};
|
|
10
|
+
exports.normalizeLocale = normalizeLocale;
|
|
4
11
|
//# sourceMappingURL=normalizeLocale.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeLocale.js","names":["normalizeLocale","locale"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/chartUtils/normalizeLocale.ts"],"sourcesContent":["export const normalizeLocale = (locale: string): string => {\n return locale === 'en' ? 'en-GB' : locale;\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"normalizeLocale.js","names":["normalizeLocale","locale","exports"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/chartUtils/normalizeLocale.ts"],"sourcesContent":["export const normalizeLocale = (locale: string): string => {\n return locale === 'en' ? 'en-GB' : locale;\n};\n"],"mappings":";;;;;;AAAO,MAAMA,eAAe,GAAIC,MAAc,IAAa;EACzD,OAAOA,MAAM,KAAK,IAAI,GAAG,OAAO,GAAGA,MAAM;AAC3C,CAAC;AAACC,OAAA,CAAAF,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getBucketWidthMultiplayer = void 0;
|
|
7
|
+
var _constants = require("../../../constants");
|
|
2
8
|
const roundToClosest = (value, options) => {
|
|
3
9
|
return options.reduce((closest, option) => {
|
|
4
10
|
const distanceToOption = Math.abs(value - option);
|
|
@@ -12,7 +18,7 @@ const roundToClosest = (value, options) => {
|
|
|
12
18
|
const getRoundingValues = base => {
|
|
13
19
|
return [base, 2 * base, 4 * base, 5 * base, 10 * base];
|
|
14
20
|
};
|
|
15
|
-
|
|
21
|
+
const getBucketWidthMultiplayer = _ref => {
|
|
16
22
|
let {
|
|
17
23
|
minPrice,
|
|
18
24
|
maxPrice,
|
|
@@ -20,9 +26,9 @@ export const getBucketWidthMultiplayer = _ref => {
|
|
|
20
26
|
} = _ref;
|
|
21
27
|
const {
|
|
22
28
|
defaultBucketWidth
|
|
23
|
-
} = INSTRUMENTS_CONFIG[instrument];
|
|
29
|
+
} = _constants.INSTRUMENTS_CONFIG[instrument];
|
|
24
30
|
const priceRange = maxPrice - minPrice;
|
|
25
|
-
const calculatedMultiplier = priceRange / (defaultBucketWidth * DISPLAYED_BUCKETS_COUNT);
|
|
31
|
+
const calculatedMultiplier = priceRange / (defaultBucketWidth * _constants.DISPLAYED_BUCKETS_COUNT);
|
|
26
32
|
if (calculatedMultiplier <= 1) {
|
|
27
33
|
return 1;
|
|
28
34
|
}
|
|
@@ -31,4 +37,5 @@ export const getBucketWidthMultiplayer = _ref => {
|
|
|
31
37
|
const roundingValues = getRoundingValues(base);
|
|
32
38
|
return roundToClosest(calculatedMultiplier, roundingValues);
|
|
33
39
|
};
|
|
40
|
+
exports.getBucketWidthMultiplayer = getBucketWidthMultiplayer;
|
|
34
41
|
//# sourceMappingURL=getBucketWidthMultiplayer.js.map
|
package/dist/module/CrowdViewWidget/components/Chart/dataUtils/getBucketWidthMultiplayer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBucketWidthMultiplayer.js","names":["
|
|
1
|
+
{"version":3,"file":"getBucketWidthMultiplayer.js","names":["_constants","require","roundToClosest","value","options","reduce","closest","option","distanceToOption","Math","abs","distanceToClosest","getRoundingValues","base","getBucketWidthMultiplayer","_ref","minPrice","maxPrice","instrument","defaultBucketWidth","INSTRUMENTS_CONFIG","priceRange","calculatedMultiplier","DISPLAYED_BUCKETS_COUNT","powerOf10","floor","log10","pow","roundingValues","exports"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/dataUtils/getBucketWidthMultiplayer.ts"],"sourcesContent":["import {\n DISPLAYED_BUCKETS_COUNT,\n INSTRUMENTS_CONFIG,\n} from '../../../constants';\nimport type { InstrumentId } from '../../../types';\n\ninterface GetBucketWidthMultiplayerParams {\n minPrice: number;\n maxPrice: number;\n instrument: InstrumentId;\n}\n\nconst roundToClosest = (value: number, options: number[]): number => {\n return options.reduce((closest, option) => {\n const distanceToOption = Math.abs(value - option);\n const distanceToClosest = Math.abs(value - closest);\n\n if (distanceToOption === distanceToClosest) {\n return option > closest ? option : closest;\n }\n\n return distanceToOption < distanceToClosest ? option : closest;\n });\n};\n\nconst getRoundingValues = (base: number): number[] => {\n return [base, 2 * base, 4 * base, 5 * base, 10 * base];\n};\n\nexport const getBucketWidthMultiplayer = ({\n minPrice,\n maxPrice,\n instrument,\n}: GetBucketWidthMultiplayerParams): number => {\n const { defaultBucketWidth } = INSTRUMENTS_CONFIG[instrument];\n const priceRange = maxPrice - minPrice;\n\n const calculatedMultiplier =\n priceRange / (defaultBucketWidth * DISPLAYED_BUCKETS_COUNT);\n\n if (calculatedMultiplier <= 1) {\n return 1;\n }\n\n const powerOf10 = Math.floor(Math.log10(calculatedMultiplier));\n const base = Math.pow(10, powerOf10);\n const roundingValues = getRoundingValues(base);\n\n return roundToClosest(calculatedMultiplier, roundingValues);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAYA,MAAMC,cAAc,GAAGA,CAACC,KAAa,EAAEC,OAAiB,KAAa;EACnE,OAAOA,OAAO,CAACC,MAAM,CAAC,CAACC,OAAO,EAAEC,MAAM,KAAK;IACzC,MAAMC,gBAAgB,GAAGC,IAAI,CAACC,GAAG,CAACP,KAAK,GAAGI,MAAM,CAAC;IACjD,MAAMI,iBAAiB,GAAGF,IAAI,CAACC,GAAG,CAACP,KAAK,GAAGG,OAAO,CAAC;IAEnD,IAAIE,gBAAgB,KAAKG,iBAAiB,EAAE;MAC1C,OAAOJ,MAAM,GAAGD,OAAO,GAAGC,MAAM,GAAGD,OAAO;IAC5C;IAEA,OAAOE,gBAAgB,GAAGG,iBAAiB,GAAGJ,MAAM,GAAGD,OAAO;EAChE,CAAC,CAAC;AACJ,CAAC;AAED,MAAMM,iBAAiB,GAAIC,IAAY,IAAe;EACpD,OAAO,CAACA,IAAI,EAAE,CAAC,GAAGA,IAAI,EAAE,CAAC,GAAGA,IAAI,EAAE,CAAC,GAAGA,IAAI,EAAE,EAAE,GAAGA,IAAI,CAAC;AACxD,CAAC;AAEM,MAAMC,yBAAyB,GAAGC,IAAA,IAIM;EAAA,IAJL;IACxCC,QAAQ;IACRC,QAAQ;IACRC;EAC+B,CAAC,GAAAH,IAAA;EAChC,MAAM;IAAEI;EAAmB,CAAC,GAAGC,6BAAkB,CAACF,UAAU,CAAC;EAC7D,MAAMG,UAAU,GAAGJ,QAAQ,GAAGD,QAAQ;EAEtC,MAAMM,oBAAoB,GACxBD,UAAU,IAAIF,kBAAkB,GAAGI,kCAAuB,CAAC;EAE7D,IAAID,oBAAoB,IAAI,CAAC,EAAE;IAC7B,OAAO,CAAC;EACV;EAEA,MAAME,SAAS,GAAGf,IAAI,CAACgB,KAAK,CAAChB,IAAI,CAACiB,KAAK,CAACJ,oBAAoB,CAAC,CAAC;EAC9D,MAAMT,IAAI,GAAGJ,IAAI,CAACkB,GAAG,CAAC,EAAE,EAAEH,SAAS,CAAC;EACpC,MAAMI,cAAc,GAAGhB,iBAAiB,CAACC,IAAI,CAAC;EAE9C,OAAOX,cAAc,CAACoB,oBAAoB,EAAEM,cAAc,CAAC;AAC7D,CAAC;AAACC,OAAA,CAAAf,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getInstrumentConfig = void 0;
|
|
7
|
+
var _graphql = require("../../../../gql/types/graphql");
|
|
8
|
+
var _selectConfig = require("../../../selectConfig");
|
|
9
|
+
const getInstrumentConfig = (division, isJapanese) => {
|
|
4
10
|
if (isJapanese) {
|
|
5
|
-
return instrumentSelectConfigJa;
|
|
11
|
+
return _selectConfig.instrumentSelectConfigJa;
|
|
6
12
|
}
|
|
7
|
-
if (division === Division.Oc) {
|
|
8
|
-
return instrumentSelectConfigOC;
|
|
13
|
+
if (division === _graphql.Division.Oc) {
|
|
14
|
+
return _selectConfig.instrumentSelectConfigOC;
|
|
9
15
|
}
|
|
10
|
-
return instrumentSelectConfig;
|
|
16
|
+
return _selectConfig.instrumentSelectConfig;
|
|
11
17
|
};
|
|
18
|
+
exports.getInstrumentConfig = getInstrumentConfig;
|
|
12
19
|
//# sourceMappingURL=getInstrumentConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInstrumentConfig.js","names":["
|
|
1
|
+
{"version":3,"file":"getInstrumentConfig.js","names":["_graphql","require","_selectConfig","getInstrumentConfig","division","isJapanese","instrumentSelectConfigJa","Division","Oc","instrumentSelectConfigOC","instrumentSelectConfig","exports"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/dataUtils/getInstrumentConfig.ts"],"sourcesContent":["import { Division } from '../../../../gql/types/graphql';\nimport {\n instrumentSelectConfig,\n instrumentSelectConfigJa,\n instrumentSelectConfigOC,\n} from '../../../selectConfig';\n\nexport const getInstrumentConfig = (\n division: Division,\n isJapanese: boolean\n) => {\n if (isJapanese) {\n return instrumentSelectConfigJa;\n }\n\n if (division === Division.Oc) {\n return instrumentSelectConfigOC;\n }\n return instrumentSelectConfig;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAMO,MAAME,mBAAmB,GAAGA,CACjCC,QAAkB,EAClBC,UAAmB,KAChB;EACH,IAAIA,UAAU,EAAE;IACd,OAAOC,sCAAwB;EACjC;EAEA,IAAIF,QAAQ,KAAKG,iBAAQ,CAACC,EAAE,EAAE;IAC5B,OAAOC,sCAAwB;EACjC;EACA,OAAOC,oCAAsB;AAC/B,CAAC;AAACC,OAAA,CAAAR,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getTimeSpanForGranularity = void 0;
|
|
7
|
+
var _graphql = require("../../../../gql/types/graphql");
|
|
8
|
+
const getTimeSpanForGranularity = granularity => {
|
|
3
9
|
const granularityTimeSpanMap = {
|
|
4
|
-
[Granularity.M5]: TimeSpan.TwoDays,
|
|
5
|
-
[Granularity.M15]: TimeSpan.FiveDays,
|
|
6
|
-
[Granularity.H1]: TimeSpan.TwentyDays,
|
|
7
|
-
[Granularity.H4]: TimeSpan.NinetyDays
|
|
10
|
+
[_graphql.Granularity.M5]: _graphql.TimeSpan.TwoDays,
|
|
11
|
+
[_graphql.Granularity.M15]: _graphql.TimeSpan.FiveDays,
|
|
12
|
+
[_graphql.Granularity.H1]: _graphql.TimeSpan.TwentyDays,
|
|
13
|
+
[_graphql.Granularity.H4]: _graphql.TimeSpan.NinetyDays
|
|
8
14
|
};
|
|
9
|
-
return granularityTimeSpanMap[granularity] || TimeSpan.TwoDays;
|
|
15
|
+
return granularityTimeSpanMap[granularity] || _graphql.TimeSpan.TwoDays;
|
|
10
16
|
};
|
|
17
|
+
exports.getTimeSpanForGranularity = getTimeSpanForGranularity;
|
|
11
18
|
//# sourceMappingURL=getTimeSpanForGranularity.js.map
|
package/dist/module/CrowdViewWidget/components/Chart/dataUtils/getTimeSpanForGranularity.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTimeSpanForGranularity.js","names":["
|
|
1
|
+
{"version":3,"file":"getTimeSpanForGranularity.js","names":["_graphql","require","getTimeSpanForGranularity","granularity","granularityTimeSpanMap","Granularity","M5","TimeSpan","TwoDays","M15","FiveDays","H1","TwentyDays","H4","NinetyDays","exports"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/dataUtils/getTimeSpanForGranularity.ts"],"sourcesContent":["import { Granularity, TimeSpan } from '../../../../gql/types/graphql';\n\nexport const getTimeSpanForGranularity = (\n granularity: Granularity\n): TimeSpan => {\n const granularityTimeSpanMap: Record<Granularity, TimeSpan> = {\n [Granularity.M5]: TimeSpan.TwoDays,\n [Granularity.M15]: TimeSpan.FiveDays,\n [Granularity.H1]: TimeSpan.TwentyDays,\n [Granularity.H4]: TimeSpan.NinetyDays,\n };\n\n return granularityTimeSpanMap[granularity] || TimeSpan.TwoDays;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAEO,MAAMC,yBAAyB,GACpCC,WAAwB,IACX;EACb,MAAMC,sBAAqD,GAAG;IAC5D,CAACC,oBAAW,CAACC,EAAE,GAAGC,iBAAQ,CAACC,OAAO;IAClC,CAACH,oBAAW,CAACI,GAAG,GAAGF,iBAAQ,CAACG,QAAQ;IACpC,CAACL,oBAAW,CAACM,EAAE,GAAGJ,iBAAQ,CAACK,UAAU;IACrC,CAACP,oBAAW,CAACQ,EAAE,GAAGN,iBAAQ,CAACO;EAC7B,CAAC;EAED,OAAOV,sBAAsB,CAACD,WAAW,CAAC,IAAII,iBAAQ,CAACC,OAAO;AAChE,CAAC;AAACO,OAAA,CAAAb,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
@@ -1,8 +1,83 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _getBucketWidthMultiplayer = require("./getBucketWidthMultiplayer");
|
|
7
|
+
Object.keys(_getBucketWidthMultiplayer).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _getBucketWidthMultiplayer[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _getBucketWidthMultiplayer[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _getInstrumentConfig = require("./getInstrumentConfig");
|
|
18
|
+
Object.keys(_getInstrumentConfig).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _getInstrumentConfig[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _getInstrumentConfig[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _getTimeSpanForGranularity = require("./getTimeSpanForGranularity");
|
|
29
|
+
Object.keys(_getTimeSpanForGranularity).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _getTimeSpanForGranularity[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _getTimeSpanForGranularity[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
var _processOrderPositionBooks = require("./processOrderPositionBooks");
|
|
40
|
+
Object.keys(_processOrderPositionBooks).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _processOrderPositionBooks[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _processOrderPositionBooks[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
var _processPriceCandles = require("./processPriceCandles");
|
|
51
|
+
Object.keys(_processPriceCandles).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _processPriceCandles[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _processPriceCandles[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
var _processSentiments = require("./processSentiments");
|
|
62
|
+
Object.keys(_processSentiments).forEach(function (key) {
|
|
63
|
+
if (key === "default" || key === "__esModule") return;
|
|
64
|
+
if (key in exports && exports[key] === _processSentiments[key]) return;
|
|
65
|
+
Object.defineProperty(exports, key, {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () {
|
|
68
|
+
return _processSentiments[key];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
var _validateData = require("./validateData");
|
|
73
|
+
Object.keys(_validateData).forEach(function (key) {
|
|
74
|
+
if (key === "default" || key === "__esModule") return;
|
|
75
|
+
if (key in exports && exports[key] === _validateData[key]) return;
|
|
76
|
+
Object.defineProperty(exports, key, {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () {
|
|
79
|
+
return _validateData[key];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
8
83
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/dataUtils/index.ts"],"sourcesContent":["export * from './getBucketWidthMultiplayer';\nexport * from './getInstrumentConfig';\nexport * from './getTimeSpanForGranularity';\nexport * from './processOrderPositionBooks';\nexport * from './processPriceCandles';\nexport * from './processSentiments';\nexport * from './validateData';\n"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["_getBucketWidthMultiplayer","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_getInstrumentConfig","_getTimeSpanForGranularity","_processOrderPositionBooks","_processPriceCandles","_processSentiments","_validateData"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/dataUtils/index.ts"],"sourcesContent":["export * from './getBucketWidthMultiplayer';\nexport * from './getInstrumentConfig';\nexport * from './getTimeSpanForGranularity';\nexport * from './processOrderPositionBooks';\nexport * from './processPriceCandles';\nexport * from './processSentiments';\nexport * from './validateData';\n"],"mappings":";;;;;AAAA,IAAAA,0BAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,0BAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,0BAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,0BAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,oBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,oBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,oBAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,oBAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,0BAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,0BAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,0BAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CA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AAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAU,aAAA,CAAAV,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAM,aAAA,CAAAV,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.processOrderPositionBooks = void 0;
|
|
7
|
+
const processOrderPositionBooks = (orderPositionData, dates) => {
|
|
2
8
|
if (!Array.isArray(dates) || dates.length === 0) {
|
|
3
9
|
return {
|
|
4
10
|
bookPrices: [],
|
|
@@ -53,4 +59,5 @@ export const processOrderPositionBooks = (orderPositionData, dates) => {
|
|
|
53
59
|
hasValidBooks: true
|
|
54
60
|
};
|
|
55
61
|
};
|
|
62
|
+
exports.processOrderPositionBooks = processOrderPositionBooks;
|
|
56
63
|
//# sourceMappingURL=processOrderPositionBooks.js.map
|
package/dist/module/CrowdViewWidget/components/Chart/dataUtils/processOrderPositionBooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processOrderPositionBooks.js","names":["processOrderPositionBooks","orderPositionData","dates","Array","isArray","length","bookPrices","bookIndexes","buckets","bucketWidth","sentimentThresholdMin","sentimentThresholdMax","hasValidBooks","orderPositionBooks","books","booksDataMap","Map","map","item","time","price","forEach","date","index","book","get","currentBuckets","filter","bucket","sentiment","Math","abs","push"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/dataUtils/processOrderPositionBooks.ts"],"sourcesContent":["import type { GetOrderPositionBooksQuery } from '../../../../gql/types/graphql';\nimport type { Bucket } from '../types';\n\nexport const processOrderPositionBooks = (\n orderPositionData: GetOrderPositionBooksQuery | undefined,\n dates: string[]\n) => {\n // Input validation\n if (!Array.isArray(dates) || dates.length === 0) {\n return {\n bookPrices: [],\n bookIndexes: [],\n buckets: [],\n bucketWidth: 0,\n sentimentThresholdMin: 0,\n sentimentThresholdMax: 0,\n hasValidBooks: false,\n };\n }\n\n if (\n !orderPositionData?.orderPositionBooks?.books?.length ||\n !orderPositionData?.orderPositionBooks?.sentimentThresholdMin ||\n !orderPositionData?.orderPositionBooks?.sentimentThresholdMax ||\n !orderPositionData?.orderPositionBooks?.bucketWidth\n ) {\n return {\n bookPrices: [],\n bookIndexes: [],\n buckets: [],\n bucketWidth: 0,\n sentimentThresholdMin: 0,\n sentimentThresholdMax: 0,\n hasValidBooks: false,\n };\n }\n\n const { bucketWidth, sentimentThresholdMin, sentimentThresholdMax } =\n orderPositionData.orderPositionBooks;\n\n const booksDataMap = new Map(\n orderPositionData.orderPositionBooks.books.map((item) => [\n item.time,\n {\n price: item.price,\n buckets: item.buckets,\n },\n ])\n );\n\n // Use forEach + push for O(n) performance instead of reduce with spreads (O(n²))\n const bookPrices: (number | null)[] = [];\n const bookIndexes: number[] = [];\n const buckets: Bucket[][] = [];\n\n dates.forEach((date, index) => {\n const book = booksDataMap.get(date);\n\n const currentBuckets =\n book?.buckets\n .filter(\n (\n bucket\n ): bucket is {\n price: number;\n sentiment: number;\n } =>\n bucket !== null &&\n typeof bucket.price === 'number' &&\n typeof bucket.sentiment === 'number' &&\n Math.abs(bucket.sentiment) >= sentimentThresholdMin\n )\n .map((bucket) => ({\n price: bucket.price,\n sentiment: bucket.sentiment,\n })) || [];\n\n bookPrices.push(book?.price ?? null);\n bookIndexes.push(index);\n buckets.push(currentBuckets);\n });\n\n return {\n bookPrices,\n bookIndexes,\n buckets,\n bucketWidth,\n sentimentThresholdMin,\n sentimentThresholdMax,\n hasValidBooks: true,\n };\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"processOrderPositionBooks.js","names":["processOrderPositionBooks","orderPositionData","dates","Array","isArray","length","bookPrices","bookIndexes","buckets","bucketWidth","sentimentThresholdMin","sentimentThresholdMax","hasValidBooks","orderPositionBooks","books","booksDataMap","Map","map","item","time","price","forEach","date","index","book","get","currentBuckets","filter","bucket","sentiment","Math","abs","push","exports"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/dataUtils/processOrderPositionBooks.ts"],"sourcesContent":["import type { GetOrderPositionBooksQuery } from '../../../../gql/types/graphql';\nimport type { Bucket } from '../types';\n\nexport const processOrderPositionBooks = (\n orderPositionData: GetOrderPositionBooksQuery | undefined,\n dates: string[]\n) => {\n // Input validation\n if (!Array.isArray(dates) || dates.length === 0) {\n return {\n bookPrices: [],\n bookIndexes: [],\n buckets: [],\n bucketWidth: 0,\n sentimentThresholdMin: 0,\n sentimentThresholdMax: 0,\n hasValidBooks: false,\n };\n }\n\n if (\n !orderPositionData?.orderPositionBooks?.books?.length ||\n !orderPositionData?.orderPositionBooks?.sentimentThresholdMin ||\n !orderPositionData?.orderPositionBooks?.sentimentThresholdMax ||\n !orderPositionData?.orderPositionBooks?.bucketWidth\n ) {\n return {\n bookPrices: [],\n bookIndexes: [],\n buckets: [],\n bucketWidth: 0,\n sentimentThresholdMin: 0,\n sentimentThresholdMax: 0,\n hasValidBooks: false,\n };\n }\n\n const { bucketWidth, sentimentThresholdMin, sentimentThresholdMax } =\n orderPositionData.orderPositionBooks;\n\n const booksDataMap = new Map(\n orderPositionData.orderPositionBooks.books.map((item) => [\n item.time,\n {\n price: item.price,\n buckets: item.buckets,\n },\n ])\n );\n\n // Use forEach + push for O(n) performance instead of reduce with spreads (O(n²))\n const bookPrices: (number | null)[] = [];\n const bookIndexes: number[] = [];\n const buckets: Bucket[][] = [];\n\n dates.forEach((date, index) => {\n const book = booksDataMap.get(date);\n\n const currentBuckets =\n book?.buckets\n .filter(\n (\n bucket\n ): bucket is {\n price: number;\n sentiment: number;\n } =>\n bucket !== null &&\n typeof bucket.price === 'number' &&\n typeof bucket.sentiment === 'number' &&\n Math.abs(bucket.sentiment) >= sentimentThresholdMin\n )\n .map((bucket) => ({\n price: bucket.price,\n sentiment: bucket.sentiment,\n })) || [];\n\n bookPrices.push(book?.price ?? null);\n bookIndexes.push(index);\n buckets.push(currentBuckets);\n });\n\n return {\n bookPrices,\n bookIndexes,\n buckets,\n bucketWidth,\n sentimentThresholdMin,\n sentimentThresholdMax,\n hasValidBooks: true,\n };\n};\n"],"mappings":";;;;;;AAGO,MAAMA,yBAAyB,GAAGA,CACvCC,iBAAyD,EACzDC,KAAe,KACZ;EAEH,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,IAAIA,KAAK,CAACG,MAAM,KAAK,CAAC,EAAE;IAC/C,OAAO;MACLC,UAAU,EAAE,EAAE;MACdC,WAAW,EAAE,EAAE;MACfC,OAAO,EAAE,EAAE;MACXC,WAAW,EAAE,CAAC;MACdC,qBAAqB,EAAE,CAAC;MACxBC,qBAAqB,EAAE,CAAC;MACxBC,aAAa,EAAE;IACjB,CAAC;EACH;EAEA,IACE,CAACX,iBAAiB,EAAEY,kBAAkB,EAAEC,KAAK,EAAET,MAAM,IACrD,CAACJ,iBAAiB,EAAEY,kBAAkB,EAAEH,qBAAqB,IAC7D,CAACT,iBAAiB,EAAEY,kBAAkB,EAAEF,qBAAqB,IAC7D,CAACV,iBAAiB,EAAEY,kBAAkB,EAAEJ,WAAW,EACnD;IACA,OAAO;MACLH,UAAU,EAAE,EAAE;MACdC,WAAW,EAAE,EAAE;MACfC,OAAO,EAAE,EAAE;MACXC,WAAW,EAAE,CAAC;MACdC,qBAAqB,EAAE,CAAC;MACxBC,qBAAqB,EAAE,CAAC;MACxBC,aAAa,EAAE;IACjB,CAAC;EACH;EAEA,MAAM;IAAEH,WAAW;IAAEC,qBAAqB;IAAEC;EAAsB,CAAC,GACjEV,iBAAiB,CAACY,kBAAkB;EAEtC,MAAME,YAAY,GAAG,IAAIC,GAAG,CAC1Bf,iBA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|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.processPriceCandles = void 0;
|
|
7
|
+
const processPriceCandles = priceCandlesData => {
|
|
2
8
|
const errorResult = {
|
|
3
9
|
minPrice: 0,
|
|
4
10
|
maxPrice: 0,
|
|
@@ -54,4 +60,5 @@ export const processPriceCandles = priceCandlesData => {
|
|
|
54
60
|
pipsLocation: priceCandlesData.priceCandles.pipsLocation
|
|
55
61
|
};
|
|
56
62
|
};
|
|
63
|
+
exports.processPriceCandles = processPriceCandles;
|
|
57
64
|
//# sourceMappingURL=processPriceCandles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processPriceCandles.js","names":["processPriceCandles","priceCandlesData","errorResult","minPrice","maxPrice","pipsLocation","hasValidCandles","candlesOpen","candlesClose","candlesLow","candlesHigh","dates","priceCandles","candle","length","reduce","acc","point","open","close","low","high","Math","min","max","Date","toISOString"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/dataUtils/processPriceCandles.ts"],"sourcesContent":["import type { GetPriceCandlesQuery } from '../../../../gql/types/graphql';\n\nexport const processPriceCandles = (\n priceCandlesData: GetPriceCandlesQuery | undefined\n) => {\n const errorResult = {\n minPrice: 0,\n maxPrice: 0,\n pipsLocation: 0,\n hasValidCandles: false,\n candlesOpen: [],\n candlesClose: [],\n candlesLow: [],\n candlesHigh: [],\n dates: [],\n };\n\n if (\n !priceCandlesData?.priceCandles?.candle?.length ||\n !priceCandlesData?.priceCandles?.pipsLocation\n ) {\n return errorResult;\n }\n\n const { dates, candlesOpen, candlesClose, candlesLow, candlesHigh } =\n priceCandlesData.priceCandles.candle.reduce(\n (acc, candle) => {\n if (!candle) {\n return acc;\n }\n\n return {\n dates: [...acc.dates, candle.point],\n candlesOpen: [...acc.candlesOpen, candle.open],\n candlesClose: [...acc.candlesClose, candle.close],\n candlesLow: [...acc.candlesLow, candle.low],\n candlesHigh: [...acc.candlesHigh, candle.high],\n };\n },\n {\n dates: [] as string[],\n candlesOpen: [] as number[],\n candlesClose: [] as number[],\n candlesLow: [] as number[],\n candlesHigh: [] as number[],\n }\n );\n\n if (dates.length === 0) {\n return errorResult;\n }\n\n const minPrice = Math.min(...candlesLow);\n const maxPrice = Math.max(...candlesHigh);\n\n return {\n minPrice,\n maxPrice,\n candlesOpen,\n candlesClose,\n candlesLow,\n candlesHigh,\n dates: [...dates, new Date().toISOString()],\n hasValidCandles: true,\n pipsLocation: priceCandlesData.priceCandles.pipsLocation,\n };\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"processPriceCandles.js","names":["processPriceCandles","priceCandlesData","errorResult","minPrice","maxPrice","pipsLocation","hasValidCandles","candlesOpen","candlesClose","candlesLow","candlesHigh","dates","priceCandles","candle","length","reduce","acc","point","open","close","low","high","Math","min","max","Date","toISOString","exports"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/dataUtils/processPriceCandles.ts"],"sourcesContent":["import type { GetPriceCandlesQuery } from '../../../../gql/types/graphql';\n\nexport const processPriceCandles = (\n priceCandlesData: GetPriceCandlesQuery | undefined\n) => {\n const errorResult = {\n minPrice: 0,\n maxPrice: 0,\n pipsLocation: 0,\n hasValidCandles: false,\n candlesOpen: [],\n candlesClose: [],\n candlesLow: [],\n candlesHigh: [],\n dates: [],\n };\n\n if (\n !priceCandlesData?.priceCandles?.candle?.length ||\n !priceCandlesData?.priceCandles?.pipsLocation\n ) {\n return errorResult;\n }\n\n const { dates, candlesOpen, candlesClose, candlesLow, candlesHigh } =\n priceCandlesData.priceCandles.candle.reduce(\n (acc, candle) => {\n if (!candle) {\n return acc;\n }\n\n return {\n dates: [...acc.dates, candle.point],\n candlesOpen: [...acc.candlesOpen, candle.open],\n candlesClose: [...acc.candlesClose, candle.close],\n candlesLow: [...acc.candlesLow, candle.low],\n candlesHigh: [...acc.candlesHigh, candle.high],\n };\n },\n {\n dates: [] as string[],\n candlesOpen: [] as number[],\n candlesClose: [] as number[],\n candlesLow: [] as number[],\n candlesHigh: [] as number[],\n }\n );\n\n if (dates.length === 0) {\n return errorResult;\n }\n\n const minPrice = Math.min(...candlesLow);\n const maxPrice = Math.max(...candlesHigh);\n\n return {\n minPrice,\n maxPrice,\n candlesOpen,\n candlesClose,\n candlesLow,\n candlesHigh,\n dates: [...dates, new Date().toISOString()],\n hasValidCandles: true,\n pipsLocation: priceCandlesData.priceCandles.pipsLocation,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,mBAAmB,GAC9BC,gBAAkD,IAC/C;EACH,MAAMC,WAAW,GAAG;IAClBC,QAAQ,EAAE,CAAC;IACXC,QAAQ,EAAE,CAAC;IACXC,YAAY,EAAE,CAAC;IACfC,eAAe,EAAE,KAAK;IACtBC,WAAW,EAAE,EAAE;IACfC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE,EAAE;IACdC,WAAW,EAAE,EAAE;IACfC,KAAK,EAAE;EACT,CAAC;EAED,IACE,CAACV,gBAAgB,EAAEW,YAAY,EAAEC,MAAM,EAAEC,MAAM,IAC/C,CAACb,gBAAgB,EAAEW,YAAY,EAAEP,YAAY,EAC7C;IACA,OAAOH,WAAW;EACpB;EAEA,MAAM;IAAES,KAAK;IAAEJ,WAAW;IAAEC,YAAY;IAAEC,UAAU;IAAEC;EAAY,CAAC,GACjET,gBAAgB,CAACW,YAAY,CAACC,MAAM,CAACE,MAAM,CACzC,CAACC,GAAG,EAAEH,MAAM,KAAK;IACf,IAAI,CAACA,MAAM,EAAE;MACX,OAAOG,GAAG;IACZ;IAEA,OAAO;MACLL,KAAK,EAAE,CAAC,GAAGK,GAAG,CAACL,KAAK,EAAEE,MAAM,CAACI,KAAK,CAAC;MACnCV,WAAW,EAAE,CAAC,GAAGS,GAAG,CAACT,WAAW,EAAEM,MAAM,CAACK,IAAI,CAAC;MAC9CV,YAAY,EAAE,CAAC,GAAGQ,GAAG,CAACR,YAAY,EAAEK,MAAM,CAACM,KAAK,CAAC;MACjDV,UAAU,EAAE,CAAC,GAAGO,GAAG,CAACP,UAAU,EAAEI,MAAM,CAACO,GAAG,CAAC;MAC3CV,WAAW,EAAE,CAAC,GAAGM,GAAG,CAACN,WAAW,EAAEG,MAAM,CAACQ,IAAI;IAC/C,CAAC;EACH,CAAC,EACD;IACEV,KAAK,EAAE,EAAc;IACrBJ,WAAW,EAAE,EAAc;IAC3BC,YAAY,EAAE,EAAc;IAC5BC,UAAU,EAAE,EAAc;IAC1BC,WAAW,EAAE;EACf,CACF,CAAC;EAEH,IAAIC,KAAK,CAACG,MAAM,KAAK,CAAC,EAAE;IACtB,OAAOZ,WAAW;EACpB;EAEA,MAAMC,QAAQ,GAAGmB,IAAI,CAACC,GAAG,CAAC,GAAGd,UAAU,CAAC;EACxC,MAAML,QAAQ,GAAGkB,IAAI,CAACE,GAAG,CAAC,GAAGd,WAAW,CAAC;EAEzC,OAAO;IACLP,QAAQ;IACRC,QAAQ;IACRG,WAAW;IACXC,YAAY;IACZC,UAAU;IACVC,WAAW;IACXC,KAAK,EAAE,CAAC,GAAGA,KAAK,EAAE,IAAIc,IAAI,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,CAAC;IAC3CpB,eAAe,EAAE,IAAI;IACrBD,YAAY,EAAEJ,gBAAgB,CAACW,YAAY,CAACP;EAC9C,CAAC;AACH,CAAC;AAACsB,OAAA,CAAA3B,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.processSentiments = void 0;
|
|
7
|
+
const processSentiments = (sentimentsData, dates) => {
|
|
2
8
|
if (!Array.isArray(dates) || dates.length === 0 || !sentimentsData?.sentiments?.sentiments?.length) {
|
|
3
9
|
return {
|
|
4
10
|
sentimentLongs: [],
|
|
@@ -29,4 +35,5 @@ export const processSentiments = (sentimentsData, dates) => {
|
|
|
29
35
|
hasValidSentiments: true
|
|
30
36
|
};
|
|
31
37
|
};
|
|
38
|
+
exports.processSentiments = processSentiments;
|
|
32
39
|
//# sourceMappingURL=processSentiments.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processSentiments.js","names":["processSentiments","sentimentsData","dates","Array","isArray","length","sentiments","sentimentLongs","sentimentShorts","hasValidSentiments","sentimentMap","Map","map","item","time","sentiment","shortPercent","reduce","acc","date","get"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/dataUtils/processSentiments.ts"],"sourcesContent":["import type { GetSentimentsQuery } from '../../../../gql/types/graphql';\n\nexport const processSentiments = (\n sentimentsData: GetSentimentsQuery | undefined,\n dates: string[]\n) => {\n if (\n !Array.isArray(dates) ||\n dates.length === 0 ||\n !sentimentsData?.sentiments?.sentiments?.length\n ) {\n return {\n sentimentLongs: [],\n sentimentShorts: [],\n hasValidSentiments: false,\n };\n }\n\n const sentimentMap = new Map(\n sentimentsData.sentiments.sentiments.map((item) => [\n item?.time,\n {\n sentimentShorts: item?.sentiment?.shortPercent ?? null,\n sentimentLongs: item?.sentiment?.shortPercent\n ? 100 - item?.sentiment?.shortPercent\n : null,\n },\n ])\n );\n\n const { sentimentLongs, sentimentShorts } = dates.reduce(\n (acc, date) => {\n const sentiment = sentimentMap.get(date);\n\n return {\n sentimentLongs: [\n ...acc.sentimentLongs,\n sentiment?.sentimentLongs || null,\n ],\n sentimentShorts: [\n ...acc.sentimentShorts,\n sentiment?.sentimentShorts || null,\n ],\n };\n },\n {\n sentimentLongs: [] as (number | null)[],\n sentimentShorts: [] as (number | null)[],\n }\n );\n\n return {\n sentimentLongs,\n sentimentShorts,\n hasValidSentiments: true,\n };\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"processSentiments.js","names":["processSentiments","sentimentsData","dates","Array","isArray","length","sentiments","sentimentLongs","sentimentShorts","hasValidSentiments","sentimentMap","Map","map","item","time","sentiment","shortPercent","reduce","acc","date","get","exports"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/dataUtils/processSentiments.ts"],"sourcesContent":["import type { GetSentimentsQuery } from '../../../../gql/types/graphql';\n\nexport const processSentiments = (\n sentimentsData: GetSentimentsQuery | undefined,\n dates: string[]\n) => {\n if (\n !Array.isArray(dates) ||\n dates.length === 0 ||\n !sentimentsData?.sentiments?.sentiments?.length\n ) {\n return {\n sentimentLongs: [],\n sentimentShorts: [],\n hasValidSentiments: false,\n };\n }\n\n const sentimentMap = new Map(\n sentimentsData.sentiments.sentiments.map((item) => [\n item?.time,\n {\n sentimentShorts: item?.sentiment?.shortPercent ?? null,\n sentimentLongs: item?.sentiment?.shortPercent\n ? 100 - item?.sentiment?.shortPercent\n : null,\n },\n ])\n );\n\n const { sentimentLongs, sentimentShorts } = dates.reduce(\n (acc, date) => {\n const sentiment = sentimentMap.get(date);\n\n return {\n sentimentLongs: [\n ...acc.sentimentLongs,\n sentiment?.sentimentLongs || null,\n ],\n sentimentShorts: [\n ...acc.sentimentShorts,\n sentiment?.sentimentShorts || null,\n ],\n };\n },\n {\n sentimentLongs: [] as (number | null)[],\n sentimentShorts: [] as (number | null)[],\n }\n );\n\n return {\n sentimentLongs,\n sentimentShorts,\n hasValidSentiments: true,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,iBAAiB,GAAGA,CAC/BC,cAA8C,EAC9CC,KAAe,KACZ;EACH,IACE,CAACC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,IACrBA,KAAK,CAACG,MAAM,KAAK,CAAC,IAClB,CAACJ,cAAc,EAAEK,UAAU,EAAEA,UAAU,EAAED,MAAM,EAC/C;IACA,OAAO;MACLE,cAAc,EAAE,EAAE;MAClBC,eAAe,EAAE,EAAE;MACnBC,kBAAkB,EAAE;IACtB,CAAC;EACH;EAEA,MAAMC,YAAY,GAAG,IAAIC,GAAG,CAC1BV,cAAc,CAACK,UAAU,CAACA,UAAU,CAACM,GAAG,CAAEC,IAAI,IAAK,CACjDA,IAAI,EAAEC,IAAI,EACV;IACEN,eAAe,EAAEK,IAAI,EAAEE,SAAS,EAAEC,YAAY,IAAI,IAAI;IACtDT,cAAc,EAAEM,IAAI,EAAEE,SAAS,EAAEC,YAAY,GACzC,GAAG,GAAGH,IAAI,EAAEE,SAAS,EAAEC,YAAY,GACnC;EACN,CAAC,CACF,CACH,CAAC;EAED,MAAM;IAAET,cAAc;IAAEC;EAAgB,CAAC,GAAGN,KAAK,CAACe,MAAM,CACtD,CAACC,GAAG,EAAEC,IAAI,KAAK;IACb,MAAMJ,SAAS,GAAGL,YAAY,CAACU,GAAG,CAACD,IAAI,CAAC;IAExC,OAAO;MACLZ,cAAc,EAAE,CACd,GAAGW,GAAG,CAACX,cAAc,EACrBQ,SAAS,EAAER,cAAc,IAAI,IAAI,CAClC;MACDC,eAAe,EAAE,CACf,GAAGU,GAAG,CAACV,eAAe,EACtBO,SAAS,EAAEP,eAAe,IAAI,IAAI;IAEtC,CAAC;EACH,CAAC,EACD;IACED,cAAc,EAAE,EAAuB;IACvCC,eAAe,EAAE;EACnB,CACF,CAAC;EAED,OAAO;IACLD,cAAc;IACdC,eAAe;IACfC,kBAAkB,EAAE;EACtB,CAAC;AACH,CAAC;AAACY,OAAA,CAAArB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.validateData = void 0;
|
|
7
|
+
const validateData = (priceCandlesData, orderPositionData, hasValidCandles, hasValidBooks, hasValidSentiments) => {
|
|
2
8
|
const hasValidPriceData = (priceCandlesData?.priceCandles?.candle?.length ?? 0) >= 1;
|
|
3
9
|
const hasValidOrderData = (orderPositionData?.orderPositionBooks?.books?.length ?? 0) >= 1;
|
|
4
10
|
if (!hasValidPriceData) {
|
|
@@ -18,4 +24,5 @@ export const validateData = (priceCandlesData, orderPositionData, hasValidCandle
|
|
|
18
24
|
}
|
|
19
25
|
return null;
|
|
20
26
|
};
|
|
27
|
+
exports.validateData = validateData;
|
|
21
28
|
//# sourceMappingURL=validateData.js.map
|