bi-eleme 2.2.1 → 2.4.1

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 (130) hide show
  1. package/lib/alert.js +4 -4
  2. package/lib/aside.js +4 -4
  3. package/lib/autocomplete.js +10 -10
  4. package/lib/avatar.js +4 -4
  5. package/lib/backtop.js +6 -6
  6. package/lib/badge.js +4 -4
  7. package/lib/breadcrumb-item.js +4 -4
  8. package/lib/breadcrumb.js +4 -4
  9. package/lib/button-group.js +4 -4
  10. package/lib/button.js +4 -4
  11. package/lib/calendar.js +15 -15
  12. package/lib/card.js +4 -4
  13. package/lib/carousel-item.js +4 -4
  14. package/lib/carousel.js +6 -6
  15. package/lib/cascader-panel.js +10 -10
  16. package/lib/cascader.js +12 -12
  17. package/lib/checkbox-button.js +4 -4
  18. package/lib/checkbox-group.js +4 -4
  19. package/lib/checkbox.js +4 -4
  20. package/lib/col.js +2 -2
  21. package/lib/collapse-item.js +6 -6
  22. package/lib/collapse.js +4 -4
  23. package/lib/color-picker.js +8 -8
  24. package/lib/container.js +4 -4
  25. package/lib/date-picker.js +65 -64
  26. package/lib/descriptions-item.js +2 -2
  27. package/lib/descriptions.js +2 -2
  28. package/lib/dialog.js +8 -8
  29. package/lib/divider.js +4 -4
  30. package/lib/drawer.js +6 -6
  31. package/lib/dropdown-item.js +4 -4
  32. package/lib/dropdown-menu.js +4 -4
  33. package/lib/dropdown.js +16 -16
  34. package/lib/element-ui.common.js +4773 -311
  35. package/lib/empty.js +4 -4
  36. package/lib/footer.js +4 -4
  37. package/lib/form-item.js +6 -6
  38. package/lib/form.js +11 -11
  39. package/lib/header.js +4 -4
  40. package/lib/icon.js +4 -4
  41. package/lib/image.js +8 -8
  42. package/lib/index.js +1 -1
  43. package/lib/infinite-scroll.js +2 -2
  44. package/lib/input-number.js +6 -6
  45. package/lib/input.js +6 -6
  46. package/lib/link.js +4 -4
  47. package/lib/loading.js +6 -6
  48. package/lib/main.js +4 -4
  49. package/lib/menu-item-group.js +4 -4
  50. package/lib/menu-item.js +6 -6
  51. package/lib/menu.js +6 -6
  52. package/lib/message-box.js +13 -13
  53. package/lib/message.js +8 -8
  54. package/lib/notification.js +8 -8
  55. package/lib/option-group.js +4 -4
  56. package/lib/option.js +4 -4
  57. package/lib/page-header.js +4 -4
  58. package/lib/pagination.js +4 -4
  59. package/lib/popconfirm.js +8 -8
  60. package/lib/popover.js +4 -4
  61. package/lib/progress.js +4 -4
  62. package/lib/radio-button.js +4 -4
  63. package/lib/radio-group.js +4 -4
  64. package/lib/radio.js +4 -4
  65. package/lib/rate.js +6 -6
  66. package/lib/result.js +4 -4
  67. package/lib/row.js +2 -2
  68. package/lib/scrollbar.js +2 -2
  69. package/lib/select.js +16 -16
  70. package/lib/skeleton-item.js +4 -4
  71. package/lib/skeleton.js +4 -4
  72. package/lib/slider.js +8 -8
  73. package/lib/spinner.js +4 -4
  74. package/lib/step.js +4 -4
  75. package/lib/steps.js +6 -6
  76. package/lib/submenu.js +6 -6
  77. package/lib/super-date.js +4833 -0
  78. package/lib/switch.js +6 -6
  79. package/lib/tab-pane.js +4 -4
  80. package/lib/table-column.js +2 -2
  81. package/lib/table.js +20 -18
  82. package/lib/tabs.js +4 -4
  83. package/lib/tag.js +4 -4
  84. package/lib/theme-chalk/index.css +1 -1
  85. package/lib/theme-chalk/super-date.css +1 -0
  86. package/lib/time-picker.js +59 -59
  87. package/lib/time-select.js +16 -16
  88. package/lib/timeline-item.js +4 -4
  89. package/lib/timeline.js +4 -4
  90. package/lib/tooltip.js +2 -2
  91. package/lib/transfer.js +8 -8
  92. package/lib/tree.js +6 -6
  93. package/lib/upload.js +15 -15
  94. package/lib/utils/date-util.js +5 -2
  95. package/lib/utils/date.js +67 -9
  96. package/package.json +1 -1
  97. package/packages/super-date/index.js +8 -0
  98. package/packages/super-date/src/basic/date-table.vue +448 -0
  99. package/packages/super-date/src/basic/month-table.vue +278 -0
  100. package/packages/super-date/src/basic/time-spinner.vue +340 -0
  101. package/packages/super-date/src/basic/year-table.vue +144 -0
  102. package/packages/super-date/src/panel/date-range.vue +1000 -0
  103. package/packages/super-date/src/panel/date.vue +649 -0
  104. package/packages/super-date/src/panel/month-range.vue +289 -0
  105. package/packages/super-date/src/panel/time-range.vue +250 -0
  106. package/packages/super-date/src/panel/time-select.vue +195 -0
  107. package/packages/super-date/src/panel/time.vue +211 -0
  108. package/packages/super-date/src/picker/date-picker.js +29 -0
  109. package/packages/super-date/src/picker/time-picker.js +39 -0
  110. package/packages/super-date/src/picker/time-select.js +21 -0
  111. package/packages/super-date/src/picker.vue +956 -0
  112. package/packages/theme-chalk/lib/index.css +1 -1
  113. package/packages/theme-chalk/lib/super-date.css +1 -0
  114. package/packages/theme-chalk/src/index.scss +1 -0
  115. package/packages/theme-chalk/src/super-date/date-picker.scss +106 -0
  116. package/packages/theme-chalk/src/super-date/date-range-picker.scss +138 -0
  117. package/packages/theme-chalk/src/super-date/date-table.scss +154 -0
  118. package/packages/theme-chalk/src/super-date/month-table.scss +96 -0
  119. package/packages/theme-chalk/src/super-date/picker-panel.scss +130 -0
  120. package/packages/theme-chalk/src/super-date/picker.scss +204 -0
  121. package/packages/theme-chalk/src/super-date/time-picker.scss +94 -0
  122. package/packages/theme-chalk/src/super-date/time-range-picker.scss +32 -0
  123. package/packages/theme-chalk/src/super-date/time-spinner.scss +111 -0
  124. package/packages/theme-chalk/src/super-date/year-table.scss +66 -0
  125. package/packages/theme-chalk/src/super-date.scss +12 -0
  126. package/src/index.js +4 -1
  127. package/src/utils/date-util.js +3 -0
  128. package/src/utils/date.js +291 -195
  129. package/types/element-ui.d.ts +9 -5
  130. package/types/super-date.d.ts +124 -0
