@blueking/date-picker 2.0.0-beta.44 → 2.0.0-beta.45
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/package.json +1 -1
- package/typings/components/date-picker.vue.d.ts +3 -1
- package/typings/components/natural-picker.vue.d.ts +3 -1
- package/typings/components/recent-picker.vue.d.ts +3 -1
- package/vue2/index.es.min.js +41 -6
- package/vue2/index.iife.min.js +48 -5
- package/vue2/index.umd.min.js +40 -5
- package/vue3/index.es.min.js +41 -6
- package/vue3/index.iife.min.js +40 -5
- package/vue3/index.umd.min.js +40 -5
package/package.json
CHANGED
|
@@ -2,7 +2,9 @@ import { type DateValue } from '../utils';
|
|
|
2
2
|
import { DateRange } from '../utils/date';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
4
4
|
value: DateRange;
|
|
5
|
-
}>, {
|
|
5
|
+
}>, {
|
|
6
|
+
handleSubmit: () => void;
|
|
7
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
8
|
change: (value: DateValue) => void;
|
|
7
9
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
8
10
|
value: DateRange;
|
|
@@ -4,7 +4,9 @@ interface IProps {
|
|
|
4
4
|
/** 已选择自然日期 */
|
|
5
5
|
value?: DateRange;
|
|
6
6
|
}
|
|
7
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<IProps>, {
|
|
7
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<IProps>, {
|
|
8
|
+
handleSubmit: () => void;
|
|
9
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
10
|
change: (value: NaturalDateValue) => void;
|
|
9
11
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<IProps>>> & {
|
|
10
12
|
onChange?: ((value: NaturalDateValue) => any) | undefined;
|
|
@@ -7,7 +7,9 @@ interface IProps {
|
|
|
7
7
|
}
|
|
8
8
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<IProps>, {
|
|
9
9
|
type: DateMode;
|
|
10
|
-
}>, {
|
|
10
|
+
}>, {
|
|
11
|
+
handleSubmit: () => void;
|
|
12
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
13
|
change: (value: RecentDateValue | FutureDateValue) => void;
|
|
12
14
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<IProps>, {
|
|
13
15
|
type: DateMode;
|
package/vue2/index.es.min.js
CHANGED
|
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "@blueking/bkui-library";
|
|
5
|
-
import { provide, inject, ref, customRef, defineComponent, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createBlock, createCommentVNode, createTextVNode, toDisplayString, shallowRef, watch, createElementVNode, normalizeClass, withModifiers, computed, onActivated, normalizeStyle, withDirectives, withKeys, onMounted, vShow, nextTick, mergeProps, KeepAlive, resolveDynamicComponent, onBeforeUnmount, createApp, h as h$1 } from "@blueking/bkui-library";
|
|
5
|
+
import { effectScope, getCurrentScope, onScopeDispose, provide, inject, ref, customRef, defineComponent, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createBlock, createCommentVNode, createTextVNode, toDisplayString, shallowRef, watch, createElementVNode, normalizeClass, withModifiers, computed, onActivated, normalizeStyle, withDirectives, withKeys, onMounted, vShow, nextTick, mergeProps, KeepAlive, resolveDynamicComponent, onBeforeUnmount, createApp, h as h$1 } from "@blueking/bkui-library";
|
|
6
6
|
import dayjs from "dayjs";
|
|
7
7
|
import customParseFormat from "dayjs/plugin/customParseFormat";
|
|
8
8
|
import localizedFormat from "dayjs/plugin/localizedFormat";
|
|
@@ -35538,6 +35538,25 @@ __webpack_exports__.BkTabPanel;
|
|
|
35538
35538
|
__webpack_exports__.PositionEnum;
|
|
35539
35539
|
__webpack_exports__.SortTypeEnum;
|
|
35540
35540
|
var __webpack_exports__default = __webpack_exports__["default"];
|
|
35541
|
+
function useKeydownEnter(callback) {
|
|
35542
|
+
const scope = effectScope();
|
|
35543
|
+
const handleKeydown = (event) => {
|
|
35544
|
+
if (event.key === "Enter") {
|
|
35545
|
+
callback(event);
|
|
35546
|
+
}
|
|
35547
|
+
};
|
|
35548
|
+
scope.run(() => {
|
|
35549
|
+
window.addEventListener("keydown", handleKeydown);
|
|
35550
|
+
});
|
|
35551
|
+
const stop = () => {
|
|
35552
|
+
scope.stop();
|
|
35553
|
+
window.removeEventListener("keydown", handleKeydown);
|
|
35554
|
+
};
|
|
35555
|
+
if (getCurrentScope()) {
|
|
35556
|
+
onScopeDispose(stop);
|
|
35557
|
+
}
|
|
35558
|
+
return stop;
|
|
35559
|
+
}
|
|
35541
35560
|
const getCookieByName = (name) => {
|
|
35542
35561
|
const match = document.cookie.match(new RegExp(`(^| )${name}=([^;]*)(;|$)`));
|
|
35543
35562
|
if (match) {
|
|
@@ -38089,7 +38108,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
38089
38108
|
value: {}
|
|
38090
38109
|
},
|
|
38091
38110
|
emits: ["change"],
|
|
38092
|
-
setup(__props, { emit: __emit }) {
|
|
38111
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
38093
38112
|
dayjs.extend(customParseFormat);
|
|
38094
38113
|
const props2 = __props;
|
|
38095
38114
|
const emits = __emit;
|
|
@@ -38262,7 +38281,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
38262
38281
|
hiddenEndPanel();
|
|
38263
38282
|
};
|
|
38264
38283
|
const handleSubmit = () => {
|
|
38265
|
-
if (startDate.value && endDate.value) {
|
|
38284
|
+
if (startDate.value && endDate.value && canConfirm.value) {
|
|
38266
38285
|
const startValue = isStartNow.value ? NowConstant : dayjs.tz(startDate.value.format(format.value ?? DefaultCommitFormat), timezoneInfo.value.label).valueOf();
|
|
38267
38286
|
const endValue = isEndNow.value ? NowConstant : dayjs.tz(endDate.value.format(format.value ?? DefaultCommitFormat), timezoneInfo.value.label).valueOf();
|
|
38268
38287
|
isValidate.value = validateDateValue([startValue || "", endValue || ""]);
|
|
@@ -38284,6 +38303,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
38284
38303
|
hiddenEndPanel();
|
|
38285
38304
|
}
|
|
38286
38305
|
};
|
|
38306
|
+
__expose({
|
|
38307
|
+
handleSubmit
|
|
38308
|
+
});
|
|
38287
38309
|
return (_ctx, _cache) => {
|
|
38288
38310
|
var _a;
|
|
38289
38311
|
return openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
@@ -38492,7 +38514,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
38492
38514
|
value: {}
|
|
38493
38515
|
},
|
|
38494
38516
|
emits: ["change"],
|
|
38495
|
-
setup(__props, { emit: __emit }) {
|
|
38517
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
38496
38518
|
const emits = __emit;
|
|
38497
38519
|
const props2 = __props;
|
|
38498
38520
|
const inputRef = ref();
|
|
@@ -38621,6 +38643,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
38621
38643
|
});
|
|
38622
38644
|
emits("change", value);
|
|
38623
38645
|
};
|
|
38646
|
+
__expose({
|
|
38647
|
+
handleSubmit
|
|
38648
|
+
});
|
|
38624
38649
|
return (_ctx, _cache) => {
|
|
38625
38650
|
return openBlock(), createElementBlock(
|
|
38626
38651
|
Fragment,
|
|
@@ -39062,7 +39087,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
39062
39087
|
value: {}
|
|
39063
39088
|
},
|
|
39064
39089
|
emits: ["change"],
|
|
39065
|
-
setup(__props, { emit: __emit }) {
|
|
39090
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
39066
39091
|
const emits = __emit;
|
|
39067
39092
|
const props2 = __props;
|
|
39068
39093
|
const recentUnit = ref("m");
|
|
@@ -39085,7 +39110,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
39085
39110
|
}
|
|
39086
39111
|
);
|
|
39087
39112
|
const handleSubmit = () => {
|
|
39088
|
-
if (!dateValue.value) return;
|
|
39113
|
+
if (!dateValue.value || !canSubmit.value) return;
|
|
39089
39114
|
const emitDate = props2.type === DateMode.FUTURE ? [NowConstant, `${DateMode.FUTURE}${dateValue.value}${recentUnit.value}`] : [`${DateMode.RECENT}${dateValue.value}${recentUnit.value}`, NowConstant].map(
|
|
39090
39115
|
(v2) => recentBaselineTime.value && recentBaselineTime.value !== NowConstant ? v2.replace(NowConstant, `(${recentBaselineTime.value})`) : v2
|
|
39091
39116
|
);
|
|
@@ -39097,6 +39122,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
39097
39122
|
}
|
|
39098
39123
|
emits("change", emitDate);
|
|
39099
39124
|
};
|
|
39125
|
+
__expose({
|
|
39126
|
+
handleSubmit
|
|
39127
|
+
});
|
|
39100
39128
|
return (_ctx, _cache) => {
|
|
39101
39129
|
return openBlock(), createElementBlock(
|
|
39102
39130
|
Fragment,
|
|
@@ -39398,6 +39426,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
39398
39426
|
const { validMsg, validateDateRange } = useValidate();
|
|
39399
39427
|
const timezoneSet = ref(false);
|
|
39400
39428
|
const activePanel = ref("common");
|
|
39429
|
+
const component = ref();
|
|
39401
39430
|
const defaultTabKey = computed(() => {
|
|
39402
39431
|
const tab2 = localStorage.getItem(getStoreTabKey(version.value));
|
|
39403
39432
|
if (!tab2) return DateMode.Date;
|
|
@@ -39419,6 +39448,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
39419
39448
|
return new DateRange(date, format.value, props2.timezone);
|
|
39420
39449
|
})
|
|
39421
39450
|
);
|
|
39451
|
+
useKeydownEnter(() => {
|
|
39452
|
+
var _a;
|
|
39453
|
+
(_a = component.value) == null ? void 0 : _a.handleSubmit();
|
|
39454
|
+
});
|
|
39422
39455
|
const handleChange = (date) => {
|
|
39423
39456
|
emits("change", date);
|
|
39424
39457
|
};
|
|
@@ -39525,6 +39558,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
39525
39558
|
null,
|
|
39526
39559
|
[
|
|
39527
39560
|
(openBlock(), createBlock(resolveDynamicComponent(getComponent()), {
|
|
39561
|
+
ref_key: "component",
|
|
39562
|
+
ref: component,
|
|
39528
39563
|
key: activeDatePickTab.value,
|
|
39529
39564
|
type: activeDatePickTab.value,
|
|
39530
39565
|
value: _ctx.defaultDate,
|
package/vue2/index.iife.min.js
CHANGED
|
@@ -275,6 +275,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
+
function effectScope(detached) {
|
|
279
|
+
return new EffectScope(detached);
|
|
280
|
+
}
|
|
278
281
|
function recordEffectScope(effect2, scope = activeEffectScope) {
|
|
279
282
|
if (scope && scope.active) {
|
|
280
283
|
scope.effects.push(effect2);
|
|
@@ -283,6 +286,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
283
286
|
function getCurrentScope() {
|
|
284
287
|
return activeEffectScope;
|
|
285
288
|
}
|
|
289
|
+
function onScopeDispose(fn) {
|
|
290
|
+
if (activeEffectScope) {
|
|
291
|
+
activeEffectScope.cleanups.push(fn);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
286
294
|
let activeEffect;
|
|
287
295
|
class ReactiveEffect {
|
|
288
296
|
constructor(fn, trigger2, scheduler, scope) {
|
|
@@ -42559,6 +42567,25 @@ ${$(r2)}`), n2;
|
|
|
42559
42567
|
})(zhCn);
|
|
42560
42568
|
var zhCnExports = zhCn.exports;
|
|
42561
42569
|
const cn = /* @__PURE__ */ getDefaultExportFromCjs(zhCnExports);
|
|
42570
|
+
function useKeydownEnter(callback) {
|
|
42571
|
+
const scope = effectScope();
|
|
42572
|
+
const handleKeydown = (event) => {
|
|
42573
|
+
if (event.key === "Enter") {
|
|
42574
|
+
callback(event);
|
|
42575
|
+
}
|
|
42576
|
+
};
|
|
42577
|
+
scope.run(() => {
|
|
42578
|
+
window.addEventListener("keydown", handleKeydown);
|
|
42579
|
+
});
|
|
42580
|
+
const stop = () => {
|
|
42581
|
+
scope.stop();
|
|
42582
|
+
window.removeEventListener("keydown", handleKeydown);
|
|
42583
|
+
};
|
|
42584
|
+
if (getCurrentScope()) {
|
|
42585
|
+
onScopeDispose(stop);
|
|
42586
|
+
}
|
|
42587
|
+
return stop;
|
|
42588
|
+
}
|
|
42562
42589
|
const getCookieByName = (name) => {
|
|
42563
42590
|
const match = document.cookie.match(new RegExp(`(^| )${name}=([^;]*)(;|$)`));
|
|
42564
42591
|
if (match) {
|
|
@@ -45110,7 +45137,7 @@ ${$(r2)}`), n2;
|
|
|
45110
45137
|
value: {}
|
|
45111
45138
|
},
|
|
45112
45139
|
emits: ["change"],
|
|
45113
|
-
setup(__props, { emit: __emit }) {
|
|
45140
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
45114
45141
|
dayjs.extend(customParseFormat);
|
|
45115
45142
|
const props2 = __props;
|
|
45116
45143
|
const emits = __emit;
|
|
@@ -45283,7 +45310,7 @@ ${$(r2)}`), n2;
|
|
|
45283
45310
|
hiddenEndPanel();
|
|
45284
45311
|
};
|
|
45285
45312
|
const handleSubmit = () => {
|
|
45286
|
-
if (startDate.value && endDate.value) {
|
|
45313
|
+
if (startDate.value && endDate.value && canConfirm.value) {
|
|
45287
45314
|
const startValue = isStartNow.value ? NowConstant : dayjs.tz(startDate.value.format(format.value ?? DefaultCommitFormat), timezoneInfo.value.label).valueOf();
|
|
45288
45315
|
const endValue = isEndNow.value ? NowConstant : dayjs.tz(endDate.value.format(format.value ?? DefaultCommitFormat), timezoneInfo.value.label).valueOf();
|
|
45289
45316
|
isValidate.value = validateDateValue([startValue || "", endValue || ""]);
|
|
@@ -45305,6 +45332,9 @@ ${$(r2)}`), n2;
|
|
|
45305
45332
|
hiddenEndPanel();
|
|
45306
45333
|
}
|
|
45307
45334
|
};
|
|
45335
|
+
__expose({
|
|
45336
|
+
handleSubmit
|
|
45337
|
+
});
|
|
45308
45338
|
return (_ctx, _cache) => {
|
|
45309
45339
|
var _a;
|
|
45310
45340
|
return openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
@@ -45513,7 +45543,7 @@ ${$(r2)}`), n2;
|
|
|
45513
45543
|
value: {}
|
|
45514
45544
|
},
|
|
45515
45545
|
emits: ["change"],
|
|
45516
|
-
setup(__props, { emit: __emit }) {
|
|
45546
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
45517
45547
|
const emits = __emit;
|
|
45518
45548
|
const props2 = __props;
|
|
45519
45549
|
const inputRef = ref();
|
|
@@ -45642,6 +45672,9 @@ ${$(r2)}`), n2;
|
|
|
45642
45672
|
});
|
|
45643
45673
|
emits("change", value);
|
|
45644
45674
|
};
|
|
45675
|
+
__expose({
|
|
45676
|
+
handleSubmit
|
|
45677
|
+
});
|
|
45645
45678
|
return (_ctx, _cache) => {
|
|
45646
45679
|
return openBlock(), createElementBlock(
|
|
45647
45680
|
Fragment,
|
|
@@ -46083,7 +46116,7 @@ ${$(r2)}`), n2;
|
|
|
46083
46116
|
value: {}
|
|
46084
46117
|
},
|
|
46085
46118
|
emits: ["change"],
|
|
46086
|
-
setup(__props, { emit: __emit }) {
|
|
46119
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
46087
46120
|
const emits = __emit;
|
|
46088
46121
|
const props2 = __props;
|
|
46089
46122
|
const recentUnit = ref("m");
|
|
@@ -46106,7 +46139,7 @@ ${$(r2)}`), n2;
|
|
|
46106
46139
|
}
|
|
46107
46140
|
);
|
|
46108
46141
|
const handleSubmit = () => {
|
|
46109
|
-
if (!dateValue.value) return;
|
|
46142
|
+
if (!dateValue.value || !canSubmit.value) return;
|
|
46110
46143
|
const emitDate = props2.type === DateMode.FUTURE ? [NowConstant, `${DateMode.FUTURE}${dateValue.value}${recentUnit.value}`] : [`${DateMode.RECENT}${dateValue.value}${recentUnit.value}`, NowConstant].map(
|
|
46111
46144
|
(v2) => recentBaselineTime.value && recentBaselineTime.value !== NowConstant ? v2.replace(NowConstant, `(${recentBaselineTime.value})`) : v2
|
|
46112
46145
|
);
|
|
@@ -46118,6 +46151,9 @@ ${$(r2)}`), n2;
|
|
|
46118
46151
|
}
|
|
46119
46152
|
emits("change", emitDate);
|
|
46120
46153
|
};
|
|
46154
|
+
__expose({
|
|
46155
|
+
handleSubmit
|
|
46156
|
+
});
|
|
46121
46157
|
return (_ctx, _cache) => {
|
|
46122
46158
|
return openBlock(), createElementBlock(
|
|
46123
46159
|
Fragment,
|
|
@@ -46419,6 +46455,7 @@ ${$(r2)}`), n2;
|
|
|
46419
46455
|
const { validMsg, validateDateRange } = useValidate();
|
|
46420
46456
|
const timezoneSet = ref(false);
|
|
46421
46457
|
const activePanel = ref("common");
|
|
46458
|
+
const component = ref();
|
|
46422
46459
|
const defaultTabKey = computed(() => {
|
|
46423
46460
|
const tab2 = localStorage.getItem(getStoreTabKey(version2.value));
|
|
46424
46461
|
if (!tab2) return DateMode.Date;
|
|
@@ -46440,6 +46477,10 @@ ${$(r2)}`), n2;
|
|
|
46440
46477
|
return new DateRange(date, format.value, props2.timezone);
|
|
46441
46478
|
})
|
|
46442
46479
|
);
|
|
46480
|
+
useKeydownEnter(() => {
|
|
46481
|
+
var _a;
|
|
46482
|
+
(_a = component.value) == null ? void 0 : _a.handleSubmit();
|
|
46483
|
+
});
|
|
46443
46484
|
const handleChange = (date) => {
|
|
46444
46485
|
emits("change", date);
|
|
46445
46486
|
};
|
|
@@ -46546,6 +46587,8 @@ ${$(r2)}`), n2;
|
|
|
46546
46587
|
null,
|
|
46547
46588
|
[
|
|
46548
46589
|
(openBlock(), createBlock(resolveDynamicComponent(getComponent()), {
|
|
46590
|
+
ref_key: "component",
|
|
46591
|
+
ref: component,
|
|
46549
46592
|
key: activeDatePickTab.value,
|
|
46550
46593
|
type: activeDatePickTab.value,
|
|
46551
46594
|
value: _ctx.defaultDate,
|
package/vue2/index.umd.min.js
CHANGED
|
@@ -35553,6 +35553,25 @@ ${$(r2)}`), n2;
|
|
|
35553
35553
|
__webpack_exports__.PositionEnum;
|
|
35554
35554
|
__webpack_exports__.SortTypeEnum;
|
|
35555
35555
|
var __webpack_exports__default = __webpack_exports__["default"];
|
|
35556
|
+
function useKeydownEnter(callback) {
|
|
35557
|
+
const scope = __WEBPACK_EXTERNAL_MODULE_vue__.effectScope();
|
|
35558
|
+
const handleKeydown = (event) => {
|
|
35559
|
+
if (event.key === "Enter") {
|
|
35560
|
+
callback(event);
|
|
35561
|
+
}
|
|
35562
|
+
};
|
|
35563
|
+
scope.run(() => {
|
|
35564
|
+
window.addEventListener("keydown", handleKeydown);
|
|
35565
|
+
});
|
|
35566
|
+
const stop = () => {
|
|
35567
|
+
scope.stop();
|
|
35568
|
+
window.removeEventListener("keydown", handleKeydown);
|
|
35569
|
+
};
|
|
35570
|
+
if (__WEBPACK_EXTERNAL_MODULE_vue__.getCurrentScope()) {
|
|
35571
|
+
__WEBPACK_EXTERNAL_MODULE_vue__.onScopeDispose(stop);
|
|
35572
|
+
}
|
|
35573
|
+
return stop;
|
|
35574
|
+
}
|
|
35556
35575
|
const getCookieByName = (name) => {
|
|
35557
35576
|
const match = document.cookie.match(new RegExp(`(^| )${name}=([^;]*)(;|$)`));
|
|
35558
35577
|
if (match) {
|
|
@@ -38104,7 +38123,7 @@ ${$(r2)}`), n2;
|
|
|
38104
38123
|
value: {}
|
|
38105
38124
|
},
|
|
38106
38125
|
emits: ["change"],
|
|
38107
|
-
setup(__props, { emit: __emit }) {
|
|
38126
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
38108
38127
|
dayjs.extend(customParseFormat);
|
|
38109
38128
|
const props2 = __props;
|
|
38110
38129
|
const emits = __emit;
|
|
@@ -38277,7 +38296,7 @@ ${$(r2)}`), n2;
|
|
|
38277
38296
|
hiddenEndPanel();
|
|
38278
38297
|
};
|
|
38279
38298
|
const handleSubmit = () => {
|
|
38280
|
-
if (startDate.value && endDate.value) {
|
|
38299
|
+
if (startDate.value && endDate.value && canConfirm.value) {
|
|
38281
38300
|
const startValue = isStartNow.value ? NowConstant : dayjs.tz(startDate.value.format(format.value ?? DefaultCommitFormat), timezoneInfo.value.label).valueOf();
|
|
38282
38301
|
const endValue = isEndNow.value ? NowConstant : dayjs.tz(endDate.value.format(format.value ?? DefaultCommitFormat), timezoneInfo.value.label).valueOf();
|
|
38283
38302
|
isValidate.value = validateDateValue([startValue || "", endValue || ""]);
|
|
@@ -38299,6 +38318,9 @@ ${$(r2)}`), n2;
|
|
|
38299
38318
|
hiddenEndPanel();
|
|
38300
38319
|
}
|
|
38301
38320
|
};
|
|
38321
|
+
__expose({
|
|
38322
|
+
handleSubmit
|
|
38323
|
+
});
|
|
38302
38324
|
return (_ctx, _cache) => {
|
|
38303
38325
|
var _a;
|
|
38304
38326
|
return __WEBPACK_EXTERNAL_MODULE_vue__.openBlock(), __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock("div", _hoisted_1$6, [
|
|
@@ -38507,7 +38529,7 @@ ${$(r2)}`), n2;
|
|
|
38507
38529
|
value: {}
|
|
38508
38530
|
},
|
|
38509
38531
|
emits: ["change"],
|
|
38510
|
-
setup(__props, { emit: __emit }) {
|
|
38532
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
38511
38533
|
const emits = __emit;
|
|
38512
38534
|
const props2 = __props;
|
|
38513
38535
|
const inputRef = __WEBPACK_EXTERNAL_MODULE_vue__.ref();
|
|
@@ -38636,6 +38658,9 @@ ${$(r2)}`), n2;
|
|
|
38636
38658
|
});
|
|
38637
38659
|
emits("change", value);
|
|
38638
38660
|
};
|
|
38661
|
+
__expose({
|
|
38662
|
+
handleSubmit
|
|
38663
|
+
});
|
|
38639
38664
|
return (_ctx, _cache) => {
|
|
38640
38665
|
return __WEBPACK_EXTERNAL_MODULE_vue__.openBlock(), __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock(
|
|
38641
38666
|
__WEBPACK_EXTERNAL_MODULE_vue__.Fragment,
|
|
@@ -39077,7 +39102,7 @@ ${$(r2)}`), n2;
|
|
|
39077
39102
|
value: {}
|
|
39078
39103
|
},
|
|
39079
39104
|
emits: ["change"],
|
|
39080
|
-
setup(__props, { emit: __emit }) {
|
|
39105
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
39081
39106
|
const emits = __emit;
|
|
39082
39107
|
const props2 = __props;
|
|
39083
39108
|
const recentUnit = __WEBPACK_EXTERNAL_MODULE_vue__.ref("m");
|
|
@@ -39100,7 +39125,7 @@ ${$(r2)}`), n2;
|
|
|
39100
39125
|
}
|
|
39101
39126
|
);
|
|
39102
39127
|
const handleSubmit = () => {
|
|
39103
|
-
if (!dateValue.value) return;
|
|
39128
|
+
if (!dateValue.value || !canSubmit.value) return;
|
|
39104
39129
|
const emitDate = props2.type === DateMode.FUTURE ? [NowConstant, `${DateMode.FUTURE}${dateValue.value}${recentUnit.value}`] : [`${DateMode.RECENT}${dateValue.value}${recentUnit.value}`, NowConstant].map(
|
|
39105
39130
|
(v2) => recentBaselineTime.value && recentBaselineTime.value !== NowConstant ? v2.replace(NowConstant, `(${recentBaselineTime.value})`) : v2
|
|
39106
39131
|
);
|
|
@@ -39112,6 +39137,9 @@ ${$(r2)}`), n2;
|
|
|
39112
39137
|
}
|
|
39113
39138
|
emits("change", emitDate);
|
|
39114
39139
|
};
|
|
39140
|
+
__expose({
|
|
39141
|
+
handleSubmit
|
|
39142
|
+
});
|
|
39115
39143
|
return (_ctx, _cache) => {
|
|
39116
39144
|
return __WEBPACK_EXTERNAL_MODULE_vue__.openBlock(), __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock(
|
|
39117
39145
|
__WEBPACK_EXTERNAL_MODULE_vue__.Fragment,
|
|
@@ -39413,6 +39441,7 @@ ${$(r2)}`), n2;
|
|
|
39413
39441
|
const { validMsg, validateDateRange } = useValidate();
|
|
39414
39442
|
const timezoneSet = __WEBPACK_EXTERNAL_MODULE_vue__.ref(false);
|
|
39415
39443
|
const activePanel = __WEBPACK_EXTERNAL_MODULE_vue__.ref("common");
|
|
39444
|
+
const component = __WEBPACK_EXTERNAL_MODULE_vue__.ref();
|
|
39416
39445
|
const defaultTabKey = __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => {
|
|
39417
39446
|
const tab2 = localStorage.getItem(getStoreTabKey(version.value));
|
|
39418
39447
|
if (!tab2) return DateMode.Date;
|
|
@@ -39434,6 +39463,10 @@ ${$(r2)}`), n2;
|
|
|
39434
39463
|
return new DateRange(date, format.value, props2.timezone);
|
|
39435
39464
|
})
|
|
39436
39465
|
);
|
|
39466
|
+
useKeydownEnter(() => {
|
|
39467
|
+
var _a;
|
|
39468
|
+
(_a = component.value) == null ? void 0 : _a.handleSubmit();
|
|
39469
|
+
});
|
|
39437
39470
|
const handleChange = (date) => {
|
|
39438
39471
|
emits("change", date);
|
|
39439
39472
|
};
|
|
@@ -39540,6 +39573,8 @@ ${$(r2)}`), n2;
|
|
|
39540
39573
|
null,
|
|
39541
39574
|
[
|
|
39542
39575
|
(__WEBPACK_EXTERNAL_MODULE_vue__.openBlock(), __WEBPACK_EXTERNAL_MODULE_vue__.createBlock(__WEBPACK_EXTERNAL_MODULE_vue__.resolveDynamicComponent(getComponent()), {
|
|
39576
|
+
ref_key: "component",
|
|
39577
|
+
ref: component,
|
|
39543
39578
|
key: activeDatePickTab.value,
|
|
39544
39579
|
type: activeDatePickTab.value,
|
|
39545
39580
|
value: _ctx.defaultDate,
|
package/vue3/index.es.min.js
CHANGED
|
@@ -7,11 +7,30 @@ import customParseFormat from "dayjs/plugin/customParseFormat";
|
|
|
7
7
|
import localizedFormat from "dayjs/plugin/localizedFormat";
|
|
8
8
|
import tz from "dayjs/plugin/timezone";
|
|
9
9
|
import utc from "dayjs/plugin/utc";
|
|
10
|
-
import { provide, inject, ref, customRef, defineComponent, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createBlock, createCommentVNode, createTextVNode, toDisplayString, shallowRef, watch, createElementVNode, normalizeClass, withModifiers, computed, onActivated, normalizeStyle, withDirectives, withKeys, onMounted, vShow, nextTick, mergeProps, KeepAlive, resolveDynamicComponent, onBeforeUnmount } from "vue";
|
|
10
|
+
import { effectScope, getCurrentScope, onScopeDispose, provide, inject, ref, customRef, defineComponent, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createBlock, createCommentVNode, createTextVNode, toDisplayString, shallowRef, watch, createElementVNode, normalizeClass, withModifiers, computed, onActivated, normalizeStyle, withDirectives, withKeys, onMounted, vShow, nextTick, mergeProps, KeepAlive, resolveDynamicComponent, onBeforeUnmount } from "vue";
|
|
11
11
|
import { Tab, PopConfirm, Popover, Button, Checkbox, clickoutside, Select, Input, Exception, $bkPopover, provideGlobalConfig } from "bkui-vue";
|
|
12
12
|
import { Del, AngleDoubleLeft, AngleLeft, AngleRight, AngleDoubleRight, Close, Transfer } from "bkui-vue/lib/icon";
|
|
13
13
|
import en from "dayjs/locale/en";
|
|
14
14
|
import cn from "dayjs/locale/zh-cn";
|
|
15
|
+
function useKeydownEnter(callback) {
|
|
16
|
+
const scope = effectScope();
|
|
17
|
+
const handleKeydown = (event) => {
|
|
18
|
+
if (event.key === "Enter") {
|
|
19
|
+
callback(event);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
scope.run(() => {
|
|
23
|
+
window.addEventListener("keydown", handleKeydown);
|
|
24
|
+
});
|
|
25
|
+
const stop = () => {
|
|
26
|
+
scope.stop();
|
|
27
|
+
window.removeEventListener("keydown", handleKeydown);
|
|
28
|
+
};
|
|
29
|
+
if (getCurrentScope()) {
|
|
30
|
+
onScopeDispose(stop);
|
|
31
|
+
}
|
|
32
|
+
return stop;
|
|
33
|
+
}
|
|
15
34
|
const getCookieByName = (name) => {
|
|
16
35
|
const match = document.cookie.match(new RegExp(`(^| )${name}=([^;]*)(;|$)`));
|
|
17
36
|
if (match) {
|
|
@@ -2563,7 +2582,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
2563
2582
|
value: {}
|
|
2564
2583
|
},
|
|
2565
2584
|
emits: ["change"],
|
|
2566
|
-
setup(__props, { emit: __emit }) {
|
|
2585
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2567
2586
|
dayjs.extend(customParseFormat);
|
|
2568
2587
|
const props = __props;
|
|
2569
2588
|
const emits = __emit;
|
|
@@ -2736,7 +2755,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
2736
2755
|
hiddenEndPanel();
|
|
2737
2756
|
};
|
|
2738
2757
|
const handleSubmit = () => {
|
|
2739
|
-
if (startDate.value && endDate.value) {
|
|
2758
|
+
if (startDate.value && endDate.value && canConfirm.value) {
|
|
2740
2759
|
const startValue = isStartNow.value ? NowConstant : dayjs.tz(startDate.value.format(format.value ?? DefaultCommitFormat), timezoneInfo.value.label).valueOf();
|
|
2741
2760
|
const endValue = isEndNow.value ? NowConstant : dayjs.tz(endDate.value.format(format.value ?? DefaultCommitFormat), timezoneInfo.value.label).valueOf();
|
|
2742
2761
|
isValidate.value = validateDateValue([startValue || "", endValue || ""]);
|
|
@@ -2758,6 +2777,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
2758
2777
|
hiddenEndPanel();
|
|
2759
2778
|
}
|
|
2760
2779
|
};
|
|
2780
|
+
__expose({
|
|
2781
|
+
handleSubmit
|
|
2782
|
+
});
|
|
2761
2783
|
return (_ctx, _cache) => {
|
|
2762
2784
|
var _a;
|
|
2763
2785
|
return openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
@@ -2966,7 +2988,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
2966
2988
|
value: {}
|
|
2967
2989
|
},
|
|
2968
2990
|
emits: ["change"],
|
|
2969
|
-
setup(__props, { emit: __emit }) {
|
|
2991
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2970
2992
|
const emits = __emit;
|
|
2971
2993
|
const props = __props;
|
|
2972
2994
|
const inputRef = ref();
|
|
@@ -3095,6 +3117,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3095
3117
|
});
|
|
3096
3118
|
emits("change", value);
|
|
3097
3119
|
};
|
|
3120
|
+
__expose({
|
|
3121
|
+
handleSubmit
|
|
3122
|
+
});
|
|
3098
3123
|
return (_ctx, _cache) => {
|
|
3099
3124
|
return openBlock(), createElementBlock(
|
|
3100
3125
|
Fragment,
|
|
@@ -3536,7 +3561,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3536
3561
|
value: {}
|
|
3537
3562
|
},
|
|
3538
3563
|
emits: ["change"],
|
|
3539
|
-
setup(__props, { emit: __emit }) {
|
|
3564
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
3540
3565
|
const emits = __emit;
|
|
3541
3566
|
const props = __props;
|
|
3542
3567
|
const recentUnit = ref("m");
|
|
@@ -3559,7 +3584,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3559
3584
|
}
|
|
3560
3585
|
);
|
|
3561
3586
|
const handleSubmit = () => {
|
|
3562
|
-
if (!dateValue.value) return;
|
|
3587
|
+
if (!dateValue.value || !canSubmit.value) return;
|
|
3563
3588
|
const emitDate = props.type === DateMode.FUTURE ? [NowConstant, `${DateMode.FUTURE}${dateValue.value}${recentUnit.value}`] : [`${DateMode.RECENT}${dateValue.value}${recentUnit.value}`, NowConstant].map(
|
|
3564
3589
|
(v) => recentBaselineTime.value && recentBaselineTime.value !== NowConstant ? v.replace(NowConstant, `(${recentBaselineTime.value})`) : v
|
|
3565
3590
|
);
|
|
@@ -3571,6 +3596,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3571
3596
|
}
|
|
3572
3597
|
emits("change", emitDate);
|
|
3573
3598
|
};
|
|
3599
|
+
__expose({
|
|
3600
|
+
handleSubmit
|
|
3601
|
+
});
|
|
3574
3602
|
return (_ctx, _cache) => {
|
|
3575
3603
|
return openBlock(), createElementBlock(
|
|
3576
3604
|
Fragment,
|
|
@@ -3872,6 +3900,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3872
3900
|
const { validMsg, validateDateRange } = useValidate();
|
|
3873
3901
|
const timezoneSet = ref(false);
|
|
3874
3902
|
const activePanel = ref("common");
|
|
3903
|
+
const component = ref();
|
|
3875
3904
|
const defaultTabKey = computed(() => {
|
|
3876
3905
|
const tab = localStorage.getItem(getStoreTabKey(version.value));
|
|
3877
3906
|
if (!tab) return DateMode.Date;
|
|
@@ -3893,6 +3922,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3893
3922
|
return new DateRange(date, format.value, props.timezone);
|
|
3894
3923
|
})
|
|
3895
3924
|
);
|
|
3925
|
+
useKeydownEnter(() => {
|
|
3926
|
+
var _a;
|
|
3927
|
+
(_a = component.value) == null ? void 0 : _a.handleSubmit();
|
|
3928
|
+
});
|
|
3896
3929
|
const handleChange = (date) => {
|
|
3897
3930
|
emits("change", date);
|
|
3898
3931
|
};
|
|
@@ -3999,6 +4032,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3999
4032
|
null,
|
|
4000
4033
|
[
|
|
4001
4034
|
(openBlock(), createBlock(resolveDynamicComponent(getComponent()), {
|
|
4035
|
+
ref_key: "component",
|
|
4036
|
+
ref: component,
|
|
4002
4037
|
key: activeDatePickTab.value,
|
|
4003
4038
|
type: activeDatePickTab.value,
|
|
4004
4039
|
value: _ctx.defaultDate,
|
package/vue3/index.iife.min.js
CHANGED
|
@@ -36159,6 +36159,25 @@ ${$(r2)}`), n2;
|
|
|
36159
36159
|
})(zhCn);
|
|
36160
36160
|
var zhCnExports = zhCn.exports;
|
|
36161
36161
|
const cn = /* @__PURE__ */ getDefaultExportFromCjs(zhCnExports);
|
|
36162
|
+
function useKeydownEnter(callback) {
|
|
36163
|
+
const scope = __WEBPACK_EXTERNAL_MODULE_vue__.effectScope();
|
|
36164
|
+
const handleKeydown = (event) => {
|
|
36165
|
+
if (event.key === "Enter") {
|
|
36166
|
+
callback(event);
|
|
36167
|
+
}
|
|
36168
|
+
};
|
|
36169
|
+
scope.run(() => {
|
|
36170
|
+
window.addEventListener("keydown", handleKeydown);
|
|
36171
|
+
});
|
|
36172
|
+
const stop = () => {
|
|
36173
|
+
scope.stop();
|
|
36174
|
+
window.removeEventListener("keydown", handleKeydown);
|
|
36175
|
+
};
|
|
36176
|
+
if (__WEBPACK_EXTERNAL_MODULE_vue__.getCurrentScope()) {
|
|
36177
|
+
__WEBPACK_EXTERNAL_MODULE_vue__.onScopeDispose(stop);
|
|
36178
|
+
}
|
|
36179
|
+
return stop;
|
|
36180
|
+
}
|
|
36162
36181
|
const getCookieByName = (name) => {
|
|
36163
36182
|
const match = document.cookie.match(new RegExp(`(^| )${name}=([^;]*)(;|$)`));
|
|
36164
36183
|
if (match) {
|
|
@@ -38710,7 +38729,7 @@ ${$(r2)}`), n2;
|
|
|
38710
38729
|
value: {}
|
|
38711
38730
|
},
|
|
38712
38731
|
emits: ["change"],
|
|
38713
|
-
setup(__props, { emit: __emit }) {
|
|
38732
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
38714
38733
|
dayjs.extend(customParseFormat);
|
|
38715
38734
|
const props2 = __props;
|
|
38716
38735
|
const emits = __emit;
|
|
@@ -38883,7 +38902,7 @@ ${$(r2)}`), n2;
|
|
|
38883
38902
|
hiddenEndPanel();
|
|
38884
38903
|
};
|
|
38885
38904
|
const handleSubmit = () => {
|
|
38886
|
-
if (startDate.value && endDate.value) {
|
|
38905
|
+
if (startDate.value && endDate.value && canConfirm.value) {
|
|
38887
38906
|
const startValue = isStartNow.value ? NowConstant : dayjs.tz(startDate.value.format(format.value ?? DefaultCommitFormat), timezoneInfo.value.label).valueOf();
|
|
38888
38907
|
const endValue = isEndNow.value ? NowConstant : dayjs.tz(endDate.value.format(format.value ?? DefaultCommitFormat), timezoneInfo.value.label).valueOf();
|
|
38889
38908
|
isValidate.value = validateDateValue([startValue || "", endValue || ""]);
|
|
@@ -38905,6 +38924,9 @@ ${$(r2)}`), n2;
|
|
|
38905
38924
|
hiddenEndPanel();
|
|
38906
38925
|
}
|
|
38907
38926
|
};
|
|
38927
|
+
__expose({
|
|
38928
|
+
handleSubmit
|
|
38929
|
+
});
|
|
38908
38930
|
return (_ctx, _cache) => {
|
|
38909
38931
|
var _a;
|
|
38910
38932
|
return __WEBPACK_EXTERNAL_MODULE_vue__.openBlock(), __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock("div", _hoisted_1$6, [
|
|
@@ -39113,7 +39135,7 @@ ${$(r2)}`), n2;
|
|
|
39113
39135
|
value: {}
|
|
39114
39136
|
},
|
|
39115
39137
|
emits: ["change"],
|
|
39116
|
-
setup(__props, { emit: __emit }) {
|
|
39138
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
39117
39139
|
const emits = __emit;
|
|
39118
39140
|
const props2 = __props;
|
|
39119
39141
|
const inputRef = __WEBPACK_EXTERNAL_MODULE_vue__.ref();
|
|
@@ -39242,6 +39264,9 @@ ${$(r2)}`), n2;
|
|
|
39242
39264
|
});
|
|
39243
39265
|
emits("change", value);
|
|
39244
39266
|
};
|
|
39267
|
+
__expose({
|
|
39268
|
+
handleSubmit
|
|
39269
|
+
});
|
|
39245
39270
|
return (_ctx, _cache) => {
|
|
39246
39271
|
return __WEBPACK_EXTERNAL_MODULE_vue__.openBlock(), __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock(
|
|
39247
39272
|
__WEBPACK_EXTERNAL_MODULE_vue__.Fragment,
|
|
@@ -39683,7 +39708,7 @@ ${$(r2)}`), n2;
|
|
|
39683
39708
|
value: {}
|
|
39684
39709
|
},
|
|
39685
39710
|
emits: ["change"],
|
|
39686
|
-
setup(__props, { emit: __emit }) {
|
|
39711
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
39687
39712
|
const emits = __emit;
|
|
39688
39713
|
const props2 = __props;
|
|
39689
39714
|
const recentUnit = __WEBPACK_EXTERNAL_MODULE_vue__.ref("m");
|
|
@@ -39706,7 +39731,7 @@ ${$(r2)}`), n2;
|
|
|
39706
39731
|
}
|
|
39707
39732
|
);
|
|
39708
39733
|
const handleSubmit = () => {
|
|
39709
|
-
if (!dateValue.value) return;
|
|
39734
|
+
if (!dateValue.value || !canSubmit.value) return;
|
|
39710
39735
|
const emitDate = props2.type === DateMode.FUTURE ? [NowConstant, `${DateMode.FUTURE}${dateValue.value}${recentUnit.value}`] : [`${DateMode.RECENT}${dateValue.value}${recentUnit.value}`, NowConstant].map(
|
|
39711
39736
|
(v2) => recentBaselineTime.value && recentBaselineTime.value !== NowConstant ? v2.replace(NowConstant, `(${recentBaselineTime.value})`) : v2
|
|
39712
39737
|
);
|
|
@@ -39718,6 +39743,9 @@ ${$(r2)}`), n2;
|
|
|
39718
39743
|
}
|
|
39719
39744
|
emits("change", emitDate);
|
|
39720
39745
|
};
|
|
39746
|
+
__expose({
|
|
39747
|
+
handleSubmit
|
|
39748
|
+
});
|
|
39721
39749
|
return (_ctx, _cache) => {
|
|
39722
39750
|
return __WEBPACK_EXTERNAL_MODULE_vue__.openBlock(), __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock(
|
|
39723
39751
|
__WEBPACK_EXTERNAL_MODULE_vue__.Fragment,
|
|
@@ -40019,6 +40047,7 @@ ${$(r2)}`), n2;
|
|
|
40019
40047
|
const { validMsg, validateDateRange } = useValidate();
|
|
40020
40048
|
const timezoneSet = __WEBPACK_EXTERNAL_MODULE_vue__.ref(false);
|
|
40021
40049
|
const activePanel = __WEBPACK_EXTERNAL_MODULE_vue__.ref("common");
|
|
40050
|
+
const component = __WEBPACK_EXTERNAL_MODULE_vue__.ref();
|
|
40022
40051
|
const defaultTabKey = __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => {
|
|
40023
40052
|
const tab2 = localStorage.getItem(getStoreTabKey(version.value));
|
|
40024
40053
|
if (!tab2) return DateMode.Date;
|
|
@@ -40040,6 +40069,10 @@ ${$(r2)}`), n2;
|
|
|
40040
40069
|
return new DateRange(date, format.value, props2.timezone);
|
|
40041
40070
|
})
|
|
40042
40071
|
);
|
|
40072
|
+
useKeydownEnter(() => {
|
|
40073
|
+
var _a;
|
|
40074
|
+
(_a = component.value) == null ? void 0 : _a.handleSubmit();
|
|
40075
|
+
});
|
|
40043
40076
|
const handleChange = (date) => {
|
|
40044
40077
|
emits("change", date);
|
|
40045
40078
|
};
|
|
@@ -40146,6 +40179,8 @@ ${$(r2)}`), n2;
|
|
|
40146
40179
|
null,
|
|
40147
40180
|
[
|
|
40148
40181
|
(__WEBPACK_EXTERNAL_MODULE_vue__.openBlock(), __WEBPACK_EXTERNAL_MODULE_vue__.createBlock(__WEBPACK_EXTERNAL_MODULE_vue__.resolveDynamicComponent(getComponent()), {
|
|
40182
|
+
ref_key: "component",
|
|
40183
|
+
ref: component,
|
|
40149
40184
|
key: activeDatePickTab.value,
|
|
40150
40185
|
type: activeDatePickTab.value,
|
|
40151
40186
|
value: _ctx.defaultDate,
|
package/vue3/index.umd.min.js
CHANGED
|
@@ -8,6 +8,25 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
8
8
|
var __vite_style__ = document.createElement("style");
|
|
9
9
|
__vite_style__.textContent = '.common-panel-tab {\n display: flex;\n align-items: center;\n}\n.common-panel-tab .bk-tab-header {\n /* stylelint-disable-next-line declaration-no-important */\n line-height: 20px !important;\n /* stylelint-disable-next-line declaration-no-important */\n border-bottom: 0 !important;\n}\n.common-panel-tab .bk-tab-header .bk-tab-header-item {\n padding: 0;\n padding-bottom: 4px;\n margin-right: 28px;\n}\n.common-panel-tab .bk-tab-header--active {\n font-weight: 700;\n color: #63656e;\n}\n.common-panel-tab .bk-tab-content {\n display: none;\n width: 0;\n height: 0;\n}\n.common-panel-tab .delete-all {\n margin-left: auto;\n}\n.common-panel-tab .delete-all:hover {\n color: #3a84ff;\n cursor: pointer;\n}.common-submit {\n flex: 0 0 64px;\n width: 64px;\n margin-left: 8px;\n}\n.common-favorite {\n display: flex;\n flex: 0 0 32px;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n margin-left: 8px;\n cursor: pointer;\n background: #f5f7fa;\n border-radius: 2px;\n}\n.common-favorite:hover svg path {\n fill: #3a84ff;\n}/* stylelint-disable declaration-no-important */\n.date-panel {\n display: flex;\n flex-direction: column;\n width: 220px;\n user-select: none;\n background: #fff;\n border: 1px solid #dcdee5;\n box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1019607843);\n}\n.date-panel-title {\n display: flex;\n flex: 0 0 40px;\n align-items: center;\n height: 40px;\n padding: 0 12px;\n color: #63656e;\n border-bottom: 1px solid #dcdee5;\n}\n.date-panel-title .title-check {\n margin-left: auto;\n}\n.date-panel-title .title-check .bk-checkbox {\n pointer-events: none;\n}\n.date-panel-main {\n display: flex;\n flex: 1;\n flex-direction: column;\n padding: 8px 0 12px 0;\n}\n.date-panel-main .date-header {\n display: flex;\n align-items: center;\n width: 100%;\n height: 24px;\n}\n.date-panel-main .date-header-center {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n height: 100%;\n font-size: 14px;\n font-weight: 700;\n}\n.date-panel-main .date-header-center .date-split {\n width: 5px;\n height: 2px;\n margin: 0 10px;\n background-color: #63656e;\n}\n.date-panel-main .date-header-right, .date-panel-main .date-header-left {\n display: flex;\n align-items: center;\n height: 100%;\n padding: 0 6px;\n font-size: 16px;\n}\n.date-panel-main .date-header-right .hand-icon, .date-panel-main .date-header-left .hand-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n font-weight: bold;\n color: #979ba5;\n}\n.date-panel-main .date-header-right .hand-icon svg, .date-panel-main .date-header-left .hand-icon svg {\n width: 20px !important;\n height: 20px !important;\n font-weight: bold;\n}\n.date-panel-main .date-header-right .hand-icon:hover, .date-panel-main .date-header-left .hand-icon:hover {\n color: #3a84ff;\n cursor: pointer;\n}\n.date-panel-main .date-header-right .hand-icon:hover svg, .date-panel-main .date-header-left .hand-icon:hover svg {\n fill: #3a84ff;\n}\n.date-panel-main .date-header-right {\n margin-left: auto;\n}\n.date-panel-main .date-content {\n display: flex;\n flex-direction: column;\n}\n.date-panel-main .date-content .date-grid {\n display: flex;\n align-items: center;\n width: 100%;\n padding: 0 12px;\n margin: 0;\n}\n.date-panel-main .date-content .date-grid-item {\n display: flex;\n flex: 0 0 14.285%;\n align-items: center;\n justify-content: center;\n width: 14.285%;\n min-width: 28px;\n height: 24px;\n}\n.date-panel-main .date-content .date-grid-item:not(.not-click):hover {\n cursor: pointer;\n background-color: #f0f1f5;\n}\n.date-panel-main .date-content .date-grid-item.is-today {\n color: #3a84ff;\n border: 1px solid #a3c5fd;\n border-radius: 2px;\n}\n.date-panel-main .date-content .date-grid-item.is-last-month {\n color: #c4c6cc;\n background-color: #f0f1f5;\n}\n.date-panel-main .date-content .date-grid-item.is-next-month {\n color: #c4c6cc;\n}\n.date-panel-main .date-content .date-grid-item.is-disabled {\n color: #c4c6cc !important;\n cursor: not-allowed !important;\n background-color: #f5f7fa !important;\n}\n.date-panel-main .date-content .date-grid-item.is-selected {\n color: #fff !important;\n background-color: #3a84ff !important;\n border-radius: 2px;\n}/* stylelint-disable declaration-no-important */\n.date-wrapper {\n display: flex;\n flex-direction: column;\n}\n.date-wrapper .date-input {\n display: flex;\n align-items: center;\n width: 100%;\n min-height: 56px;\n}\n.date-wrapper .date-input .date-picker {\n display: flex;\n align-items: center;\n width: 100%;\n min-width: 360px;\n height: 32px;\n background: #fff;\n border: 1px solid #c4c6cc;\n border-radius: 2px;\n}\n.date-wrapper .date-input .date-picker-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 6px;\n margin-left: 8px;\n}\n.date-wrapper .date-input .date-picker-start, .date-wrapper .date-input .date-picker-end {\n width: 160px;\n height: 24px;\n padding: 0 4px;\n font-size: 12px;\n color: #63656e;\n border: none;\n border-radius: 2px;\n}\n.date-wrapper .date-input .date-picker-start:focus, .date-wrapper .date-input .date-picker-end:focus {\n background: #e1ecff;\n border: none;\n outline: none;\n box-shadow: none;\n}\n.date-wrapper .date-input .date-picker-split {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 8px;\n color: #979ba5;\n}\n.date-wrapper .date-input .date-picker-clear {\n display: none !important;\n flex: 0 0 32px;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n font-size: 14px;\n color: #c4c6cc;\n}\n.date-wrapper .date-input .date-picker-clear:hover {\n color: #63656e;\n cursor: pointer;\n}\n.date-wrapper .date-input .date-picker:hover .date-picker-clear {\n display: flex !important;\n}\n.date-wrapper .show-format {\n display: flex;\n align-items: center;\n width: 100%;\n min-width: 100%;\n margin: -4px 0 8px 0;\n color: #979ba5;\n}\n.date-wrapper .show-format .format-button {\n margin-left: 0px;\n}\n.date-format-wrapper {\n display: flex;\n flex-direction: column;\n width: 500px;\n background: #ffffff;\n border: 1px solid #dcdee5;\n border-radius: 2px;\n box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1019607843);\n}\n.date-format-wrapper .content-title {\n margin-bottom: 12px;\n font-weight: bold;\n line-height: 20px;\n}\n.date-format-wrapper .content-table {\n display: flex;\n flex-direction: column;\n padding: 6px 0;\n border-collapse: collapse;\n background-color: #fff;\n border-top: 0;\n border-left: 0;\n}\n.date-format-wrapper .content-table th,\n.date-format-wrapper .content-table td {\n height: 32px;\n padding: 0px 10px;\n line-height: 32px;\n color: #63656e;\n text-align: left;\n border-right: 0;\n border-bottom: 0;\n}\n.date-format-wrapper .content-table thead,\n.date-format-wrapper .content-table tr {\n display: flex;\n align-items: center;\n width: 100%;\n}\n.date-format-wrapper .content-table thead th,\n.date-format-wrapper .content-table tr th {\n flex: 1;\n background-color: #fafbfd;\n}\n.date-format-wrapper .content-table tbody {\n display: block;\n width: 100%;\n max-height: 300px;\n overflow: auto;\n}\n.date-format-wrapper .content-table tbody td {\n display: flex;\n flex: 1;\n align-items: center;\n}\n.date-format-wrapper.enable-format-click tr {\n cursor: pointer;\n}\n.date-format-wrapper.enable-format-click tr:hover {\n background: #f0f5ff;\n}\n.date-format-wrapper.enable-format-click tr:hover td {\n color: #3a84ff;\n}.natural-picker {\n display: flex;\n align-items: center;\n min-height: 56px;\n}\n.natural-picker .natural-date {\n width: 256px;\n}\n.natural-picker .natural-unit {\n width: 140px;\n margin-left: 8px;\n}\n.natural-picker.is-invalid .bk-input {\n border-color: #ea3636;\n}\n.natural-custom-option {\n display: flex;\n align-items: center;\n width: 100%;\n min-width: 250px;\n height: 100%;\n padding: 0 12px;\n margin: 0 -12px;\n}\n.natural-custom-option .bk-input {\n background-color: white;\n}.baseline-picker {\n display: flex;\n align-items: center;\n min-height: 56px;\n margin-right: -1px;\n}\n.baseline-picker-select {\n width: 208px;\n}\n.baseline-picker-select .bk-input {\n margin-right: -4px;\n border-top-right-radius: 0px;\n border-bottom-right-radius: 0px;\n}\n.baseline-custom-option {\n display: flex;\n align-items: center;\n width: 100%;\n height: 100%;\n padding: 0 12px;\n margin: 0 -12px;\n}\n.baseline-custom-option .bk-input {\n background-color: white;\n}\n.baseline-custom-option .specific-date {\n position: relative;\n display: flex;\n align-items: center;\n width: 174px;\n height: 26px;\n background: #fff;\n border: 1px solid #c4c6cc;\n border-radius: 2px;\n}\n.baseline-custom-option .specific-date-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 6px;\n margin-left: 8px;\n}\n.baseline-custom-option .specific-date-input {\n width: 140px;\n height: 20px;\n padding: 0 4px;\n font-size: 12px;\n color: #63656e;\n border: none;\n border-radius: 2px;\n}\n.baseline-custom-option .specific-date-input:focus {\n background: #e1ecff;\n border: none;\n outline: none;\n box-shadow: none;\n}\n.baseline-custom-option .specific-date-panel {\n position: fixed;\n top: 166px;\n left: 188px;\n z-index: 1000;\n border-radius: 2px;\n}.recent-picker {\n display: flex;\n align-items: center;\n min-height: 56px;\n}\n.recent-picker .recent-input {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.recent-picker .recent-input.is-focused {\n z-index: 2;\n}\n.recent-picker .recent-unit {\n min-width: 64px;\n}\n.recent-picker .recent-unit .bk-input {\n margin-left: -1px;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.recent-picker .recent-unit .bk-input--text {\n border-radius: 0;\n}\n.recent-picker.is-invalid .recent-input {\n border-color: #ea3636;\n}\n.recent-picker.is-invalid .bk-input {\n border-color: #ea3636;\n}.timezone-picker {\n width: 100%;\n}\n.timezone-picker-option {\n display: flex;\n align-items: center;\n width: 100%;\n color: #63656e;\n}\n.timezone-picker-option .option-name {\n flex: 1;\n}\n.timezone-picker-option .option-country {\n display: flex;\n width: 100%;\n margin-left: 6px;\n color: #999;\n}\n.timezone-picker-option .option-utc {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 20px;\n padding: 0 8px;\n background: #f0f1f5;\n border-radius: 2px;\n}\n.timezone-picker-option.is-selected {\n color: #3a84ff;\n}\n.timezone-picker-option.is-selected .option-country {\n color: #699df4;\n}\n.timezone-picker-option.is-selected .option-utc {\n color: white;\n background-color: #699df4;\n}.panel-wrapper {\n width: 510px;\n padding: 12px 16px 0 16px;\n background: #fff;\n border: 1px solid #dcdee5;\n border-radius: 2px;\n box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1019607843);\n}\n.panel-wrapper .common-date-list {\n height: 136px;\n max-height: 136px;\n padding: 0;\n padding-bottom: 4px;\n margin: 12px -10px 0 0;\n overflow: auto;\n}\n.panel-wrapper .common-date-list .list-item {\n display: inline-flex;\n align-items: center;\n min-width: calc(33.33% - 8px);\n height: 28px;\n padding: 0 8px;\n margin-right: 8px;\n margin-bottom: 8px;\n color: #313238;\n cursor: pointer;\n background: #f5f7fa;\n border-radius: 2px;\n}\n.panel-wrapper .common-date-list .list-item.is-recent-item {\n min-width: inherit;\n height: 24px;\n padding: 0 6px;\n color: #63656e;\n}\n.panel-wrapper .common-date-list .list-item.is-selected {\n color: #3a84ff;\n background: #e1ecff;\n}\n.panel-wrapper .common-date-list .list-item.is-disabled {\n color: #c4c6cc;\n cursor: not-allowed;\n background: #f5f7fa;\n}\n.panel-wrapper .common-date-list .list-item:not(.is-disabled):hover {\n color: #3a84ff;\n background: #e1ecff;\n}\n.panel-wrapper .date-pick-tab {\n padding-top: 12px;\n border-top: 1px solid #eaebf0;\n}\n.panel-wrapper .date-pick-tab .bk-tab-header-item {\n /* stylelint-disable-next-line declaration-no-important */\n margin-right: 20px !important;\n}\n.panel-wrapper .time-zone-panel {\n display: flex;\n align-items: center;\n height: 45px;\n padding: 0 16px;\n margin: 0 -16px;\n color: #313238;\n background: #fafbfd;\n border-top: 1px solid #dcdee5;\n}\n.panel-wrapper .time-zone-panel .time-zone {\n display: flex;\n align-items: center;\n margin: 0 8px;\n}\n.panel-wrapper .time-zone-panel .time-zone-area {\n display: flex;\n align-items: center;\n margin-left: 8px;\n color: #979ba5;\n}\n.panel-wrapper .time-zone-panel .time-zone-tag {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 79px;\n height: 20px;\n color: #63656e;\n border: 1px solid #dcdee5;\n border-radius: 2px;\n}\n.panel-wrapper .time-zone-panel .time-zone-btn {\n margin-left: auto;\n}\n.panel-wrapper .time-zone-picker {\n margin: 8px 0;\n}\n.panel-wrapper .common-wrapper {\n display: flex;\n flex-direction: column;\n height: 139px;\n max-height: 139px;\n overflow: auto;\n}\n.panel-wrapper .common-wrapper .empty-content {\n height: 100px;\n max-height: 100px;\n}\n.panel-wrapper .common-wrapper .empty-tips {\n display: flex;\n align-items: center;\n justify-content: center;\n}.__bk_date_picker__ {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n height: 32px;\n padding: 0 4px;\n font-size: 12px;\n color: #63656e;\n border: 1px solid #c4c6cc;\n border-radius: 2px;\n /* stylelint-disable-next-line no-descending-specificity */\n}\n.__bk_date_picker__ div::-webkit-scrollbar,\n.__bk_date_picker__ ul::-webkit-scrollbar,\n.__bk_date_picker__ section::-webkit-scrollbar,\n.__bk_date_picker__ tbody::-webkit-scrollbar,\n.__bk_date_picker__ article::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n}\n.__bk_date_picker__ div::-webkit-scrollbar-thumb,\n.__bk_date_picker__ ul::-webkit-scrollbar-thumb,\n.__bk_date_picker__ section::-webkit-scrollbar-thumb,\n.__bk_date_picker__ tbody::-webkit-scrollbar-thumb,\n.__bk_date_picker__ article::-webkit-scrollbar-thumb {\n background: #ddd;\n border-radius: 20px;\n box-shadow: inset 0 0 6px rgba(204, 204, 204, 0.3);\n}\n.__bk_date_picker__ .date-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n font-size: 20px;\n font-weight: bold;\n color: #989ca7;\n background: #f5f7fa;\n border-radius: 2px;\n}\n.__bk_date_picker__ .date-icon-left, .__bk_date_picker__ .date-icon-right {\n display: inline-flex;\n}\n.__bk_date_picker__ .date-icon-left svg, .__bk_date_picker__ .date-icon-right svg {\n /* stylelint-disable-next-line declaration-no-important */\n width: 20px !important;\n /* stylelint-disable-next-line declaration-no-important */\n height: 20px !important;\n}\n.__bk_date_picker__ .date-icon:hover {\n cursor: pointer;\n background-color: #f0f1f5;\n}\n.__bk_date_picker__.is-simplicity {\n border-color: transparent;\n}\n.__bk_date_picker__.is-simplicity .date-icon {\n background-color: transparent;\n}\n.__bk_date_picker__.is-simplicity .date-icon:hover {\n cursor: pointer;\n background-color: #f0f1f5;\n}\n.__bk_date_picker__.is-disabled {\n color: #c4c6cc;\n cursor: not-allowed;\n /* stylelint-disable-next-line no-descending-specificity */\n}\n.__bk_date_picker__.is-disabled .date-icon {\n color: #c4c6cc;\n pointer-events: none;\n}\n.__bk_date_picker__.is-disabled .date-content {\n pointer-events: none;\n cursor: not-allowed;\n}\n.__bk_date_picker__ .date-content {\n display: flex;\n align-items: center;\n height: 24px;\n padding: 0 6px;\n margin: 0 4px;\n user-select: none;\n border-radius: 2px;\n}\n.__bk_date_picker__ .date-content-icon {\n margin-right: 4px;\n}\n.__bk_date_picker__ .date-content-utc {\n display: flex;\n align-items: center;\n margin-left: 4px;\n font-weight: 700;\n color: #ff9c01;\n}\n.__bk_date_picker__ .date-content:hover {\n cursor: pointer;\n background: #f5f7fa;\n}\n.__bk-date-picker-popover__ {\n /* stylelint-disable-next-line declaration-no-important */\n padding: 0 !important;\n /* stylelint-disable-next-line declaration-no-important */\n margin: 0 !important;\n /* stylelint-disable-next-line declaration-no-important */\n color: #63656e !important;\n}\n.__bk-date-picker-popover__ div::-webkit-scrollbar,\n.__bk-date-picker-popover__ ul::-webkit-scrollbar,\n.__bk-date-picker-popover__ section::-webkit-scrollbar,\n.__bk-date-picker-popover__ tbody::-webkit-scrollbar,\n.__bk-date-picker-popover__ article::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n}\n.__bk-date-picker-popover__ div::-webkit-scrollbar-thumb,\n.__bk-date-picker-popover__ ul::-webkit-scrollbar-thumb,\n.__bk-date-picker-popover__ section::-webkit-scrollbar-thumb,\n.__bk-date-picker-popover__ tbody::-webkit-scrollbar-thumb,\n.__bk-date-picker-popover__ article::-webkit-scrollbar-thumb {\n background: #ddd;\n border-radius: 20px;\n box-shadow: inset 0 0 6px rgba(204, 204, 204, 0.3);\n}\n.__bk-date-picker-popover__.__bk-date-picker-baseline-popover__ {\n /* stylelint-disable-next-line declaration-no-important */\n overflow: inherit !important;\n}\n.__bk-date-picker-popover__.__bk-date-picker-baseline-popover__ .time-range-select-content {\n transform: scale(1);\n}\n.__bk-date-picker-popover__.__date-picker-popover-specific__ {\n position: absolute;\n}\n.__bk-date-picker-popover__ ul {\n padding: 0;\n margin: 0;\n}\n.__bk-date-picker-popover__ ul li {\n list-style: none;\n}\n.__bk-date-picker-popover__ .bk-select-search-wrapper .icon-search::before {\n /* stylelint-disable-next-line declaration-no-important */\n content: "" !important;\n}\n.__bk-date-picker-popover__ .bk-pop-confirm {\n /* stylelint-disable-next-line declaration-no-important */\n margin: 20px 16px 16px 16px !important;\n}\n.__date-tooltips__ {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n max-width: 156px;\n line-height: 20px;\n}\n.__date-tooltips__ div::-webkit-scrollbar,\n.__date-tooltips__ ul::-webkit-scrollbar,\n.__date-tooltips__ section::-webkit-scrollbar,\n.__date-tooltips__ tbody::-webkit-scrollbar,\n.__date-tooltips__ article::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n}\n.__date-tooltips__ div::-webkit-scrollbar-thumb,\n.__date-tooltips__ ul::-webkit-scrollbar-thumb,\n.__date-tooltips__ section::-webkit-scrollbar-thumb,\n.__date-tooltips__ tbody::-webkit-scrollbar-thumb,\n.__date-tooltips__ article::-webkit-scrollbar-thumb {\n background: #ddd;\n border-radius: 20px;\n box-shadow: inset 0 0 6px rgba(204, 204, 204, 0.3);\n}\n.__date-tooltips__ .date-tooltips-timezone {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: 4px;\n color: #ff9c01;\n}\n.__date-tooltips__ .date-tooltips-diff {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 4px;\n margin-top: 4px;\n color: white;\n background: rgba(255, 255, 255, 0.12);\n border-radius: 2px;\n}';
|
|
10
10
|
document.head.appendChild(__vite_style__);
|
|
11
|
+
function useKeydownEnter(callback) {
|
|
12
|
+
const scope = vue.effectScope();
|
|
13
|
+
const handleKeydown = (event) => {
|
|
14
|
+
if (event.key === "Enter") {
|
|
15
|
+
callback(event);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
scope.run(() => {
|
|
19
|
+
window.addEventListener("keydown", handleKeydown);
|
|
20
|
+
});
|
|
21
|
+
const stop = () => {
|
|
22
|
+
scope.stop();
|
|
23
|
+
window.removeEventListener("keydown", handleKeydown);
|
|
24
|
+
};
|
|
25
|
+
if (vue.getCurrentScope()) {
|
|
26
|
+
vue.onScopeDispose(stop);
|
|
27
|
+
}
|
|
28
|
+
return stop;
|
|
29
|
+
}
|
|
11
30
|
const getCookieByName = (name) => {
|
|
12
31
|
const match = document.cookie.match(new RegExp(`(^| )${name}=([^;]*)(;|$)`));
|
|
13
32
|
if (match) {
|
|
@@ -2559,7 +2578,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2559
2578
|
value: {}
|
|
2560
2579
|
},
|
|
2561
2580
|
emits: ["change"],
|
|
2562
|
-
setup(__props, { emit: __emit }) {
|
|
2581
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2563
2582
|
dayjs.extend(customParseFormat);
|
|
2564
2583
|
const props = __props;
|
|
2565
2584
|
const emits = __emit;
|
|
@@ -2732,7 +2751,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2732
2751
|
hiddenEndPanel();
|
|
2733
2752
|
};
|
|
2734
2753
|
const handleSubmit = () => {
|
|
2735
|
-
if (startDate.value && endDate.value) {
|
|
2754
|
+
if (startDate.value && endDate.value && canConfirm.value) {
|
|
2736
2755
|
const startValue = isStartNow.value ? NowConstant : dayjs.tz(startDate.value.format(format.value ?? DefaultCommitFormat), timezoneInfo.value.label).valueOf();
|
|
2737
2756
|
const endValue = isEndNow.value ? NowConstant : dayjs.tz(endDate.value.format(format.value ?? DefaultCommitFormat), timezoneInfo.value.label).valueOf();
|
|
2738
2757
|
isValidate.value = validateDateValue([startValue || "", endValue || ""]);
|
|
@@ -2754,6 +2773,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2754
2773
|
hiddenEndPanel();
|
|
2755
2774
|
}
|
|
2756
2775
|
};
|
|
2776
|
+
__expose({
|
|
2777
|
+
handleSubmit
|
|
2778
|
+
});
|
|
2757
2779
|
return (_ctx, _cache) => {
|
|
2758
2780
|
var _a;
|
|
2759
2781
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
|
|
@@ -2962,7 +2984,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2962
2984
|
value: {}
|
|
2963
2985
|
},
|
|
2964
2986
|
emits: ["change"],
|
|
2965
|
-
setup(__props, { emit: __emit }) {
|
|
2987
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2966
2988
|
const emits = __emit;
|
|
2967
2989
|
const props = __props;
|
|
2968
2990
|
const inputRef = vue.ref();
|
|
@@ -3091,6 +3113,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3091
3113
|
});
|
|
3092
3114
|
emits("change", value);
|
|
3093
3115
|
};
|
|
3116
|
+
__expose({
|
|
3117
|
+
handleSubmit
|
|
3118
|
+
});
|
|
3094
3119
|
return (_ctx, _cache) => {
|
|
3095
3120
|
return vue.openBlock(), vue.createElementBlock(
|
|
3096
3121
|
vue.Fragment,
|
|
@@ -3532,7 +3557,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3532
3557
|
value: {}
|
|
3533
3558
|
},
|
|
3534
3559
|
emits: ["change"],
|
|
3535
|
-
setup(__props, { emit: __emit }) {
|
|
3560
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
3536
3561
|
const emits = __emit;
|
|
3537
3562
|
const props = __props;
|
|
3538
3563
|
const recentUnit = vue.ref("m");
|
|
@@ -3555,7 +3580,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3555
3580
|
}
|
|
3556
3581
|
);
|
|
3557
3582
|
const handleSubmit = () => {
|
|
3558
|
-
if (!dateValue.value) return;
|
|
3583
|
+
if (!dateValue.value || !canSubmit.value) return;
|
|
3559
3584
|
const emitDate = props.type === DateMode.FUTURE ? [NowConstant, `${DateMode.FUTURE}${dateValue.value}${recentUnit.value}`] : [`${DateMode.RECENT}${dateValue.value}${recentUnit.value}`, NowConstant].map(
|
|
3560
3585
|
(v) => recentBaselineTime.value && recentBaselineTime.value !== NowConstant ? v.replace(NowConstant, `(${recentBaselineTime.value})`) : v
|
|
3561
3586
|
);
|
|
@@ -3567,6 +3592,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3567
3592
|
}
|
|
3568
3593
|
emits("change", emitDate);
|
|
3569
3594
|
};
|
|
3595
|
+
__expose({
|
|
3596
|
+
handleSubmit
|
|
3597
|
+
});
|
|
3570
3598
|
return (_ctx, _cache) => {
|
|
3571
3599
|
return vue.openBlock(), vue.createElementBlock(
|
|
3572
3600
|
vue.Fragment,
|
|
@@ -3868,6 +3896,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3868
3896
|
const { validMsg, validateDateRange } = useValidate();
|
|
3869
3897
|
const timezoneSet = vue.ref(false);
|
|
3870
3898
|
const activePanel = vue.ref("common");
|
|
3899
|
+
const component = vue.ref();
|
|
3871
3900
|
const defaultTabKey = vue.computed(() => {
|
|
3872
3901
|
const tab = localStorage.getItem(getStoreTabKey(version.value));
|
|
3873
3902
|
if (!tab) return DateMode.Date;
|
|
@@ -3889,6 +3918,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3889
3918
|
return new DateRange(date, format.value, props.timezone);
|
|
3890
3919
|
})
|
|
3891
3920
|
);
|
|
3921
|
+
useKeydownEnter(() => {
|
|
3922
|
+
var _a;
|
|
3923
|
+
(_a = component.value) == null ? void 0 : _a.handleSubmit();
|
|
3924
|
+
});
|
|
3892
3925
|
const handleChange = (date) => {
|
|
3893
3926
|
emits("change", date);
|
|
3894
3927
|
};
|
|
@@ -3995,6 +4028,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3995
4028
|
null,
|
|
3996
4029
|
[
|
|
3997
4030
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getComponent()), {
|
|
4031
|
+
ref_key: "component",
|
|
4032
|
+
ref: component,
|
|
3998
4033
|
key: activeDatePickTab.value,
|
|
3999
4034
|
type: activeDatePickTab.value,
|
|
4000
4035
|
value: _ctx.defaultDate,
|