bkui-vue 0.0.2-beta.133 → 0.0.2-beta.134
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +13 -13
- package/dist/index.esm.js +294 -278
- package/dist/index.umd.js +13 -13
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/date-picker/index.js +38 -6
- package/lib/date-picker/panel/date.d.ts +2 -2
- package/lib/date-picker/panel/time-range.d.ts +17 -0
- package/lib/date-picker/panel/time.d.ts +17 -1
- package/lib/search-select/index.js +2 -2
- package/lib/time-picker/time-picker.css +1 -0
- package/lib/time-picker/time-picker.less +1 -0
- package/lib/time-picker/time-picker.variable.css +1 -0
- package/package.json +1 -1
package/lib/date-picker/index.js
CHANGED
@@ -2547,6 +2547,17 @@ var timeProps = {
|
|
2547
2547
|
confirm: {
|
2548
2548
|
type: Boolean,
|
2549
2549
|
"default": false
|
2550
|
+
},
|
2551
|
+
selectionMode: {
|
2552
|
+
type: String,
|
2553
|
+
"default": 'date',
|
2554
|
+
validator: function validator(v) {
|
2555
|
+
if (['year', 'month', 'date', 'time'].indexOf(v) < 0) {
|
2556
|
+
console.error("selectionMode property is not valid: '".concat(v, "'"));
|
2557
|
+
return false;
|
2558
|
+
}
|
2559
|
+
return true;
|
2560
|
+
}
|
2550
2561
|
}
|
2551
2562
|
};
|
2552
2563
|
// function injectStrict<T>(key: InjectionKey<T>, fallback?: T) {
|
@@ -2642,7 +2653,8 @@ var timeProps = {
|
|
2642
2653
|
return newDate["set".concat((0,external_shared_namespaceObject.capitalize)(type))](date[type]);
|
2643
2654
|
});
|
2644
2655
|
if (isEmit) {
|
2645
|
-
|
2656
|
+
// pick 参数:dates, visible, type, isUseShortCut
|
2657
|
+
emit('pick', newDate, true, props.selectionMode);
|
2646
2658
|
}
|
2647
2659
|
}
|
2648
2660
|
function handlePickClick() {
|
@@ -2861,7 +2873,10 @@ var datePanelProps = {
|
|
2861
2873
|
state.pickerTable = getTableType(state.currentView);
|
2862
2874
|
}
|
2863
2875
|
};
|
2864
|
-
var handlePick = function handlePick(value
|
2876
|
+
var handlePick = function handlePick(value) {
|
2877
|
+
var _visible = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
2878
|
+
var type = arguments.length > 2 ? arguments[2] : undefined;
|
2879
|
+
var _shortcut = arguments.length > 3 ? arguments[3] : undefined;
|
2865
2880
|
var val = value;
|
2866
2881
|
if (props.selectionMode === 'year') {
|
2867
2882
|
val = new Date(value.getFullYear(), 0, 1);
|
@@ -2871,6 +2886,7 @@ var datePanelProps = {
|
|
2871
2886
|
val = new Date(value);
|
2872
2887
|
}
|
2873
2888
|
state.dates = [val];
|
2889
|
+
// pick 参数:dates, visible, type, isUseShortCut
|
2874
2890
|
emit('pick', val, false, type || props.selectionMode);
|
2875
2891
|
};
|
2876
2892
|
var handlePickSuccess = function handlePickSuccess() {
|
@@ -2884,7 +2900,7 @@ var datePanelProps = {
|
|
2884
2900
|
var handleShortcutClick = function handleShortcutClick(shortcut) {
|
2885
2901
|
if (shortcut.value) {
|
2886
2902
|
// pick 参数:dates, visible, type, isUseShortCut
|
2887
|
-
emit('pick', shortcut.value(), false,
|
2903
|
+
emit('pick', shortcut.value(), false, props.selectionMode, shortcut);
|
2888
2904
|
}
|
2889
2905
|
if (shortcut.onClick) {
|
2890
2906
|
shortcut.onClick(_this);
|
@@ -3099,6 +3115,7 @@ var datePanelProps = {
|
|
3099
3115
|
"ref": "timePickerRef",
|
3100
3116
|
"value": this.dates,
|
3101
3117
|
"format": this.format,
|
3118
|
+
"selectionMode": this.selectionMode,
|
3102
3119
|
"disabledDate": this.disabledDate,
|
3103
3120
|
"onPick": this.handlePick,
|
3104
3121
|
"onPick-click": this.handlePickClick,
|
@@ -3175,6 +3192,17 @@ var timeRangeProps = {
|
|
3175
3192
|
allowCrossDay: {
|
3176
3193
|
type: Boolean,
|
3177
3194
|
"default": false
|
3195
|
+
},
|
3196
|
+
selectionMode: {
|
3197
|
+
type: String,
|
3198
|
+
"default": 'date',
|
3199
|
+
validator: function validator(v) {
|
3200
|
+
if (['year', 'month', 'date', 'time'].indexOf(v) < 0) {
|
3201
|
+
console.error("selectionMode property is not valid: '".concat(v, "'"));
|
3202
|
+
return false;
|
3203
|
+
}
|
3204
|
+
return true;
|
3205
|
+
}
|
3178
3206
|
}
|
3179
3207
|
};
|
3180
3208
|
/* harmony default export */ const time_range = ((0,external_vue_namespaceObject.defineComponent)({
|
@@ -3285,7 +3313,8 @@ var timeRangeProps = {
|
|
3285
3313
|
}
|
3286
3314
|
}
|
3287
3315
|
if (isEmit) {
|
3288
|
-
|
3316
|
+
// pick 参数:dates, visible, type, isUseShortCut
|
3317
|
+
emit('pick', [dateStart, dateEnd], true, props.selectionMode);
|
3289
3318
|
}
|
3290
3319
|
}
|
3291
3320
|
function handleStartChange(date) {
|
@@ -3650,6 +3679,7 @@ var dateRangePanelProps = {
|
|
3650
3679
|
* handleConfirm
|
3651
3680
|
*/
|
3652
3681
|
var handleConfirm = function handleConfirm(visible, type) {
|
3682
|
+
// pick 参数:dates, visible, type, isUseShortCut
|
3653
3683
|
emit('pick', state.dates, visible, type || props.type);
|
3654
3684
|
};
|
3655
3685
|
/**
|
@@ -3680,7 +3710,7 @@ var dateRangePanelProps = {
|
|
3680
3710
|
selecting: false
|
3681
3711
|
};
|
3682
3712
|
}
|
3683
|
-
handleConfirm(false, type ||
|
3713
|
+
handleConfirm(false, type || props.selectionMode);
|
3684
3714
|
} else {
|
3685
3715
|
state.upToNowEnable = new Date(val).getTime() < new Date().getTime();
|
3686
3716
|
state.rangeState = {
|
@@ -3726,6 +3756,7 @@ var dateRangePanelProps = {
|
|
3726
3756
|
state.rangeState.to = to;
|
3727
3757
|
state.dates = [form, to];
|
3728
3758
|
state.selectedIndex = index;
|
3759
|
+
// pick 参数:dates, visible, type, isUseShortCut
|
3729
3760
|
emit('pick', value, false, 'shortcut', shortcut);
|
3730
3761
|
if (props.shortcutClose) {
|
3731
3762
|
emit('pick-success');
|
@@ -4079,6 +4110,7 @@ var dateRangePanelProps = {
|
|
4079
4110
|
}
|
4080
4111
|
}() : '']), [[external_vue_namespaceObject.vShow, !this.isTime]]), this.isTime ? (0,external_vue_namespaceObject.createVNode)(time_range, {
|
4081
4112
|
"ref": "timePickerRef",
|
4113
|
+
"selectionMode": this.selectionMode,
|
4082
4114
|
"value": this.dates,
|
4083
4115
|
"format": this.format,
|
4084
4116
|
"disabledDate": this.disabledDate,
|
@@ -4162,7 +4194,7 @@ function date_picker_objectSpread(target) { for (var i = 1; i < arguments.length
|
|
4162
4194
|
if (props.shortcutSelectedIndex !== -1) {
|
4163
4195
|
shortcut = props.shortcuts[props.shortcutSelectedIndex] || null;
|
4164
4196
|
if (shortcut) {
|
4165
|
-
initialValue = shortcut.value();
|
4197
|
+
initialValue = [shortcut.value()];
|
4166
4198
|
}
|
4167
4199
|
}
|
4168
4200
|
var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
|
@@ -108,7 +108,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
108
108
|
readonly default: () => {};
|
109
109
|
};
|
110
110
|
}, {
|
111
|
-
panelPickerHandlers: import("vue").ComputedRef<(value: any, type: any) => void>;
|
111
|
+
panelPickerHandlers: import("vue").ComputedRef<(value: any, _visible: boolean, type: any, _shortcut: any) => void>;
|
112
112
|
datePanelLabel: import("vue").ComputedRef<{
|
113
113
|
separator: any;
|
114
114
|
labels: any[];
|
@@ -126,7 +126,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
126
126
|
handleToggleTime: () => void;
|
127
127
|
handlePickSuccess: () => void;
|
128
128
|
handlePickClear: () => void;
|
129
|
-
handlePick: (value: any, type: any) => void;
|
129
|
+
handlePick: (value: any, _visible: boolean, type: any, _shortcut: any) => void;
|
130
130
|
handlePickClick: () => void;
|
131
131
|
timePickerRef: any;
|
132
132
|
resolveClassName: (cls: string) => string;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { ExtractPropTypes, PropType } from 'vue';
|
2
|
+
import { SelectionModeType } from '../interface';
|
2
3
|
declare const timeRangeProps: {
|
3
4
|
steps: {
|
4
5
|
type: PropType<number[]>;
|
@@ -16,6 +17,11 @@ declare const timeRangeProps: {
|
|
16
17
|
type: BooleanConstructor;
|
17
18
|
default: boolean;
|
18
19
|
};
|
20
|
+
selectionMode: {
|
21
|
+
type: PropType<SelectionModeType>;
|
22
|
+
default: string;
|
23
|
+
validator(v: any): boolean;
|
24
|
+
};
|
19
25
|
};
|
20
26
|
export type TimeRangePanelProps = Readonly<ExtractPropTypes<typeof timeRangeProps>>;
|
21
27
|
declare const _default: import("vue").DefineComponent<{
|
@@ -35,6 +41,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
35
41
|
type: BooleanConstructor;
|
36
42
|
default: boolean;
|
37
43
|
};
|
44
|
+
selectionMode: {
|
45
|
+
type: PropType<SelectionModeType>;
|
46
|
+
default: string;
|
47
|
+
validator(v: any): boolean;
|
48
|
+
};
|
38
49
|
disabledHours: {
|
39
50
|
readonly type: ArrayConstructor;
|
40
51
|
readonly default: () => any[];
|
@@ -322,6 +333,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
322
333
|
type: BooleanConstructor;
|
323
334
|
default: boolean;
|
324
335
|
};
|
336
|
+
selectionMode: {
|
337
|
+
type: PropType<SelectionModeType>;
|
338
|
+
default: string;
|
339
|
+
validator(v: any): boolean;
|
340
|
+
};
|
325
341
|
disabledHours: {
|
326
342
|
readonly type: ArrayConstructor;
|
327
343
|
readonly default: () => any[];
|
@@ -492,5 +508,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
492
508
|
disabledSeconds: unknown[];
|
493
509
|
hideDisabledOptions: boolean;
|
494
510
|
enterMode: boolean;
|
511
|
+
selectionMode: SelectionModeType;
|
495
512
|
}, {}>;
|
496
513
|
export default _default;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { ExtractPropTypes, PropType } from 'vue';
|
2
|
-
import { IDisabledHMS } from '../interface';
|
2
|
+
import { IDisabledHMS, SelectionModeType } from '../interface';
|
3
3
|
declare const timeProps: {
|
4
4
|
disabledDate: {
|
5
5
|
type: FunctionConstructor;
|
@@ -21,6 +21,11 @@ declare const timeProps: {
|
|
21
21
|
type: BooleanConstructor;
|
22
22
|
default: boolean;
|
23
23
|
};
|
24
|
+
selectionMode: {
|
25
|
+
type: PropType<SelectionModeType>;
|
26
|
+
default: string;
|
27
|
+
validator(v: any): boolean;
|
28
|
+
};
|
24
29
|
};
|
25
30
|
export type TimePanelProps = Readonly<ExtractPropTypes<typeof timeProps>>;
|
26
31
|
declare const _default: import("vue").DefineComponent<{
|
@@ -44,6 +49,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
44
49
|
type: BooleanConstructor;
|
45
50
|
default: boolean;
|
46
51
|
};
|
52
|
+
selectionMode: {
|
53
|
+
type: PropType<SelectionModeType>;
|
54
|
+
default: string;
|
55
|
+
validator(v: any): boolean;
|
56
|
+
};
|
47
57
|
disabledHours: {
|
48
58
|
readonly type: ArrayConstructor;
|
49
59
|
readonly default: () => any[];
|
@@ -273,6 +283,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
273
283
|
type: BooleanConstructor;
|
274
284
|
default: boolean;
|
275
285
|
};
|
286
|
+
selectionMode: {
|
287
|
+
type: PropType<SelectionModeType>;
|
288
|
+
default: string;
|
289
|
+
validator(v: any): boolean;
|
290
|
+
};
|
276
291
|
disabledHours: {
|
277
292
|
readonly type: ArrayConstructor;
|
278
293
|
readonly default: () => any[];
|
@@ -448,5 +463,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
448
463
|
disabledSeconds: unknown[];
|
449
464
|
hideDisabledOptions: boolean;
|
450
465
|
enterMode: boolean;
|
466
|
+
selectionMode: SelectionModeType;
|
451
467
|
}, {}>;
|
452
468
|
export default _default;
|
@@ -475,7 +475,7 @@ function _defineProperty(obj, key, value) {
|
|
475
475
|
;// CONCATENATED MODULE: external "vue"
|
476
476
|
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
477
477
|
var external_vue_y = x => () => x
|
478
|
-
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["
|
478
|
+
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective, ["shallowRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["watchEffect"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watchEffect, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
|
479
479
|
;// CONCATENATED MODULE: ../../node_modules/resize-detector/esm/index.js
|
480
480
|
var raf = null;
|
481
481
|
function requestAnimationFrame (callback) {
|
@@ -1696,7 +1696,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
1696
1696
|
if (!usingItem.value && !keyword.value) {
|
1697
1697
|
emit('delete');
|
1698
1698
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
1699
|
-
(
|
1699
|
+
setTimeout(setMenuList, 16);
|
1700
1700
|
return;
|
1701
1701
|
}
|
1702
1702
|
if ((_usingItem$value10 = usingItem.value) !== null && _usingItem$value10 !== void 0 && _usingItem$value10.values.length) {
|
@@ -223,6 +223,7 @@
|
|
223
223
|
|
224
224
|
.@{bk-prefix}-picker-panel-content .@{bk-prefix}-picker-panel-content .@{bk-prefix}-time-picker-cells {
|
225
225
|
min-width: 216px;
|
226
|
+
position: relative;
|
226
227
|
}
|
227
228
|
|
228
229
|
.@{bk-prefix}-picker-panel-content .@{bk-prefix}-picker-panel-content .@{bk-prefix}-time-picker-cells-with-seconds {
|