@zkwq/business 0.0.4 → 0.0.6

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 (227) hide show
  1. package/package.json +2 -2
  2. package/src/components/base/ui/alert/Alert.vue +0 -94
  3. package/src/components/base/ui/autocomplete/autocomplete-suggestions.vue +0 -77
  4. package/src/components/base/ui/autocomplete/autocomplete.vue +0 -305
  5. package/src/components/base/ui/backtop/main.vue +0 -112
  6. package/src/components/base/ui/button/Button.vue +0 -84
  7. package/src/components/base/ui/button/ButtonGroup.vue +0 -10
  8. package/src/components/base/ui/carousel/Carousel.vue +0 -304
  9. package/src/components/base/ui/carousel/CarouselItem.vue +0 -137
  10. package/src/components/base/ui/cascader/cascader.vue +0 -650
  11. package/src/components/base/ui/cascader-panel/cascader-menu.vue +0 -138
  12. package/src/components/base/ui/cascader-panel/cascader-node.vue +0 -246
  13. package/src/components/base/ui/cascader-panel/cascader-panel.vue +0 -382
  14. package/src/components/base/ui/cascader-panel/node.js +0 -166
  15. package/src/components/base/ui/cascader-panel/store.js +0 -62
  16. package/src/components/base/ui/checkbox/checkbox-button.vue +0 -199
  17. package/src/components/base/ui/checkbox/checkbox-group.vue +0 -48
  18. package/src/components/base/ui/checkbox/checkbox.vue +0 -222
  19. package/src/components/base/ui/col/col.js +0 -71
  20. package/src/components/base/ui/collapse/collapse-item.vue +0 -180
  21. package/src/components/base/ui/collapse/collapse.vue +0 -73
  22. package/src/components/base/ui/color-picker/color.js +0 -317
  23. package/src/components/base/ui/color-picker/components/alpha-slider.vue +0 -132
  24. package/src/components/base/ui/color-picker/components/hue-slider.vue +0 -123
  25. package/src/components/base/ui/color-picker/components/picker-dropdown.vue +0 -119
  26. package/src/components/base/ui/color-picker/components/predefine.vue +0 -61
  27. package/src/components/base/ui/color-picker/components/sv-panel.vue +0 -100
  28. package/src/components/base/ui/color-picker/draggable.js +0 -36
  29. package/src/components/base/ui/color-picker/index.js +0 -2
  30. package/src/components/base/ui/color-picker/main.vue +0 -188
  31. package/src/components/base/ui/date-picker/basic/date-table.vue +0 -441
  32. package/src/components/base/ui/date-picker/basic/month-table.vue +0 -254
  33. package/src/components/base/ui/date-picker/basic/time-spinner.vue +0 -304
  34. package/src/components/base/ui/date-picker/basic/year-table.vue +0 -101
  35. package/src/components/base/ui/date-picker/panel/date-range.vue +0 -680
  36. package/src/components/base/ui/date-picker/panel/date.vue +0 -597
  37. package/src/components/base/ui/date-picker/panel/month-range.vue +0 -289
  38. package/src/components/base/ui/date-picker/panel/time-range.vue +0 -248
  39. package/src/components/base/ui/date-picker/panel/time-select.vue +0 -178
  40. package/src/components/base/ui/date-picker/panel/time.vue +0 -186
  41. package/src/components/base/ui/date-picker/picker/date-picker.js +0 -43
  42. package/src/components/base/ui/date-picker/picker/time-picker.js +0 -39
  43. package/src/components/base/ui/date-picker/picker/time-select.js +0 -21
  44. package/src/components/base/ui/date-picker/picker.vue +0 -942
  45. package/src/components/base/ui/dialog/Index.vue +0 -212
  46. package/src/components/base/ui/directive/repeat-click.js +0 -24
  47. package/src/components/base/ui/directive/ripple.js +0 -303
  48. package/src/components/base/ui/divider/Divider.vue +0 -37
  49. package/src/components/base/ui/drawer/Drawer.vue +0 -202
  50. package/src/components/base/ui/dropdown/dropdown-item.vue +0 -39
  51. package/src/components/base/ui/dropdown/dropdown-menu.vue +0 -63
  52. package/src/components/base/ui/dropdown/dropdown.vue +0 -308
  53. package/src/components/base/ui/form/Form.vue +0 -167
  54. package/src/components/base/ui/form/FormItem.vue +0 -334
  55. package/src/components/base/ui/form/LabelWrap.vue +0 -69
  56. package/src/components/base/ui/icon/icon.vue +0 -13
  57. package/src/components/base/ui/image/image-viewer.vue +0 -302
  58. package/src/components/base/ui/image/main.vue +0 -248
  59. package/src/components/base/ui/index.js +0 -189
  60. package/src/components/base/ui/input/Input.vue +0 -438
  61. package/src/components/base/ui/input/calcTextareaHeight.js +0 -104
  62. package/src/components/base/ui/input-number/input-number.vue +0 -285
  63. package/src/components/base/ui/locale/format.js +0 -32
  64. package/src/components/base/ui/locale/index.js +0 -48
  65. package/src/components/base/ui/locale/lang/zh-CN.js +0 -120
  66. package/src/components/base/ui/menu/menu-item-group.vue +0 -45
  67. package/src/components/base/ui/menu/menu-item.vue +0 -112
  68. package/src/components/base/ui/menu/menu-mixin.js +0 -44
  69. package/src/components/base/ui/menu/menu.vue +0 -312
  70. package/src/components/base/ui/menu/submenu.vue +0 -408
  71. package/src/components/base/ui/message/index.js +0 -2
  72. package/src/components/base/ui/message/main.js +0 -87
  73. package/src/components/base/ui/message/main.vue +0 -110
  74. package/src/components/base/ui/message-box/main.js +0 -216
  75. package/src/components/base/ui/message-box/main.vue +0 -323
  76. package/src/components/base/ui/mixin/emitter.js +0 -31
  77. package/src/components/base/ui/mixin/focus.js +0 -9
  78. package/src/components/base/ui/mixin/locale.js +0 -9
  79. package/src/components/base/ui/mixin/migrating.js +0 -33
  80. package/src/components/base/ui/pagination/pager.vue +0 -163
  81. package/src/components/base/ui/pagination/pagination.jsx +0 -391
  82. package/src/components/base/ui/popover/directive.js +0 -20
  83. package/src/components/base/ui/popover/index.js +0 -14
  84. package/src/components/base/ui/popover/main.vue +0 -236
  85. package/src/components/base/ui/progress/Progress.vue +0 -227
  86. package/src/components/base/ui/radio/radio-button.vue +0 -114
  87. package/src/components/base/ui/radio/radio-group.vue +0 -111
  88. package/src/components/base/ui/radio/radio.vue +0 -134
  89. package/src/components/base/ui/row/row.js +0 -47
  90. package/src/components/base/ui/scrollbar/bar.jsx +0 -91
  91. package/src/components/base/ui/scrollbar/index.jsx +0 -203
  92. package/src/components/base/ui/scrollbar/util.js +0 -32
  93. package/src/components/base/ui/select/Option.vue +0 -168
  94. package/src/components/base/ui/select/OptionGroup.vue +0 -60
  95. package/src/components/base/ui/select/Select.vue +0 -920
  96. package/src/components/base/ui/select/SelectDropdown.vue +0 -74
  97. package/src/components/base/ui/select/navigation-mixin.js +0 -54
  98. package/src/components/base/ui/skeleton/index.js +0 -8
  99. package/src/components/base/ui/skeleton/src/img-placeholder.vue +0 -16
  100. package/src/components/base/ui/skeleton/src/index.vue +0 -80
  101. package/src/components/base/ui/skeleton/src/item.vue +0 -22
  102. package/src/components/base/ui/skeleton-item/index.js +0 -8
  103. package/src/components/base/ui/slider/button.vue +0 -238
  104. package/src/components/base/ui/slider/main.vue +0 -427
  105. package/src/components/base/ui/slider/marker.js +0 -18
  106. package/src/components/base/ui/style/alert.scss +0 -147
  107. package/src/components/base/ui/style/animations.scss +0 -65
  108. package/src/components/base/ui/style/autocomplete.scss +0 -81
  109. package/src/components/base/ui/style/backtop.scss +0 -20
  110. package/src/components/base/ui/style/button-group.scss +0 -0
  111. package/src/components/base/ui/style/button.scss +0 -380
  112. package/src/components/base/ui/style/carousel-item.scss +0 -50
  113. package/src/components/base/ui/style/carousel.scss +0 -161
  114. package/src/components/base/ui/style/cascader-panel.scss +0 -120
  115. package/src/components/base/ui/style/cascader.scss +0 -185
  116. package/src/components/base/ui/style/checkbox-button.scss +0 -0
  117. package/src/components/base/ui/style/checkbox-group.scss +0 -0
  118. package/src/components/base/ui/style/checkbox.scss +0 -360
  119. package/src/components/base/ui/style/col.scss +0 -156
  120. package/src/components/base/ui/style/collapse-item.scss +0 -0
  121. package/src/components/base/ui/style/collapse.scss +0 -114
  122. package/src/components/base/ui/style/color-picker.scss +0 -387
  123. package/src/components/base/ui/style/config.scss +0 -4
  124. package/src/components/base/ui/style/date-picker/date-picker.scss +0 -97
  125. package/src/components/base/ui/style/date-picker/date-range-picker.scss +0 -101
  126. package/src/components/base/ui/style/date-picker/date-table.scss +0 -151
  127. package/src/components/base/ui/style/date-picker/month-table.scss +0 -82
  128. package/src/components/base/ui/style/date-picker/picker-panel.scss +0 -117
  129. package/src/components/base/ui/style/date-picker/picker.scss +0 -197
  130. package/src/components/base/ui/style/date-picker/time-picker.scss +0 -85
  131. package/src/components/base/ui/style/date-picker/time-range-picker.scss +0 -31
  132. package/src/components/base/ui/style/date-picker/time-spinner.scss +0 -110
  133. package/src/components/base/ui/style/date-picker/year-table.scss +0 -51
  134. package/src/components/base/ui/style/date-picker.scss +0 -12
  135. package/src/components/base/ui/style/dialog.scss +0 -123
  136. package/src/components/base/ui/style/divider.scss +0 -47
  137. package/src/components/base/ui/style/drawer.scss +0 -218
  138. package/src/components/base/ui/style/dropdown-item.scss +0 -0
  139. package/src/components/base/ui/style/dropdown-menu.scss +0 -0
  140. package/src/components/base/ui/style/dropdown.scss +0 -185
  141. package/src/components/base/ui/style/form-item.scss +0 -0
  142. package/src/components/base/ui/style/form.scss +0 -203
  143. package/src/components/base/ui/style/function.scss +0 -43
  144. package/src/components/base/ui/style/icon.scss +0 -1167
  145. package/src/components/base/ui/style/image.scss +0 -184
  146. package/src/components/base/ui/style/index.scss +0 -57
  147. package/src/components/base/ui/style/input-number.scss +0 -187
  148. package/src/components/base/ui/style/input.scss +0 -477
  149. package/src/components/base/ui/style/menu-item-group.scss +0 -0
  150. package/src/components/base/ui/style/menu-item.scss +0 -0
  151. package/src/components/base/ui/style/menu.scss +0 -294
  152. package/src/components/base/ui/style/message-box.scss +0 -231
  153. package/src/components/base/ui/style/message.scss +0 -120
  154. package/src/components/base/ui/style/mixins.scss +0 -196
  155. package/src/components/base/ui/style/option-group.scss +0 -42
  156. package/src/components/base/ui/style/option.scss +0 -36
  157. package/src/components/base/ui/style/pagination.scss +0 -295
  158. package/src/components/base/ui/style/popover.scss +0 -40
  159. package/src/components/base/ui/style/popper.scss +0 -102
  160. package/src/components/base/ui/style/popup.scss +0 -42
  161. package/src/components/base/ui/style/progress.scss +0 -141
  162. package/src/components/base/ui/style/radio-button.scss +0 -113
  163. package/src/components/base/ui/style/radio-group.scss +0 -9
  164. package/src/components/base/ui/style/radio.scss +0 -203
  165. package/src/components/base/ui/style/ripple.scss +0 -35
  166. package/src/components/base/ui/style/row.scss +0 -39
  167. package/src/components/base/ui/style/scrollbar.scss +0 -75
  168. package/src/components/base/ui/style/select-dropdown.scss +0 -59
  169. package/src/components/base/ui/style/select.scss +0 -154
  170. package/src/components/base/ui/style/skeleton-item.scss +0 -84
  171. package/src/components/base/ui/style/skeleton.scss +0 -40
  172. package/src/components/base/ui/style/slider.scss +0 -250
  173. package/src/components/base/ui/style/switch.scss +0 -116
  174. package/src/components/base/ui/style/tabs.scss +0 -602
  175. package/src/components/base/ui/style/tag.scss +0 -174
  176. package/src/components/base/ui/style/tooltip.scss +0 -146
  177. package/src/components/base/ui/style/transition.scss +0 -138
  178. package/src/components/base/ui/style/upload.scss +0 -603
  179. package/src/components/base/ui/style/utils.scss +0 -39
  180. package/src/components/base/ui/style/var.scss +0 -1011
  181. package/src/components/base/ui/switch/index.vue +0 -174
  182. package/src/components/base/ui/tabs/tab-bar.vue +0 -57
  183. package/src/components/base/ui/tabs/tab-nav.vue +0 -294
  184. package/src/components/base/ui/tabs/tab-pane.vue +0 -56
  185. package/src/components/base/ui/tabs/tabs.vue +0 -191
  186. package/src/components/base/ui/tag/Tag.vue +0 -60
  187. package/src/components/base/ui/tooltip/tooltip.jsx +0 -234
  188. package/src/components/base/ui/upload/Index.vue +0 -340
  189. package/src/components/base/ui/upload/Upload.vue +0 -216
  190. package/src/components/base/ui/upload/UploadDragger.vue +0 -70
  191. package/src/components/base/ui/upload/UploadList.vue +0 -100
  192. package/src/components/base/ui/upload/ajax.js +0 -85
  193. package/src/components/base/ui/util/aria-dialog.js +0 -90
  194. package/src/components/base/ui/util/aria-utils.js +0 -122
  195. package/src/components/base/ui/util/clickoutside.js +0 -76
  196. package/src/components/base/ui/util/date-util.js +0 -292
  197. package/src/components/base/ui/util/date.js +0 -355
  198. package/src/components/base/ui/util/debounce.js +0 -21
  199. package/src/components/base/ui/util/deepmerge.js +0 -100
  200. package/src/components/base/ui/util/dom.js +0 -215
  201. package/src/components/base/ui/util/index.js +0 -262
  202. package/src/components/base/ui/util/menu/aria-menubar.js +0 -14
  203. package/src/components/base/ui/util/menu/aria-menuitem.js +0 -49
  204. package/src/components/base/ui/util/menu/aria-submenu.js +0 -59
  205. package/src/components/base/ui/util/merge.js +0 -14
  206. package/src/components/base/ui/util/popper.js +0 -1235
  207. package/src/components/base/ui/util/popup/index.js +0 -218
  208. package/src/components/base/ui/util/popup/popup-manager.js +0 -194
  209. package/src/components/base/ui/util/resize-events.js +0 -32
  210. package/src/components/base/ui/util/scroll-into-view.js +0 -27
  211. package/src/components/base/ui/util/scrollbar-width.js +0 -29
  212. package/src/components/base/ui/util/shared.js +0 -7
  213. package/src/components/base/ui/util/throttle.js +0 -91
  214. package/src/components/base/ui/util/types.js +0 -24
  215. package/src/components/base/ui/util/vdom.js +0 -5
  216. package/src/components/base/ui/util/vue-popper.js +0 -188
  217. package/src/components/normal/AggsItemH.vue +0 -145
  218. package/src/index.js +0 -10
  219. package/src/static/base-icons.ttf +0 -0
  220. package/src/static/base-icons.woff +0 -0
  221. package/src/static/label_bg.png +0 -0
  222. package/src/static/term-label-bg.png +0 -0
  223. package/src/style/app-article.scss +0 -698
  224. package/src/style/app-comment.scss +0 -259
  225. package/src/style/app-recommend.scss +0 -48
  226. package/src/style/app-richtext.scss +0 -176
  227. package/src/style/index.scss +0 -523