@@ -0,0 +1,124 @@
1
+ import { ElementUIComponent, ElementUIComponentSize, ElementUIHorizontalAlignment } from './component'
2
+
3
+ export type DatePickerType = 'year' | 'month' | 'date' | 'datetime' | 'week' | 'datetimerange' | 'daterange' | 'dates'
4
+ export type FirstDayOfWeek = 1 | 2 | 3 | 4 | 5 | 6 | 7
5
+
6
+ export interface DisabledDateChecker {
7
+ /**
8
+ * Determine if `date` will be disabled in the picker
9
+ *
10
+ * @param date The date to check
11
+ * @returns if `date` will be disabled in the picker
12
+ */
13
+ (date: Date): boolean
14
+ }
15
+
16
+ // Picked date range
17
+ export interface DateRange {
18
+ minDate: Date
19
+ maxDate: Date
20
+ }
21
+
22
+ export interface PickEventHandler {
23
+ /**
24
+ * Callback function that triggers when picks a date range
25
+ *
26
+ * @param dateRange The selected date range
27
+ */
28
+ (dateRange: DateRange): void
29
+ }
30
+
31
+ export interface ShortcutClickEventHandler {
32
+ /**
33
+ * Callback function that triggers when clicking on a shortcut.
34
+ * You can change the picker value by emitting the pick event.
35
+ * Example: `vm.$emit('pick', new Date())`
36
+ */
37
+ (vm: ElSuperDate): void
38
+ }
39
+
40
+ /** Shortcut options */
41
+ export interface Shortcut {
42
+ /** Title of the shortcut */
43
+ text: string
44
+
45
+ /** Callback function that triggers when picks a date range */
46
+ onClick?: ShortcutClickEventHandler
47
+ }
48
+
49
+ /** Options of el-date-picker */
50
+ export interface DatePickerOptions {
51
+ /** An object array to set shortcut options */
52
+ shortcuts?: Shortcut[]
53
+
54
+ /** A function determining if a date is disabled. */
55
+ disabledDate?: DisabledDateChecker
56
+
57
+ /** First day of week */
58
+ firstDayOfWeek?: FirstDayOfWeek
59
+
60
+ /** A callback that triggers when the seleted date is changed. Only for daterange and datetimerange. */
61
+ onPick?: PickEventHandler
62
+ }
63
+
64
+ /** DatePicker Component */
65
+ export declare class ElSuperDate extends ElementUIComponent {
66
+ /** The value of the date picker */
67
+ value: Date | string | Date[] | string[]
68
+
69
+ /** Whether DatePicker is read only */
70
+ readonly: boolean
71
+
72
+ /** Whether DatePicker is disabled */
73
+ disabled: boolean
74
+
75
+ /** Size of Input */
76
+ size: ElementUIComponentSize
77
+
78
+ /** Whether the input is editable */
79
+ editable: boolean
80
+
81
+ /** Whether to show clear button */
82
+ clearable: boolean
83
+
84
+ /** Placeholder */
85
+ placeholder: string
86
+
87
+ /** Placeholder for the start date in range mode */
88
+ startPlaceholder: string
89
+
90
+ /** Placeholder for the end date in range mode */
91
+ endPlaceholder: string
92
+
93
+ /** Type of the picker */
94
+ type: DatePickerType
95
+
96
+ /** Format of the picker */
97
+ format: string
98
+
99
+ /** Alignment */
100
+ align: ElementUIHorizontalAlignment
101
+
102
+ /** Custom class name for DatePicker's dropdown */
103
+ popperClass: string
104
+
105
+ /** Additional options, check the table below */
106
+ pickerOptions: DatePickerOptions
107
+
108
+ /** Range separator */
109
+ rangeSeparator: string
110
+
111
+ /** Default date of the calendar */
112
+ defaultValue: Date | number | string
113
+
114
+ /** Format of binding value. If not specified, the binding value will be a Date object */
115
+ valueFormat: string
116
+
117
+ /** name for the inner native input */
118
+ name: string
119
+
120
+ /**
121
+ * Focus the Input component
122
+ */
123
+ focus(): void
124
+ }