evui 3.4.206 → 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.
Files changed (162) hide show
  1. package/README.md +18 -33
  2. package/dist/404.html +44 -0
  3. package/dist/favicon.ico +0 -0
  4. package/dist/index.js +22645 -0
  5. package/dist/index.umd.cjs +28 -0
  6. package/dist/style.css +1 -0
  7. package/package.json +46 -43
  8. package/dist/evui.common.js +0 -63678
  9. package/dist/evui.common.js.map +0 -1
  10. package/dist/evui.umd.js +0 -63688
  11. package/dist/evui.umd.js.map +0 -1
  12. package/dist/evui.umd.min.js +0 -2
  13. package/dist/evui.umd.min.js.map +0 -1
  14. package/dist/img/EVUI.b82ee81a.svg +0 -293
  15. package/src/assets/logo.png +0 -0
  16. package/src/common/emitter.js +0 -20
  17. package/src/common/utils.bignumber.js +0 -67
  18. package/src/common/utils.debounce.js +0 -223
  19. package/src/common/utils.js +0 -151
  20. package/src/common/utils.table.js +0 -78
  21. package/src/common/utils.throttle.js +0 -83
  22. package/src/common/utils.tree.js +0 -18
  23. package/src/components/button/Button.vue +0 -195
  24. package/src/components/button/index.js +0 -7
  25. package/src/components/buttonGroup/ButtonGroup.vue +0 -11
  26. package/src/components/buttonGroup/index.js +0 -7
  27. package/src/components/calendar/Calendar.vue +0 -725
  28. package/src/components/calendar/index.js +0 -7
  29. package/src/components/calendar/uses.js +0 -1410
  30. package/src/components/chart/Chart.vue +0 -363
  31. package/src/components/chart/ChartToolbar.vue +0 -52
  32. package/src/components/chart/chart.core.js +0 -1170
  33. package/src/components/chart/chartZoom.core.js +0 -540
  34. package/src/components/chart/element/element.bar.js +0 -672
  35. package/src/components/chart/element/element.bar.time.js +0 -166
  36. package/src/components/chart/element/element.heatmap.js +0 -743
  37. package/src/components/chart/element/element.line.js +0 -611
  38. package/src/components/chart/element/element.pie.js +0 -197
  39. package/src/components/chart/element/element.scatter.js +0 -320
  40. package/src/components/chart/element/element.tip.js +0 -717
  41. package/src/components/chart/helpers/helpers.canvas.js +0 -265
  42. package/src/components/chart/helpers/helpers.constant.js +0 -235
  43. package/src/components/chart/helpers/helpers.util.js +0 -400
  44. package/src/components/chart/index.js +0 -9
  45. package/src/components/chart/model/index.js +0 -50
  46. package/src/components/chart/model/model.series.js +0 -125
  47. package/src/components/chart/model/model.store.js +0 -1427
  48. package/src/components/chart/plugins/plugins.interaction.js +0 -1655
  49. package/src/components/chart/plugins/plugins.legend.gradient.js +0 -606
  50. package/src/components/chart/plugins/plugins.legend.js +0 -1543
  51. package/src/components/chart/plugins/plugins.pie.js +0 -254
  52. package/src/components/chart/plugins/plugins.scrollbar.js +0 -732
  53. package/src/components/chart/plugins/plugins.title.js +0 -61
  54. package/src/components/chart/plugins/plugins.tooltip.js +0 -1041
  55. package/src/components/chart/scale/scale.js +0 -951
  56. package/src/components/chart/scale/scale.linear.js +0 -268
  57. package/src/components/chart/scale/scale.logarithmic.js +0 -135
  58. package/src/components/chart/scale/scale.step.js +0 -430
  59. package/src/components/chart/scale/scale.time.category.js +0 -338
  60. package/src/components/chart/scale/scale.time.js +0 -49
  61. package/src/components/chart/style/chart.scss +0 -405
  62. package/src/components/chart/uses.js +0 -721
  63. package/src/components/chartBrush/ChartBrush.vue +0 -323
  64. package/src/components/chartBrush/chartBrush.core.js +0 -691
  65. package/src/components/chartBrush/index.js +0 -9
  66. package/src/components/chartBrush/uses.js +0 -23
  67. package/src/components/chartGroup/ChartGroup.vue +0 -144
  68. package/src/components/chartGroup/index.js +0 -9
  69. package/src/components/chartGroup/style/chartGroup.scss +0 -5
  70. package/src/components/chartGroup/uses.js +0 -53
  71. package/src/components/checkbox/Checkbox.vue +0 -229
  72. package/src/components/checkbox/index.js +0 -7
  73. package/src/components/checkboxGroup/CheckboxGroup.vue +0 -44
  74. package/src/components/checkboxGroup/index.js +0 -7
  75. package/src/components/contextMenu/ContextMenu.vue +0 -95
  76. package/src/components/contextMenu/MenuList.vue +0 -182
  77. package/src/components/contextMenu/index.js +0 -7
  78. package/src/components/contextMenu/uses.js +0 -223
  79. package/src/components/datePicker/DatePicker.vue +0 -504
  80. package/src/components/datePicker/index.js +0 -7
  81. package/src/components/datePicker/uses.js +0 -460
  82. package/src/components/grid/Grid.vue +0 -1535
  83. package/src/components/grid/GridColumnSetting.vue +0 -358
  84. package/src/components/grid/GridFilterSetting.vue +0 -323
  85. package/src/components/grid/GridPagination.vue +0 -75
  86. package/src/components/grid/GridSummary.vue +0 -314
  87. package/src/components/grid/GridToolbar.vue +0 -35
  88. package/src/components/grid/icon/icon-option-button.vue +0 -17
  89. package/src/components/grid/icon/icon-sort-button.vue +0 -67
  90. package/src/components/grid/index.js +0 -11
  91. package/src/components/grid/style/grid.scss +0 -417
  92. package/src/components/grid/uses.js +0 -1629
  93. package/src/components/icon/Icon.vue +0 -53
  94. package/src/components/icon/index.js +0 -8
  95. package/src/components/inputNumber/InputNumber.vue +0 -212
  96. package/src/components/inputNumber/index.js +0 -7
  97. package/src/components/inputNumber/uses.js +0 -217
  98. package/src/components/loading/Loading.vue +0 -125
  99. package/src/components/loading/index.js +0 -7
  100. package/src/components/menu/Menu.vue +0 -79
  101. package/src/components/menu/MenuItem.vue +0 -201
  102. package/src/components/menu/index.js +0 -7
  103. package/src/components/message/Message.vue +0 -229
  104. package/src/components/message/index.js +0 -34
  105. package/src/components/messageBox/MessageBox.vue +0 -358
  106. package/src/components/messageBox/index.js +0 -22
  107. package/src/components/notification/Notification.vue +0 -316
  108. package/src/components/notification/index.js +0 -49
  109. package/src/components/pagination/Pagination.vue +0 -317
  110. package/src/components/pagination/index.js +0 -7
  111. package/src/components/pagination/pageButton.vue +0 -31
  112. package/src/components/progress/Progress.vue +0 -139
  113. package/src/components/progress/index.js +0 -7
  114. package/src/components/radio/Radio.vue +0 -159
  115. package/src/components/radio/index.js +0 -7
  116. package/src/components/radioGroup/RadioGroup.vue +0 -41
  117. package/src/components/radioGroup/index.js +0 -7
  118. package/src/components/scheduler/Scheduler.vue +0 -149
  119. package/src/components/scheduler/index.js +0 -7
  120. package/src/components/scheduler/uses.js +0 -183
  121. package/src/components/select/Select.vue +0 -556
  122. package/src/components/select/index.js +0 -7
  123. package/src/components/select/uses.js +0 -379
  124. package/src/components/slider/Slider.vue +0 -505
  125. package/src/components/slider/index.js +0 -7
  126. package/src/components/slider/uses.js +0 -391
  127. package/src/components/tabPanel/TabPanel.vue +0 -74
  128. package/src/components/tabPanel/index.js +0 -7
  129. package/src/components/tabs/Tabs.vue +0 -517
  130. package/src/components/tabs/index.js +0 -7
  131. package/src/components/textField/TextField.vue +0 -399
  132. package/src/components/textField/index.js +0 -7
  133. package/src/components/timePicker/TimePicker.vue +0 -364
  134. package/src/components/timePicker/index.js +0 -7
  135. package/src/components/toggle/Toggle.vue +0 -115
  136. package/src/components/toggle/index.js +0 -7
  137. package/src/components/tree/Tree.vue +0 -338
  138. package/src/components/tree/TreeNode.vue +0 -293
  139. package/src/components/tree/index.js +0 -7
  140. package/src/components/treeGrid/TreeGrid.vue +0 -1074
  141. package/src/components/treeGrid/TreeGridNode.vue +0 -349
  142. package/src/components/treeGrid/TreeGridToolbar.vue +0 -35
  143. package/src/components/treeGrid/icon/icon-tree.png +0 -0
  144. package/src/components/treeGrid/index.js +0 -9
  145. package/src/components/treeGrid/style/treeGrid.scss +0 -277
  146. package/src/components/treeGrid/uses.js +0 -1178
  147. package/src/components/window/Window.vue +0 -329
  148. package/src/components/window/index.js +0 -7
  149. package/src/components/window/uses.js +0 -908
  150. package/src/directives/clickoutside.js +0 -90
  151. package/src/main.js +0 -120
  152. package/src/style/components/input.scss +0 -108
  153. package/src/style/functions.scss +0 -3
  154. package/src/style/index.scss +0 -6
  155. package/src/style/lib/fonts/EVUI.eot +0 -0
  156. package/src/style/lib/fonts/EVUI.svg +0 -293
  157. package/src/style/lib/fonts/EVUI.ttf +0 -0
  158. package/src/style/lib/fonts/EVUI.woff +0 -0
  159. package/src/style/lib/icon.css +0 -888
  160. package/src/style/mixins.scss +0 -94
  161. package/src/style/themes.scss +0 -69
  162. package/src/style/variables.scss +0 -22
