@pie-lib/graphing-module 1.8.8 → 1.9.1
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/module/index.js +35 -27
- package/module/manifest.json +8 -8
- package/package.json +1 -1
package/module/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {_dll_prop_types, _dll_pie_lib__render_ui, _dll_material_ui__core_styles, _dll_react, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_material_ui__core, _dll_material_ui__core_styles_color_manipulator, _dll_material_ui__icons} from "../../shared-module@^1.5.
|
|
2
|
-
import {_dll_pie_lib__editable_html} from "../../editable-html-module@^3.1
|
|
3
|
-
import {_dll_pie_lib__drag} from "../../drag-module@^1.0.
|
|
4
|
-
import {_dll_pie_lib__config_ui} from "../../config-module@^2.1.
|
|
1
|
+
import {_dll_prop_types, _dll_pie_lib__render_ui, _dll_material_ui__core_styles, _dll_react, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_material_ui__core, _dll_material_ui__core_styles_color_manipulator, _dll_material_ui__icons} from "../../shared-module@^1.5.19/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__editable_html} from "../../editable-html-module@^3.2.1/module/index.js";
|
|
3
|
+
import {_dll_pie_lib__drag} from "../../drag-module@^1.0.71/module/index.js";
|
|
4
|
+
import {_dll_pie_lib__config_ui} from "../../config-module@^2.1.19/module/index.js";
|
|
5
5
|
const PropTypes$D = _dll_prop_types;
|
|
6
6
|
const BaseDomainRangeType = {
|
|
7
7
|
min: PropTypes$D.number.isRequired,
|
|
@@ -828,14 +828,14 @@ const {withStyles: withStyles$m} = _dll_material_ui__core_styles;
|
|
|
828
828
|
const EditableHtml$2 = _dll_pie_lib__editable_html;
|
|
829
829
|
const _jsxFileName$x = "/home/circleci/repo/packages/plot/src/label.jsx";
|
|
830
830
|
const LabelComponent = props => {
|
|
831
|
-
const {classes, disabledLabel, graphHeight, graphWidth, isChartBottomLabel, isChartLeftLabel, placeholder, text, side, onChange} = props;
|
|
831
|
+
const {classes, disabledLabel, graphHeight, graphWidth, isChartBottomLabel, isDefineChartBottomLabel, isChartLeftLabel, isDefineChartLeftLabel, placeholder, text, side, onChange} = props;
|
|
832
832
|
const [rotatedToHorizontal, setRotatedToHorizontal] = useState$2(false);
|
|
833
833
|
const activePlugins = ['bold', 'italic', 'underline', 'strikethrough', 'math'];
|
|
834
|
-
const chartValue = side === 'left' &&
|
|
834
|
+
const chartValue = side === 'left' && isDefineChartLeftLabel && graphHeight - 220;
|
|
835
835
|
const defaultStyle = {
|
|
836
836
|
width: chartValue || (side === 'left' || side === 'right' ? graphHeight - 8 : graphWidth - 8),
|
|
837
|
-
top: chartValue || side === 'left' && `${graphHeight - 8}px` || side === 'bottom' && `${graphHeight - 90}px` || 0,
|
|
838
|
-
left: side === 'right' && `${graphWidth - 8}px` || (
|
|
837
|
+
top: chartValue || isChartLeftLabel && `${graphHeight - 70}px` || side === 'left' && `${graphHeight - 8}px` || isChartBottomLabel && `${graphHeight - 40}px` || side === 'bottom' && `${graphHeight - 90}px` || 0,
|
|
838
|
+
left: side === 'right' && `${graphWidth - 8}px` || (isDefineChartLeftLabel || isDefineChartBottomLabel) && '40px' || isChartBottomLabel && '-10px' || 0
|
|
839
839
|
};
|
|
840
840
|
const rotatedStyle = {
|
|
841
841
|
width: graphWidth - 8,
|
|
@@ -848,21 +848,21 @@ const LabelComponent = props => {
|
|
|
848
848
|
__self: undefined,
|
|
849
849
|
__source: {
|
|
850
850
|
fileName: _jsxFileName$x,
|
|
851
|
-
lineNumber:
|
|
851
|
+
lineNumber: 59
|
|
852
852
|
}
|
|
853
853
|
}, React$F.createElement('div', {
|
|
854
854
|
className: cn$4(classes.axisLabel, {
|
|
855
855
|
[classes.rotateLeftLabel]: side === 'left' && !rotatedToHorizontal,
|
|
856
856
|
[classes.rotateRightLabel]: side === 'right' && !rotatedToHorizontal,
|
|
857
857
|
[classes.editLabel]: rotatedToHorizontal,
|
|
858
|
-
[classes.customBottom]: isChartBottomLabel
|
|
858
|
+
[classes.customBottom]: isChartBottomLabel || isDefineChartBottomLabel
|
|
859
859
|
}),
|
|
860
860
|
style: rotatedToHorizontal ? rotatedStyle : defaultStyle,
|
|
861
861
|
onClick: rotateLabel,
|
|
862
862
|
__self: undefined,
|
|
863
863
|
__source: {
|
|
864
864
|
fileName: _jsxFileName$x,
|
|
865
|
-
lineNumber:
|
|
865
|
+
lineNumber: 60
|
|
866
866
|
}
|
|
867
867
|
}, disabledLabel ? React$F.createElement('div', {
|
|
868
868
|
className: classes.disabledLabel,
|
|
@@ -872,7 +872,7 @@ const LabelComponent = props => {
|
|
|
872
872
|
__self: undefined,
|
|
873
873
|
__source: {
|
|
874
874
|
fileName: _jsxFileName$x,
|
|
875
|
-
lineNumber:
|
|
875
|
+
lineNumber: 71
|
|
876
876
|
}
|
|
877
877
|
}) : React$F.createElement(EditableHtml$2, {
|
|
878
878
|
markup: text || '',
|
|
@@ -888,7 +888,7 @@ const LabelComponent = props => {
|
|
|
888
888
|
__self: undefined,
|
|
889
889
|
__source: {
|
|
890
890
|
fileName: _jsxFileName$x,
|
|
891
|
-
lineNumber:
|
|
891
|
+
lineNumber: 73
|
|
892
892
|
}
|
|
893
893
|
})));
|
|
894
894
|
};
|
|
@@ -1029,7 +1029,7 @@ class Root$1 extends React$E.Component {
|
|
|
1029
1029
|
const finalWidth = width + leftPadding * 2 + (domain.padding || 0) * 2;
|
|
1030
1030
|
const finalHeight = height + topPadding * 2 + (range.padding || 0) * 2;
|
|
1031
1031
|
const activeTitlePlugins = ['bold', 'italic', 'underline', 'strikethrough', 'math'];
|
|
1032
|
-
const actualHeight = defineChart && showPixelGuides ? height -
|
|
1032
|
+
const actualHeight = defineChart && showPixelGuides ? height - 160 : height;
|
|
1033
1033
|
const nbOfVerticalLines = parseInt(width / 100);
|
|
1034
1034
|
const nbOfHorizontalLines = parseInt(actualHeight / 100);
|
|
1035
1035
|
const sideGridlinesPadding = parseInt(actualHeight % 100);
|
|
@@ -1078,6 +1078,9 @@ class Root$1 extends React$E.Component {
|
|
|
1078
1078
|
lineNumber: 131
|
|
1079
1079
|
}
|
|
1080
1080
|
}, "|"))))), showTitle && (disabledTitle ? React$E.createElement('div', {
|
|
1081
|
+
style: isChart && ({
|
|
1082
|
+
width: finalWidth
|
|
1083
|
+
}),
|
|
1081
1084
|
className: cn$3(classes.graphTitle, classes.disabledTitle),
|
|
1082
1085
|
dangerouslySetInnerHTML: {
|
|
1083
1086
|
__html: title || ''
|
|
@@ -1088,6 +1091,9 @@ class Root$1 extends React$E.Component {
|
|
|
1088
1091
|
lineNumber: 139
|
|
1089
1092
|
}
|
|
1090
1093
|
}) : React$E.createElement(EditableHtml$1, {
|
|
1094
|
+
style: isChart && ({
|
|
1095
|
+
width: finalWidth
|
|
1096
|
+
}),
|
|
1091
1097
|
className: cn$3({
|
|
1092
1098
|
[classes.rightMargin]: showPixelGuides
|
|
1093
1099
|
}, classes.graphTitle),
|
|
@@ -1102,7 +1108,7 @@ class Root$1 extends React$E.Component {
|
|
|
1102
1108
|
__self: this,
|
|
1103
1109
|
__source: {
|
|
1104
1110
|
fileName: _jsxFileName$w,
|
|
1105
|
-
lineNumber:
|
|
1111
|
+
lineNumber: 149
|
|
1106
1112
|
}
|
|
1107
1113
|
})), showLabels && !isChart && React$E.createElement(Label$1, {
|
|
1108
1114
|
side: "top",
|
|
@@ -1115,14 +1121,14 @@ class Root$1 extends React$E.Component {
|
|
|
1115
1121
|
__self: this,
|
|
1116
1122
|
__source: {
|
|
1117
1123
|
fileName: _jsxFileName$w,
|
|
1118
|
-
lineNumber:
|
|
1124
|
+
lineNumber: 168
|
|
1119
1125
|
}
|
|
1120
1126
|
}), React$E.createElement('div', {
|
|
1121
1127
|
className: classes.wrapper,
|
|
1122
1128
|
__self: this,
|
|
1123
1129
|
__source: {
|
|
1124
1130
|
fileName: _jsxFileName$w,
|
|
1125
|
-
lineNumber:
|
|
1131
|
+
lineNumber: 178
|
|
1126
1132
|
}
|
|
1127
1133
|
}, showLabels && React$E.createElement(Label$1, {
|
|
1128
1134
|
side: "left",
|
|
@@ -1131,12 +1137,13 @@ class Root$1 extends React$E.Component {
|
|
|
1131
1137
|
placeholder: _optionalChain$1([labelsPlaceholders, 'optionalAccess', _2 => _2.left]),
|
|
1132
1138
|
graphHeight: finalHeight,
|
|
1133
1139
|
graphWidth: finalWidth,
|
|
1134
|
-
isChartLeftLabel: isChart && defineChart,
|
|
1140
|
+
isChartLeftLabel: isChart && !defineChart,
|
|
1141
|
+
isDefineChartLeftLabel: isChart && defineChart,
|
|
1135
1142
|
onChange: value => this.onChangeLabel(value, 'left'),
|
|
1136
1143
|
__self: this,
|
|
1137
1144
|
__source: {
|
|
1138
1145
|
fileName: _jsxFileName$w,
|
|
1139
|
-
lineNumber:
|
|
1146
|
+
lineNumber: 180
|
|
1140
1147
|
}
|
|
1141
1148
|
}), React$E.createElement('svg', {
|
|
1142
1149
|
width: finalWidth,
|
|
@@ -1145,7 +1152,7 @@ class Root$1 extends React$E.Component {
|
|
|
1145
1152
|
__self: this,
|
|
1146
1153
|
__source: {
|
|
1147
1154
|
fileName: _jsxFileName$w,
|
|
1148
|
-
lineNumber:
|
|
1155
|
+
lineNumber: 192
|
|
1149
1156
|
}
|
|
1150
1157
|
}, React$E.createElement('g', {
|
|
1151
1158
|
ref: r => {
|
|
@@ -1159,7 +1166,7 @@ class Root$1 extends React$E.Component {
|
|
|
1159
1166
|
__self: this,
|
|
1160
1167
|
__source: {
|
|
1161
1168
|
fileName: _jsxFileName$w,
|
|
1162
|
-
lineNumber:
|
|
1169
|
+
lineNumber: 197
|
|
1163
1170
|
}
|
|
1164
1171
|
}, children)), showLabels && !isChart && React$E.createElement(Label$1, {
|
|
1165
1172
|
side: "right",
|
|
@@ -1172,7 +1179,7 @@ class Root$1 extends React$E.Component {
|
|
|
1172
1179
|
__self: this,
|
|
1173
1180
|
__source: {
|
|
1174
1181
|
fileName: _jsxFileName$w,
|
|
1175
|
-
lineNumber:
|
|
1182
|
+
lineNumber: 211
|
|
1176
1183
|
}
|
|
1177
1184
|
}), showPixelGuides && React$E.createElement('div', {
|
|
1178
1185
|
className: classes.sidePixelGuides,
|
|
@@ -1183,7 +1190,7 @@ class Root$1 extends React$E.Component {
|
|
|
1183
1190
|
__self: this,
|
|
1184
1191
|
__source: {
|
|
1185
1192
|
fileName: _jsxFileName$w,
|
|
1186
|
-
lineNumber:
|
|
1193
|
+
lineNumber: 222
|
|
1187
1194
|
}
|
|
1188
1195
|
}, [...Array(nbOfHorizontalLines + 1).keys()].reverse().map(value => React$E.createElement(Readable$2, {
|
|
1189
1196
|
false: true,
|
|
@@ -1191,14 +1198,14 @@ class Root$1 extends React$E.Component {
|
|
|
1191
1198
|
__self: this,
|
|
1192
1199
|
__source: {
|
|
1193
1200
|
fileName: _jsxFileName$w,
|
|
1194
|
-
lineNumber:
|
|
1201
|
+
lineNumber: 230
|
|
1195
1202
|
}
|
|
1196
1203
|
}, React$E.createElement('div', {
|
|
1197
1204
|
className: classes.sidePixelIndicator,
|
|
1198
1205
|
__self: this,
|
|
1199
1206
|
__source: {
|
|
1200
1207
|
fileName: _jsxFileName$w,
|
|
1201
|
-
lineNumber:
|
|
1208
|
+
lineNumber: 231
|
|
1202
1209
|
}
|
|
1203
1210
|
}, "━ ", value * 100, "px"))))), showLabels && React$E.createElement(Label$1, {
|
|
1204
1211
|
side: "bottom",
|
|
@@ -1207,12 +1214,13 @@ class Root$1 extends React$E.Component {
|
|
|
1207
1214
|
placeholder: _optionalChain$1([labelsPlaceholders, 'optionalAccess', _4 => _4.bottom]),
|
|
1208
1215
|
graphHeight: finalHeight,
|
|
1209
1216
|
graphWidth: finalWidth,
|
|
1210
|
-
isChartBottomLabel: isChart && defineChart,
|
|
1217
|
+
isChartBottomLabel: isChart && !defineChart,
|
|
1218
|
+
isDefineChartBottomLabel: isChart && defineChart,
|
|
1211
1219
|
onChange: value => this.onChangeLabel(value, 'bottom'),
|
|
1212
1220
|
__self: this,
|
|
1213
1221
|
__source: {
|
|
1214
1222
|
fileName: _jsxFileName$w,
|
|
1215
|
-
lineNumber:
|
|
1223
|
+
lineNumber: 238
|
|
1216
1224
|
}
|
|
1217
1225
|
}));
|
|
1218
1226
|
}
|
package/module/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/graphing-module",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"mappings": {
|
|
5
5
|
"@pie-lib/plot": "_dll_pie_lib__plot",
|
|
6
6
|
"@pie-lib/graphing": "_dll_pie_lib__graphing",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"versionInfo": {
|
|
11
11
|
"data": {
|
|
12
12
|
"@pie-lib/plot": {
|
|
13
|
-
"version": "2.
|
|
13
|
+
"version": "2.5.0"
|
|
14
14
|
},
|
|
15
15
|
"@pie-lib/graphing": {
|
|
16
|
-
"version": "2.
|
|
16
|
+
"version": "2.11.0"
|
|
17
17
|
},
|
|
18
18
|
"d3-scale": {
|
|
19
19
|
"version": "2.2.2"
|
|
@@ -22,24 +22,24 @@
|
|
|
22
22
|
"version": "1.4.2"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
"hash": "
|
|
25
|
+
"hash": "9bead60a43127f1232f4ac87ffa004e649c3f21c"
|
|
26
26
|
},
|
|
27
27
|
"modules": [
|
|
28
28
|
{
|
|
29
29
|
"name": "@pie-lib/shared-module",
|
|
30
|
-
"version": "^1.5.
|
|
30
|
+
"version": "^1.5.19"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"name": "@pie-lib/editable-html-module",
|
|
34
|
-
"version": "^3.1
|
|
34
|
+
"version": "^3.2.1"
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"name": "@pie-lib/drag-module",
|
|
38
|
-
"version": "^1.0.
|
|
38
|
+
"version": "^1.0.71"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"name": "@pie-lib/config-module",
|
|
42
|
-
"version": "^2.1.
|
|
42
|
+
"version": "^2.1.19"
|
|
43
43
|
}
|
|
44
44
|
],
|
|
45
45
|
"isLocal": true
|