ag-common 0.0.717 → 0.0.719
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.
|
@@ -9,7 +9,12 @@ function loadCsvAsJson(p) {
|
|
|
9
9
|
if (lines[0].split(',').length === 1 && lines[0].split(';').length > 1) {
|
|
10
10
|
sep = ';';
|
|
11
11
|
}
|
|
12
|
-
const headers = lines[0]
|
|
12
|
+
const headers = lines[0]
|
|
13
|
+
.split(sep)
|
|
14
|
+
.map((s) => {
|
|
15
|
+
var _a, _b, _c;
|
|
16
|
+
return [s, (_c = (_b = (_a = p.opt) === null || _a === void 0 ? void 0 : _a.typeOverrides) === null || _b === void 0 ? void 0 : _b.find((s1) => s1.headerName === s)) === null || _c === void 0 ? void 0 : _c.type];
|
|
17
|
+
});
|
|
13
18
|
const jsonData = lines.slice(1).map((line) => {
|
|
14
19
|
const values = [];
|
|
15
20
|
let inQuote = false;
|
|
@@ -33,13 +38,17 @@ function loadCsvAsJson(p) {
|
|
|
33
38
|
if (v === '-') {
|
|
34
39
|
//ignore
|
|
35
40
|
}
|
|
36
|
-
else if (
|
|
41
|
+
else if (headers[i][1] === 'string') {
|
|
42
|
+
//@ts-ignore
|
|
43
|
+
obj[headers[i][0]] = v.toString();
|
|
44
|
+
}
|
|
45
|
+
else if (headers[i][1] === 'number' || (0, math_1.isNumber)(v)) {
|
|
37
46
|
//@ts-ignore
|
|
38
|
-
obj[headers[i]] = Number(v);
|
|
47
|
+
obj[headers[i][0]] = Number(v);
|
|
39
48
|
}
|
|
40
49
|
else {
|
|
41
50
|
//@ts-ignore
|
|
42
|
-
obj[headers[i]] = v;
|
|
51
|
+
obj[headers[i][0]] = v;
|
|
43
52
|
}
|
|
44
53
|
}
|
|
45
54
|
return obj;
|
|
@@ -32,7 +32,7 @@ const react_1 = __importStar(require("react"));
|
|
|
32
32
|
const react_dom_1 = require("react-dom");
|
|
33
33
|
const Base = styled_1.default.div `
|
|
34
34
|
position: absolute;
|
|
35
|
-
z-index:
|
|
35
|
+
z-index: 10;
|
|
36
36
|
`;
|
|
37
37
|
const Comp = ({ pos, children, }) => {
|
|
38
38
|
const ref = (0, react_1.createRef)();
|
|
@@ -72,6 +72,9 @@ const Comp = ({ pos, children, }) => {
|
|
|
72
72
|
if (pos.hasParent) {
|
|
73
73
|
top = undefined;
|
|
74
74
|
}
|
|
75
|
+
else {
|
|
76
|
+
top = pos.parentHeight - size.tooltipHeight;
|
|
77
|
+
}
|
|
75
78
|
bottom = pos.parentHeight - pos.y;
|
|
76
79
|
}
|
|
77
80
|
if (right && right + size.tooltipWidth > pos.parentWidth) {
|
|
@@ -90,7 +93,7 @@ const Comp = ({ pos, children, }) => {
|
|
|
90
93
|
const Content = (react_1.default.createElement(Base, { "data-type": "tooltip-content", ref: ref, style: Object.assign(Object.assign({ left,
|
|
91
94
|
right,
|
|
92
95
|
top,
|
|
93
|
-
bottom
|
|
96
|
+
bottom }, (!pos.hasParent && { position: 'fixed' })), (!size && { zIndex: -1 })) }, children(pos, size)));
|
|
94
97
|
const e = document.querySelector(`#${pos.portalId}`);
|
|
95
98
|
if (!pos.hasParent && e) {
|
|
96
99
|
return (0, react_dom_1.createPortal)(Content, e);
|
package/package.json
CHANGED