capibara 1.3.39 → 1.3.40
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/dist/cuarteles.html +1 -1
- package/dist/index.html +1 -1
- package/dist/index.js +109 -24421
- package/dist/minimal.html +1 -1
- package/package.json +1 -1
- package/src/scss/layout/_nav.scss +40 -5
- package/src/util/tableElements.js +39 -4
package/dist/minimal.html
CHANGED
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
<script src="config_minimal.js"></script>
|
|
15
15
|
<script src="data_minimal.js"></script>
|
|
16
16
|
<script src="app_minimal.js"></script>
|
|
17
|
-
<script type="text/javascript" src="
|
|
17
|
+
<script type="text/javascript" src="/index.js"></script></body>
|
|
18
18
|
|
|
19
19
|
</html>
|
package/package.json
CHANGED
|
@@ -323,7 +323,16 @@
|
|
|
323
323
|
|
|
324
324
|
&.full-width {
|
|
325
325
|
flex: 1 0 auto;
|
|
326
|
-
display:
|
|
326
|
+
display: flex;
|
|
327
|
+
z-index: 2;
|
|
328
|
+
min-width: calc(
|
|
329
|
+
var(--nav-width) + var(--ex-nav-width) +
|
|
330
|
+
var(--initial-nav-width) + var(--btn-nav-width) - 40px
|
|
331
|
+
);
|
|
332
|
+
width: calc(
|
|
333
|
+
var(--nav-width) + var(--ex-nav-width) +
|
|
334
|
+
var(--initial-nav-width) + var(--btn-nav-width) - 40px
|
|
335
|
+
);
|
|
327
336
|
}
|
|
328
337
|
|
|
329
338
|
&.clickeable {
|
|
@@ -339,12 +348,39 @@
|
|
|
339
348
|
background: rgba(100, 100, 100, 0.2) !important;
|
|
340
349
|
}
|
|
341
350
|
}
|
|
351
|
+
|
|
352
|
+
.item-title-content {
|
|
353
|
+
flex: 1 1 auto;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.detail-btn-container {
|
|
357
|
+
flex: 0 0 auto;
|
|
358
|
+
width: auto;
|
|
359
|
+
text-align: right;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.detail-btn {
|
|
363
|
+
margin-left: 2rem;
|
|
364
|
+
height: 24px;
|
|
365
|
+
line-height: 1rem;
|
|
366
|
+
background: transparent;
|
|
367
|
+
border: 1px solid currentColor;
|
|
368
|
+
color: currentColor;
|
|
369
|
+
font-size: 0.875em;
|
|
370
|
+
padding: 4px 8px;
|
|
371
|
+
border-radius: 3px;
|
|
372
|
+
cursor: pointer;
|
|
373
|
+
z-index: 10;
|
|
374
|
+
&:hover {
|
|
375
|
+
background: rgba(100, 100, 100, 0.2) !important;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
342
378
|
}
|
|
343
379
|
}
|
|
344
380
|
}
|
|
345
381
|
}
|
|
346
382
|
|
|
347
|
-
.multibuttons-btn{
|
|
383
|
+
.multibuttons-btn {
|
|
348
384
|
background: transparent;
|
|
349
385
|
border: none;
|
|
350
386
|
color: rgb(153, 153, 153);
|
|
@@ -356,11 +392,10 @@
|
|
|
356
392
|
flex-direction: row;
|
|
357
393
|
align-items: center;
|
|
358
394
|
justify-content: center;
|
|
359
|
-
&:hover{
|
|
395
|
+
&:hover {
|
|
360
396
|
background: rgba(100, 100, 100, 0.2);
|
|
361
397
|
}
|
|
362
|
-
}
|
|
363
|
-
|
|
398
|
+
}
|
|
364
399
|
}
|
|
365
400
|
|
|
366
401
|
/*
|
|
@@ -1009,6 +1009,15 @@ export default {
|
|
|
1009
1009
|
config.data.forEach((d) => {
|
|
1010
1010
|
if (d.isHidden) return;
|
|
1011
1011
|
|
|
1012
|
+
const hasBtn = !!d.onClickDetailButton;
|
|
1013
|
+
const detailBtn = hasBtn
|
|
1014
|
+
? `<button class="detail-btn" item-id="${d.id || -1}" type-node="${
|
|
1015
|
+
d.type || ""
|
|
1016
|
+
}" >
|
|
1017
|
+
${d.labelDetailButton}
|
|
1018
|
+
</button>`
|
|
1019
|
+
: "";
|
|
1020
|
+
|
|
1012
1021
|
navList += `
|
|
1013
1022
|
<div class="nav-item">
|
|
1014
1023
|
|
|
@@ -1030,7 +1039,12 @@ export default {
|
|
|
1030
1039
|
${d.navOver ? "hoverable" : ""} " item-id="${
|
|
1031
1040
|
d.id || -1
|
|
1032
1041
|
}" type-node="${d.type || ""}" >
|
|
1033
|
-
|
|
1042
|
+
<div class="item-title-content">
|
|
1043
|
+
${d.label}
|
|
1044
|
+
</div>
|
|
1045
|
+
<div class="detail-btn-container">
|
|
1046
|
+
${detailBtn}
|
|
1047
|
+
</div>
|
|
1034
1048
|
</div>
|
|
1035
1049
|
</div>`;
|
|
1036
1050
|
|
|
@@ -1685,6 +1699,24 @@ export default {
|
|
|
1685
1699
|
});
|
|
1686
1700
|
});
|
|
1687
1701
|
|
|
1702
|
+
$elem.querySelectorAll("button.detail-btn").forEach((i) => {
|
|
1703
|
+
i.addEventListener("click", (e) => {
|
|
1704
|
+
let itemId = i.getAttribute("item-id");
|
|
1705
|
+
let typeNode = i.getAttribute("type-node");
|
|
1706
|
+
let item = utils.getItemById(config, itemId, "parent");
|
|
1707
|
+
|
|
1708
|
+
if (item && item.onClickDetailButton) {
|
|
1709
|
+
item.onClickDetailButton({
|
|
1710
|
+
itemId: itemId,
|
|
1711
|
+
type: typeNode,
|
|
1712
|
+
item: item,
|
|
1713
|
+
event: e,
|
|
1714
|
+
button: i,
|
|
1715
|
+
});
|
|
1716
|
+
}
|
|
1717
|
+
});
|
|
1718
|
+
});
|
|
1719
|
+
|
|
1688
1720
|
$elem.querySelectorAll("button.tree-icon").forEach((i) => {
|
|
1689
1721
|
i.addEventListener("click", (e) => {
|
|
1690
1722
|
let itemId = i.getAttribute("item-id");
|
|
@@ -2518,7 +2550,7 @@ export default {
|
|
|
2518
2550
|
|
|
2519
2551
|
//CAPSULES
|
|
2520
2552
|
let visibleItemsCount = 0; // Contador de elementos visibles
|
|
2521
|
-
|
|
2553
|
+
|
|
2522
2554
|
if (dataDay) {
|
|
2523
2555
|
config.timeline.detailDay.capsules.forEach((cap) => {
|
|
2524
2556
|
//para comprobar si tiene datos, se obtiene el primer valor
|
|
@@ -2657,8 +2689,11 @@ export default {
|
|
|
2657
2689
|
}
|
|
2658
2690
|
|
|
2659
2691
|
// Agregar clase single-item si solo hay un elemento visible
|
|
2660
|
-
const columnClass =
|
|
2661
|
-
|
|
2692
|
+
const columnClass =
|
|
2693
|
+
visibleItemsCount === 1
|
|
2694
|
+
? "list column-flex single-item"
|
|
2695
|
+
: "list column-flex";
|
|
2696
|
+
str = str.replace("list column-flex", columnClass);
|
|
2662
2697
|
|
|
2663
2698
|
str += `
|
|
2664
2699
|
</div>`; // list-detail
|