evui 3.4.207 → 3.4.208
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/README.md +18 -33
- package/dist/404.html +44 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.js +22645 -0
- package/dist/index.umd.cjs +28 -0
- package/dist/style.css +1 -0
- package/package.json +46 -43
- package/dist/evui.common.js +0 -63681
- package/dist/evui.common.js.map +0 -1
- package/dist/evui.umd.js +0 -63691
- package/dist/evui.umd.js.map +0 -1
- package/dist/evui.umd.min.js +0 -2
- package/dist/evui.umd.min.js.map +0 -1
- package/dist/img/EVUI.b82ee81a.svg +0 -293
- package/src/assets/logo.png +0 -0
- package/src/common/emitter.js +0 -20
- package/src/common/utils.bignumber.js +0 -67
- package/src/common/utils.debounce.js +0 -223
- package/src/common/utils.js +0 -151
- package/src/common/utils.table.js +0 -78
- package/src/common/utils.throttle.js +0 -83
- package/src/common/utils.tree.js +0 -18
- package/src/components/button/Button.vue +0 -195
- package/src/components/button/index.js +0 -7
- package/src/components/buttonGroup/ButtonGroup.vue +0 -11
- package/src/components/buttonGroup/index.js +0 -7
- package/src/components/calendar/Calendar.vue +0 -725
- package/src/components/calendar/index.js +0 -7
- package/src/components/calendar/uses.js +0 -1410
- package/src/components/chart/Chart.vue +0 -363
- package/src/components/chart/ChartToolbar.vue +0 -52
- package/src/components/chart/chart.core.js +0 -1170
- package/src/components/chart/chartZoom.core.js +0 -540
- package/src/components/chart/element/element.bar.js +0 -672
- package/src/components/chart/element/element.bar.time.js +0 -166
- package/src/components/chart/element/element.heatmap.js +0 -743
- package/src/components/chart/element/element.line.js +0 -611
- package/src/components/chart/element/element.pie.js +0 -197
- package/src/components/chart/element/element.scatter.js +0 -320
- package/src/components/chart/element/element.tip.js +0 -717
- package/src/components/chart/helpers/helpers.canvas.js +0 -265
- package/src/components/chart/helpers/helpers.constant.js +0 -235
- package/src/components/chart/helpers/helpers.util.js +0 -400
- package/src/components/chart/index.js +0 -9
- package/src/components/chart/model/index.js +0 -50
- package/src/components/chart/model/model.series.js +0 -125
- package/src/components/chart/model/model.store.js +0 -1427
- package/src/components/chart/plugins/plugins.interaction.js +0 -1659
- package/src/components/chart/plugins/plugins.legend.gradient.js +0 -606
- package/src/components/chart/plugins/plugins.legend.js +0 -1543
- package/src/components/chart/plugins/plugins.pie.js +0 -254
- package/src/components/chart/plugins/plugins.scrollbar.js +0 -732
- package/src/components/chart/plugins/plugins.title.js +0 -61
- package/src/components/chart/plugins/plugins.tooltip.js +0 -1041
- package/src/components/chart/scale/scale.js +0 -951
- package/src/components/chart/scale/scale.linear.js +0 -268
- package/src/components/chart/scale/scale.logarithmic.js +0 -135
- package/src/components/chart/scale/scale.step.js +0 -430
- package/src/components/chart/scale/scale.time.category.js +0 -338
- package/src/components/chart/scale/scale.time.js +0 -49
- package/src/components/chart/style/chart.scss +0 -405
- package/src/components/chart/uses.js +0 -721
- package/src/components/chartBrush/ChartBrush.vue +0 -323
- package/src/components/chartBrush/chartBrush.core.js +0 -691
- package/src/components/chartBrush/index.js +0 -9
- package/src/components/chartBrush/uses.js +0 -23
- package/src/components/chartGroup/ChartGroup.vue +0 -144
- package/src/components/chartGroup/index.js +0 -9
- package/src/components/chartGroup/style/chartGroup.scss +0 -5
- package/src/components/chartGroup/uses.js +0 -53
- package/src/components/checkbox/Checkbox.vue +0 -229
- package/src/components/checkbox/index.js +0 -7
- package/src/components/checkboxGroup/CheckboxGroup.vue +0 -44
- package/src/components/checkboxGroup/index.js +0 -7
- package/src/components/contextMenu/ContextMenu.vue +0 -95
- package/src/components/contextMenu/MenuList.vue +0 -182
- package/src/components/contextMenu/index.js +0 -7
- package/src/components/contextMenu/uses.js +0 -223
- package/src/components/datePicker/DatePicker.vue +0 -504
- package/src/components/datePicker/index.js +0 -7
- package/src/components/datePicker/uses.js +0 -460
- package/src/components/grid/Grid.vue +0 -1535
- package/src/components/grid/GridColumnSetting.vue +0 -358
- package/src/components/grid/GridFilterSetting.vue +0 -323
- package/src/components/grid/GridPagination.vue +0 -75
- package/src/components/grid/GridSummary.vue +0 -314
- package/src/components/grid/GridToolbar.vue +0 -35
- package/src/components/grid/icon/icon-option-button.vue +0 -17
- package/src/components/grid/icon/icon-sort-button.vue +0 -67
- package/src/components/grid/index.js +0 -11
- package/src/components/grid/style/grid.scss +0 -417
- package/src/components/grid/uses.js +0 -1629
- package/src/components/icon/Icon.vue +0 -53
- package/src/components/icon/index.js +0 -8
- package/src/components/inputNumber/InputNumber.vue +0 -212
- package/src/components/inputNumber/index.js +0 -7
- package/src/components/inputNumber/uses.js +0 -217
- package/src/components/loading/Loading.vue +0 -125
- package/src/components/loading/index.js +0 -7
- package/src/components/menu/Menu.vue +0 -79
- package/src/components/menu/MenuItem.vue +0 -201
- package/src/components/menu/index.js +0 -7
- package/src/components/message/Message.vue +0 -229
- package/src/components/message/index.js +0 -34
- package/src/components/messageBox/MessageBox.vue +0 -358
- package/src/components/messageBox/index.js +0 -22
- package/src/components/notification/Notification.vue +0 -316
- package/src/components/notification/index.js +0 -49
- package/src/components/pagination/Pagination.vue +0 -317
- package/src/components/pagination/index.js +0 -7
- package/src/components/pagination/pageButton.vue +0 -31
- package/src/components/progress/Progress.vue +0 -139
- package/src/components/progress/index.js +0 -7
- package/src/components/radio/Radio.vue +0 -159
- package/src/components/radio/index.js +0 -7
- package/src/components/radioGroup/RadioGroup.vue +0 -41
- package/src/components/radioGroup/index.js +0 -7
- package/src/components/scheduler/Scheduler.vue +0 -149
- package/src/components/scheduler/index.js +0 -7
- package/src/components/scheduler/uses.js +0 -183
- package/src/components/select/Select.vue +0 -556
- package/src/components/select/index.js +0 -7
- package/src/components/select/uses.js +0 -379
- package/src/components/slider/Slider.vue +0 -505
- package/src/components/slider/index.js +0 -7
- package/src/components/slider/uses.js +0 -391
- package/src/components/tabPanel/TabPanel.vue +0 -74
- package/src/components/tabPanel/index.js +0 -7
- package/src/components/tabs/Tabs.vue +0 -517
- package/src/components/tabs/index.js +0 -7
- package/src/components/textField/TextField.vue +0 -399
- package/src/components/textField/index.js +0 -7
- package/src/components/timePicker/TimePicker.vue +0 -364
- package/src/components/timePicker/index.js +0 -7
- package/src/components/toggle/Toggle.vue +0 -115
- package/src/components/toggle/index.js +0 -7
- package/src/components/tree/Tree.vue +0 -338
- package/src/components/tree/TreeNode.vue +0 -293
- package/src/components/tree/index.js +0 -7
- package/src/components/treeGrid/TreeGrid.vue +0 -1074
- package/src/components/treeGrid/TreeGridNode.vue +0 -349
- package/src/components/treeGrid/TreeGridToolbar.vue +0 -35
- package/src/components/treeGrid/icon/icon-tree.png +0 -0
- package/src/components/treeGrid/index.js +0 -9
- package/src/components/treeGrid/style/treeGrid.scss +0 -277
- package/src/components/treeGrid/uses.js +0 -1178
- package/src/components/window/Window.vue +0 -329
- package/src/components/window/index.js +0 -7
- package/src/components/window/uses.js +0 -908
- package/src/directives/clickoutside.js +0 -90
- package/src/main.js +0 -120
- package/src/style/components/input.scss +0 -108
- package/src/style/functions.scss +0 -3
- package/src/style/index.scss +0 -6
- package/src/style/lib/fonts/EVUI.eot +0 -0
- package/src/style/lib/fonts/EVUI.svg +0 -293
- package/src/style/lib/fonts/EVUI.ttf +0 -0
- package/src/style/lib/fonts/EVUI.woff +0 -0
- package/src/style/lib/icon.css +0 -888
- package/src/style/mixins.scss +0 -94
- package/src/style/themes.scss +0 -69
- package/src/style/variables.scss +0 -22
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="ev-radio-group"
|
|
4
|
-
:class="{ 'type-button': type === 'button' }"
|
|
5
|
-
role="group"
|
|
6
|
-
>
|
|
7
|
-
<slot />
|
|
8
|
-
</div>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
import { computed, provide, nextTick } from 'vue';
|
|
13
|
-
|
|
14
|
-
export default {
|
|
15
|
-
name: 'EvRadioGroup',
|
|
16
|
-
props: {
|
|
17
|
-
modelValue: {
|
|
18
|
-
type: [String, Number, Symbol, Boolean],
|
|
19
|
-
default: null,
|
|
20
|
-
},
|
|
21
|
-
type: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: 'radio',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
emits: ['update:modelValue', 'change'],
|
|
27
|
-
setup(props, { emit }) {
|
|
28
|
-
const mv = computed({
|
|
29
|
-
get: () => props.modelValue,
|
|
30
|
-
set: val => emit('update:modelValue', val),
|
|
31
|
-
});
|
|
32
|
-
provide('EvRadioGroupMv', mv);
|
|
33
|
-
|
|
34
|
-
const change = async (e) => {
|
|
35
|
-
await nextTick();
|
|
36
|
-
emit('change', mv.value, e);
|
|
37
|
-
};
|
|
38
|
-
provide('EvRadioGroupChange', change);
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
</script>
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<table
|
|
3
|
-
class="ev-scheduler"
|
|
4
|
-
:class="{ draggable: !!dragEventName }"
|
|
5
|
-
>
|
|
6
|
-
<thead>
|
|
7
|
-
<tr class="ev-scheduler-header">
|
|
8
|
-
<td />
|
|
9
|
-
<td
|
|
10
|
-
v-for="(wItem, wIdx) in colLabels.length"
|
|
11
|
-
:key="`${wItem}_${wIdx}_header`"
|
|
12
|
-
class="ev-scheduler-header-label"
|
|
13
|
-
@click="selectColumn(wIdx)"
|
|
14
|
-
v-html="colLabels[wIdx]"
|
|
15
|
-
/>
|
|
16
|
-
</tr>
|
|
17
|
-
</thead>
|
|
18
|
-
<tbody @mouseleave="mouseleaveBoxArea">
|
|
19
|
-
<tr
|
|
20
|
-
v-for="(hItem, hIdx) in rowLabels.length"
|
|
21
|
-
:key="`${hItem}_${hIdx}_body`"
|
|
22
|
-
class="ev-scheduler-body"
|
|
23
|
-
>
|
|
24
|
-
<td
|
|
25
|
-
:key="`${hItem}_${hIdx}_${rowLabels[hIdx]}`"
|
|
26
|
-
class="ev-scheduler-body-label"
|
|
27
|
-
@click="selectRow(hIdx)"
|
|
28
|
-
v-html="rowLabels[hIdx]"
|
|
29
|
-
/>
|
|
30
|
-
<td
|
|
31
|
-
v-for="(wItem, wIdx) in colLabels.length"
|
|
32
|
-
:key="`${wItem}_${hIdx}_${wIdx}_body`"
|
|
33
|
-
class="ev-scheduler-body-box"
|
|
34
|
-
:class="{ selected: mv[hIdx][wIdx] }"
|
|
35
|
-
:style="selectionStyle(hIdx, wIdx)"
|
|
36
|
-
@mousedown.stop.prevent="mousedownBox(hIdx, wIdx, $event)"
|
|
37
|
-
@mouseup.stop.prevent="mouseupBox(hIdx, wIdx)"
|
|
38
|
-
@[`${dragEventName}`]="mousemoveBox(hIdx, wIdx)"
|
|
39
|
-
/>
|
|
40
|
-
</tr>
|
|
41
|
-
</tbody>
|
|
42
|
-
</table>
|
|
43
|
-
</template>
|
|
44
|
-
|
|
45
|
-
<script>
|
|
46
|
-
import { toRefs } from 'vue';
|
|
47
|
-
import { useModel, useEvent } from './uses';
|
|
48
|
-
|
|
49
|
-
export default {
|
|
50
|
-
name: 'EvScheduler',
|
|
51
|
-
props: {
|
|
52
|
-
modelValue: {
|
|
53
|
-
type: Array,
|
|
54
|
-
default: () => [],
|
|
55
|
-
},
|
|
56
|
-
colLabels: {
|
|
57
|
-
type: Array,
|
|
58
|
-
default: () => (['<span style="color: #FF0000">SUN</span>',
|
|
59
|
-
'MON', 'TUE', 'WED', 'THU', 'FRI',
|
|
60
|
-
'<span style="color: #0006F9">SAT</span>']),
|
|
61
|
-
},
|
|
62
|
-
rowLabels: {
|
|
63
|
-
type: Array,
|
|
64
|
-
default: () => (['00:00', '01:00', '02:00', '03:00', '04:00', '05:00',
|
|
65
|
-
'06:00', '07:00', '08:00', '09:00', '10:00', '11:00',
|
|
66
|
-
'12:00', '13:00', '14:00', '15:00', '16:00', '17:00',
|
|
67
|
-
'18:00', '19:00', '20:00', '21:00', '22:00', '23:00']),
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
emits: {
|
|
71
|
-
'update:modelValue': Array,
|
|
72
|
-
change: Array,
|
|
73
|
-
},
|
|
74
|
-
setup() {
|
|
75
|
-
const {
|
|
76
|
-
mv,
|
|
77
|
-
validateValue,
|
|
78
|
-
} = useModel();
|
|
79
|
-
|
|
80
|
-
validateValue();
|
|
81
|
-
|
|
82
|
-
const {
|
|
83
|
-
mousePos,
|
|
84
|
-
selectionStyle,
|
|
85
|
-
mousedownBox,
|
|
86
|
-
mouseupBox,
|
|
87
|
-
mousemoveBox,
|
|
88
|
-
mouseleaveBoxArea,
|
|
89
|
-
selectColumn,
|
|
90
|
-
selectRow,
|
|
91
|
-
} = useEvent({ mv });
|
|
92
|
-
|
|
93
|
-
return {
|
|
94
|
-
mv,
|
|
95
|
-
selectionStyle,
|
|
96
|
-
mousedownBox,
|
|
97
|
-
mouseupBox,
|
|
98
|
-
mousemoveBox,
|
|
99
|
-
mouseleaveBoxArea,
|
|
100
|
-
selectColumn,
|
|
101
|
-
selectRow,
|
|
102
|
-
...toRefs(mousePos),
|
|
103
|
-
};
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
</script>
|
|
107
|
-
|
|
108
|
-
<style lang="scss">
|
|
109
|
-
@import '../../style/index.scss';
|
|
110
|
-
.ev-scheduler {
|
|
111
|
-
width: 100%;
|
|
112
|
-
border-collapse: collapse;
|
|
113
|
-
border-spacing: 0;
|
|
114
|
-
table-layout: fixed;
|
|
115
|
-
text-align: center;
|
|
116
|
-
font-size: $font-size-small;
|
|
117
|
-
user-select: none;
|
|
118
|
-
cursor: pointer;
|
|
119
|
-
|
|
120
|
-
&.draggable {
|
|
121
|
-
cursor: crosshair !important;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
td {
|
|
125
|
-
height: 18px;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.ev-scheduler-header-label,
|
|
130
|
-
.ev-scheduler-body-label {
|
|
131
|
-
overflow: hidden;
|
|
132
|
-
text-overflow: ellipsis;
|
|
133
|
-
white-space: nowrap;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.ev-scheduler-body-box {
|
|
137
|
-
border: 1px solid #CCCCCC;
|
|
138
|
-
|
|
139
|
-
&.selected {
|
|
140
|
-
background-color: #CCEECC;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.ev-scheduler-selection {
|
|
145
|
-
position: absolute;
|
|
146
|
-
top: 0;
|
|
147
|
-
left: 0;
|
|
148
|
-
}
|
|
149
|
-
</style>
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getCurrentInstance, computed, reactive,
|
|
3
|
-
} from 'vue';
|
|
4
|
-
|
|
5
|
-
const getMatrixArr = (row, col) => Array.from(Array(row), () => Array(col).fill(false));
|
|
6
|
-
|
|
7
|
-
export const useModel = () => {
|
|
8
|
-
const { props, emit } = getCurrentInstance();
|
|
9
|
-
|
|
10
|
-
const mv = computed({
|
|
11
|
-
get: () => {
|
|
12
|
-
if (props.modelValue.length !== props.rowLabels.length
|
|
13
|
-
|| !props.modelValue[0]
|
|
14
|
-
|| props.modelValue[0].length !== props.colLabels.length
|
|
15
|
-
) {
|
|
16
|
-
return getMatrixArr(props.rowLabels.length, props.colLabels.length);
|
|
17
|
-
}
|
|
18
|
-
return props.modelValue;
|
|
19
|
-
},
|
|
20
|
-
set: (val) => {
|
|
21
|
-
emit('update:modelValue', val);
|
|
22
|
-
emit('change', val);
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* 초기값 배열의 length와 options의 count가 안맞는 경우 valid체크하는 로직
|
|
28
|
-
*/
|
|
29
|
-
const validateValue = () => {
|
|
30
|
-
if (props.modelValue.length !== props.rowLabels.length
|
|
31
|
-
|| !props.modelValue[0]
|
|
32
|
-
|| props.modelValue[0].length !== props.colLabels.length
|
|
33
|
-
) {
|
|
34
|
-
mv.value = [...getMatrixArr(props.rowLabels.length, props.colLabels.length)];
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
return {
|
|
39
|
-
mv,
|
|
40
|
-
validateValue,
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export const useEvent = (param) => {
|
|
45
|
-
const { mv } = param;
|
|
46
|
-
const mousePos = reactive({
|
|
47
|
-
startRow: null,
|
|
48
|
-
startCol: null,
|
|
49
|
-
dragRow: null,
|
|
50
|
-
dragCol: null,
|
|
51
|
-
endRow: null,
|
|
52
|
-
endCol: null,
|
|
53
|
-
dragEventName: null,
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* 스케쥴 내 드래그 시 선택영역의 style 세팅
|
|
58
|
-
* @param rows
|
|
59
|
-
* @param cols
|
|
60
|
-
*/
|
|
61
|
-
const selectionStyle = (rows, cols) => {
|
|
62
|
-
if (mousePos.dragCol === null || mousePos.dragRow === null) {
|
|
63
|
-
return {};
|
|
64
|
-
}
|
|
65
|
-
const minRow = mousePos.startRow < mousePos.dragRow ? mousePos.startRow : mousePos.dragRow;
|
|
66
|
-
const maxRow = mousePos.startRow > mousePos.dragRow ? mousePos.startRow : mousePos.dragRow;
|
|
67
|
-
const minCol = mousePos.startCol < mousePos.dragCol ? mousePos.startCol : mousePos.dragCol;
|
|
68
|
-
const maxCol = mousePos.startCol > mousePos.dragCol ? mousePos.startCol : mousePos.dragCol;
|
|
69
|
-
if (minRow > rows || maxRow < rows || minCol > cols || maxCol < cols) {
|
|
70
|
-
return {};
|
|
71
|
-
}
|
|
72
|
-
const borderValue = '2px solid #5292F7';
|
|
73
|
-
let result = {};
|
|
74
|
-
if (rows === minRow) {
|
|
75
|
-
result = { ...result, 'border-top': borderValue };
|
|
76
|
-
}
|
|
77
|
-
if (rows === maxRow) {
|
|
78
|
-
result = { ...result, 'border-bottom': borderValue };
|
|
79
|
-
}
|
|
80
|
-
if (cols === minCol) {
|
|
81
|
-
result = { ...result, 'border-left': borderValue };
|
|
82
|
-
}
|
|
83
|
-
if (cols === maxCol) {
|
|
84
|
-
result = { ...result, 'border-right': borderValue };
|
|
85
|
-
}
|
|
86
|
-
return result;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* 마우스다운할 때 좌표값 세팅 및 드래그이벤트명을 mousemove로 변경함으로서 마우스이벤트 활성화
|
|
91
|
-
* @param rows
|
|
92
|
-
* @param cols
|
|
93
|
-
*/
|
|
94
|
-
const mousedownBox = (rows, cols) => {
|
|
95
|
-
mousePos.startRow = rows;
|
|
96
|
-
mousePos.startCol = cols;
|
|
97
|
-
mousePos.dragRow = rows;
|
|
98
|
-
mousePos.dragCol = cols;
|
|
99
|
-
mousePos.dragEventName = 'mousemove';
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* 마우스업할 때 start~end의 행열 값을 가져오고 mv에 적용
|
|
104
|
-
* @param rows
|
|
105
|
-
* @param cols
|
|
106
|
-
*/
|
|
107
|
-
const mouseupBox = (rows, cols) => {
|
|
108
|
-
if (!mousePos.dragEventName) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
mousePos.endRow = rows;
|
|
112
|
-
mousePos.endCol = cols;
|
|
113
|
-
mousePos.dragEventName = null;
|
|
114
|
-
const tempArr = [...mv.value];
|
|
115
|
-
const minRow = mousePos.startRow < mousePos.endRow ? mousePos.startRow : mousePos.endRow;
|
|
116
|
-
const maxRow = mousePos.startRow > mousePos.endRow ? mousePos.startRow : mousePos.endRow;
|
|
117
|
-
const minCol = mousePos.startCol < mousePos.endCol ? mousePos.startCol : mousePos.endCol;
|
|
118
|
-
const maxCol = mousePos.startCol > mousePos.endCol ? mousePos.startCol : mousePos.endCol;
|
|
119
|
-
for (let i = minRow; i <= maxRow; i++) {
|
|
120
|
-
for (let j = minCol; j <= maxCol; j++) {
|
|
121
|
-
tempArr[i][j] = !tempArr[i][j];
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
mv.value = [...tempArr];
|
|
125
|
-
mousePos.dragRow = null;
|
|
126
|
-
mousePos.dragCol = null;
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* 마우스다운 후 이벤트명이 mousemove일 때 실행되는 이벤트
|
|
131
|
-
* 즉, 드래그할 때의 박스들의 rows, cols값을 입력받음
|
|
132
|
-
* @param rows
|
|
133
|
-
* @param cols
|
|
134
|
-
*/
|
|
135
|
-
const mousemoveBox = (rows, cols) => {
|
|
136
|
-
mousePos.dragRow = rows;
|
|
137
|
-
mousePos.dragCol = cols;
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* tbody밖으로 마우스벗어나는 경우 마우스업하는 이벤트 실행
|
|
142
|
-
*/
|
|
143
|
-
const mouseleaveBoxArea = () => {
|
|
144
|
-
mouseupBox(mousePos.dragRow, mousePos.dragCol);
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* 선택된 Column의 첫번째 row의 값의 반대로 전체 적용
|
|
149
|
-
* @param wIdx
|
|
150
|
-
*/
|
|
151
|
-
const selectColumn = (wIdx) => {
|
|
152
|
-
const tempArr = [...mv.value];
|
|
153
|
-
const firstValue = tempArr[0][wIdx];
|
|
154
|
-
for (let i = 0; i < tempArr.length; i++) {
|
|
155
|
-
tempArr[i][wIdx] = !firstValue;
|
|
156
|
-
}
|
|
157
|
-
mv.value = [...tempArr];
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* 선택된 Row의 첫번째 column의 값의 반대로 전체 적용
|
|
162
|
-
* @param hIdx
|
|
163
|
-
*/
|
|
164
|
-
const selectRow = (hIdx) => {
|
|
165
|
-
const tempArr = [...mv.value];
|
|
166
|
-
const firstValue = tempArr[hIdx][0];
|
|
167
|
-
for (let i = 0; i < tempArr[0].length; i++) {
|
|
168
|
-
tempArr[hIdx][i] = !firstValue;
|
|
169
|
-
}
|
|
170
|
-
mv.value = [...tempArr];
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
return {
|
|
174
|
-
mousePos,
|
|
175
|
-
selectionStyle,
|
|
176
|
-
mousedownBox,
|
|
177
|
-
mouseupBox,
|
|
178
|
-
mousemoveBox,
|
|
179
|
-
mouseleaveBoxArea,
|
|
180
|
-
selectColumn,
|
|
181
|
-
selectRow,
|
|
182
|
-
};
|
|
183
|
-
};
|