@@ -1,355 +0,0 @@
1
- /* Modified from https://github.com/taylorhakes/fecha
2
- *
3
- * The MIT License (MIT)
4
- *
5
- * Copyright (c) 2015 Taylor Hakes
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
-
26
- /*eslint-disable*/
27
- // 把 YYYY-MM-DD 改成了 yyyy-MM-dd
28
-
29
- /**
30
- * Parse or format dates
31
- * @class fecha
32
- */
33
- var fecha = {};
34
- var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
35
- var twoDigits = '\\d\\d?';
36
- var threeDigits = '\\d{3}';
37
- var fourDigits = '\\d{4}';
38
- var word = '[^\\s]+';
39
- var literal = /\[([^]*?)\]/gm;
40
- var noop = function () {
41
- };
42
-
43
- function regexEscape(str) {
44
- return str.replace(/[|\\{()[^$+*?.-]/g, '\\$&');
45
- }
46
-
47
- function shorten(arr, sLen) {
48
- var newArr = [];
49
- for (var i = 0, len = arr.length; i < len; i++) {
50
- newArr.push(arr[i].substr(0, sLen));
51
- }
52
- return newArr;
53
- }
54
-
55
- function monthUpdate(arrName) {
56
- return function (d, v, i18n) {
57
- var index = i18n[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase());
58
- if (~index) {
59
- d.month = index;
60
- }
61
- };
62
- }
63
-
64
- function pad(val, len) {
65
- val = String(val);
66
- len = len || 2;
67
- while (val.length < len) {
68
- val = '0' + val;
69
- }
70
- return val;
71
- }
72
-
73
- var dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
74
- var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
75
- var monthNamesShort = shorten(monthNames, 3);
76
- var dayNamesShort = shorten(dayNames, 3);
77
- fecha.i18n = {
78
- dayNamesShort: dayNamesShort,
79
- dayNames: dayNames,
80
- monthNamesShort: monthNamesShort,
81
- monthNames: monthNames,
82
- amPm: ['am', 'pm'],
83
- DoFn: function DoFn(D) {
84
- return D + ['th', 'st', 'nd', 'rd'][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10];
85
- }
86
- };
87
-
88
- var formatFlags = {
89
- D: function (dateObj) {
90
- return dateObj.getDay();
91
- },
92
- DD: function (dateObj) {
93
- return pad(dateObj.getDay());
94
- },
95
- Do: function (dateObj, i18n) {
96
- return i18n.DoFn(dateObj.getDate());
97
- },
98
- d: function (dateObj) {
99
- return dateObj.getDate();
100
- },
101
- dd: function (dateObj) {
102
- return pad(dateObj.getDate());
103
- },
104
- ddd: function (dateObj, i18n) {
105
- return i18n.dayNamesShort[dateObj.getDay()];
106
- },
107
- dddd: function (dateObj, i18n) {
108
- return i18n.dayNames[dateObj.getDay()];
109
- },
110
- M: function (dateObj) {
111
- return dateObj.getMonth() + 1;
112
- },
113
- MM: function (dateObj) {
114
- return pad(dateObj.getMonth() + 1);
115
- },
116
- MMM: function (dateObj, i18n) {
117
- return i18n.monthNamesShort[dateObj.getMonth()];
118
- },
119
- MMMM: function (dateObj, i18n) {
120
- return i18n.monthNames[dateObj.getMonth()];
121
- },
122
- yy: function (dateObj) {
123
- return pad(String(dateObj.getFullYear()), 4).substr(2);
124
- },
125
- yyyy: function (dateObj) {
126
- return pad(dateObj.getFullYear(), 4);
127
- },
128
- h: function (dateObj) {
129
- return dateObj.getHours() % 12 || 12;
130
- },
131
- hh: function (dateObj) {
132
- return pad(dateObj.getHours() % 12 || 12);
133
- },
134
- H: function (dateObj) {
135
- return dateObj.getHours();
136
- },
137
- HH: function (dateObj) {
138
- return pad(dateObj.getHours());
139
- },
140
- m: function (dateObj) {
141
- return dateObj.getMinutes();
142
- },
143
- mm: function (dateObj) {
144
- return pad(dateObj.getMinutes());
145
- },
146
- s: function (dateObj) {
147
- return dateObj.getSeconds();
148
- },
149
- ss: function (dateObj) {
150
- return pad(dateObj.getSeconds());
151
- },
152
- S: function (dateObj) {
153
- return Math.round(dateObj.getMilliseconds() / 100);
154
- },
155
- SS: function (dateObj) {
156
- return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
157
- },
158
- SSS: function (dateObj) {
159
- return pad(dateObj.getMilliseconds(), 3);
160
- },
161
- a: function (dateObj, i18n) {
162
- return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1];
163
- },
164
- A: function (dateObj, i18n) {
165
- return dateObj.getHours() < 12 ? i18n.amPm[0].toUpperCase() : i18n.amPm[1].toUpperCase();
166
- },
167
- ZZ: function (dateObj) {
168
- var o = dateObj.getTimezoneOffset();
169
- return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
170
- }
171
- };
172
-
173
- var parseFlags = {
174
- d: [twoDigits, function (d, v) {
175
- d.day = v;
176
- }],
177
- Do: [twoDigits + word, function (d, v) {
178
- d.day = parseInt(v, 10);
179
- }],
180
- M: [twoDigits, function (d, v) {
181
- d.month = v - 1;
182
- }],
183
- yy: [twoDigits, function (d, v) {
184
- var da = new Date(), cent = +('' + da.getFullYear()).substr(0, 2);
185
- d.year = '' + (v > 68 ? cent - 1 : cent) + v;
186
- }],
187
- h: [twoDigits, function (d, v) {
188
- d.hour = v;
189
- }],
190
- m: [twoDigits, function (d, v) {
191
- d.minute = v;
192
- }],
193
- s: [twoDigits, function (d, v) {
194
- d.second = v;
195
- }],
196
- yyyy: [fourDigits, function (d, v) {
197
- d.year = v;
198
- }],
199
- S: ['\\d', function (d, v) {
200
- d.millisecond = v * 100;
201
- }],
202
- SS: ['\\d{2}', function (d, v) {
203
- d.millisecond = v * 10;
204
- }],
205
- SSS: [threeDigits, function (d, v) {
206
- d.millisecond = v;
207
- }],
208
- D: [twoDigits, noop],
209
- ddd: [word, noop],
210
- MMM: [word, monthUpdate('monthNamesShort')],
211
- MMMM: [word, monthUpdate('monthNames')],
212
- a: [word, function (d, v, i18n) {
213
- var val = v.toLowerCase();
214
- if (val === i18n.amPm[0]) {
215
- d.isPm = false;
216
- } else if (val === i18n.amPm[1]) {
217
- d.isPm = true;
218
- }
219
- }],
220
- ZZ: ['[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z', function (d, v) {
221
- var parts = (v + '').match(/([+-]|\d\d)/gi), minutes;
222
-
223
- if (parts) {
224
- minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
225
- d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;
226
- }
227
- }]
228
- };
229
- parseFlags.dd = parseFlags.d;
230
- parseFlags.dddd = parseFlags.ddd;
231
- parseFlags.DD = parseFlags.D;
232
- parseFlags.mm = parseFlags.m;
233
- parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
234
- parseFlags.MM = parseFlags.M;
235
- parseFlags.ss = parseFlags.s;
236
- parseFlags.A = parseFlags.a;
237
-
238
-
239
- // Some common format strings
240
- fecha.masks = {
241
- default: 'ddd MMM dd yyyy HH:mm:ss',
242
- shortDate: 'M/D/yy',
243
- mediumDate: 'MMM d, yyyy',
244
- longDate: 'MMMM d, yyyy',
245
- fullDate: 'dddd, MMMM d, yyyy',
246
- shortTime: 'HH:mm',
247
- mediumTime: 'HH:mm:ss',
248
- longTime: 'HH:mm:ss.SSS'
249
- };
250
-
251
- /***
252
- * Format a date
253
- * @method format
254
- * @param {Date|number} dateObj
255
- * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'
256
- */
257
- fecha.format = function (dateObj, mask, i18nSettings) {
258
- var i18n = i18nSettings || fecha.i18n;
259
-
260
- if (typeof dateObj === 'number') {
261
- dateObj = new Date(dateObj);
262
- }
263
-
264
- if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
265
- throw new Error('Invalid Date in fecha.format');
266
- }
267
-
268
- mask = fecha.masks[mask] || mask || fecha.masks['default'];
269
-
270
- var literals = [];
271
-
272
- // Make literals inactive by replacing them with ??
273
- mask = mask.replace(literal, function ($0, $1) {
274
- literals.push($1);
275
- return '@@@';
276
- });
277
- // Apply formatting rules
278
- mask = mask.replace(token, function ($0) {
279
- return $0 in formatFlags ? formatFlags[$0](dateObj, i18n) : $0.slice(1, $0.length - 1);
280
- });
281
- // Inline literal values back into the formatted value
282
- return mask.replace(/@@@/g, function () {
283
- return literals.shift();
284
- });
285
- };
286
-
287
- /**
288
- * Parse a date string into an object, changes - into /
289
- * @method parse
290
- * @param {string} dateStr Date string
291
- * @param {string} format Date parse format
292
- * @returns {Date|boolean}
293
- */
294
- fecha.parse = function (dateStr, format, i18nSettings) {
295
- var i18n = i18nSettings || fecha.i18n;
296
-
297
- if (typeof format !== 'string') {
298
- throw new Error('Invalid format in fecha.parse');
299
- }
300
-
301
- format = fecha.masks[format] || format;
302
-
303
- // Avoid regular expression denial of service, fail early for really long strings
304
- // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
305
- if (dateStr.length > 1000) {
306
- return null;
307
- }
308
-
309
- var dateInfo = {};
310
- var parseInfo = [];
311
- var literals = [];
312
- format = format.replace(literal, function ($0, $1) {
313
- literals.push($1);
314
- return '@@@';
315
- });
316
- var newFormat = regexEscape(format).replace(token, function ($0) {
317
- if (parseFlags[$0]) {
318
- var info = parseFlags[$0];
319
- parseInfo.push(info[1]);
320
- return '(' + info[0] + ')';
321
- }
322
-
323
- return $0;
324
- });
325
- newFormat = newFormat.replace(/@@@/g, function () {
326
- return literals.shift();
327
- });
328
- var matches = dateStr.match(new RegExp(newFormat, 'i'));
329
- if (!matches) {
330
- return null;
331
- }
332
-
333
- for (var i = 1; i < matches.length; i++) {
334
- parseInfo[i - 1](dateInfo, matches[i], i18n);
335
- }
336
-
337
- var today = new Date();
338
- if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
339
- dateInfo.hour = +dateInfo.hour + 12;
340
- } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
341
- dateInfo.hour = 0;
342
- }
343
-
344
- var date;
345
- if (dateInfo.timezoneOffset != null) {
346
- dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
347
- date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
348
- dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0));
349
- } else {
350
- date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
351
- dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
352
- }
353
- return date;
354
- };
355
- export default fecha;
@@ -1,21 +0,0 @@
1
- /* eslint-disable no-undefined */
2
-
3
- var throttle = import('./throttle');
4
-
5
- /**
6
- * Debounce execution of a function. Debouncing, unlike throttling,
7
- * guarantees that a function is only executed a single time, either at the
8
- * very beginning of a series of calls, or at the very end.
9
- *
10
- * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
11
- * @param {Boolean} [atBegin] Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds
12
- * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.
13
- * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).
14
- * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
15
- * to `callback` when the debounced-function is executed.
16
- *
17
- * @return {Function} A new, debounced function.
18
- */
19
- export default function ( delay, atBegin, callback ) {
20
- return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);
21
- };
@@ -1,100 +0,0 @@
1
- var deepmerge = function () {
2
- 'use strict';
3
-
4
- var isMergeableObject = function isMergeableObject(value) {
5
- return isNonNullObject(value)
6
- && !isSpecial(value)
7
- };
8
-
9
- function isNonNullObject(value) {
10
- return !!value && typeof value === 'object'
11
- }
12
-
13
- function isSpecial(value) {
14
- var stringValue = Object.prototype.toString.call(value);
15
-
16
- return stringValue === '[object RegExp]'
17
- || stringValue === '[object Date]'
18
- || isReactElement(value)
19
- }
20
-
21
- // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
22
- var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
23
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
24
-
25
- function isReactElement(value) {
26
- return value.$$typeof === REACT_ELEMENT_TYPE
27
- }
28
-
29
- function emptyTarget(val) {
30
- return Array.isArray(val) ? [] : {}
31
- }
32
-
33
- function cloneIfNecessary(value, optionsArgument) {
34
- var clone = optionsArgument && optionsArgument.clone === true;
35
- return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value
36
- }
37
-
38
- function defaultArrayMerge(target, source, optionsArgument) {
39
- var destination = target.slice();
40
- source.forEach(function(e, i) {
41
- if (typeof destination[i] === 'undefined') {
42
- destination[i] = cloneIfNecessary(e, optionsArgument);
43
- } else if (isMergeableObject(e)) {
44
- destination[i] = deepmerge(target[i], e, optionsArgument);
45
- } else if (target.indexOf(e) === -1) {
46
- destination.push(cloneIfNecessary(e, optionsArgument));
47
- }
48
- });
49
- return destination
50
- }
51
-
52
- function mergeObject(target, source, optionsArgument) {
53
- var destination = {};
54
- if (isMergeableObject(target)) {
55
- Object.keys(target).forEach(function(key) {
56
- destination[key] = cloneIfNecessary(target[key], optionsArgument);
57
- });
58
- }
59
- Object.keys(source).forEach(function(key) {
60
- if (!isMergeableObject(source[key]) || !target[key]) {
61
- destination[key] = cloneIfNecessary(source[key], optionsArgument);
62
- } else {
63
- destination[key] = deepmerge(target[key], source[key], optionsArgument);
64
- }
65
- });
66
- return destination
67
- }
68
-
69
- function deepmerge(target, source, optionsArgument) {
70
- var sourceIsArray = Array.isArray(source);
71
- var targetIsArray = Array.isArray(target);
72
- var options = optionsArgument || { arrayMerge: defaultArrayMerge };
73
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
74
-
75
- if (!sourceAndTargetTypesMatch) {
76
- return cloneIfNecessary(source, optionsArgument)
77
- } else if (sourceIsArray) {
78
- var arrayMerge = options.arrayMerge || defaultArrayMerge;
79
- return arrayMerge(target, source, optionsArgument)
80
- } else {
81
- return mergeObject(target, source, optionsArgument)
82
- }
83
- }
84
-
85
- deepmerge.all = function deepmergeAll(array, optionsArgument) {
86
- if (!Array.isArray(array) || array.length < 2) {
87
- throw new Error('first argument should be an array with at least two elements')
88
- }
89
-
90
- // we are sure there are at least 2 values, so it is safe to have no initial value
91
- return array.reduce(function(prev, next) {
92
- return deepmerge(prev, next, optionsArgument)
93
- })
94
- };
95
-
96
- var deepmerge_1 = deepmerge
97
-
98
- return deepmerge_1
99
- }
100
- export default deepmerge ()
@@ -1,215 +0,0 @@
1
- import Vue from 'vue'
2
-
3
- const isServer = Vue.prototype.$isServer
4
- const SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g
5
- const MOZ_HACK_REGEXP = /^moz([A-Z])/
6
- const ieVersion = isServer ? 0 : Number(document.documentMode)
7
-
8
- const trim = function(string) {
9
- return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '')
10
- }
11
- const camelCase = function(name) {
12
- return name.replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
13
- return offset ? letter.toUpperCase() : letter
14
- }).replace(MOZ_HACK_REGEXP, 'Moz$1')
15
- }
16
-
17
- export const on = (function() {
18
- if (!isServer && document.addEventListener) {
19
- return function(element, event, handler) {
20
- if (element && event && handler) {
21
- element.addEventListener(event, handler, false)
22
- }
23
- }
24
- } else {
25
- return function(element, event, handler) {
26
- if (element && event && handler) {
27
- element.attachEvent('on' + event, handler)
28
- }
29
- }
30
- }
31
- })()
32
-
33
- export const off = (function() {
34
- if (!isServer && document.removeEventListener) {
35
- return function(element, event, handler) {
36
- if (element && event) {
37
- element.removeEventListener(event, handler, false)
38
- }
39
- }
40
- } else {
41
- return function(element, event, handler) {
42
- if (element && event) {
43
- element.detachEvent('on' + event, handler)
44
- }
45
- }
46
- }
47
- })()
48
-
49
- export const once = function(el, event, fn) {
50
- var listener = function() {
51
- if (fn) {
52
- fn.apply(this, arguments)
53
- }
54
- off(el, event, listener)
55
- }
56
- on(el, event, listener)
57
- }
58
-
59
- export function hasClass(el, cls) {
60
- if (!el || !cls) return false
61
- if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.')
62
- if (el.classList) {
63
- return el.classList.contains(cls)
64
- } else {
65
- return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1
66
- }
67
- }
68
-
69
- export function addClass(el, cls) {
70
- if (!el) return
71
- var curClass = el.className
72
- var classes = (cls || '').split(' ')
73
-
74
- for (var i = 0, j = classes.length; i < j; i++) {
75
- var clsName = classes[i]
76
- if (!clsName) continue
77
-
78
- if (el.classList) {
79
- el.classList.add(clsName)
80
- } else if (!hasClass(el, clsName)) {
81
- curClass += ' ' + clsName
82
- }
83
- }
84
- if (!el.classList) {
85
- el.className = curClass
86
- }
87
- }
88
-
89
- export function removeClass(el, cls) {
90
- if (!el || !cls) return
91
- var classes = cls.split(' ')
92
- var curClass = ' ' + el.className + ' '
93
-
94
- for (var i = 0, j = classes.length; i < j; i++) {
95
- var clsName = classes[i]
96
- if (!clsName) continue
97
-
98
- if (el.classList) {
99
- el.classList.remove(clsName)
100
- } else if (hasClass(el, clsName)) {
101
- curClass = curClass.replace(' ' + clsName + ' ', ' ')
102
- }
103
- }
104
- if (!el.classList) {
105
- el.className = trim(curClass)
106
- }
107
- }
108
-
109
- export const getStyle = ieVersion < 9 ? function(element, styleName) {
110
- if (isServer) return
111
- if (!element || !styleName) return null
112
- styleName = camelCase(styleName)
113
- if (styleName === 'float') {
114
- styleName = 'styleFloat'
115
- }
116
- try {
117
- switch (styleName) {
118
- case 'opacity':
119
- try {
120
- return element.filters.item('alpha').opacity / 100
121
- } catch (e) {
122
- return 1.0
123
- }
124
- default:
125
- return (element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null)
126
- }
127
- } catch (e) {
128
- return element.style[styleName]
129
- }
130
- } : function(element, styleName) {
131
- if (isServer) return
132
- if (!element || !styleName) return null
133
- styleName = camelCase(styleName)
134
- if (styleName === 'float') {
135
- styleName = 'cssFloat'
136
- }
137
- try {
138
- var computed = document.defaultView.getComputedStyle(element, '')
139
- return element.style[styleName] || computed ? computed[styleName] : null
140
- } catch (e) {
141
- return element.style[styleName]
142
- }
143
- }
144
-
145
- export function setStyle(element, styleName, value) {
146
- if (!element || !styleName) return
147
-
148
- if (typeof styleName === 'object') {
149
- for (var prop in styleName) {
150
- if (styleName.hasOwnProperty(prop)) {
151
- setStyle(element, prop, styleName[prop])
152
- }
153
- }
154
- } else {
155
- styleName = camelCase(styleName)
156
- if (styleName === 'opacity' && ieVersion < 9) {
157
- element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')'
158
- } else {
159
- element.style[styleName] = value
160
- }
161
- }
162
- }
163
-
164
- export const isScroll = (el, vertical) => {
165
- if (isServer) return
166
-
167
- const determinedDirection = vertical !== null || vertical !== undefined
168
- const overflow = determinedDirection
169
- ? vertical
170
- ? getStyle(el, 'overflow-y')
171
- : getStyle(el, 'overflow-x')
172
- : getStyle(el, 'overflow')
173
-
174
- return overflow.match(/(scroll|auto)/)
175
- }
176
-
177
- export const getScrollContainer = (el, vertical) => {
178
- if (isServer) return
179
-
180
- let parent = el
181
- while (parent) {
182
- if ([window, document, document.documentElement].includes(parent)) {
183
- return window
184
- }
185
- if (isScroll(parent, vertical)) {
186
- return parent
187
- }
188
- parent = parent.parentNode
189
- }
190
-
191
- return parent
192
- }
193
-
194
- export const isInContainer = (el, container) => {
195
- if (isServer || !el || !container) return false
196
-
197
- const elRect = el.getBoundingClientRect()
198
- let containerRect
199
-
200
- if ([window, document, document.documentElement, null, undefined].includes(container)) {
201
- containerRect = {
202
- top: 0,
203
- right: window.innerWidth,
204
- bottom: window.innerHeight,
205
- left: 0
206
- }
207
- } else {
208
- containerRect = container.getBoundingClientRect()
209
- }
210
-
211
- return elRect.top < containerRect.bottom &&
212
- elRect.bottom > containerRect.top &&
213
- elRect.right > containerRect.left &&
214
- elRect.left < containerRect.right
215
- }