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.
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 -63681
  9. package/dist/evui.common.js.map +0 -1
  10. package/dist/evui.umd.js +0 -63691
  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 -1659
  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
Binary file
@@ -1,20 +0,0 @@
1
- export default {
2
- methods: {
3
- dispatch(componentName, eventName, params) {
4
- let parent = this.$parent || this.$root;
5
- let name = parent.$options.name;
6
-
7
- while (parent && (!name || name !== componentName)) {
8
- parent = parent.$parent;
9
-
10
- if (parent) {
11
- name = parent.$options.name;
12
- }
13
- }
14
- if (parent) {
15
- // eslint-disable-next-line prefer-spread
16
- parent.$emit.apply(parent, [eventName].concat(params));
17
- }
18
- },
19
- },
20
- };
@@ -1,67 +0,0 @@
1
- import BigNumber from 'bignumber.js';
2
-
3
- /**
4
- * Convert Number to BigNumber
5
- * @param {Number} value
6
- * @return {BigNumber}
7
- */
8
- function toBigNumber(value) { return new BigNumber(value); }
9
-
10
- /**
11
- * plus(+)
12
- * @param {Number} num1
13
- * @param {Number} num2
14
- * @return {Number}
15
- */
16
- function bnPlus(num1, num2) {
17
- return toBigNumber(num1).plus(toBigNumber(num2)).toNumber();
18
- }
19
-
20
- /**
21
- * minus(-)
22
- * @param {Number} num1
23
- * @param {Number} num2
24
- * @return {Number}
25
- */
26
- function bnMinus(num1, num2) {
27
- return toBigNumber(num1).minus(toBigNumber(num2)).toNumber();
28
- }
29
-
30
- /**
31
- * multiply(*)
32
- * @param {Number} num1
33
- * @param {Number} num2
34
- * @return {Number}
35
- */
36
- function bnMultiply(num1, num2) {
37
- return toBigNumber(num1).multipliedBy(toBigNumber(num2)).toNumber();
38
- }
39
-
40
- /**
41
- * divide(/)
42
- * @param {Number} dividend
43
- * @param {Number} divisor
44
- * @return {Number}
45
- */
46
- function bnDivide(dividend, divisor) {
47
- return toBigNumber(dividend).dividedBy(toBigNumber((divisor))).toNumber();
48
- }
49
-
50
- /**
51
- * floor
52
- * @param {Number} num
53
- * @param {Number} decimal
54
- * @return {Number}
55
- */
56
- function bnFloor(num, decimal) {
57
- return toBigNumber(num).decimalPlaces(decimal, BigNumber.ROUND_DOWN).toNumber();
58
- }
59
-
60
- export {
61
- toBigNumber,
62
- bnPlus,
63
- bnMinus,
64
- bnMultiply,
65
- bnDivide,
66
- bnFloor,
67
- };
@@ -1,223 +0,0 @@
1
- /**
2
- * Original Code
3
- * https://github.com/lodash/lodash/blob/es/debounce.js
4
- * lodash/debounce.js
5
- */
6
-
7
- function isObject(value) {
8
- const type = typeof value;
9
- return value != null && (type === 'object' || type === 'function');
10
- }
11
-
12
- /**
13
- * Creates a debounced function that delays invoking `func` until after `wait`
14
- * milliseconds have elapsed since the last time the debounced function was
15
- * invoked, or until the next browser frame is drawn. The debounced function
16
- * comes with a `cancel` method to cancel delayed `func` invocations and a
17
- * `flush` method to immediately invoke them. Provide `options` to indicate
18
- * whether `func` should be invoked on the leading and/or trailing edge of the
19
- * `wait` timeout. The `func` is invoked with the last arguments provided to the
20
- * debounced function. Subsequent calls to the debounced function return the
21
- * result of the last `func` invocation.
22
- *
23
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
24
- * invoked on the trailing edge of the timeout only if the debounced function
25
- * is invoked more than once during the `wait` timeout.
26
- *
27
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
28
- * until the next tick, similar to `setTimeout` with a timeout of `0`.
29
- *
30
- * If `wait` is omitted in an environment with `requestAnimationFrame`, `func`
31
- * invocation will be deferred until the next frame is drawn (typically about
32
- * 16ms).
33
- *
34
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
35
- * for details over the differences between `debounce` and `throttle`.
36
- *
37
- * @since 0.1.0
38
- * @category Function
39
- * @param {Function} func The function to debounce.
40
- * @param {number} [wait=0]
41
- * The number of milliseconds to delay; if omitted, `requestAnimationFrame` is
42
- * used (if available).
43
- * @param {Object} [options={}] The options object.
44
- * @param {boolean} [options.leading=false]
45
- * Specify invoking on the leading edge of the timeout.
46
- * @param {number} [options.maxWait]
47
- * The maximum time `func` is allowed to be delayed before it's invoked.
48
- * @param {boolean} [options.trailing=true]
49
- * Specify invoking on the trailing edge of the timeout.
50
- * @returns {Function} Returns the new debounced function.
51
- * @example
52
- *
53
- * // Avoid costly calculations while the window size is in flux.
54
- * jQuery(window).on('resize', debounce(calculateLayout, 150))
55
- *
56
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
57
- * jQuery(element).on('click', debounce(sendMail, 300, {
58
- * 'leading': true,
59
- * 'trailing': false
60
- * }))
61
- *
62
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
63
- * const debounced = debounce(batchLog, 250, { 'maxWait': 1000 })
64
- * const source = new EventSource('/stream')
65
- * jQuery(source).on('message', debounced)
66
- *
67
- * // Cancel the trailing debounced invocation.
68
- * jQuery(window).on('popstate', debounced.cancel)
69
- *
70
- * // Check for pending invocations.
71
- * const status = debounced.pending() ? "Pending..." : "Ready"
72
- */
73
- /* eslint-disable */
74
- function debounce(func, wait, options) {
75
- let lastArgs,
76
- lastThis,
77
- maxWait,
78
- result,
79
- timerId,
80
- lastCallTime
81
-
82
- let lastInvokeTime = 0
83
- let leading = false
84
- let maxing = false
85
- let trailing = true
86
-
87
- // Bypass `requestAnimationFrame` by explicitly setting `wait=0`.
88
- const useRAF = (!wait && wait !== 0 && typeof root.requestAnimationFrame === 'function')
89
-
90
- if (typeof func !== 'function') {
91
- throw new TypeError('Expected a function')
92
- }
93
- wait = +wait || 0
94
- if (isObject(options)) {
95
- leading = !!options.leading
96
- maxing = 'maxWait' in options
97
- maxWait = maxing ? Math.max(+options.maxWait || 0, wait) : maxWait
98
- trailing = 'trailing' in options ? !!options.trailing : trailing
99
- }
100
-
101
- function invokeFunc(time) {
102
- const args = lastArgs
103
- const thisArg = lastThis
104
-
105
- lastArgs = lastThis = undefined
106
- lastInvokeTime = time
107
- result = func.apply(thisArg, args)
108
- return result
109
- }
110
-
111
- function startTimer(pendingFunc, wait) {
112
- if (useRAF) {
113
- window.cancelAnimationFrame(timerId)
114
- return window.requestAnimationFrame(pendingFunc)
115
- }
116
- return setTimeout(pendingFunc, wait)
117
- }
118
-
119
- function cancelTimer(id) {
120
- if (useRAF) {
121
- return window.cancelAnimationFrame(id)
122
- }
123
- clearTimeout(id)
124
- }
125
-
126
- function leadingEdge(time) {
127
- // Reset any `maxWait` timer.
128
- lastInvokeTime = time
129
- // Start the timer for the trailing edge.
130
- timerId = startTimer(timerExpired, wait)
131
- // Invoke the leading edge.
132
- return leading ? invokeFunc(time) : result
133
- }
134
-
135
- function remainingWait(time) {
136
- const timeSinceLastCall = time - lastCallTime
137
- const timeSinceLastInvoke = time - lastInvokeTime
138
- const timeWaiting = wait - timeSinceLastCall
139
-
140
- return maxing
141
- ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke)
142
- : timeWaiting
143
- }
144
-
145
- function shouldInvoke(time) {
146
- const timeSinceLastCall = time - lastCallTime
147
- const timeSinceLastInvoke = time - lastInvokeTime
148
-
149
- // Either this is the first call, activity has stopped and we're at the
150
- // trailing edge, the system time has gone backwards and we're treating
151
- // it as the trailing edge, or we've hit the `maxWait` limit.
152
- return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
153
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait))
154
- }
155
-
156
- function timerExpired() {
157
- const time = Date.now()
158
- if (shouldInvoke(time)) {
159
- return trailingEdge(time)
160
- }
161
- // Restart the timer.
162
- timerId = startTimer(timerExpired, remainingWait(time))
163
- }
164
-
165
- function trailingEdge(time) {
166
- timerId = undefined
167
-
168
- // Only invoke if we have `lastArgs` which means `func` has been
169
- // debounced at least once.
170
- if (trailing && lastArgs) {
171
- return invokeFunc(time)
172
- }
173
- lastArgs = lastThis = undefined
174
- return result
175
- }
176
-
177
- function cancel() {
178
- if (timerId !== undefined) {
179
- cancelTimer(timerId)
180
- }
181
- lastInvokeTime = 0
182
- lastArgs = lastCallTime = lastThis = timerId = undefined
183
- }
184
-
185
- function flush() {
186
- return timerId === undefined ? result : trailingEdge(Date.now())
187
- }
188
-
189
- function pending() {
190
- return timerId !== undefined
191
- }
192
-
193
- function debounced(...args) {
194
- const time = Date.now()
195
- const isInvoking = shouldInvoke(time)
196
-
197
- lastArgs = args
198
- lastThis = this
199
- lastCallTime = time
200
-
201
- if (isInvoking) {
202
- if (timerId === undefined) {
203
- return leadingEdge(lastCallTime)
204
- }
205
- if (maxing) {
206
- // Handle invocations in a tight loop.
207
- timerId = startTimer(timerExpired, wait)
208
- return invokeFunc(lastCallTime)
209
- }
210
- }
211
- if (timerId === undefined) {
212
- timerId = startTimer(timerExpired, wait)
213
- }
214
- return result
215
- }
216
- debounced.cancel = cancel
217
- debounced.flush = flush
218
- debounced.pending = pending
219
- return debounced
220
- }
221
-
222
- export default debounce
223
- /* eslint-enable */
@@ -1,151 +0,0 @@
1
- const windowConsole = window.console;
2
- export const Console = {
3
- log(...data) {
4
- windowConsole.log(...data);
5
- },
6
- warn(...data) {
7
- windowConsole.warn(...data);
8
- },
9
- info(...data) {
10
- windowConsole.info(...data);
11
- },
12
- error(...data) {
13
- windowConsole.error(...data);
14
- },
15
- debug(...data) {
16
- windowConsole.debug(...data);
17
- },
18
- dir(item, options) {
19
- windowConsole.dir(item, options);
20
- },
21
- };
22
-
23
- export function getQuantity(input) {
24
- let output = null;
25
- if (typeof input === 'string' || typeof input === 'number') {
26
- const match = /^(normal|(-*\d+(?:\.\d+)?)(px|%)?)$/.exec(input);
27
- output = match ? { value: +match[2], unit: match[3] || undefined } : null;
28
- }
29
-
30
- return output;
31
- }
32
-
33
- export function getSize(size) {
34
- let sizeValue = '100%';
35
- if (size) {
36
- sizeValue = size.unit ? size.value + size.unit : `${size.value}px`;
37
- }
38
-
39
- return sizeValue;
40
- }
41
-
42
- export function getMatchedComponentsDownward(context, componentName) {
43
- const children = context.$children;
44
- const result = [];
45
- if (!children) {
46
- return result;
47
- }
48
- for (let i = 0; i < children.length; i++) {
49
- const v = children[i];
50
- const name = v.$options.name;
51
- if (name === componentName) {
52
- result.push(v);
53
- } else {
54
- result.concat(getMatchedComponentsDownward(v, componentName));
55
- }
56
- }
57
- return result;
58
- }
59
-
60
- export function getMatchedComponentUpward(context, componentName) {
61
- let parent = context.$parent;
62
- let name = parent.$options.name;
63
-
64
- while (parent && (!name || componentName !== name)) {
65
- parent = parent.$parent;
66
- if (parent) {
67
- name = parent.$options.name;
68
- }
69
- }
70
-
71
- return parent;
72
- }
73
-
74
- export function truthyNumber(v) {
75
- return typeof v === 'number' && !Number.isNaN(v);
76
- }
77
-
78
- export function truthy(...args) {
79
- return args.every(truthyNumber);
80
- }
81
-
82
- export function convertToPercent(value, totalValue) {
83
- const res = (value / totalValue) * 100;
84
- if (!truthy(value, totalValue, res) || value === 0 || totalValue === 0) {
85
- return 0;
86
- }
87
-
88
- return res.toFixed(2);
89
- }
90
-
91
- export function convertToValue(value, totalValue) {
92
- const res = (value / 100) * totalValue;
93
- if (!truthy(value, totalValue, res) || value === 0 || totalValue === 0) {
94
- return 0;
95
- }
96
-
97
- return res.toFixed(2);
98
- }
99
-
100
- export function millions(v) {
101
- return truthy(v) ? 1e6 * v : 0;
102
- }
103
-
104
- export function billions(v) {
105
- return truthy(v) ? 1e9 * v : 0;
106
- }
107
-
108
- export function trillion(v) {
109
- return truthy(v) ? 1e12 * v : 0;
110
- }
111
-
112
- export function quadrillion(v) {
113
- return truthy(v) ? 1e15 * v : 0;
114
- }
115
-
116
- export function numberWithComma(v) {
117
- const reg = /\B(?=(\d{3})+(?!\d))/g;
118
-
119
- if (truthy(v)) {
120
- if (Number.isInteger(v)) {
121
- return v.toString().replace(reg, ',');
122
- }
123
-
124
- const part = v.toString().split('.');
125
- return part[0].replace(reg, ',') + (part[1] ? `.${part[1]}` : '');
126
- }
127
-
128
- return false;
129
- }
130
-
131
- export function getPrecision(v) {
132
- const decimal = v?.toString().split('.')[1] || 0;
133
- return decimal ? decimal.length : 0;
134
- }
135
-
136
- export function checkNullAndUndefined(value) {
137
- return value === null || value === undefined;
138
- }
139
-
140
- /**
141
- * Check if the device is mobile
142
- * @returns {boolean}
143
- */
144
- export function mobileCheck() {
145
- return (
146
- /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
147
- navigator.userAgent,
148
- )
149
- || 'ontouchstart' in window
150
- );
151
- }
@@ -1,78 +0,0 @@
1
- export default {
2
- quantity(input) {
3
- let output;
4
-
5
- if (typeof input === 'string' || typeof input === 'number') {
6
- const match = (/^(normal|(\d+(?:\.\d+)?)(px|%)?)$/).exec(input);
7
- output = match ? { value: +match[2], unit: match[3] || undefined } : undefined;
8
- } else {
9
- output = undefined;
10
- }
11
- return output;
12
- },
13
-
14
- /**
15
- * % 는 퍼센트로 숫자 및 문자 숫자는 px로 이상한값은 0px로 반환
16
- * @param input
17
- * @returns px | % | undefiend
18
- */
19
- numberToPixel(input) {
20
- let output;
21
- let result;
22
-
23
- if (typeof input === 'string' || typeof input === 'number') {
24
- const match = (/^(normal|(\d+(?:\.\d+)?)(px|%)?)$/).exec(input);
25
- output = match ? { value: +match[2], unit: match[3] || undefined } : undefined;
26
- } else {
27
- output = undefined;
28
- }
29
-
30
- if (output === null || output === undefined) {
31
- result = undefined;
32
- } else if (output.unit === '%') {
33
- result = `${output.value}%`;
34
- } else {
35
- result = `${output.value}px`;
36
- }
37
- return result;
38
- },
39
-
40
- /**
41
- * % 값인지 확인 하기
42
- * @param val
43
- * @returns true | false
44
- */
45
- isPercentValue(val) {
46
- let result;
47
- if (typeof val !== 'string') {
48
- result = false;
49
- } else if (val.indexOf('%') === (val.length - 1)) {
50
- result = true;
51
- } else {
52
- result = false;
53
- }
54
-
55
- return result;
56
- },
57
-
58
- /**
59
- * 컬럼 min max 체크하기
60
- * @param val
61
- * @param min
62
- * @param max
63
- * @returns {*}
64
- */
65
- checkColSize(val, min, max) {
66
- let result;
67
-
68
- if (min && val < min) {
69
- result = min;
70
- } else if (max && val > max) {
71
- result = max;
72
- } else {
73
- result = val;
74
- }
75
-
76
- return result;
77
- },
78
- };
@@ -1,83 +0,0 @@
1
- import debounce from './utils.debounce';
2
-
3
- /**
4
- * Original Code
5
- * https://github.com/lodash/lodash/blob/es/throttle.js
6
- * lodash/throttle.js
7
- */
8
-
9
- function isObject(value) {
10
- const type = typeof value;
11
- return value != null && (type === 'object' || type === 'function');
12
- }
13
-
14
- /** Error message constants. */
15
- const FUNC_ERROR_TEXT = 'Expected a function';
16
-
17
- /**
18
- * Creates a throttled function that only invokes `func` at most once per
19
- * every `wait` milliseconds. The throttled function comes with a `cancel`
20
- * method to cancel delayed `func` invocations and a `flush` method to
21
- * immediately invoke them. Provide `options` to indicate whether `func`
22
- * should be invoked on the leading and/or trailing edge of the `wait`
23
- * timeout. The `func` is invoked with the last arguments provided to the
24
- * throttled function. Subsequent calls to the throttled function return the
25
- * result of the last `func` invocation.
26
- *
27
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
28
- * invoked on the trailing edge of the timeout only if the throttled function
29
- * is invoked more than once during the `wait` timeout.
30
- *
31
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
32
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
33
- *
34
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
35
- * for details over the differences between `_.throttle` and `_.debounce`.
36
- *
37
- * @static
38
- * @memberOf _
39
- * @since 0.1.0
40
- * @category Function
41
- * @param {Function} func The function to throttle.
42
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
43
- * @param {Object} [options={}] The options object.
44
- * @param {boolean} [options.leading=true]
45
- * Specify invoking on the leading edge of the timeout.
46
- * @param {boolean} [options.trailing=true]
47
- * Specify invoking on the trailing edge of the timeout.
48
- * @returns {Function} Returns the new throttled function.
49
- * @example
50
- *
51
- * // Avoid excessively updating the position while scrolling.
52
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
53
- *
54
- * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
55
- * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
56
- * jQuery(element).on('click', throttled);
57
- *
58
- * // Cancel the trailing throttled invocation.
59
- * jQuery(window).on('popstate', throttled.cancel);
60
- */
61
- /* eslint-disable */
62
- function throttle(func, wait, options) {
63
- let leading = true;
64
- let trailing = true;
65
-
66
- if (typeof func != 'function') {
67
- throw new TypeError(FUNC_ERROR_TEXT);
68
- }
69
-
70
- if (isObject(options)) {
71
- leading = 'leading' in options ? !!options.leading : leading;
72
- trailing = 'trailing' in options ? !!options.trailing : trailing;
73
- }
74
-
75
- return debounce(func, wait, {
76
- 'leading': leading,
77
- 'maxWait': wait,
78
- 'trailing': trailing
79
- });
80
- }
81
-
82
- export default throttle;
83
- /* eslint-enable */
@@ -1,18 +0,0 @@
1
- function findComponentUpward(context, componentName, componentNames) {
2
- let componentNamesTemp = componentNames;
3
- if (typeof componentName === 'string') {
4
- componentNamesTemp = [componentName];
5
- } else {
6
- componentNamesTemp = componentName;
7
- }
8
-
9
- let parent = context.$parent;
10
- let name = parent.$options.name;
11
- while (parent && (!name || componentNamesTemp.indexOf(name) < 0)) {
12
- parent = parent.$parent;
13
- if (parent) name = parent.$options.name;
14
- }
15
- return parent;
16
- }
17
- // eslint-disable-next-line import/prefer-default-export
18
- export { findComponentUpward };