@oanda/labs-currency-power-balance-widget 1.0.157 → 1.0.158
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 +636 -0
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/Chart.js +3 -10
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/Chart.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/getOption.js +21 -3
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/getOption.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/index.js +0 -11
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/index.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/Chart.js +3 -11
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/Chart.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/getOption.js +23 -5
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/getOption.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/index.js +0 -1
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/index.js.map +1 -1
- package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/getOption.d.ts +104 -1
- package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/index.d.ts +0 -1
- package/package.json +5 -5
- package/src/CurrencyPowerBalanceWidget/components/Chart/Chart.tsx +3 -17
- package/src/CurrencyPowerBalanceWidget/components/Chart/options/getOption.ts +36 -2
- package/src/CurrencyPowerBalanceWidget/components/Chart/options/index.ts +0 -1
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.js +0 -36
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.js.map +0 -1
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.js +0 -30
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.js.map +0 -1
- package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.d.ts +0 -110
- package/src/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.ts +0 -48
package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { getGridLines } from '@oanda/labs-widget-common';
|
|
2
|
-
import { CHART_HEIGHT, CHART_WIDTH, LEGEND_HEIGHT, LEGEND_HEIGHT_MOBILE, X_LABEL_SIZE, X_LABEL_SIZE_MOBILE, Y_LABEL_SIZE, Y_LABEL_SIZE_MOBILE } from './constants';
|
|
3
|
-
const getResponsiveOption = (isDesktop, isMobile, isDark) => {
|
|
4
|
-
const baseGridLines = getGridLines({
|
|
5
|
-
isDark,
|
|
6
|
-
chartWidth: CHART_WIDTH,
|
|
7
|
-
chartHeight: CHART_HEIGHT,
|
|
8
|
-
xLabelsSize: isMobile ? X_LABEL_SIZE_MOBILE : X_LABEL_SIZE,
|
|
9
|
-
yLabelSize: isMobile ? Y_LABEL_SIZE_MOBILE : Y_LABEL_SIZE,
|
|
10
|
-
bottomLeftBox: false,
|
|
11
|
-
marginBottom: isMobile ? LEGEND_HEIGHT_MOBILE : LEGEND_HEIGHT
|
|
12
|
-
});
|
|
13
|
-
return {
|
|
14
|
-
yAxis: {
|
|
15
|
-
axisLabel: {
|
|
16
|
-
margin: isDesktop ? 8 : 6
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
grid: [{
|
|
20
|
-
name: 'main-grid',
|
|
21
|
-
top: '0px',
|
|
22
|
-
left: '0px',
|
|
23
|
-
right: `${isMobile ? Y_LABEL_SIZE_MOBILE : Y_LABEL_SIZE}px`,
|
|
24
|
-
bottom: `${isMobile ? X_LABEL_SIZE_MOBILE : X_LABEL_SIZE}px`
|
|
25
|
-
}],
|
|
26
|
-
graphic: [...baseGridLines]
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export { getResponsiveOption };
|
|
30
|
-
//# sourceMappingURL=getResponsiveOption.js.map
|
package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getResponsiveOption.js","names":["getGridLines","CHART_HEIGHT","CHART_WIDTH","LEGEND_HEIGHT","LEGEND_HEIGHT_MOBILE","X_LABEL_SIZE","X_LABEL_SIZE_MOBILE","Y_LABEL_SIZE","Y_LABEL_SIZE_MOBILE","getResponsiveOption","isDesktop","isMobile","isDark","baseGridLines","chartWidth","chartHeight","xLabelsSize","yLabelSize","bottomLeftBox","marginBottom","yAxis","axisLabel","margin","grid","name","top","left","right","bottom","graphic"],"sources":["../../../../../../src/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.ts"],"sourcesContent":["import { getGridLines } from '@oanda/labs-widget-common';\n\nimport {\n CHART_HEIGHT,\n CHART_WIDTH,\n LEGEND_HEIGHT,\n LEGEND_HEIGHT_MOBILE,\n X_LABEL_SIZE,\n X_LABEL_SIZE_MOBILE,\n Y_LABEL_SIZE,\n Y_LABEL_SIZE_MOBILE,\n} from './constants';\n\nconst getResponsiveOption = (\n isDesktop: boolean,\n isMobile: boolean,\n isDark: boolean\n) => {\n const baseGridLines = getGridLines({\n isDark,\n chartWidth: CHART_WIDTH,\n chartHeight: CHART_HEIGHT,\n xLabelsSize: isMobile ? X_LABEL_SIZE_MOBILE : X_LABEL_SIZE,\n yLabelSize: isMobile ? Y_LABEL_SIZE_MOBILE : Y_LABEL_SIZE,\n bottomLeftBox: false,\n marginBottom: isMobile ? LEGEND_HEIGHT_MOBILE : LEGEND_HEIGHT,\n });\n\n return {\n yAxis: {\n axisLabel: {\n margin: isDesktop ? 8 : 6,\n },\n },\n grid: [\n {\n name: 'main-grid',\n top: '0px',\n left: '0px',\n right: `${isMobile ? Y_LABEL_SIZE_MOBILE : Y_LABEL_SIZE}px`,\n bottom: `${isMobile ? X_LABEL_SIZE_MOBILE : X_LABEL_SIZE}px`,\n },\n ],\n graphic: [...baseGridLines],\n };\n};\n\nexport { getResponsiveOption };\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,2BAA2B;AAExD,SACEC,YAAY,EACZC,WAAW,EACXC,aAAa,EACbC,oBAAoB,EACpBC,YAAY,EACZC,mBAAmB,EACnBC,YAAY,EACZC,mBAAmB,QACd,aAAa;AAEpB,MAAMC,mBAAmB,GAAGA,CAC1BC,SAAkB,EAClBC,QAAiB,EACjBC,MAAe,KACZ;EACH,MAAMC,aAAa,GAAGb,YAAY,CAAC;IACjCY,MAAM;IACNE,UAAU,EAAEZ,WAAW;IACvBa,WAAW,EAAEd,YAAY;IACzBe,WAAW,EAAEL,QAAQ,GAAGL,mBAAmB,GAAGD,YAAY;IAC1DY,UAAU,EAAEN,QAAQ,GAAGH,mBAAmB,GAAGD,YAAY;IACzDW,aAAa,EAAE,KAAK;IACpBC,YAAY,EAAER,QAAQ,GAAGP,oBAAoB,GAAGD;EAClD,CAAC,CAAC;EAEF,OAAO;IACLiB,KAAK,EAAE;MACLC,SAAS,EAAE;QACTC,MAAM,EAAEZ,SAAS,GAAG,CAAC,GAAG;MAC1B;IACF,CAAC;IACDa,IAAI,EAAE,CACJ;MACEC,IAAI,EAAE,WAAW;MACjBC,GAAG,EAAE,KAAK;MACVC,IAAI,EAAE,KAAK;MACXC,KAAK,EAAE,GAAGhB,QAAQ,GAAGH,mBAAmB,GAAGD,YAAY,IAAI;MAC3DqB,MAAM,EAAE,GAAGjB,QAAQ,GAAGL,mBAAmB,GAAGD,YAAY;IAC1D,CAAC,CACF;IACDwB,OAAO,EAAE,CAAC,GAAGhB,aAAa;EAC5B,CAAC;AACH,CAAC;AAED,SAASJ,mBAAmB","ignoreList":[]}
|
package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.d.ts
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
declare const getResponsiveOption: (isDesktop: boolean, isMobile: boolean, isDark: boolean) => {
|
|
2
|
-
yAxis: {
|
|
3
|
-
axisLabel: {
|
|
4
|
-
margin: number;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
7
|
-
grid: {
|
|
8
|
-
name: string;
|
|
9
|
-
top: string;
|
|
10
|
-
left: string;
|
|
11
|
-
right: string;
|
|
12
|
-
bottom: string;
|
|
13
|
-
}[];
|
|
14
|
-
graphic: ({
|
|
15
|
-
top: number | undefined;
|
|
16
|
-
bottom: number | undefined;
|
|
17
|
-
left: number | undefined;
|
|
18
|
-
right: number | undefined;
|
|
19
|
-
shape: {
|
|
20
|
-
x1: number;
|
|
21
|
-
y1: number;
|
|
22
|
-
x2: number;
|
|
23
|
-
y2: number;
|
|
24
|
-
};
|
|
25
|
-
type: string;
|
|
26
|
-
silent: boolean;
|
|
27
|
-
z: number;
|
|
28
|
-
style: {
|
|
29
|
-
stroke: string;
|
|
30
|
-
lineWidth: number;
|
|
31
|
-
};
|
|
32
|
-
} | {
|
|
33
|
-
top: number;
|
|
34
|
-
shape: {
|
|
35
|
-
x1: number;
|
|
36
|
-
y1: number;
|
|
37
|
-
x2: number;
|
|
38
|
-
y2: number;
|
|
39
|
-
};
|
|
40
|
-
type: string;
|
|
41
|
-
silent: boolean;
|
|
42
|
-
z: number;
|
|
43
|
-
style: {
|
|
44
|
-
stroke: string;
|
|
45
|
-
lineWidth: number;
|
|
46
|
-
};
|
|
47
|
-
} | {
|
|
48
|
-
right: number;
|
|
49
|
-
shape: {
|
|
50
|
-
x1: number;
|
|
51
|
-
y1: number;
|
|
52
|
-
x2: number;
|
|
53
|
-
y2: number;
|
|
54
|
-
};
|
|
55
|
-
type: string;
|
|
56
|
-
silent: boolean;
|
|
57
|
-
z: number;
|
|
58
|
-
style: {
|
|
59
|
-
stroke: string;
|
|
60
|
-
lineWidth: number;
|
|
61
|
-
};
|
|
62
|
-
} | {
|
|
63
|
-
bottom: number;
|
|
64
|
-
shape: {
|
|
65
|
-
x1: number;
|
|
66
|
-
y1: number;
|
|
67
|
-
x2: number;
|
|
68
|
-
y2: number;
|
|
69
|
-
};
|
|
70
|
-
type: string;
|
|
71
|
-
silent: boolean;
|
|
72
|
-
z: number;
|
|
73
|
-
style: {
|
|
74
|
-
stroke: string;
|
|
75
|
-
lineWidth: number;
|
|
76
|
-
};
|
|
77
|
-
} | {
|
|
78
|
-
left: number;
|
|
79
|
-
shape: {
|
|
80
|
-
x1: number;
|
|
81
|
-
y1: number;
|
|
82
|
-
x2: number;
|
|
83
|
-
y2: number;
|
|
84
|
-
};
|
|
85
|
-
type: string;
|
|
86
|
-
silent: boolean;
|
|
87
|
-
z: number;
|
|
88
|
-
style: {
|
|
89
|
-
stroke: string;
|
|
90
|
-
lineWidth: number;
|
|
91
|
-
};
|
|
92
|
-
} | {
|
|
93
|
-
right: number;
|
|
94
|
-
bottom: number;
|
|
95
|
-
shape: {
|
|
96
|
-
x1: number;
|
|
97
|
-
y1: number;
|
|
98
|
-
x2: number;
|
|
99
|
-
y2: number;
|
|
100
|
-
};
|
|
101
|
-
type: string;
|
|
102
|
-
silent: boolean;
|
|
103
|
-
z: number;
|
|
104
|
-
style: {
|
|
105
|
-
stroke: string;
|
|
106
|
-
lineWidth: number;
|
|
107
|
-
};
|
|
108
|
-
})[];
|
|
109
|
-
};
|
|
110
|
-
export { getResponsiveOption };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { getGridLines } from '@oanda/labs-widget-common';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
CHART_HEIGHT,
|
|
5
|
-
CHART_WIDTH,
|
|
6
|
-
LEGEND_HEIGHT,
|
|
7
|
-
LEGEND_HEIGHT_MOBILE,
|
|
8
|
-
X_LABEL_SIZE,
|
|
9
|
-
X_LABEL_SIZE_MOBILE,
|
|
10
|
-
Y_LABEL_SIZE,
|
|
11
|
-
Y_LABEL_SIZE_MOBILE,
|
|
12
|
-
} from './constants';
|
|
13
|
-
|
|
14
|
-
const getResponsiveOption = (
|
|
15
|
-
isDesktop: boolean,
|
|
16
|
-
isMobile: boolean,
|
|
17
|
-
isDark: boolean
|
|
18
|
-
) => {
|
|
19
|
-
const baseGridLines = getGridLines({
|
|
20
|
-
isDark,
|
|
21
|
-
chartWidth: CHART_WIDTH,
|
|
22
|
-
chartHeight: CHART_HEIGHT,
|
|
23
|
-
xLabelsSize: isMobile ? X_LABEL_SIZE_MOBILE : X_LABEL_SIZE,
|
|
24
|
-
yLabelSize: isMobile ? Y_LABEL_SIZE_MOBILE : Y_LABEL_SIZE,
|
|
25
|
-
bottomLeftBox: false,
|
|
26
|
-
marginBottom: isMobile ? LEGEND_HEIGHT_MOBILE : LEGEND_HEIGHT,
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
return {
|
|
30
|
-
yAxis: {
|
|
31
|
-
axisLabel: {
|
|
32
|
-
margin: isDesktop ? 8 : 6,
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
grid: [
|
|
36
|
-
{
|
|
37
|
-
name: 'main-grid',
|
|
38
|
-
top: '0px',
|
|
39
|
-
left: '0px',
|
|
40
|
-
right: `${isMobile ? Y_LABEL_SIZE_MOBILE : Y_LABEL_SIZE}px`,
|
|
41
|
-
bottom: `${isMobile ? X_LABEL_SIZE_MOBILE : X_LABEL_SIZE}px`,
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
graphic: [...baseGridLines],
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export { getResponsiveOption };
|