evui 3.4.205 → 3.4.207
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 +1891 -1416
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +1891 -1416
- 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/element/element.line.js +21 -22
- package/src/components/chart/helpers/helpers.constant.js +2 -1
- package/src/components/chart/plugins/plugins.interaction.js +58 -69
- package/src/components/chart/plugins/plugins.legend.js +265 -72
- package/src/components/chart/plugins/plugins.tooltip.js +27 -14
- package/src/components/chart/scale/scale.js +31 -5
- package/src/components/chart/scale/scale.linear.js +56 -7
- package/src/components/chart/scale/scale.step.js +30 -2
- package/src/components/chart/scale/scale.time.category.js +33 -4
- package/src/components/chart/uses.js +1 -0
- 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/select/uses.js +4 -2
- package/src/components/treeGrid/TreeGridNode.vue +8 -2
- package/src/style/lib/icon.css +1 -1
|
@@ -137,6 +137,8 @@ class StepScale extends Scale {
|
|
|
137
137
|
const offsetCounterPoint = aPos[this.units.rectOffsetCounter(this.position)];
|
|
138
138
|
const maxWidth = this.labelStyle?.maxWidth ?? chartRect.chartWidth / (steps + 2);
|
|
139
139
|
|
|
140
|
+
const AXIS_TICK_LENGTH = 5;
|
|
141
|
+
|
|
140
142
|
this.drawAxisTitle(chartRect, labelOffset);
|
|
141
143
|
|
|
142
144
|
if (this.labelStyle?.show) {
|
|
@@ -245,9 +247,22 @@ class StepScale extends Scale {
|
|
|
245
247
|
}
|
|
246
248
|
}
|
|
247
249
|
|
|
250
|
+
if (this.showAxisTick) {
|
|
251
|
+
ctx.beginPath();
|
|
252
|
+
ctx.strokeStyle = this.axisLineColor;
|
|
253
|
+
ctx.moveTo(labelCenter + (labelGap / 2), offsetPoint);
|
|
254
|
+
ctx.lineTo(labelCenter + (labelGap / 2), offsetPoint + AXIS_TICK_LENGTH);
|
|
255
|
+
ctx.stroke();
|
|
256
|
+
ctx.closePath();
|
|
257
|
+
}
|
|
258
|
+
|
|
248
259
|
if (index > 0 && this.showGrid) {
|
|
260
|
+
ctx.beginPath();
|
|
261
|
+
ctx.strokeStyle = this.gridLineColor;
|
|
249
262
|
ctx.moveTo(linePosition, offsetPoint);
|
|
250
263
|
ctx.lineTo(linePosition, offsetCounterPoint);
|
|
264
|
+
ctx.stroke();
|
|
265
|
+
ctx.closePath();
|
|
251
266
|
}
|
|
252
267
|
} else {
|
|
253
268
|
labelPoint = this.position === 'left' ? offsetPoint - 10 : offsetPoint + 10;
|
|
@@ -255,9 +270,22 @@ class StepScale extends Scale {
|
|
|
255
270
|
ctx.fillText(labelText, labelPoint, yPoint);
|
|
256
271
|
drawnLabels.push(labelText);
|
|
257
272
|
|
|
273
|
+
if (this.showAxisTick) {
|
|
274
|
+
ctx.beginPath();
|
|
275
|
+
ctx.strokeStyle = this.axisLineColor;
|
|
276
|
+
ctx.moveTo(offsetPoint + (this.axisLineWidth ?? 1), yPoint);
|
|
277
|
+
ctx.lineTo(offsetPoint - AXIS_TICK_LENGTH, yPoint);
|
|
278
|
+
ctx.stroke();
|
|
279
|
+
ctx.closePath();
|
|
280
|
+
}
|
|
281
|
+
|
|
258
282
|
if (index > 0 && this.showGrid) {
|
|
259
|
-
|
|
260
|
-
|
|
283
|
+
ctx.beginPath();
|
|
284
|
+
ctx.strokeStyle = this.gridLineColor;
|
|
285
|
+
ctx.moveTo(offsetPoint, linePosition);
|
|
286
|
+
ctx.lineTo(offsetCounterPoint, linePosition);
|
|
287
|
+
ctx.stroke();
|
|
288
|
+
ctx.closePath();
|
|
261
289
|
}
|
|
262
290
|
}
|
|
263
291
|
ctx.stroke();
|
|
@@ -132,6 +132,8 @@ class TimeCategoryScale extends Scale {
|
|
|
132
132
|
const offsetPoint = aPos[this.units.rectOffset(this.position)];
|
|
133
133
|
const offsetCounterPoint = aPos[this.units.rectOffsetCounter(this.position)];
|
|
134
134
|
|
|
135
|
+
const AXIS_TICK_LENGTH = 5;
|
|
136
|
+
|
|
135
137
|
this.drawAxisTitle(chartRect, labelOffset);
|
|
136
138
|
|
|
137
139
|
// label font 설정
|
|
@@ -253,24 +255,51 @@ class TimeCategoryScale extends Scale {
|
|
|
253
255
|
});
|
|
254
256
|
}
|
|
255
257
|
}
|
|
258
|
+
|
|
259
|
+
if (this.showAxisTick) {
|
|
260
|
+
ctx.beginPath();
|
|
261
|
+
ctx.strokeStyle = this.axisLineColor;
|
|
262
|
+
ctx.moveTo(linePosition, offsetPoint);
|
|
263
|
+
ctx.lineTo(linePosition, offsetPoint + AXIS_TICK_LENGTH);
|
|
264
|
+
ctx.stroke();
|
|
265
|
+
ctx.closePath();
|
|
266
|
+
}
|
|
267
|
+
|
|
256
268
|
if (
|
|
257
269
|
ix < oriSteps && this.showGrid && (
|
|
258
270
|
isStartPointRightOfRectStart || (!isStartPointRightOfRectStart && ix !== 0)
|
|
259
271
|
)
|
|
260
272
|
) {
|
|
261
|
-
|
|
262
|
-
|
|
273
|
+
ctx.beginPath();
|
|
274
|
+
ctx.strokeStyle = this.gridLineColor;
|
|
275
|
+
ctx.moveTo(linePosition, offsetPoint);
|
|
276
|
+
ctx.lineTo(linePosition, offsetCounterPoint);
|
|
277
|
+
ctx.stroke();
|
|
278
|
+
ctx.closePath();
|
|
263
279
|
}
|
|
264
280
|
} else {
|
|
265
281
|
labelPoint = this.position === 'left' ? offsetPoint - 10 : offsetPoint + 10;
|
|
266
282
|
ctx.fillText(labelText, labelPoint, labelCenter);
|
|
267
283
|
|
|
284
|
+
if (this.showAxisTick) {
|
|
285
|
+
ctx.beginPath();
|
|
286
|
+
ctx.strokeStyle = this.axisLineColor;
|
|
287
|
+
ctx.moveTo(offsetPoint + (this.axisLineWidth ?? 1), linePosition);
|
|
288
|
+
ctx.lineTo(offsetPoint - AXIS_TICK_LENGTH, linePosition);
|
|
289
|
+
ctx.stroke();
|
|
290
|
+
ctx.closePath();
|
|
291
|
+
}
|
|
292
|
+
|
|
268
293
|
if (
|
|
269
294
|
ix < oriSteps && this.showGrid && (
|
|
270
295
|
isStartPointRightOfRectStart || (!isStartPointRightOfRectStart && ix !== 0)
|
|
271
296
|
)) {
|
|
272
|
-
|
|
273
|
-
|
|
297
|
+
ctx.beginPath();
|
|
298
|
+
ctx.strokeStyle = this.gridLineColor;
|
|
299
|
+
ctx.moveTo(offsetPoint, linePosition);
|
|
300
|
+
ctx.lineTo(offsetCounterPoint, linePosition);
|
|
301
|
+
ctx.stroke();
|
|
302
|
+
ctx.closePath();
|
|
274
303
|
}
|
|
275
304
|
}
|
|
276
305
|
|
|
@@ -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
|
},
|
|
@@ -300,9 +300,11 @@ export const useDropdown = (param) => {
|
|
|
300
300
|
if (props.filterable) {
|
|
301
301
|
filterTextRef.value = '';
|
|
302
302
|
}
|
|
303
|
-
mv.value = val;
|
|
304
303
|
isDropbox.value = false;
|
|
305
|
-
|
|
304
|
+
if (mv.value !== val) {
|
|
305
|
+
mv.value = val;
|
|
306
|
+
changeMv();
|
|
307
|
+
}
|
|
306
308
|
};
|
|
307
309
|
const multipleClickItem = (val) => {
|
|
308
310
|
if (props.filterable) {
|
|
@@ -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;
|