evui 3.4.134 → 3.4.136
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/evui.common.js +404 -291
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +404 -291
- package/dist/evui.umd.js.map +1 -1
- package/dist/evui.umd.min.js +1 -1
- package/dist/evui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chart/plugins/plugins.interaction.js +0 -2
- package/src/components/chart/plugins/plugins.tooltip.js +27 -14
- package/src/components/contextMenu/ContextMenu.vue +12 -1
- package/src/components/contextMenu/MenuList.vue +29 -2
- package/src/components/grid/uses.js +62 -33
- package/src/components/icon/Icon.vue +5 -0
- package/src/components/menu/Menu.vue +12 -1
- package/src/components/menu/MenuItem.vue +15 -1
- package/src/components/treeGrid/TreeGridNode.vue +8 -2
- package/src/style/lib/icon.css +1 -1
package/package.json
CHANGED
|
@@ -82,7 +82,6 @@ const modules = {
|
|
|
82
82
|
label,
|
|
83
83
|
mousePosition: [e.clientX, e.clientY],
|
|
84
84
|
dataLabel: actualLabelValue,
|
|
85
|
-
isTooltipBased: true,
|
|
86
85
|
};
|
|
87
86
|
}
|
|
88
87
|
} else if (tooltip.use && this.isInitTooltip) {
|
|
@@ -109,7 +108,6 @@ const modules = {
|
|
|
109
108
|
horizontal: this.options.horizontal,
|
|
110
109
|
label,
|
|
111
110
|
mousePosition: [e.clientX, e.clientY],
|
|
112
|
-
isTooltipBased: false,
|
|
113
111
|
};
|
|
114
112
|
} else if (!args.hoveredLabel) {
|
|
115
113
|
args.hoveredLabel = {
|
|
@@ -858,29 +858,18 @@ const modules = {
|
|
|
858
858
|
*
|
|
859
859
|
* @returns {undefined}
|
|
860
860
|
*/
|
|
861
|
-
drawSyncedIndicator({ horizontal, label, mousePosition, dataLabel
|
|
862
|
-
if (!
|
|
861
|
+
drawSyncedIndicator({ horizontal, label, mousePosition, dataLabel }) {
|
|
862
|
+
if (!this._canDrawSyncedIndicator(horizontal, mousePosition)) {
|
|
863
863
|
return;
|
|
864
864
|
}
|
|
865
865
|
|
|
866
|
-
|
|
867
|
-
if (isTooltipBased) {
|
|
866
|
+
if (dataLabel) {
|
|
868
867
|
this.drawSyncedIndicatorForTooltip({ dataLabel, mousePosition });
|
|
869
868
|
return;
|
|
870
869
|
}
|
|
871
870
|
|
|
872
|
-
// 기존 시간 기반 동기화
|
|
873
|
-
if (
|
|
874
|
-
this.options.syncHover === false
|
|
875
|
-
|| (!horizontal && !this.options.axesX.every(({ type }) => type === 'time'))
|
|
876
|
-
|| (horizontal && !this.options.axesY.every(({ type }) => type === 'time'))) {
|
|
877
|
-
return;
|
|
878
|
-
}
|
|
879
871
|
const fromTime = +this.data.labels?.[0];
|
|
880
872
|
const toTime = +this.data.labels?.[this.data.labels.length - 1];
|
|
881
|
-
if (fromTime == null || toTime == null) {
|
|
882
|
-
return;
|
|
883
|
-
}
|
|
884
873
|
const [clientX, clientY] = mousePosition;
|
|
885
874
|
const { top, bottom, left, right } = this.chartDOM.getBoundingClientRect();
|
|
886
875
|
|
|
@@ -908,6 +897,30 @@ const modules = {
|
|
|
908
897
|
}
|
|
909
898
|
},
|
|
910
899
|
|
|
900
|
+
_canDrawSyncedIndicator(horizontal, mousePosition) {
|
|
901
|
+
if (!mousePosition || !!horizontal !== !!this.options.horizontal) {
|
|
902
|
+
return false;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
return this._isTimeBasedSyncEnabled(horizontal) && this._hasValidTimeRange();
|
|
906
|
+
},
|
|
907
|
+
|
|
908
|
+
_isTimeBasedSyncEnabled(horizontal) {
|
|
909
|
+
if (this.options.syncHover === false) return false;
|
|
910
|
+
if (!this.data?.labels?.length) return false;
|
|
911
|
+
|
|
912
|
+
const timeAxes = horizontal
|
|
913
|
+
? this.options.axesY.every(({ type }) => type === 'time')
|
|
914
|
+
: this.options.axesX.every(({ type }) => type === 'time');
|
|
915
|
+
|
|
916
|
+
return timeAxes;
|
|
917
|
+
},
|
|
918
|
+
|
|
919
|
+
_hasValidTimeRange() {
|
|
920
|
+
const fromTime = +this.data.labels?.[0];
|
|
921
|
+
const toTime = +this.data.labels?.[this.data.labels.length - 1];
|
|
922
|
+
return fromTime != null && toTime != null;
|
|
923
|
+
},
|
|
911
924
|
|
|
912
925
|
/**
|
|
913
926
|
* 제공된 dataLabel과 일치하는 Label이 있다면 indicator를 그림
|
|
@@ -9,7 +9,18 @@
|
|
|
9
9
|
:items="items"
|
|
10
10
|
:style="menuStyle"
|
|
11
11
|
:comp="comp"
|
|
12
|
-
|
|
12
|
+
>
|
|
13
|
+
<template
|
|
14
|
+
v-for="(_, slotName) in $slots"
|
|
15
|
+
:key="slotName"
|
|
16
|
+
#[slotName]="slotProps"
|
|
17
|
+
>
|
|
18
|
+
<slot
|
|
19
|
+
:name="slotName"
|
|
20
|
+
v-bind="slotProps"
|
|
21
|
+
/>
|
|
22
|
+
</template>
|
|
23
|
+
</menu-list>
|
|
13
24
|
</teleport>
|
|
14
25
|
</template>
|
|
15
26
|
</template>
|
|
@@ -15,7 +15,18 @@
|
|
|
15
15
|
class="ev-menu-li-prefix"
|
|
16
16
|
:class="item.iconClass"
|
|
17
17
|
/>
|
|
18
|
-
|
|
18
|
+
<span class="ev-menu-li-text">
|
|
19
|
+
<slot
|
|
20
|
+
v-if="item.slotKey"
|
|
21
|
+
:name="item.slotKey"
|
|
22
|
+
:item="item"
|
|
23
|
+
>
|
|
24
|
+
{{ item.text }}
|
|
25
|
+
</slot>
|
|
26
|
+
<template v-else>
|
|
27
|
+
{{ item.text }}
|
|
28
|
+
</template>
|
|
29
|
+
</span>
|
|
19
30
|
<i
|
|
20
31
|
v-if="item.children || item.isShowMenu"
|
|
21
32
|
class="ev-menu-li-suffix ev-icon-arrow-right2"
|
|
@@ -31,7 +42,18 @@
|
|
|
31
42
|
:comp="comp"
|
|
32
43
|
:items="childrenItems"
|
|
33
44
|
:style="menuStyle"
|
|
34
|
-
|
|
45
|
+
>
|
|
46
|
+
<template
|
|
47
|
+
v-for="(_, slotName) in $slots"
|
|
48
|
+
:key="slotName"
|
|
49
|
+
#[slotName]="slotProps"
|
|
50
|
+
>
|
|
51
|
+
<slot
|
|
52
|
+
:name="slotName"
|
|
53
|
+
v-bind="slotProps"
|
|
54
|
+
/>
|
|
55
|
+
</template>
|
|
56
|
+
</component>
|
|
35
57
|
</template>
|
|
36
58
|
</div>
|
|
37
59
|
</template>
|
|
@@ -152,4 +174,9 @@ export default {
|
|
|
152
174
|
position: absolute;
|
|
153
175
|
left: 3px;
|
|
154
176
|
}
|
|
177
|
+
|
|
178
|
+
.ev-menu-li-text {
|
|
179
|
+
display: inline-block;
|
|
180
|
+
padding-left: 20px;
|
|
181
|
+
}
|
|
155
182
|
</style>
|
|
@@ -78,20 +78,17 @@ export const commonFunctions = () => {
|
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
export const getUpdatedColumns = (stores) => {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
const { originColumns, filteredColumns } = stores;
|
|
90
|
-
return originColumns.map((col) => {
|
|
91
|
-
const changedCol = filteredColumns.find(fcol => fcol.index === col.index) ?? {};
|
|
81
|
+
const baseColumns = (
|
|
82
|
+
stores.movedColumns?.length ? stores.movedColumns : stores.originColumns
|
|
83
|
+
) ?? [];
|
|
84
|
+
const filteredColumnsMap = new Map(
|
|
85
|
+
(stores.filteredColumns ?? []).map(filtered => [filtered.index, filtered]),
|
|
86
|
+
);
|
|
87
|
+
return baseColumns.map((column) => {
|
|
88
|
+
const filteredColumn = filteredColumnsMap.get(column.index) ?? {};
|
|
92
89
|
return {
|
|
93
|
-
...
|
|
94
|
-
...
|
|
90
|
+
...column,
|
|
91
|
+
...filteredColumn,
|
|
95
92
|
};
|
|
96
93
|
});
|
|
97
94
|
};
|
|
@@ -1475,6 +1472,28 @@ export const columnSettingEvent = (params) => {
|
|
|
1475
1472
|
columnSettingInfo.visibleColumnIdx = [];
|
|
1476
1473
|
columnSettingInfo.hiddenColumn = '';
|
|
1477
1474
|
};
|
|
1475
|
+
const getBaseColumns = () => {
|
|
1476
|
+
if (Array.isArray(stores.movedColumns) && stores.movedColumns.length) {
|
|
1477
|
+
return stores.movedColumns;
|
|
1478
|
+
}
|
|
1479
|
+
return stores.originColumns || [];
|
|
1480
|
+
};
|
|
1481
|
+
const syncHiddenState = (column, hidden) => {
|
|
1482
|
+
if (!column) {
|
|
1483
|
+
return;
|
|
1484
|
+
}
|
|
1485
|
+
column.hiddenDisplay = hidden;
|
|
1486
|
+
const originColumn = stores.originColumns?.find(col => col.index === column.index);
|
|
1487
|
+
if (originColumn && originColumn !== column) {
|
|
1488
|
+
originColumn.hiddenDisplay = hidden;
|
|
1489
|
+
}
|
|
1490
|
+
if (Array.isArray(stores.movedColumns)) {
|
|
1491
|
+
const movedColumn = stores.movedColumns.find(col => col.index === column.index);
|
|
1492
|
+
if (movedColumn && movedColumn !== column) {
|
|
1493
|
+
movedColumn.hiddenDisplay = hidden;
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
};
|
|
1478
1497
|
const setFilteringColumn = () => {
|
|
1479
1498
|
columnSettingInfo.visibleColumnIdx = stores.filteredColumns.map(col => col.index);
|
|
1480
1499
|
|
|
@@ -1499,18 +1518,13 @@ export const columnSettingEvent = (params) => {
|
|
|
1499
1518
|
return;
|
|
1500
1519
|
}
|
|
1501
1520
|
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
// 보여주지 않을 컬럼들은 hiddenDisplay 속성을 전부 ture로 적용
|
|
1511
|
-
col.hiddenDisplay = true;
|
|
1512
|
-
return false;
|
|
1513
|
-
});
|
|
1521
|
+
const baseColumns = getBaseColumns();
|
|
1522
|
+
const columnNameSet = new Set(columnNames);
|
|
1523
|
+
stores.filteredColumns = baseColumns.filter((col) => {
|
|
1524
|
+
const shouldShow = columnNameSet.has(col.field) || !col.caption;
|
|
1525
|
+
syncHiddenState(col, !shouldShow);
|
|
1526
|
+
return shouldShow;
|
|
1527
|
+
});
|
|
1514
1528
|
columnSettingInfo.hiddenColumn = '';
|
|
1515
1529
|
setFilteringColumn();
|
|
1516
1530
|
emit('change-column-status', {
|
|
@@ -1530,13 +1544,16 @@ export const columnSettingEvent = (params) => {
|
|
|
1530
1544
|
}
|
|
1531
1545
|
stores.filteredColumns = columns
|
|
1532
1546
|
.filter((col) => {
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
}
|
|
1537
|
-
col.hiddenDisplay = true;
|
|
1538
|
-
return false;
|
|
1547
|
+
const shouldHide = col.field === val;
|
|
1548
|
+
syncHiddenState(col, shouldHide);
|
|
1549
|
+
return !shouldHide;
|
|
1539
1550
|
});
|
|
1551
|
+
const baseColumns = getBaseColumns();
|
|
1552
|
+
baseColumns.forEach((col) => {
|
|
1553
|
+
if (col.field === val) {
|
|
1554
|
+
syncHiddenState(col, true);
|
|
1555
|
+
}
|
|
1556
|
+
});
|
|
1540
1557
|
columnSettingInfo.hiddenColumn = val;
|
|
1541
1558
|
setFilteringColumn();
|
|
1542
1559
|
};
|
|
@@ -1551,6 +1568,19 @@ export const columnSettingEvent = (params) => {
|
|
|
1551
1568
|
|
|
1552
1569
|
export const dragEvent = ({ stores }) => {
|
|
1553
1570
|
const { emit } = getCurrentInstance();
|
|
1571
|
+
const buildMovedColumns = (visibleColumns) => {
|
|
1572
|
+
const baseColumns = (stores.movedColumns?.length
|
|
1573
|
+
? [...stores.movedColumns]
|
|
1574
|
+
: [...stores.originColumns]);
|
|
1575
|
+
const queue = [...visibleColumns];
|
|
1576
|
+
const visibleIndexSet = new Set(queue.map(column => column.index));
|
|
1577
|
+
stores.movedColumns = baseColumns.map((column) => {
|
|
1578
|
+
if (visibleIndexSet.has(column.index)) {
|
|
1579
|
+
return queue.shift();
|
|
1580
|
+
}
|
|
1581
|
+
return column;
|
|
1582
|
+
});
|
|
1583
|
+
};
|
|
1554
1584
|
const setColumnMoving = (currentIndex, droppedIndex) => {
|
|
1555
1585
|
const oldIndex = parseInt(currentIndex, 10);
|
|
1556
1586
|
const newPositionIndex = parseInt(droppedIndex, 10);
|
|
@@ -1567,9 +1597,8 @@ export const dragEvent = ({ stores }) => {
|
|
|
1567
1597
|
|
|
1568
1598
|
if (stores.filteredColumns.length) {
|
|
1569
1599
|
stores.filteredColumns = columns;
|
|
1570
|
-
} else {
|
|
1571
|
-
stores.movedColumns = columns;
|
|
1572
1600
|
}
|
|
1601
|
+
buildMovedColumns(columns);
|
|
1573
1602
|
};
|
|
1574
1603
|
const onDragStart = (e) => {
|
|
1575
1604
|
e.dataTransfer.setData('text/plain', e.currentTarget.dataset.index);
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
icon,
|
|
5
5
|
{ [`ev-icon-${size}`]: !!size },
|
|
6
6
|
]"
|
|
7
|
+
:style="{ color }"
|
|
7
8
|
@click="onClick"
|
|
8
9
|
@dblClick="onDblClick"
|
|
9
10
|
@contextmenu="onContextMenu"
|
|
@@ -22,6 +23,10 @@ export default {
|
|
|
22
23
|
type: String,
|
|
23
24
|
default: '',
|
|
24
25
|
},
|
|
26
|
+
color: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: '',
|
|
29
|
+
},
|
|
25
30
|
},
|
|
26
31
|
emits: {
|
|
27
32
|
click: null,
|
|
@@ -9,7 +9,18 @@
|
|
|
9
9
|
:disabled="disabled"
|
|
10
10
|
:comp="component"
|
|
11
11
|
@click="clickMenu"
|
|
12
|
-
|
|
12
|
+
>
|
|
13
|
+
<template
|
|
14
|
+
v-for="(_, slotName) in $slots"
|
|
15
|
+
:key="slotName"
|
|
16
|
+
#[slotName]="slotProps"
|
|
17
|
+
>
|
|
18
|
+
<slot
|
|
19
|
+
:name="slotName"
|
|
20
|
+
v-bind="slotProps"
|
|
21
|
+
/>
|
|
22
|
+
</template>
|
|
23
|
+
</menu-item>
|
|
13
24
|
</ul>
|
|
14
25
|
</template>
|
|
15
26
|
|
|
@@ -21,7 +21,18 @@
|
|
|
21
21
|
:class="['front-icon', item.iconClass]"
|
|
22
22
|
/>
|
|
23
23
|
<span class="text">
|
|
24
|
-
|
|
24
|
+
<slot
|
|
25
|
+
v-if="item.slotKey"
|
|
26
|
+
:name="item.slotKey"
|
|
27
|
+
:item="item"
|
|
28
|
+
:depth="depth"
|
|
29
|
+
:selected-item="selectedItem"
|
|
30
|
+
>
|
|
31
|
+
{{ item.text || item.value }}
|
|
32
|
+
</slot>
|
|
33
|
+
<template v-else>
|
|
34
|
+
{{ item.text || item.value }}
|
|
35
|
+
</template>
|
|
25
36
|
</span>
|
|
26
37
|
<span
|
|
27
38
|
v-if="expandable && hasChild"
|
|
@@ -84,6 +95,9 @@ export default {
|
|
|
84
95
|
} else if (obj.disabled !== undefined && typeof obj.disabled !== 'boolean') {
|
|
85
96
|
console.warn('[EVUI][Menu] disabled attribute must be \'Boolean\' type.');
|
|
86
97
|
return false;
|
|
98
|
+
} else if (obj.slotKey !== undefined && typeof obj.slotKey !== 'string') {
|
|
99
|
+
console.warn('[EVUI][Menu] slotKey attribute must be \'String\' type.');
|
|
100
|
+
return false;
|
|
87
101
|
}
|
|
88
102
|
return true;
|
|
89
103
|
},
|
|
@@ -235,8 +235,14 @@ export default {
|
|
|
235
235
|
const isDataIcon = computed(() => ((parentIconMV.value !== 'none' || childIconMV.value !== 'none')));
|
|
236
236
|
|
|
237
237
|
const expandColumnIdx = computed(() => {
|
|
238
|
-
const
|
|
239
|
-
|
|
238
|
+
const columns = props.orderedColumns || [];
|
|
239
|
+
const visibleExpandIdx = columns.findIndex(column =>
|
|
240
|
+
column.expandColumn && !column.hide && !column.hiddenDisplay);
|
|
241
|
+
if (visibleExpandIdx !== -1) {
|
|
242
|
+
return visibleExpandIdx;
|
|
243
|
+
}
|
|
244
|
+
const firstVisibleIdx = columns.findIndex(column => !column.hide && !column.hiddenDisplay);
|
|
245
|
+
return firstVisibleIdx !== -1 ? firstVisibleIdx : 0;
|
|
240
246
|
});
|
|
241
247
|
const getRowClass = nodeInfo => ({
|
|
242
248
|
row: true,
|
package/src/style/lib/icon.css
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
font-display: block;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
[class^=
|
|
13
|
+
[class^='ev-icon-'], [class*=' ev-icon-'] {
|
|
14
14
|
/* use !important to prevent issues with browser extensions that change fonts */
|
|
15
15
|
font-family: 'EVUI' !important;
|
|
16
16
|
speak: none;
|