@@ -1,379 +0,0 @@
1
- import {
2
- ref, reactive, computed, watch,
3
- nextTick, getCurrentInstance, onMounted, onUnmounted,
4
- } from 'vue';
5
- import {
6
- getRegExp,
7
- engToKor,
8
- korToEng,
9
- } from 'korean-regexp';
10
-
11
- export const useModel = () => {
12
- const { props, emit } = getCurrentInstance();
13
-
14
- /**
15
- * Select 컴포넌트의 v-model 값
16
- * single 모드 : modelValue(String), 없는 경우 null
17
- * multiple 모드 : modelValue(Array), 없는 경우 []
18
- */
19
- const singleMv = {
20
- get: () => {
21
- if (props.items.some(v => v.value === props.modelValue)) {
22
- return props.modelValue;
23
- }
24
- return null;
25
- },
26
- set: value => emit('update:modelValue', value),
27
- };
28
- const multiMv = {
29
- get: () => {
30
- if (Array.isArray(props.modelValue)) {
31
- return props.modelValue;
32
- }
33
- return [];
34
- },
35
- set: value => emit('update:modelValue', value),
36
- };
37
- const mv = computed(!props.multiple ? singleMv : multiMv);
38
-
39
- /**
40
- * 현재 select에서 선택된 항목들
41
- * single 모드 : { name: 'name', value: 'value' }
42
- * multiple 모드 : [{ name: 'name', value: 'value' }, {...}]
43
- */
44
- const singleSm = () => props.items.find(v => v.value === mv.value)?.name;
45
- const multipleSm = () => props.items.filter(v => props.modelValue.includes(v.value));
46
- const selectedModel = computed(!props.multiple ? singleSm : multipleSm);
47
-
48
- const computedPlaceholder = computed(() => {
49
- if (!props.multiple) {
50
- return props.placeholder;
51
- }
52
- return mv.value.length ? null : props.placeholder;
53
- });
54
-
55
- /**
56
- * clearable 모드일 때, 항목(mv) 전체 삭제 아이콘 존재여부
57
- */
58
- const singleIci = () => mv.value;
59
- const multipleIci = () => mv.value.length;
60
- const isClearableIcon = computed(!props.multiple ? singleIci : multipleIci);
61
-
62
- /**
63
- * clearable모드일 때 [x] 아이콘 클릭 시 mv값을 초기화
64
- */
65
- const removeAllMv = () => {
66
- if (!props.disabled) {
67
- if (!props.multiple) {
68
- mv.value = null;
69
- } else {
70
- mv.value.splice(0);
71
- mv.value = [...mv.value];
72
- }
73
- }
74
- };
75
-
76
- /**
77
- * 해당 컴포넌트의 v-model값이 변경(change)되는 이벤트
78
- */
79
- const changeMv = async () => {
80
- await nextTick();
81
- emit('change', mv.value);
82
- };
83
-
84
- /**
85
- * multiple 모드인 경우 선택된 value를 mv에서 삭제하는 로직
86
- * @param val - tagWrapper에서 [x]클릭된 목록의 value
87
- */
88
- const removeMv = async (val) => {
89
- if (!props.disabled) {
90
- const idx = mv.value.indexOf(val);
91
- mv.value.splice(idx, 1);
92
- mv.value = [...mv.value];
93
- await changeMv();
94
- }
95
- };
96
-
97
- return {
98
- mv,
99
- selectedModel,
100
- computedPlaceholder,
101
- isClearableIcon,
102
- removeAllMv,
103
- removeMv,
104
- changeMv,
105
- };
106
- };
107
-
108
- export const useDropdown = (param) => {
109
- const { props } = getCurrentInstance();
110
- const { mv, changeMv } = param;
111
-
112
- const isDropbox = ref(false);
113
- const filterTextRef = ref(props.filterText);
114
- const select = ref(null);
115
- const selectWrapper = ref(null);
116
- const dropbox = ref(null);
117
- const itemWrapper = ref(null);
118
- const dropboxWidth = ref('100%');
119
- const initialDropboxWidth = ref(null);
120
- const dropboxPosition = reactive({
121
- top: 0,
122
- });
123
-
124
- /**
125
- * filterable 모드 시 인풋박스에 입력된 텍스트가 포함된 목록 가져오기
126
- * @param val - filterable 모드 시 인풋박스에 입력된 텍스트
127
- * @returns [] - 필터링 결과의 목록
128
- */
129
- const filteredItems = computed(() => {
130
- if (!filterTextRef.value || !props.filterable) {
131
- return props.items;
132
- }
133
- const trimText = filterTextRef.value?.trim();
134
- const korean = engToKor(trimText);
135
- const eng = korToEng(trimText);
136
-
137
- return props.items.filter(({ name }) => (
138
- name.search(getRegExp(trimText)) > -1
139
- || name.search(getRegExp(korean)) > -1
140
- || name.search(getRegExp(eng)) > -1
141
- ));
142
- });
143
-
144
- /**
145
- * filterable 에서 text input 이벤트 핸들러
146
- */
147
- const changeFilterText = (e) => {
148
- filterTextRef.value = e?.target?.value;
149
- };
150
-
151
- /**
152
- * dropdown box 위치 변경하는 메소드
153
- */
154
- const changeDropboxPosition = async () => {
155
- await nextTick();
156
- const selectHeight = selectWrapper.value?.getBoundingClientRect().height;
157
- const selectY = selectWrapper.value?.getBoundingClientRect().y;
158
- const dropboxHeight = dropbox.value?.getBoundingClientRect().height;
159
- const docHeight = document.documentElement.clientHeight;
160
- if (docHeight < selectY + selectHeight + dropboxHeight) {
161
- dropboxPosition.top = `-${dropboxHeight}px`; // dropTop
162
- } else {
163
- dropboxPosition.top = `${selectHeight}px`; // dropDown
164
- }
165
- };
166
-
167
- /**
168
- * dropdown box 내 선택한 첫번째 아이템을 스크롤 가장 위로 올리는 메소드
169
- */
170
- const scrollToSelectedItem = () => {
171
- if (!itemWrapper.value?.children[0]?.children?.length) {
172
- return;
173
- }
174
- const SELECTED_CLS = 'selected';
175
- const childEls = itemWrapper.value.children[0].children;
176
- const wrapperOffsetTop = itemWrapper.value.offsetTop;
177
- let childEl = null;
178
- for (let i = 0; i < childEls.length; i++) {
179
- childEl = childEls[i];
180
- if (childEl.classList.contains(SELECTED_CLS)) {
181
- if (!childEl.offsetTop) {
182
- return;
183
- }
184
- itemWrapper.value.scrollTop = childEl.offsetTop - wrapperOffsetTop;
185
- break;
186
- }
187
- }
188
- };
189
-
190
- const calculateDropboxWidth = async () => {
191
- if (itemWrapper.value && dropbox.value) {
192
- await nextTick();
193
-
194
- if (initialDropboxWidth.value === null
195
- || initialDropboxWidth.value !== selectWrapper.value.offsetWidth) {
196
- initialDropboxWidth.value = selectWrapper.value.offsetWidth;
197
- }
198
-
199
- const items = itemWrapper.value.querySelectorAll('.ev-select-dropbox-item');
200
- let maxWidth = 0;
201
-
202
- items.forEach((item) => {
203
- const itemWidth = item.scrollWidth;
204
- if (itemWidth > maxWidth) {
205
- maxWidth = itemWidth;
206
- }
207
- });
208
-
209
- const { borderLeftWidth, borderRightWidth } = window.getComputedStyle(dropbox.value);
210
- const borderXWidth = parseInt(borderLeftWidth) + parseInt(borderRightWidth);
211
-
212
- const scrollbarWidth = itemWrapper.value.offsetWidth - itemWrapper.value.clientWidth;
213
- maxWidth += (scrollbarWidth + borderXWidth);
214
-
215
- const windowWidth = window.innerWidth;
216
- const dropboxRect = dropbox.value.getBoundingClientRect();
217
- const dropboxLeft = dropboxRect.left;
218
- const maxAllowedWidth = windowWidth - dropboxLeft - 20;
219
-
220
- const finalWidth = Math.max(
221
- Math.min((maxWidth), maxAllowedWidth),
222
- initialDropboxWidth.value,
223
- );
224
-
225
- dropboxWidth.value = `${finalWidth}px`;
226
- } else {
227
- dropboxWidth.value = '100%';
228
- }
229
- };
230
-
231
-
232
- watch(
233
- () => isDropbox.value,
234
- async (cur) => {
235
- if (cur) {
236
- await scrollToSelectedItem();
237
- await calculateDropboxWidth();
238
- }
239
- },
240
- );
241
-
242
- watch(
243
- () => filteredItems.value,
244
- async () => {
245
- await changeDropboxPosition();
246
- },
247
- );
248
-
249
-
250
- if (props.filterable) {
251
- watch(
252
- () => filteredItems.value,
253
- () => changeDropboxPosition(),
254
- );
255
- }
256
-
257
- /**
258
- * 인풋박스 클릭 이벤트
259
- * props로 받는 항목이 없는 경우 return처리
260
- * 인풋박스 위 클릭된 이벤트위치로 드롭박스의 사이즈, 위치를 계산
261
- */
262
- const clickSelectInput = async () => {
263
- if (props.items.length && !props.disabled) {
264
- isDropbox.value = !isDropbox.value;
265
- if (isDropbox.value) {
266
- await changeDropboxPosition();
267
- }
268
- }
269
- };
270
-
271
- /**
272
- * 드롭박스 외부 클릭 이벤트
273
- * filterable 모드인 경우는 필터링텍스트를 비운다.
274
- */
275
- const clickOutsideDropbox = () => {
276
- if (props.filterable) {
277
- filterTextRef.value = '';
278
- }
279
- isDropbox.value = false;
280
- };
281
-
282
- const allCheck = ref(false);
283
- const changeAllCheck = (isCheckBoxLabel) => {
284
- if (!isCheckBoxLabel) {
285
- allCheck.value = !allCheck.value;
286
- }
287
- if (allCheck.value) {
288
- mv.value = filteredItems.value.filter(item => !item.disabled).map(item => item.value);
289
- } else {
290
- mv.value = [];
291
- }
292
- };
293
- /**
294
- * 항목 클릭하여 선택하는 이벤트
295
- * 항목 내 disabled인 경우 클릭 로직을 타지 않게 한다.
296
- * multiple 모드가 아닌경우 리스트 클릭 시 드롭박스를 닫는다.
297
- * @param val - clicked item value
298
- */
299
- const singleClickItem = (val) => {
300
- if (props.filterable) {
301
- filterTextRef.value = '';
302
- }
303
- isDropbox.value = false;
304
- if (mv.value !== val) {
305
- mv.value = val;
306
- changeMv();
307
- }
308
- };
309
- const multipleClickItem = (val) => {
310
- if (props.filterable) {
311
- filterTextRef.value = '';
312
- }
313
- if (!mv.value.includes(val)) {
314
- mv.value.push(val);
315
- } else {
316
- const idx = mv.value.indexOf(val);
317
- mv.value.splice(idx, 1);
318
- }
319
- allCheck.value = mv.value.length === filteredItems.value.filter(item => !item.disabled).length;
320
- mv.value = [...mv.value];
321
- changeMv();
322
- };
323
- const clickItem = !props.multiple ? singleClickItem : multipleClickItem;
324
-
325
- /**
326
- * 선택된 아이템을 구별하는 메소드
327
- * @param val
328
- * @returns {boolean | array}
329
- */
330
- const singleSelectedCls = val => val === mv.value;
331
- const multipleSelectedCls = val => mv.value.includes(val);
332
- const selectedItemClass = !props.multiple ? singleSelectedCls : multipleSelectedCls;
333
-
334
- watch(() => mv.value, (curr) => {
335
- if (props.multiple && props.checkable) {
336
- if (curr.length === 0) {
337
- allCheck.value = false;
338
- } else {
339
- allCheck.value = curr.length === filteredItems.value.filter(item => !item.disabled).length;
340
- }
341
- changeDropboxPosition();
342
- }
343
- });
344
-
345
- const handleResize = () => {
346
- if (isDropbox.value) {
347
- calculateDropboxWidth();
348
- changeDropboxPosition();
349
- }
350
- };
351
-
352
- onMounted(() => {
353
- window.addEventListener('resize', handleResize);
354
- });
355
-
356
- onUnmounted(() => {
357
- window.removeEventListener('resize', handleResize);
358
- });
359
-
360
- return {
361
- select,
362
- selectWrapper,
363
- dropbox,
364
- itemWrapper,
365
- isDropbox,
366
- dropboxPosition,
367
- filterTextRef,
368
- filteredItems,
369
- clickSelectInput,
370
- clickOutsideDropbox,
371
- changeFilterText,
372
- changeDropboxPosition,
373
- clickItem,
374
- selectedItemClass,
375
- allCheck,
376
- changeAllCheck,
377
- dropboxWidth,
378
- };
379
- };