@blueking/date-picker 0.0.63 → 0.0.65
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/lang/lang.d.ts +3 -2
- package/dist/vue2-full.css +1 -1
- package/dist/vue2-full.es.js +3291 -3265
- package/dist/vue2-light.css +1 -1
- package/dist/vue2-light.es.js +4127 -4101
- package/dist/vue3-full.css +1 -1
- package/dist/vue3-full.es.js +2693 -2667
- package/dist/vue3-light.css +1 -1
- package/dist/vue3-light.es.js +872 -846
- package/package.json +1 -1
package/dist/vue3-light.es.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var ta = (
|
|
1
|
+
var le = Object.defineProperty;
|
|
2
|
+
var se = (l, a, i) => a in l ? le(l, a, { enumerable: !0, configurable: !0, writable: !0, value: i }) : l[a] = i;
|
|
3
|
+
var ta = (l, a, i) => (se(l, typeof a != "symbol" ? a + "" : a, i), i);
|
|
4
4
|
import d from "dayjs";
|
|
5
5
|
import { default as gi } from "dayjs";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { provide as
|
|
11
|
-
import
|
|
6
|
+
import Ha from "dayjs/plugin/customParseFormat";
|
|
7
|
+
import ce from "dayjs/plugin/localizedFormat";
|
|
8
|
+
import Ka from "dayjs/plugin/timezone";
|
|
9
|
+
import qa from "dayjs/plugin/utc";
|
|
10
|
+
import { provide as ue, inject as oe, defineComponent as X, openBlock as A, createElementBlock as E, createVNode as S, unref as t, withCtx as $, Fragment as U, renderList as O, createBlock as H, createCommentVNode as na, createTextVNode as J, toDisplayString as y, shallowRef as ea, watch as oa, createElementVNode as v, normalizeClass as ua, withModifiers as Oa, ref as L, computed as W, normalizeStyle as Fa, withDirectives as va, withKeys as Na, mergeProps as $a, KeepAlive as de, resolveDynamicComponent as me, vShow as he, onBeforeUnmount as ve } from "vue";
|
|
11
|
+
import la from "bkui-vue/lib/popover";
|
|
12
12
|
import "bkui-vue/lib/popover/popover.css";
|
|
13
13
|
import { provideGlobalConfig as be } from "bkui-vue/lib/config-provider";
|
|
14
|
-
import { clickoutside as
|
|
15
|
-
import { Del as fe, AngleDoubleLeft as pe, AngleLeft as
|
|
14
|
+
import { clickoutside as fa } from "bkui-vue/lib/directives";
|
|
15
|
+
import { Del as fe, AngleDoubleLeft as pe, AngleLeft as Ga, AngleRight as Ja, AngleDoubleRight as Ae, Close as ge } from "bkui-vue/lib/icon";
|
|
16
16
|
import "bkui-vue/lib/styles/reset.css";
|
|
17
17
|
import xe from "dayjs/locale/en";
|
|
18
18
|
import Ie from "dayjs/locale/zh-cn";
|
|
19
|
-
import
|
|
19
|
+
import _a from "bkui-vue/lib/button";
|
|
20
20
|
import "bkui-vue/lib/button/button.css";
|
|
21
21
|
import ke from "bkui-vue/lib/exception";
|
|
22
22
|
import "bkui-vue/lib/exception/exception.css";
|
|
23
23
|
import _e from "bkui-vue/lib/pop-confirm";
|
|
24
24
|
import "bkui-vue/lib/pop-confirm/pop-confirm.css";
|
|
25
|
-
import
|
|
25
|
+
import ja from "bkui-vue/lib/tab";
|
|
26
26
|
import "bkui-vue/lib/tab/tab.css";
|
|
27
27
|
import ye from "bkui-vue/lib/checkbox";
|
|
28
28
|
import "bkui-vue/lib/checkbox/checkbox.css";
|
|
29
|
-
import
|
|
29
|
+
import Wa from "bkui-vue/lib/input";
|
|
30
30
|
import "bkui-vue/lib/input/input.css";
|
|
31
|
-
import
|
|
31
|
+
import Z from "bkui-vue/lib/select";
|
|
32
32
|
import "bkui-vue/lib/select/select.css";
|
|
33
|
-
const we = (
|
|
34
|
-
const a = document.cookie.match(new RegExp(`(^| )${
|
|
33
|
+
const we = (l) => {
|
|
34
|
+
const a = document.cookie.match(new RegExp(`(^| )${l}=([^;]*)(;|$)`));
|
|
35
35
|
return a ? a[2] : "";
|
|
36
36
|
}, De = {
|
|
37
37
|
上周: "Last week",
|
|
@@ -64,7 +64,7 @@ const we = (s) => {
|
|
|
64
64
|
s: "秒",
|
|
65
65
|
w: "周",
|
|
66
66
|
y: "年"
|
|
67
|
-
},
|
|
67
|
+
}, pa = {
|
|
68
68
|
前: "Previous",
|
|
69
69
|
取消: "Cancel",
|
|
70
70
|
将来: "Future",
|
|
@@ -76,6 +76,7 @@ const we = (s) => {
|
|
|
76
76
|
无匹配数据: "No matching data",
|
|
77
77
|
日期选择: "Time Range",
|
|
78
78
|
时区设置: "Timezone setting",
|
|
79
|
+
"时差:n小时": "Time difference: n hours",
|
|
79
80
|
时间格式支持: "Time format support",
|
|
80
81
|
"是否清空最近使用?": "Clear recent records?",
|
|
81
82
|
暂无常用时间: "No common time",
|
|
@@ -95,139 +96,139 @@ const we = (s) => {
|
|
|
95
96
|
请输入: "Please enter",
|
|
96
97
|
"请输入搜索(国家,城市,简称)": "Please enter search (country, city, abbreviation)",
|
|
97
98
|
近: "Last",
|
|
98
|
-
"(至今)": "
|
|
99
|
+
"(至今)": " so far"
|
|
99
100
|
};
|
|
100
|
-
Object.keys(
|
|
101
|
-
const
|
|
102
|
-
var
|
|
103
|
-
const
|
|
101
|
+
Object.keys(pa).reduce((l, a) => (l[pa[a]] = a, l), {});
|
|
102
|
+
const ba = we("blueking_language") || "zh-cn", n = (l) => ba !== "en" ? ia[l] || l : ia[l] || Me[l] || De[l] || pa[l] || l;
|
|
103
|
+
var k = /* @__PURE__ */ ((l) => (l.Date = "date", l.FUTURE = "now+", l.NATURAL = "natural", l.RECENT = "now-", l))(k || {});
|
|
104
|
+
const Za = [
|
|
104
105
|
{
|
|
105
106
|
id: "s",
|
|
106
|
-
name:
|
|
107
|
+
name: n("秒")
|
|
107
108
|
},
|
|
108
109
|
{
|
|
109
110
|
id: "m",
|
|
110
|
-
name:
|
|
111
|
+
name: n("分钟")
|
|
111
112
|
},
|
|
112
113
|
{
|
|
113
114
|
id: "h",
|
|
114
|
-
name:
|
|
115
|
+
name: n("小时")
|
|
115
116
|
},
|
|
116
117
|
{
|
|
117
118
|
id: "d",
|
|
118
|
-
name:
|
|
119
|
+
name: n("天")
|
|
119
120
|
},
|
|
120
121
|
{
|
|
121
122
|
id: "w",
|
|
122
|
-
name:
|
|
123
|
+
name: n("周")
|
|
123
124
|
},
|
|
124
125
|
{
|
|
125
126
|
id: "M",
|
|
126
|
-
name:
|
|
127
|
+
name: n("月")
|
|
127
128
|
},
|
|
128
129
|
{
|
|
129
130
|
id: "y",
|
|
130
|
-
name:
|
|
131
|
+
name: n("年")
|
|
131
132
|
}
|
|
132
|
-
], sa =
|
|
133
|
-
var aa = /* @__PURE__ */ ((
|
|
134
|
-
const
|
|
133
|
+
], sa = Za.map((l) => l.id).join("");
|
|
134
|
+
var aa = /* @__PURE__ */ ((l) => (l.custom = "custom", l.default = "default", l.edit = "edit", l))(aa || {});
|
|
135
|
+
const Aa = [
|
|
135
136
|
{
|
|
136
137
|
id: "now/d",
|
|
137
|
-
name:
|
|
138
|
+
name: n("今天"),
|
|
138
139
|
type: "default"
|
|
139
140
|
/* default */
|
|
140
141
|
},
|
|
141
142
|
{
|
|
142
143
|
id: "now-1d/d",
|
|
143
|
-
name:
|
|
144
|
+
name: n("昨天"),
|
|
144
145
|
type: "default"
|
|
145
146
|
/* default */
|
|
146
147
|
},
|
|
147
148
|
{
|
|
148
149
|
id: "now-2d/d",
|
|
149
|
-
name:
|
|
150
|
+
name: n("前天"),
|
|
150
151
|
type: "default"
|
|
151
152
|
/* default */
|
|
152
153
|
},
|
|
153
154
|
{
|
|
154
155
|
id: "now/w",
|
|
155
|
-
name:
|
|
156
|
+
name: n("本周"),
|
|
156
157
|
type: "default"
|
|
157
158
|
/* default */
|
|
158
159
|
},
|
|
159
160
|
{
|
|
160
161
|
id: "now-1w/w",
|
|
161
|
-
name:
|
|
162
|
+
name: n("上周"),
|
|
162
163
|
type: "default"
|
|
163
164
|
/* default */
|
|
164
165
|
},
|
|
165
166
|
{
|
|
166
167
|
id: "now/M",
|
|
167
|
-
name:
|
|
168
|
+
name: n("本月"),
|
|
168
169
|
type: "default"
|
|
169
170
|
/* default */
|
|
170
171
|
},
|
|
171
172
|
{
|
|
172
173
|
id: "now-1M/M",
|
|
173
|
-
name:
|
|
174
|
+
name: n("上月"),
|
|
174
175
|
type: "default"
|
|
175
176
|
/* default */
|
|
176
177
|
},
|
|
177
178
|
{
|
|
178
179
|
id: "now-nd/d",
|
|
179
|
-
name:
|
|
180
|
-
prefix:
|
|
181
|
-
suffix:
|
|
180
|
+
name: n("前 N 天"),
|
|
181
|
+
prefix: n("前"),
|
|
182
|
+
suffix: n("天"),
|
|
182
183
|
type: "edit",
|
|
183
184
|
unit: "d"
|
|
184
185
|
},
|
|
185
186
|
{
|
|
186
187
|
id: "now-nw/w",
|
|
187
|
-
name:
|
|
188
|
-
prefix:
|
|
189
|
-
suffix:
|
|
188
|
+
name: n("前 N 周"),
|
|
189
|
+
prefix: n("前"),
|
|
190
|
+
suffix: n("周"),
|
|
190
191
|
type: "edit",
|
|
191
192
|
unit: "w"
|
|
192
193
|
}
|
|
193
194
|
];
|
|
194
|
-
var
|
|
195
|
-
const
|
|
195
|
+
var ha = /* @__PURE__ */ ((l) => (l.ALL = "all", l.NOW = "now", l))(ha || {});
|
|
196
|
+
const Ya = [
|
|
196
197
|
{
|
|
197
198
|
id: "all",
|
|
198
|
-
name:
|
|
199
|
+
name: n("整")
|
|
199
200
|
},
|
|
200
201
|
{
|
|
201
202
|
id: "now",
|
|
202
|
-
name:
|
|
203
|
+
name: n("至今")
|
|
203
204
|
}
|
|
204
|
-
],
|
|
205
|
+
], ze = [
|
|
205
206
|
{
|
|
206
207
|
id: "common",
|
|
207
|
-
name:
|
|
208
|
+
name: n("常用时间")
|
|
208
209
|
},
|
|
209
210
|
{
|
|
210
211
|
id: "recent",
|
|
211
|
-
name:
|
|
212
|
+
name: n("最近使用")
|
|
212
213
|
}
|
|
213
|
-
],
|
|
214
|
+
], Ee = [
|
|
214
215
|
{
|
|
215
|
-
id:
|
|
216
|
-
name:
|
|
216
|
+
id: k.RECENT,
|
|
217
|
+
name: n("最近")
|
|
217
218
|
},
|
|
218
219
|
{
|
|
219
|
-
id:
|
|
220
|
-
name:
|
|
220
|
+
id: k.FUTURE,
|
|
221
|
+
name: n("未来")
|
|
221
222
|
},
|
|
222
223
|
{
|
|
223
|
-
id:
|
|
224
|
-
name:
|
|
224
|
+
id: k.NATURAL,
|
|
225
|
+
name: n("自然日期")
|
|
225
226
|
},
|
|
226
227
|
{
|
|
227
|
-
id:
|
|
228
|
-
name:
|
|
228
|
+
id: k.Date,
|
|
229
|
+
name: n("日期选择")
|
|
229
230
|
}
|
|
230
|
-
], Se = "BK_DATE_PICKER_STORE", Ce = "BK_DATE_PICKER_STORE_TAB", Pe = "blueking_timezone",
|
|
231
|
+
], Se = "BK_DATE_PICKER_STORE", Ce = "BK_DATE_PICKER_STORE_TAB", Pe = "blueking_timezone", ga = (l = 1) => `${Se}_${l}`, Ba = (l = 1) => `${Ce}_${l}`, Te = [
|
|
231
232
|
"YYYY-MM-DD HH:mm:ss",
|
|
232
233
|
"YYYY-MM-DD HH:mm:ss,SSS",
|
|
233
234
|
"YYYY-MM-DD HH:mm:ss.SSS",
|
|
@@ -249,17 +250,17 @@ const ja = [
|
|
|
249
250
|
"YYYY-MM-DDTHH:mm:ssZ",
|
|
250
251
|
"YYYY-MM-DDTHH:mm:ss.SSSSSSZ"
|
|
251
252
|
], Ve = {
|
|
252
|
-
"now/M~now/M":
|
|
253
|
-
"now/d~now/d":
|
|
254
|
-
"now/w~now/w":
|
|
255
|
-
"now/y~now/y":
|
|
256
|
-
"now-1M/M~now-1M/M":
|
|
257
|
-
"now-1d/d~now-1d/d":
|
|
258
|
-
"now-1w/w~now-1w/w":
|
|
259
|
-
"now-1y/y~now-1y/y":
|
|
260
|
-
"now-2d/d~now-2d/d":
|
|
261
|
-
"now-2y/y~now-2y/y":
|
|
262
|
-
},
|
|
253
|
+
"now/M~now/M": n("本月"),
|
|
254
|
+
"now/d~now/d": n("今天"),
|
|
255
|
+
"now/w~now/w": n("本周"),
|
|
256
|
+
"now/y~now/y": n("今年"),
|
|
257
|
+
"now-1M/M~now-1M/M": n("上月"),
|
|
258
|
+
"now-1d/d~now-1d/d": n("昨天"),
|
|
259
|
+
"now-1w/w~now-1w/w": n("上周"),
|
|
260
|
+
"now-1y/y~now-1y/y": n("去年"),
|
|
261
|
+
"now-2d/d~now-2d/d": n("前天"),
|
|
262
|
+
"now-2y/y~now-2y/y": n("前年")
|
|
263
|
+
}, xa = [
|
|
263
264
|
["now-5m", "now"],
|
|
264
265
|
["now-15m", "now"],
|
|
265
266
|
["now-30m", "now"],
|
|
@@ -280,11 +281,11 @@ const ja = [
|
|
|
280
281
|
["now/M", "now"],
|
|
281
282
|
["now-1M/M", "now-1M/M"],
|
|
282
283
|
["now-1M/M", "now"]
|
|
283
|
-
], P = "now", Ne = /^(\d{4})[-/]
|
|
284
|
-
|
|
285
|
-
},
|
|
284
|
+
], P = "now", Ne = /^(\d{4})[-/](\d{1,2})[-/](\d{0,2})[Tt\s]*(\d{1,2})?:(\d{1,2})?:(\d{1,2})?[.:](\d+)?$/, vi = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, Qa = Symbol("DATE_PICKER_PROVIDER_KEY"), $e = (l) => {
|
|
285
|
+
ue(Qa, l);
|
|
286
|
+
}, Xa = () => oe(Qa);
|
|
287
|
+
d.extend(qa);
|
|
286
288
|
d.extend(Ka);
|
|
287
|
-
d.extend(Ha);
|
|
288
289
|
const je = [
|
|
289
290
|
// {
|
|
290
291
|
// label: '',
|
|
@@ -1628,125 +1629,125 @@ const je = [
|
|
|
1628
1629
|
}
|
|
1629
1630
|
]
|
|
1630
1631
|
}
|
|
1631
|
-
],
|
|
1632
|
-
const
|
|
1632
|
+
], Ye = () => {
|
|
1633
|
+
const l = d.tz.guess(), a = [], i = je.map((e) => ({
|
|
1633
1634
|
label: e.label,
|
|
1634
|
-
options: e.options.map((
|
|
1635
|
-
const
|
|
1636
|
-
...
|
|
1637
|
-
...
|
|
1635
|
+
options: e.options.map((r) => {
|
|
1636
|
+
const f = {
|
|
1637
|
+
...r,
|
|
1638
|
+
...Be(r.searchIndex)
|
|
1638
1639
|
};
|
|
1639
|
-
return
|
|
1640
|
-
...
|
|
1641
|
-
...
|
|
1642
|
-
label:
|
|
1643
|
-
}),
|
|
1640
|
+
return r.value === l && a.push({
|
|
1641
|
+
...r,
|
|
1642
|
+
...f,
|
|
1643
|
+
label: f.label
|
|
1644
|
+
}), f;
|
|
1644
1645
|
})
|
|
1645
1646
|
}));
|
|
1646
|
-
return
|
|
1647
|
+
return i.unshift({
|
|
1647
1648
|
label: "",
|
|
1648
1649
|
options: a
|
|
1649
|
-
}),
|
|
1650
|
-
},
|
|
1651
|
-
const a =
|
|
1650
|
+
}), i;
|
|
1651
|
+
}, Be = (l) => {
|
|
1652
|
+
const a = l.split("|");
|
|
1652
1653
|
return {
|
|
1653
1654
|
abbreviation: a[1].toLocaleUpperCase(),
|
|
1654
|
-
country: (a[3] || "").replace(/(\b\w)/g, (
|
|
1655
|
+
country: (a[3] || "").replace(/(\b\w)/g, (i) => i.toLocaleUpperCase()),
|
|
1655
1656
|
countryCode: a[4] || "",
|
|
1656
1657
|
utc: a[2].toLocaleUpperCase()
|
|
1657
1658
|
};
|
|
1658
|
-
},
|
|
1659
|
-
class
|
|
1660
|
-
constructor(a = ["", ""],
|
|
1659
|
+
}, ae = Ye(), ee = (l) => ae.reduce((a, i) => (a == null ? void 0 : a.label) === l ? a : i.options.find((e) => e.label === l), {}), ca = new RegExp(`now([+-]?\\d*)([${sa}]?)\\/?([${sa}]?)`), Re = new RegExp(`now[-](\\d+)([${sa}]{1})$`), Le = new RegExp(`now[+](\\d+)([${sa}]{1})$`), Ia = new RegExp(`now([+-]?\\d*)([${sa}]?)\\/([${sa}])$`);
|
|
1660
|
+
class ra {
|
|
1661
|
+
constructor(a = ["", ""], i = "YYYY-MM-DD HH:mm:ss", e = d.tz.guess()) {
|
|
1661
1662
|
ta(this, "endDate");
|
|
1662
1663
|
ta(this, "endNum");
|
|
1663
1664
|
ta(this, "endUnit");
|
|
1664
1665
|
ta(this, "startDate");
|
|
1665
1666
|
ta(this, "startNum");
|
|
1666
1667
|
ta(this, "startUnit");
|
|
1667
|
-
this.dateValue = a, this.format =
|
|
1668
|
-
const [
|
|
1669
|
-
this.startDate =
|
|
1668
|
+
this.dateValue = a, this.format = i, this.timezome = e;
|
|
1669
|
+
const [r, f] = a;
|
|
1670
|
+
this.startDate = r ? this.transformValue2Dayjs(r) : null, this.endDate = f ? this.transformValue2Dayjs(f, "end") : null;
|
|
1670
1671
|
}
|
|
1671
1672
|
dateDuration() {
|
|
1672
1673
|
if (!this.startDate || !this.endDate || !this.isValidate)
|
|
1673
1674
|
return;
|
|
1674
1675
|
let a = this.endDate.diff(this.startDate);
|
|
1675
|
-
const
|
|
1676
|
+
const i = 24 * 60 * 60 * 1e3;
|
|
1676
1677
|
switch (this.dateMode) {
|
|
1677
|
-
case
|
|
1678
|
+
case k.RECENT:
|
|
1678
1679
|
a = d().add(this.startNum, this.startUnit).diff(d());
|
|
1679
1680
|
break;
|
|
1680
|
-
case
|
|
1681
|
+
case k.FUTURE:
|
|
1681
1682
|
a = d().diff(
|
|
1682
1683
|
d().add(this.endNum, this.endUnit),
|
|
1683
1684
|
this.endUnit
|
|
1684
1685
|
);
|
|
1685
1686
|
break;
|
|
1686
|
-
case
|
|
1687
|
+
case k.NATURAL:
|
|
1687
1688
|
a = this.endDate.diff(this.startDate);
|
|
1688
1689
|
const e = 24 * 60 * 60 * 1e3;
|
|
1689
1690
|
a % e === e - 1 && (a += 1);
|
|
1690
1691
|
break;
|
|
1691
1692
|
default:
|
|
1692
|
-
case
|
|
1693
|
+
case k.Date:
|
|
1693
1694
|
a = this.endDate.diff(this.startDate);
|
|
1694
1695
|
break;
|
|
1695
1696
|
}
|
|
1696
|
-
return a %
|
|
1697
|
+
return a % i === i - 1e3 && (a += 1e3), a;
|
|
1697
1698
|
}
|
|
1698
1699
|
toDisplayString() {
|
|
1699
|
-
var
|
|
1700
|
+
var f, h, m;
|
|
1700
1701
|
if (!this.startDate || !this.endDate || !this.isValidate)
|
|
1701
|
-
return ((
|
|
1702
|
-
if (this.dateMode ===
|
|
1703
|
-
return `${
|
|
1702
|
+
return ((f = this.dateValue) == null ? void 0 : f.join(" ~ ")) || "";
|
|
1703
|
+
if (this.dateMode === k.RECENT)
|
|
1704
|
+
return `${n("近")} ${Math.abs(this.startNum)} ${n(
|
|
1704
1705
|
ia[this.startUnit]
|
|
1705
1706
|
)}`;
|
|
1706
|
-
if (this.dateMode ===
|
|
1707
|
-
return `${
|
|
1707
|
+
if (this.dateMode === k.FUTURE)
|
|
1708
|
+
return `${n("未来")} ${Math.abs(this.endNum)} ${n(
|
|
1708
1709
|
ia[this.endUnit]
|
|
1709
1710
|
)}`;
|
|
1710
|
-
const [a,
|
|
1711
|
-
if (this.dateMode ===
|
|
1712
|
-
const c =
|
|
1713
|
-
return
|
|
1711
|
+
const [a, i] = this.dateValue;
|
|
1712
|
+
if (this.dateMode === k.NATURAL) {
|
|
1713
|
+
const c = i !== P ? "" : n("(至今)"), s = Aa.find((u) => u.id === a);
|
|
1714
|
+
return s ? n(s.name) + c : `${`${n("前")} ${this.startNum} ${n(
|
|
1714
1715
|
ia[this.startUnit]
|
|
1715
1716
|
)}`}${c}`;
|
|
1716
1717
|
}
|
|
1717
1718
|
let e = this.format;
|
|
1718
1719
|
if (a === P)
|
|
1719
|
-
return `${
|
|
1720
|
-
if (
|
|
1721
|
-
return `${(
|
|
1722
|
-
const
|
|
1723
|
-
(c,
|
|
1720
|
+
return `${n("此刻")} ~ ${(h = this.endDate) == null ? void 0 : h.format(this.format)}`;
|
|
1721
|
+
if (i === P)
|
|
1722
|
+
return `${(m = this.startDate) == null ? void 0 : m.format(this.format)} ~ ${n("此刻")}`;
|
|
1723
|
+
const r = ["Y", "M", "D", "H", "m", "s"].reduce(
|
|
1724
|
+
(c, s, u, D) => (u < 1 || (this.format.indexOf(s) > this.format.indexOf(D[u - 1]) ? c.push(s) : c = []), c),
|
|
1724
1725
|
["Y"]
|
|
1725
1726
|
);
|
|
1726
|
-
if (
|
|
1727
|
+
if (r.length > 1 && r.includes("D") && this.startDate.isSame(this.endDate, "year")) {
|
|
1727
1728
|
const [, c] = this.format.match(/(Y+)/) || [];
|
|
1728
|
-
let
|
|
1729
|
+
let s = this.format.replace(c, this.startDate.format(c));
|
|
1729
1730
|
if (e = e.replace(/Y+[^\w\s]*/, ""), this.startDate.isSame(this.endDate, "day") && this.startDate.isSame(this.endDate, "month")) {
|
|
1730
|
-
const [,
|
|
1731
|
-
if (
|
|
1732
|
-
const [,
|
|
1733
|
-
|
|
1731
|
+
const [, D] = this.format.match(/(M+)/) || [];
|
|
1732
|
+
if (s = s.replace(D, this.startDate.format(D)), e = e.replace(/M+[^\w\s]*/, ""), this.startDate.isSame(this.endDate, "day")) {
|
|
1733
|
+
const [, M] = this.format.match(/(d+|D+)/) || [];
|
|
1734
|
+
s = s.replace(M, this.startDate.format(M)), e = e.replace(/(d|D)+[^\w\s]*/, "");
|
|
1734
1735
|
}
|
|
1735
1736
|
}
|
|
1736
|
-
const
|
|
1737
|
-
return console.info(
|
|
1738
|
-
`${
|
|
1737
|
+
const u = s.replace(e, "").slice(-1);
|
|
1738
|
+
return console.info(s, e, u), s.length <= e.length ? `${this.startDate.format(this.format)} ~ ${this.endDate.format(this.format)}` : s.replace(
|
|
1739
|
+
`${u.match(/([^\w\s]{1})/) ? u : ""}${e}`,
|
|
1739
1740
|
` ( ${this.startDate.format(e)} ~ ${this.endDate.format(e)} )`
|
|
1740
1741
|
);
|
|
1741
1742
|
}
|
|
1742
1743
|
return `${this.startDate.format(this.format)} ~ ${this.endDate.format(this.format)}`;
|
|
1743
1744
|
}
|
|
1744
1745
|
toEmitValue() {
|
|
1745
|
-
var a,
|
|
1746
|
+
var a, i, e, r;
|
|
1746
1747
|
return [
|
|
1747
|
-
this.dateMode ===
|
|
1748
|
+
this.dateMode === k.Date ? [
|
|
1748
1749
|
this.dateValue[0] === P ? P : (a = this.startDate) == null ? void 0 : a.valueOf(),
|
|
1749
|
-
this.dateValue[1] === P ? P : (
|
|
1750
|
+
this.dateValue[1] === P ? P : (i = this.endDate) == null ? void 0 : i.valueOf()
|
|
1750
1751
|
] : [...this.dateValue],
|
|
1751
1752
|
[
|
|
1752
1753
|
{
|
|
@@ -1755,99 +1756,99 @@ class na {
|
|
|
1755
1756
|
},
|
|
1756
1757
|
{
|
|
1757
1758
|
dayjs: this.endDate,
|
|
1758
|
-
formatText: (
|
|
1759
|
+
formatText: (r = this.endDate) == null ? void 0 : r.format(this.format)
|
|
1759
1760
|
}
|
|
1760
1761
|
]
|
|
1761
1762
|
];
|
|
1762
1763
|
}
|
|
1763
|
-
transformValue2Dayjs(a,
|
|
1764
|
+
transformValue2Dayjs(a, i = "start") {
|
|
1764
1765
|
const e = isNaN(a) ? a : +a;
|
|
1765
|
-
let
|
|
1766
|
-
if (typeof e == "number" || d.isDayjs(e) ||
|
|
1767
|
-
return d.tz(
|
|
1768
|
-
const [,
|
|
1769
|
-
return
|
|
1766
|
+
let r = d(e);
|
|
1767
|
+
if (typeof e == "number" || d.isDayjs(e) || r.isValid())
|
|
1768
|
+
return d.tz(r.valueOf(), this.timezome);
|
|
1769
|
+
const [, f, h, m] = e.match(ca) || [];
|
|
1770
|
+
return i === "start" ? (this.startNum = Math.abs(+f), this.startUnit = h || m) : i === "end" && (this.endNum = Math.abs(+f), this.endUnit = h || m), f ? r = d().add(+f, h || m) : e === P && (r = d()), m ? (r = i === "start" ? d(d(r.isValid() ? r : void 0).valueOf()) : d(d(r.isValid() ? r : void 0)), i === "start" ? d.tz(r.valueOf(), this.timezome).startOf(m) : d.tz(r.valueOf(), this.timezome).endOf(m)) : d.tz(r.valueOf(), this.timezome);
|
|
1770
1771
|
}
|
|
1771
|
-
updateDateValue(a,
|
|
1772
|
+
updateDateValue(a, i) {
|
|
1772
1773
|
this.dateValue = a;
|
|
1773
|
-
const [e,
|
|
1774
|
-
|
|
1774
|
+
const [e, r] = a;
|
|
1775
|
+
i && (this.timezome = i), this.startDate = e ? this.transformValue2Dayjs(e) : null, this.endDate = r ? this.transformValue2Dayjs(r, "end") : null;
|
|
1775
1776
|
}
|
|
1776
1777
|
updateFormat(a) {
|
|
1777
1778
|
this.format = a;
|
|
1778
1779
|
}
|
|
1779
1780
|
get dateMode() {
|
|
1780
|
-
const [a,
|
|
1781
|
-
if (typeof a == "number" || typeof
|
|
1782
|
-
return
|
|
1783
|
-
if (a === P && Le.test(
|
|
1784
|
-
return
|
|
1785
|
-
if (
|
|
1786
|
-
return
|
|
1781
|
+
const [a, i] = this.dateValue;
|
|
1782
|
+
if (typeof a == "number" || typeof i == "number" || d.isDayjs(a) || d.isDayjs(i) || d(a).isValid() || d(i).isValid())
|
|
1783
|
+
return k.Date;
|
|
1784
|
+
if (a === P && Le.test(i))
|
|
1785
|
+
return k.FUTURE;
|
|
1786
|
+
if (i === P && Re.test(a))
|
|
1787
|
+
return k.RECENT;
|
|
1787
1788
|
if (Ve[this.dateValue.join("~")])
|
|
1788
|
-
return
|
|
1789
|
-
if (
|
|
1790
|
-
const [, e,
|
|
1791
|
-
if (
|
|
1792
|
-
return
|
|
1789
|
+
return k.NATURAL;
|
|
1790
|
+
if (Ia.test(a) && (Ia.test(i) || i === P)) {
|
|
1791
|
+
const [, e, r, f] = a.match(ca) || [], [, h, m, c] = i.match(ca) || [];
|
|
1792
|
+
if (f && (i === P || e && +h == -1 && r === f && m === c && r === m))
|
|
1793
|
+
return k.NATURAL;
|
|
1793
1794
|
}
|
|
1794
|
-
return
|
|
1795
|
+
return k.Date;
|
|
1795
1796
|
}
|
|
1796
1797
|
get endDisplayText() {
|
|
1797
1798
|
var a;
|
|
1798
1799
|
return d.tz(((a = this.endDate) == null ? void 0 : a.valueOf()) || void 0, this.timezome).format(this.format);
|
|
1799
1800
|
}
|
|
1800
1801
|
get isValidate() {
|
|
1801
|
-
var a,
|
|
1802
|
-
return ((a = this.startDate) == null ? void 0 : a.isValid()) && ((
|
|
1802
|
+
var a, i;
|
|
1803
|
+
return ((a = this.startDate) == null ? void 0 : a.isValid()) && ((i = this.endDate) == null ? void 0 : i.isValid());
|
|
1803
1804
|
}
|
|
1804
1805
|
get recentOrFuturedateNum() {
|
|
1805
|
-
if (this.dateMode ===
|
|
1806
|
+
if (this.dateMode === k.RECENT)
|
|
1806
1807
|
return this.startNum;
|
|
1807
|
-
if (this.dateMode ===
|
|
1808
|
+
if (this.dateMode === k.FUTURE)
|
|
1808
1809
|
return this.endNum;
|
|
1809
1810
|
}
|
|
1810
1811
|
get recentOrFuturedateUnit() {
|
|
1811
|
-
return this.dateMode ===
|
|
1812
|
+
return this.dateMode === k.RECENT ? this.startUnit : this.dateMode === k.FUTURE ? this.endUnit : "m";
|
|
1812
1813
|
}
|
|
1813
1814
|
get startDisplayText() {
|
|
1814
1815
|
var a;
|
|
1815
1816
|
return d.tz(((a = this.startDate) == null ? void 0 : a.valueOf()) || void 0, this.timezome).format(this.format);
|
|
1816
1817
|
}
|
|
1817
1818
|
}
|
|
1818
|
-
const
|
|
1819
|
-
const e = isNaN(
|
|
1820
|
-
let
|
|
1821
|
-
if (typeof e == "number" || d.isDayjs(e) ||
|
|
1822
|
-
return d.tz(
|
|
1823
|
-
const [,
|
|
1824
|
-
return
|
|
1825
|
-
}, bi = (
|
|
1826
|
-
if (!Array.isArray(
|
|
1819
|
+
const ka = (l, a = "start", i) => {
|
|
1820
|
+
const e = isNaN(l) ? l : +l;
|
|
1821
|
+
let r = d(e);
|
|
1822
|
+
if (typeof e == "number" || d.isDayjs(e) || r.isValid())
|
|
1823
|
+
return d.tz(r.valueOf(), i || d.tz.guess());
|
|
1824
|
+
const [, f, h, m] = e.match(ca) || [];
|
|
1825
|
+
return f ? r = d().add(+f, h || m || "d") : e === P && (r = d()), m ? (r = a === "start" ? d.tz(d(r.isValid() ? r : void 0).valueOf(), i).startOf(m) : d.tz(d(r.isValid() ? r : void 0), i).endOf(m), r != null && r.isValid() ? r : void 0) : r.isValid() ? d.tz(r.valueOf(), i || d.tz.guess()) : void 0;
|
|
1826
|
+
}, bi = (l, a) => {
|
|
1827
|
+
if (!Array.isArray(l) || l.length < 1)
|
|
1827
1828
|
return [];
|
|
1828
|
-
const [
|
|
1829
|
-
return [
|
|
1830
|
-
},
|
|
1831
|
-
const e = (a === "local" ? localStorage : sessionStorage).getItem(
|
|
1832
|
-
let
|
|
1829
|
+
const [i, e] = l || [], r = ka(i, "start", a), f = ka(e, "end", a);
|
|
1830
|
+
return [r, f];
|
|
1831
|
+
}, te = (l, a = "local") => {
|
|
1832
|
+
const e = (a === "local" ? localStorage : sessionStorage).getItem(l);
|
|
1833
|
+
let r = [];
|
|
1833
1834
|
if (e)
|
|
1834
1835
|
try {
|
|
1835
|
-
|
|
1836
|
+
r = JSON.parse(e);
|
|
1836
1837
|
} catch {
|
|
1837
|
-
|
|
1838
|
+
r = [];
|
|
1838
1839
|
}
|
|
1839
|
-
return Array.isArray(
|
|
1840
|
-
},
|
|
1840
|
+
return Array.isArray(r) || (r = []), r;
|
|
1841
|
+
}, ie = (l, a, i = "local") => {
|
|
1841
1842
|
let e = [];
|
|
1842
|
-
const
|
|
1843
|
-
if (
|
|
1843
|
+
const r = i === "local" ? localStorage : sessionStorage, f = r.getItem(a);
|
|
1844
|
+
if (f)
|
|
1844
1845
|
try {
|
|
1845
|
-
e = JSON.parse(
|
|
1846
|
+
e = JSON.parse(f);
|
|
1846
1847
|
} catch {
|
|
1847
1848
|
e = [];
|
|
1848
1849
|
}
|
|
1849
|
-
Array.isArray(e) || (e = []), !e.some((
|
|
1850
|
-
}, Ue = { class: "common-panel-tab" },
|
|
1850
|
+
Array.isArray(e) || (e = []), !e.some((h) => h[0] === l[0] && h[1] === l[1]) && (e.unshift(l), r.setItem(a, JSON.stringify(e.slice(0, 10))));
|
|
1851
|
+
}, Ue = { class: "common-panel-tab" }, Ra = /* @__PURE__ */ X({
|
|
1851
1852
|
__name: "common-tab",
|
|
1852
1853
|
props: {
|
|
1853
1854
|
/** modelValue 选中的tab */
|
|
@@ -1865,18 +1866,18 @@ const Ia = (s, a = "start", n) => {
|
|
|
1865
1866
|
type: Boolean
|
|
1866
1867
|
}
|
|
1867
1868
|
},
|
|
1868
|
-
setup(
|
|
1869
|
-
return (a,
|
|
1870
|
-
|
|
1871
|
-
active:
|
|
1872
|
-
"onUpdate:active":
|
|
1869
|
+
setup(l) {
|
|
1870
|
+
return (a, i) => (A(), E("div", Ue, [
|
|
1871
|
+
S(t(ja), {
|
|
1872
|
+
active: l.modelValue,
|
|
1873
|
+
"onUpdate:active": i[0] || (i[0] = (e) => a.$emit("update:modelValue", e)),
|
|
1873
1874
|
type: "unborder-card"
|
|
1874
1875
|
}, {
|
|
1875
|
-
default:
|
|
1876
|
-
(A(!0),
|
|
1877
|
-
|
|
1876
|
+
default: $(() => [
|
|
1877
|
+
(A(!0), E(
|
|
1878
|
+
U,
|
|
1878
1879
|
null,
|
|
1879
|
-
O(
|
|
1880
|
+
O(l.panels, (e) => (A(), H(t(ja).TabPanel, {
|
|
1880
1881
|
key: e.id,
|
|
1881
1882
|
label: e.name,
|
|
1882
1883
|
name: e.id
|
|
@@ -1888,54 +1889,54 @@ const Ia = (s, a = "start", n) => {
|
|
|
1888
1889
|
_: 1
|
|
1889
1890
|
/* STABLE */
|
|
1890
1891
|
}, 8, ["active"]),
|
|
1891
|
-
|
|
1892
|
+
l.showDeleteAll ? (A(), H(t(_e), {
|
|
1892
1893
|
key: 0,
|
|
1893
|
-
content: t(
|
|
1894
|
+
content: t(n)("是否清空最近使用?"),
|
|
1894
1895
|
trigger: "click",
|
|
1895
1896
|
width: 189,
|
|
1896
|
-
onConfirm:
|
|
1897
|
-
"confirm-text": t(
|
|
1898
|
-
"cancel-text": t(
|
|
1897
|
+
onConfirm: i[1] || (i[1] = (e) => a.$emit("confirm")),
|
|
1898
|
+
"confirm-text": t(n)("确定"),
|
|
1899
|
+
"cancel-text": t(n)("取消"),
|
|
1899
1900
|
"ext-cls": "__bk-date-picker-popover__ __bk-date-picker-popover-delete__"
|
|
1900
1901
|
}, {
|
|
1901
|
-
default:
|
|
1902
|
-
|
|
1902
|
+
default: $(() => [
|
|
1903
|
+
S(t(fe), { class: "delete-all" })
|
|
1903
1904
|
]),
|
|
1904
1905
|
_: 1
|
|
1905
1906
|
/* STABLE */
|
|
1906
|
-
}, 8, ["content", "confirm-text", "cancel-text"])) :
|
|
1907
|
+
}, 8, ["content", "confirm-text", "cancel-text"])) : na("v-if", !0)
|
|
1907
1908
|
]));
|
|
1908
1909
|
}
|
|
1909
1910
|
});
|
|
1910
|
-
const
|
|
1911
|
+
const ya = /* @__PURE__ */ X({
|
|
1911
1912
|
__name: "common-submit",
|
|
1912
1913
|
props: {
|
|
1913
1914
|
disableTips: {},
|
|
1914
1915
|
disabled: { type: Boolean }
|
|
1915
1916
|
},
|
|
1916
1917
|
emits: ["submit"],
|
|
1917
|
-
setup(
|
|
1918
|
-
return (a,
|
|
1918
|
+
setup(l) {
|
|
1919
|
+
return (a, i) => {
|
|
1919
1920
|
var e;
|
|
1920
|
-
return A(),
|
|
1921
|
-
|
|
1921
|
+
return A(), E(
|
|
1922
|
+
U,
|
|
1922
1923
|
null,
|
|
1923
1924
|
[
|
|
1924
|
-
|
|
1925
|
+
S(t(la), {
|
|
1925
1926
|
content: a.disableTips,
|
|
1926
1927
|
disabled: !a.disabled || !((e = a.disableTips) != null && e.length)
|
|
1927
1928
|
}, {
|
|
1928
|
-
default:
|
|
1929
|
-
|
|
1929
|
+
default: $(() => [
|
|
1930
|
+
S(t(_a), {
|
|
1930
1931
|
disabled: a.disabled,
|
|
1931
1932
|
outline: !0,
|
|
1932
|
-
onClick:
|
|
1933
|
+
onClick: i[0] || (i[0] = (r) => a.$emit("submit")),
|
|
1933
1934
|
class: "common-submit",
|
|
1934
1935
|
theme: "primary"
|
|
1935
1936
|
}, {
|
|
1936
|
-
default:
|
|
1937
|
-
|
|
1938
|
-
|
|
1937
|
+
default: $(() => [
|
|
1938
|
+
J(
|
|
1939
|
+
y(t(n)("确定")),
|
|
1939
1940
|
1
|
|
1940
1941
|
/* TEXT */
|
|
1941
1942
|
)
|
|
@@ -1947,7 +1948,7 @@ const _a = /* @__PURE__ */ Q({
|
|
|
1947
1948
|
_: 1
|
|
1948
1949
|
/* STABLE */
|
|
1949
1950
|
}, 8, ["content", "disabled"]),
|
|
1950
|
-
|
|
1951
|
+
na("v-if", !0)
|
|
1951
1952
|
],
|
|
1952
1953
|
64
|
|
1953
1954
|
/* STABLE_FRAGMENT */
|
|
@@ -1961,7 +1962,7 @@ const He = { class: "date-panel" }, Ke = { class: "date-panel-title" }, qe = { c
|
|
|
1961
1962
|
null,
|
|
1962
1963
|
-1
|
|
1963
1964
|
/* HOISTED */
|
|
1964
|
-
), We = { class: "date-header-right" }, Ze = { class: "date-content" }, Qe = { class: "date-grid" }, Xe = ["onClick"],
|
|
1965
|
+
), We = { class: "date-header-right" }, Ze = { class: "date-content" }, Qe = { class: "date-grid" }, Xe = ["onClick"], La = 6, ma = 7, Ua = /* @__PURE__ */ X({
|
|
1965
1966
|
__name: "date-panel",
|
|
1966
1967
|
props: {
|
|
1967
1968
|
diableNow: { type: Boolean },
|
|
@@ -1972,50 +1973,54 @@ const He = { class: "date-panel" }, Ke = { class: "date-panel-title" }, qe = { c
|
|
|
1972
1973
|
title: {}
|
|
1973
1974
|
},
|
|
1974
1975
|
emits: ["update:isNow", "update:modelValue"],
|
|
1975
|
-
setup(
|
|
1976
|
-
const
|
|
1976
|
+
setup(l, { emit: a }) {
|
|
1977
|
+
const i = l, e = a, r = ba === "en" ? ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] : ["日", "一", "二", "三", "四", "五", "六"], f = ea([]), h = d(), m = ea(i.modelValue || h);
|
|
1977
1978
|
oa(
|
|
1978
|
-
|
|
1979
|
+
m,
|
|
1979
1980
|
() => {
|
|
1980
|
-
const
|
|
1981
|
-
for (let N = 0; N <
|
|
1982
|
-
Y.push(
|
|
1983
|
-
|
|
1981
|
+
const C = m.value.startOf("month").startOf("week").add(-1, "day"), Y = [];
|
|
1982
|
+
for (let N = 0; N < La * ma; N++)
|
|
1983
|
+
Y.push(C.add(N, "day"));
|
|
1984
|
+
f.value = Y;
|
|
1984
1985
|
},
|
|
1985
1986
|
{
|
|
1986
1987
|
immediate: !0
|
|
1987
1988
|
}
|
|
1988
1989
|
);
|
|
1989
|
-
const c = (
|
|
1990
|
-
|
|
1991
|
-
},
|
|
1992
|
-
|
|
1993
|
-
},
|
|
1994
|
-
|
|
1995
|
-
}, f = () => {
|
|
1996
|
-
n.diableNow || e("update:isNow", !n.isNow);
|
|
1990
|
+
const c = (C) => {
|
|
1991
|
+
m.value = m.value.add(C, "month");
|
|
1992
|
+
}, s = (C) => {
|
|
1993
|
+
m.value = m.value.add(C, "year");
|
|
1994
|
+
}, u = (C) => {
|
|
1995
|
+
i.minDate && C.isBefore(i.minDate, "day") || e("update:modelValue", C);
|
|
1997
1996
|
};
|
|
1998
|
-
|
|
1997
|
+
let D = 0;
|
|
1998
|
+
const M = () => {
|
|
1999
|
+
i.diableNow || D || (e("update:isNow", !i.isNow), D = setTimeout(() => {
|
|
2000
|
+
clearTimeout(D), D = 0;
|
|
2001
|
+
}, 500));
|
|
2002
|
+
};
|
|
2003
|
+
return (C, Y) => (A(), E("div", He, [
|
|
1999
2004
|
v("div", Ke, [
|
|
2000
|
-
|
|
2001
|
-
|
|
2005
|
+
J(
|
|
2006
|
+
y(C.title) + " ",
|
|
2002
2007
|
1
|
|
2003
2008
|
/* TEXT */
|
|
2004
2009
|
),
|
|
2005
2010
|
v(
|
|
2006
2011
|
"span",
|
|
2007
2012
|
{
|
|
2008
|
-
onMousedown:
|
|
2013
|
+
onMousedown: M,
|
|
2009
2014
|
class: "title-check"
|
|
2010
2015
|
},
|
|
2011
2016
|
[
|
|
2012
|
-
|
|
2013
|
-
disabled:
|
|
2014
|
-
"model-value":
|
|
2017
|
+
S(t(ye), {
|
|
2018
|
+
disabled: C.diableNow,
|
|
2019
|
+
"model-value": C.isNow,
|
|
2015
2020
|
size: "small"
|
|
2016
2021
|
}, {
|
|
2017
|
-
default:
|
|
2018
|
-
|
|
2022
|
+
default: $(() => [
|
|
2023
|
+
J(" now ")
|
|
2019
2024
|
]),
|
|
2020
2025
|
_: 1
|
|
2021
2026
|
/* STABLE */
|
|
@@ -2028,51 +2033,51 @@ const He = { class: "date-panel" }, Ke = { class: "date-panel-title" }, qe = { c
|
|
|
2028
2033
|
v("div", qe, [
|
|
2029
2034
|
v("div", Oe, [
|
|
2030
2035
|
v("div", Fe, [
|
|
2031
|
-
|
|
2032
|
-
onClick: Y[0] || (Y[0] = (N) =>
|
|
2036
|
+
S(t(pe), {
|
|
2037
|
+
onClick: Y[0] || (Y[0] = (N) => s(-1)),
|
|
2033
2038
|
class: "hand-icon"
|
|
2034
2039
|
}),
|
|
2035
|
-
|
|
2040
|
+
S(t(Ga), {
|
|
2036
2041
|
onClick: Y[1] || (Y[1] = (N) => c(-1)),
|
|
2037
2042
|
class: "hand-icon"
|
|
2038
2043
|
})
|
|
2039
2044
|
]),
|
|
2040
2045
|
v("div", Ge, [
|
|
2041
|
-
|
|
2042
|
-
|
|
2046
|
+
J(
|
|
2047
|
+
y(m.value.year()),
|
|
2043
2048
|
1
|
|
2044
2049
|
/* TEXT */
|
|
2045
2050
|
),
|
|
2046
2051
|
Je,
|
|
2047
|
-
|
|
2048
|
-
|
|
2052
|
+
J(
|
|
2053
|
+
y(m.value.month() + 1),
|
|
2049
2054
|
1
|
|
2050
2055
|
/* TEXT */
|
|
2051
2056
|
)
|
|
2052
2057
|
]),
|
|
2053
2058
|
v("div", We, [
|
|
2054
|
-
|
|
2059
|
+
S(t(Ja), {
|
|
2055
2060
|
onClick: Y[2] || (Y[2] = (N) => c(1)),
|
|
2056
2061
|
class: "hand-icon"
|
|
2057
2062
|
}),
|
|
2058
|
-
|
|
2059
|
-
onClick: Y[3] || (Y[3] = (N) =>
|
|
2063
|
+
S(t(Ae), {
|
|
2064
|
+
onClick: Y[3] || (Y[3] = (N) => s(1)),
|
|
2060
2065
|
class: "hand-icon"
|
|
2061
2066
|
})
|
|
2062
2067
|
])
|
|
2063
2068
|
]),
|
|
2064
2069
|
v("div", Ze, [
|
|
2065
2070
|
v("ul", Qe, [
|
|
2066
|
-
(A(!0),
|
|
2067
|
-
|
|
2071
|
+
(A(!0), E(
|
|
2072
|
+
U,
|
|
2068
2073
|
null,
|
|
2069
|
-
O(t(
|
|
2074
|
+
O(t(r), (N, B) => (A(), E(
|
|
2070
2075
|
"li",
|
|
2071
2076
|
{
|
|
2072
|
-
key:
|
|
2077
|
+
key: B,
|
|
2073
2078
|
class: "date-grid-item not-click"
|
|
2074
2079
|
},
|
|
2075
|
-
|
|
2080
|
+
y(N),
|
|
2076
2081
|
1
|
|
2077
2082
|
/* TEXT */
|
|
2078
2083
|
))),
|
|
@@ -2080,27 +2085,27 @@ const He = { class: "date-panel" }, Ke = { class: "date-panel-title" }, qe = { c
|
|
|
2080
2085
|
/* KEYED_FRAGMENT */
|
|
2081
2086
|
))
|
|
2082
2087
|
]),
|
|
2083
|
-
(A(),
|
|
2084
|
-
|
|
2088
|
+
(A(), E(
|
|
2089
|
+
U,
|
|
2085
2090
|
null,
|
|
2086
|
-
O(
|
|
2091
|
+
O(La, (N) => v("ul", {
|
|
2087
2092
|
key: N,
|
|
2088
2093
|
class: "date-grid"
|
|
2089
2094
|
}, [
|
|
2090
|
-
(A(!0),
|
|
2091
|
-
|
|
2095
|
+
(A(!0), E(
|
|
2096
|
+
U,
|
|
2092
2097
|
null,
|
|
2093
|
-
O(
|
|
2094
|
-
class:
|
|
2095
|
-
"is-last-month":
|
|
2096
|
-
"is-next-month":
|
|
2097
|
-
"is-today":
|
|
2098
|
-
"is-disabled":
|
|
2099
|
-
"is-selected":
|
|
2098
|
+
O(f.value.slice((N - 1) * ma, (N - 1) * ma + ma), (B) => (A(), E("li", {
|
|
2099
|
+
class: ua([{
|
|
2100
|
+
"is-last-month": B.isBefore(m.value, "month"),
|
|
2101
|
+
"is-next-month": B.isAfter(m.value, "month"),
|
|
2102
|
+
"is-today": B.isSame(t(h), "day"),
|
|
2103
|
+
"is-disabled": C.minDate && B.isBefore(C.minDate, "day"),
|
|
2104
|
+
"is-selected": i.modelValue && B.isSame(i.modelValue, "day")
|
|
2100
2105
|
}, "date-grid-item"]),
|
|
2101
|
-
key:
|
|
2102
|
-
onClick:
|
|
2103
|
-
},
|
|
2106
|
+
key: B.unix(),
|
|
2107
|
+
onClick: Oa((F) => u(B), ["prevent"])
|
|
2108
|
+
}, y(B.date()), 11, Xe))),
|
|
2104
2109
|
128
|
|
2105
2110
|
/* KEYED_FRAGMENT */
|
|
2106
2111
|
))
|
|
@@ -2113,7 +2118,7 @@ const He = { class: "date-panel" }, Ke = { class: "date-panel-title" }, qe = { c
|
|
|
2113
2118
|
]));
|
|
2114
2119
|
}
|
|
2115
2120
|
});
|
|
2116
|
-
const at = { class: "date-wrapper" }, et = { class: "date-input" }, tt =
|
|
2121
|
+
const at = { class: "date-wrapper" }, et = { class: "date-input" }, tt = /* @__PURE__ */ v(
|
|
2117
2122
|
"span",
|
|
2118
2123
|
{ class: "date-picker-icon" },
|
|
2119
2124
|
[
|
|
@@ -2135,259 +2140,270 @@ const at = { class: "date-wrapper" }, et = { class: "date-input" }, tt = { class
|
|
|
2135
2140
|
],
|
|
2136
2141
|
-1
|
|
2137
2142
|
/* HOISTED */
|
|
2138
|
-
),
|
|
2143
|
+
), it = ["placeholder", "value"], nt = /* @__PURE__ */ v(
|
|
2139
2144
|
"span",
|
|
2140
2145
|
{ class: "date-picker-split" },
|
|
2141
2146
|
"~",
|
|
2142
2147
|
-1
|
|
2143
2148
|
/* HOISTED */
|
|
2144
|
-
),
|
|
2149
|
+
), rt = ["placeholder", "value"], lt = { class: "show-format" }, st = { class: "date-format-wrapper" }, ct = { class: "content-title" }, ut = { class: "content-table" }, ot = /* @__PURE__ */ X({
|
|
2145
2150
|
__name: "date-picker",
|
|
2146
2151
|
props: {
|
|
2147
2152
|
value: {}
|
|
2148
2153
|
},
|
|
2149
2154
|
emits: ["change"],
|
|
2150
|
-
setup(
|
|
2151
|
-
d.extend(
|
|
2152
|
-
const
|
|
2155
|
+
setup(l, { emit: a }) {
|
|
2156
|
+
d.extend(Ha);
|
|
2157
|
+
const i = l, e = a, r = L(null), f = L(null), h = L(!1), m = L(!1), c = ea(), s = ea(), u = L(!1), D = L(!1), { format: M } = Xa(), C = d();
|
|
2153
2158
|
oa(
|
|
2154
|
-
() =>
|
|
2155
|
-
(
|
|
2156
|
-
if (
|
|
2159
|
+
() => i.value,
|
|
2160
|
+
(p) => {
|
|
2161
|
+
if (p.dateMode !== k.Date)
|
|
2157
2162
|
return;
|
|
2158
|
-
const { dateValue:
|
|
2159
|
-
!(
|
|
2163
|
+
const { dateValue: o, endDate: w, startDate: z } = p;
|
|
2164
|
+
!(z != null && z.isValid()) && !(w != null && w.isValid()) || (c.value = z, s.value = w, u.value = o[0] === P, D.value = o[1] === P);
|
|
2160
2165
|
},
|
|
2161
2166
|
{
|
|
2162
2167
|
immediate: !0
|
|
2163
2168
|
}
|
|
2164
2169
|
);
|
|
2165
|
-
const
|
|
2170
|
+
const Y = W(() => !(!c.value || !s.value || !c.value.isValid() || !s.value.isValid() || c.value.isSame(s.value, "ms") || c.value.isAfter(s.value))), N = async (p, o) => {
|
|
2166
2171
|
setTimeout(() => {
|
|
2167
|
-
var
|
|
2168
|
-
const
|
|
2169
|
-
if (
|
|
2172
|
+
var wa, Da, Ma, za;
|
|
2173
|
+
const w = (Da = (wa = p.target) == null ? void 0 : wa.value) == null ? void 0 : Da.toString().trim(), z = o === "start" ? c.value : s.value, K = o === "start" ? u : D, da = o === "start" ? D : u, ne = z == null ? void 0 : z.format(M.value);
|
|
2174
|
+
if (w === ne || !w || w === P && K.value)
|
|
2170
2175
|
return;
|
|
2171
|
-
if (
|
|
2172
|
-
R(
|
|
2176
|
+
if (w === P && !K.value && !da.value) {
|
|
2177
|
+
R(o);
|
|
2173
2178
|
return;
|
|
2174
2179
|
}
|
|
2175
|
-
let
|
|
2176
|
-
if (
|
|
2177
|
-
const
|
|
2178
|
-
if (
|
|
2180
|
+
let G;
|
|
2181
|
+
if (ca.test(w) && (G = ka(w, o)), !G && !/Z$/i.test(w) && M.value === "YYYY-MM-DD HH:mm:ss") {
|
|
2182
|
+
const Q = w.match(Ne) || [];
|
|
2183
|
+
if (console.info(Q), Q.length) {
|
|
2179
2184
|
let q = !0;
|
|
2180
|
-
const
|
|
2185
|
+
const re = (Q[7] || "0").substring(0, 3), Ea = Q[6] || 0;
|
|
2181
2186
|
q = Ea < 60;
|
|
2182
|
-
const
|
|
2183
|
-
q = q &&
|
|
2184
|
-
const
|
|
2185
|
-
q = q &&
|
|
2186
|
-
const
|
|
2187
|
-
q = q &&
|
|
2188
|
-
const
|
|
2189
|
-
q = q &&
|
|
2190
|
-
const
|
|
2191
|
-
q = q &&
|
|
2187
|
+
const Sa = Q[5] || 0;
|
|
2188
|
+
q = q && Sa < 60;
|
|
2189
|
+
const Ca = Q[4] || 0;
|
|
2190
|
+
q = q && Ca < 24;
|
|
2191
|
+
const Pa = Q[3] || 1;
|
|
2192
|
+
q = q && Pa < 32;
|
|
2193
|
+
const Ta = Q[2] - 1 || 0;
|
|
2194
|
+
q = q && Ta < 12;
|
|
2195
|
+
const Va = Q[1];
|
|
2196
|
+
q = q && Va.length < 5 && w.length <= M.value.length, G = q ? d(new Date(Va, Ta, Pa, Ca, Sa, Ea, re)) : z;
|
|
2192
2197
|
}
|
|
2193
2198
|
}
|
|
2194
|
-
|
|
2199
|
+
G || (G = d(w)), G.isValid() && (z != null && z.isSame(G) || (K.value = w === P, o === "start" ? I(c ? G : G.startOf("d")) : T(s ? G : G.endOf("d")))), p.target.value = o === "start" ? ((Ma = c.value) == null ? void 0 : Ma.format(M.value)) || "" : ((za = s.value) == null ? void 0 : za.format(M.value)) || "";
|
|
2195
2200
|
}, 100);
|
|
2196
|
-
},
|
|
2197
|
-
|
|
2198
|
-
},
|
|
2199
|
-
|
|
2200
|
-
},
|
|
2201
|
-
setTimeout(() =>
|
|
2202
|
-
}, g = (
|
|
2203
|
-
setTimeout(() =>
|
|
2204
|
-
},
|
|
2205
|
-
var
|
|
2206
|
-
(
|
|
2207
|
-
}, T = (
|
|
2208
|
-
var
|
|
2209
|
-
(
|
|
2210
|
-
}, R = (
|
|
2211
|
-
|
|
2212
|
-
var
|
|
2213
|
-
(
|
|
2214
|
-
}, 100),
|
|
2215
|
-
var
|
|
2216
|
-
(
|
|
2217
|
-
}, 100),
|
|
2218
|
-
},
|
|
2219
|
-
c.value = void 0,
|
|
2220
|
-
},
|
|
2221
|
-
var
|
|
2222
|
-
if (c.value &&
|
|
2223
|
-
const
|
|
2224
|
-
e("change", [
|
|
2201
|
+
}, B = () => {
|
|
2202
|
+
h.value = !0, g();
|
|
2203
|
+
}, F = () => {
|
|
2204
|
+
m.value = !0, x();
|
|
2205
|
+
}, x = (p = 32) => {
|
|
2206
|
+
setTimeout(() => h.value = !1, p);
|
|
2207
|
+
}, g = (p = 32) => {
|
|
2208
|
+
setTimeout(() => m.value = !1, p);
|
|
2209
|
+
}, I = (p) => {
|
|
2210
|
+
var o, w;
|
|
2211
|
+
(o = c.value) != null && o.isSame(p) || (c.value = p, u.value = !1), s.value || ((w = f.value) == null || w.focus(), F()), x();
|
|
2212
|
+
}, T = (p) => {
|
|
2213
|
+
var o, w;
|
|
2214
|
+
(o = s.value) != null && o.isSame(p) || (s.value = p, D.value = !1), c.value || ((w = r.value) == null || w.focus(), B()), g();
|
|
2215
|
+
}, R = (p) => {
|
|
2216
|
+
p === "start" ? (u.value = !u.value, D.value = !1, c.value = d(), s.value ? u.value && x() : (setTimeout(() => {
|
|
2217
|
+
var o;
|
|
2218
|
+
(o = f.value) == null || o.focus(), F();
|
|
2219
|
+
}, 100), x())) : (D.value = !D.value, u.value = !1, s.value = d(), c.value ? D.value && g() : (setTimeout(() => {
|
|
2220
|
+
var o;
|
|
2221
|
+
(o = r.value) == null || o.focus(), B();
|
|
2222
|
+
}, 100), g()));
|
|
2223
|
+
}, _ = () => {
|
|
2224
|
+
c.value = void 0, s.value = void 0, u.value = !1, D.value = !1, x(), g();
|
|
2225
|
+
}, V = () => {
|
|
2226
|
+
var p, o;
|
|
2227
|
+
if (c.value && s.value) {
|
|
2228
|
+
const w = u.value ? P : (p = c.value) == null ? void 0 : p.valueOf(), z = D.value ? P : (o = s.value) == null ? void 0 : o.valueOf();
|
|
2229
|
+
e("change", [w || "", z || ""]);
|
|
2225
2230
|
}
|
|
2226
|
-
},
|
|
2227
|
-
var
|
|
2228
|
-
|
|
2229
|
-
}, j = (
|
|
2230
|
-
var
|
|
2231
|
-
|
|
2231
|
+
}, b = (p) => {
|
|
2232
|
+
var o;
|
|
2233
|
+
h.value && ((o = document.querySelector(".__date-picker-popover-start__")) != null && o.contains(p.target) || x());
|
|
2234
|
+
}, j = (p) => {
|
|
2235
|
+
var o;
|
|
2236
|
+
m.value && ((o = document.querySelector(".__date-picker-popover-end__")) != null && o.contains(p.target) || g());
|
|
2232
2237
|
};
|
|
2233
|
-
return (
|
|
2234
|
-
var
|
|
2235
|
-
return A(),
|
|
2238
|
+
return (p, o) => {
|
|
2239
|
+
var w;
|
|
2240
|
+
return A(), E("div", at, [
|
|
2236
2241
|
v("div", et, [
|
|
2237
|
-
v(
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
boundary: "parent",
|
|
2243
|
-
"ext-cls": "__bk-date-picker-popover__ __date-picker-popover-start__",
|
|
2244
|
-
placement: "bottom-start",
|
|
2245
|
-
theme: "light",
|
|
2246
|
-
trigger: "manual"
|
|
2247
|
-
}, {
|
|
2248
|
-
content: V(() => [
|
|
2249
|
-
z(La, {
|
|
2250
|
-
"diable-now": f.value,
|
|
2251
|
-
format: t(I),
|
|
2252
|
-
"is-now": m.value,
|
|
2253
|
-
"model-value": c.value,
|
|
2254
|
-
title: t(r)("开始时间"),
|
|
2255
|
-
"onUpdate:isNow": h[2] || (h[2] = () => R("start")),
|
|
2256
|
-
"onUpdate:modelValue": y,
|
|
2257
|
-
key: "start"
|
|
2258
|
-
}, null, 8, ["diable-now", "format", "is-now", "model-value", "title"])
|
|
2259
|
-
]),
|
|
2260
|
-
default: V(() => {
|
|
2261
|
-
var C;
|
|
2262
|
-
return [
|
|
2263
|
-
ha(v("input", {
|
|
2264
|
-
placeholder: t(r)("开始时间"),
|
|
2265
|
-
value: m.value ? t(P) : (C = c.value) == null ? void 0 : C.format(t(I)),
|
|
2266
|
-
onBlur: h[0] || (h[0] = (U) => $(U, "start")),
|
|
2267
|
-
onClick: K,
|
|
2268
|
-
onKeypress: h[1] || (h[1] = Va((U) => $(U, "start"), ["enter"])),
|
|
2269
|
-
class: "date-picker-start",
|
|
2270
|
-
ref_key: "startInput",
|
|
2271
|
-
ref: l,
|
|
2272
|
-
spellcheck: "false"
|
|
2273
|
-
}, null, 40, nt), [
|
|
2274
|
-
[t(ba), _]
|
|
2275
|
-
])
|
|
2276
|
-
];
|
|
2277
|
-
}),
|
|
2278
|
-
_: 1
|
|
2279
|
-
/* STABLE */
|
|
2280
|
-
}, 8, ["is-show"]),
|
|
2281
|
-
rt,
|
|
2282
|
-
z(t(ra), {
|
|
2283
|
-
arrow: !1,
|
|
2284
|
-
"is-show": u.value,
|
|
2285
|
-
boundary: "parent",
|
|
2286
|
-
"ext-cls": "__bk-date-picker-popover__ __date-picker-popover-end__",
|
|
2287
|
-
placement: "bottom-start",
|
|
2288
|
-
theme: "light",
|
|
2289
|
-
trigger: "manual"
|
|
2290
|
-
}, {
|
|
2291
|
-
content: V(() => [
|
|
2292
|
-
z(La, {
|
|
2293
|
-
"diable-now": m.value,
|
|
2294
|
-
format: t(I),
|
|
2295
|
-
"is-now": f.value,
|
|
2296
|
-
"model-value": i.value,
|
|
2297
|
-
title: t(r)("结束时间"),
|
|
2298
|
-
"onUpdate:isNow": h[5] || (h[5] = () => R("end")),
|
|
2299
|
-
"onUpdate:modelValue": h[6] || (h[6] = (C) => T(C.endOf("d"))),
|
|
2300
|
-
key: "end"
|
|
2301
|
-
}, null, 8, ["diable-now", "format", "is-now", "model-value", "title"])
|
|
2302
|
-
]),
|
|
2303
|
-
default: V(() => {
|
|
2304
|
-
var C;
|
|
2305
|
-
return [
|
|
2306
|
-
ha(v("input", {
|
|
2307
|
-
placeholder: t(r)("结束时间"),
|
|
2308
|
-
value: f.value ? t(P) : (C = i.value) == null ? void 0 : C.format(t(I)),
|
|
2309
|
-
onBlur: h[3] || (h[3] = (U) => $(U, "end")),
|
|
2310
|
-
onClick: W,
|
|
2311
|
-
onKeypress: h[4] || (h[4] = Va((U) => $(U, "end"), ["enter"])),
|
|
2312
|
-
class: "date-picker-end",
|
|
2313
|
-
ref_key: "endInput",
|
|
2314
|
-
ref: b
|
|
2315
|
-
}, null, 40, lt), [
|
|
2316
|
-
[t(ba), j]
|
|
2317
|
-
])
|
|
2318
|
-
];
|
|
2242
|
+
v(
|
|
2243
|
+
"div",
|
|
2244
|
+
{
|
|
2245
|
+
style: Fa({
|
|
2246
|
+
"border-color": h.value || m.value ? "#3A84FF" : "#C4C6CC"
|
|
2319
2247
|
}),
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2248
|
+
class: "date-picker"
|
|
2249
|
+
},
|
|
2250
|
+
[
|
|
2251
|
+
tt,
|
|
2252
|
+
S(t(la), {
|
|
2253
|
+
arrow: !1,
|
|
2254
|
+
"is-show": h.value,
|
|
2255
|
+
boundary: "parent",
|
|
2256
|
+
"ext-cls": "__bk-date-picker-popover__ __date-picker-popover-start__",
|
|
2257
|
+
placement: "bottom-start",
|
|
2258
|
+
theme: "light",
|
|
2259
|
+
trigger: "manual"
|
|
2260
|
+
}, {
|
|
2261
|
+
content: $(() => [
|
|
2262
|
+
S(Ua, {
|
|
2263
|
+
"diable-now": D.value,
|
|
2264
|
+
format: t(M),
|
|
2265
|
+
"is-now": u.value,
|
|
2266
|
+
"model-value": c.value,
|
|
2267
|
+
title: t(n)("开始时间"),
|
|
2268
|
+
"onUpdate:isNow": o[2] || (o[2] = () => R("start")),
|
|
2269
|
+
"onUpdate:modelValue": I,
|
|
2270
|
+
key: "start"
|
|
2271
|
+
}, null, 8, ["diable-now", "format", "is-now", "model-value", "title"])
|
|
2272
|
+
]),
|
|
2273
|
+
default: $(() => {
|
|
2274
|
+
var z;
|
|
2275
|
+
return [
|
|
2276
|
+
va(v("input", {
|
|
2277
|
+
placeholder: t(n)("开始时间"),
|
|
2278
|
+
value: u.value ? t(P) : (z = c.value) == null ? void 0 : z.format(t(M)),
|
|
2279
|
+
onBlur: o[0] || (o[0] = (K) => N(K, "start")),
|
|
2280
|
+
onClick: B,
|
|
2281
|
+
onKeypress: o[1] || (o[1] = Na((K) => N(K, "start"), ["enter"])),
|
|
2282
|
+
class: "date-picker-start",
|
|
2283
|
+
ref_key: "startInput",
|
|
2284
|
+
ref: r,
|
|
2285
|
+
spellcheck: "false"
|
|
2286
|
+
}, null, 40, it), [
|
|
2287
|
+
[t(fa), b]
|
|
2288
|
+
])
|
|
2289
|
+
];
|
|
2290
|
+
}),
|
|
2291
|
+
_: 1
|
|
2292
|
+
/* STABLE */
|
|
2293
|
+
}, 8, ["is-show"]),
|
|
2294
|
+
nt,
|
|
2295
|
+
S(t(la), {
|
|
2296
|
+
arrow: !1,
|
|
2297
|
+
"is-show": m.value,
|
|
2298
|
+
boundary: "parent",
|
|
2299
|
+
"ext-cls": "__bk-date-picker-popover__ __date-picker-popover-end__",
|
|
2300
|
+
placement: "bottom-start",
|
|
2301
|
+
theme: "light",
|
|
2302
|
+
trigger: "manual"
|
|
2303
|
+
}, {
|
|
2304
|
+
content: $(() => [
|
|
2305
|
+
S(Ua, {
|
|
2306
|
+
"diable-now": u.value,
|
|
2307
|
+
format: t(M),
|
|
2308
|
+
"is-now": D.value,
|
|
2309
|
+
"model-value": s.value,
|
|
2310
|
+
title: t(n)("结束时间"),
|
|
2311
|
+
"onUpdate:isNow": o[5] || (o[5] = () => R("end")),
|
|
2312
|
+
"onUpdate:modelValue": o[6] || (o[6] = (z) => T(z.endOf("d"))),
|
|
2313
|
+
key: "end"
|
|
2314
|
+
}, null, 8, ["diable-now", "format", "is-now", "model-value", "title"])
|
|
2315
|
+
]),
|
|
2316
|
+
default: $(() => {
|
|
2317
|
+
var z;
|
|
2318
|
+
return [
|
|
2319
|
+
va(v("input", {
|
|
2320
|
+
placeholder: t(n)("结束时间"),
|
|
2321
|
+
value: D.value ? t(P) : (z = s.value) == null ? void 0 : z.format(t(M)),
|
|
2322
|
+
onBlur: o[3] || (o[3] = (K) => N(K, "end")),
|
|
2323
|
+
onClick: F,
|
|
2324
|
+
onKeypress: o[4] || (o[4] = Na((K) => N(K, "end"), ["enter"])),
|
|
2325
|
+
class: "date-picker-end",
|
|
2326
|
+
ref_key: "endInput",
|
|
2327
|
+
ref: f
|
|
2328
|
+
}, null, 40, rt), [
|
|
2329
|
+
[t(fa), j]
|
|
2330
|
+
])
|
|
2331
|
+
];
|
|
2332
|
+
}),
|
|
2333
|
+
_: 1
|
|
2334
|
+
/* STABLE */
|
|
2335
|
+
}, 8, ["is-show"]),
|
|
2336
|
+
c.value || s.value ? (A(), H(t(ge), {
|
|
2337
|
+
key: 0,
|
|
2338
|
+
onClick: _,
|
|
2339
|
+
class: "date-picker-clear"
|
|
2340
|
+
})) : na("v-if", !0)
|
|
2341
|
+
],
|
|
2342
|
+
4
|
|
2343
|
+
/* STYLE */
|
|
2344
|
+
),
|
|
2345
|
+
S(ya, {
|
|
2346
|
+
"disable-tips": (w = c.value) != null && w.isAfter(s.value) ? t(n)("开始时间不能大于结束时间") : "",
|
|
2347
|
+
disabled: !Y.value,
|
|
2348
|
+
onSubmit: V
|
|
2333
2349
|
}, null, 8, ["disable-tips", "disabled"])
|
|
2334
2350
|
]),
|
|
2335
|
-
v("div",
|
|
2336
|
-
|
|
2337
|
-
|
|
2351
|
+
v("div", lt, [
|
|
2352
|
+
J(
|
|
2353
|
+
y(t(n)("支持多种时间格式自动转换")) + " ",
|
|
2338
2354
|
1
|
|
2339
2355
|
/* TEXT */
|
|
2340
2356
|
),
|
|
2341
|
-
|
|
2357
|
+
S(t(la), {
|
|
2342
2358
|
trigger: "click",
|
|
2343
2359
|
"ext-cls": "__bk-date-picker-popover__",
|
|
2344
2360
|
placement: "bottom",
|
|
2345
2361
|
theme: "light"
|
|
2346
2362
|
}, {
|
|
2347
|
-
content:
|
|
2348
|
-
v("div",
|
|
2363
|
+
content: $(() => [
|
|
2364
|
+
v("div", st, [
|
|
2349
2365
|
v(
|
|
2350
2366
|
"div",
|
|
2351
|
-
|
|
2352
|
-
|
|
2367
|
+
ct,
|
|
2368
|
+
y(t(n)("时间格式支持")),
|
|
2353
2369
|
1
|
|
2354
2370
|
/* TEXT */
|
|
2355
2371
|
),
|
|
2356
|
-
v("table",
|
|
2372
|
+
v("table", ut, [
|
|
2357
2373
|
v("thead", null, [
|
|
2358
2374
|
v("tr", null, [
|
|
2359
2375
|
v(
|
|
2360
2376
|
"th",
|
|
2361
2377
|
null,
|
|
2362
|
-
|
|
2378
|
+
y(t(n)("格式")),
|
|
2363
2379
|
1
|
|
2364
2380
|
/* TEXT */
|
|
2365
2381
|
),
|
|
2366
2382
|
v(
|
|
2367
2383
|
"th",
|
|
2368
2384
|
null,
|
|
2369
|
-
|
|
2385
|
+
y(t(n)("示例")),
|
|
2370
2386
|
1
|
|
2371
2387
|
/* TEXT */
|
|
2372
2388
|
)
|
|
2373
2389
|
])
|
|
2374
2390
|
]),
|
|
2375
2391
|
v("tbody", null, [
|
|
2376
|
-
(A(!0),
|
|
2377
|
-
|
|
2392
|
+
(A(!0), E(
|
|
2393
|
+
U,
|
|
2378
2394
|
null,
|
|
2379
|
-
O(t(Te), (
|
|
2395
|
+
O(t(Te), (z) => (A(), E("tr", { key: z }, [
|
|
2380
2396
|
v(
|
|
2381
2397
|
"td",
|
|
2382
2398
|
null,
|
|
2383
|
-
|
|
2399
|
+
y(z),
|
|
2384
2400
|
1
|
|
2385
2401
|
/* TEXT */
|
|
2386
2402
|
),
|
|
2387
2403
|
v(
|
|
2388
2404
|
"td",
|
|
2389
2405
|
null,
|
|
2390
|
-
|
|
2406
|
+
y(t(C).format(z)),
|
|
2391
2407
|
1
|
|
2392
2408
|
/* TEXT */
|
|
2393
2409
|
)
|
|
@@ -2399,15 +2415,15 @@ const at = { class: "date-wrapper" }, et = { class: "date-input" }, tt = { class
|
|
|
2399
2415
|
])
|
|
2400
2416
|
])
|
|
2401
2417
|
]),
|
|
2402
|
-
default:
|
|
2403
|
-
|
|
2418
|
+
default: $(() => [
|
|
2419
|
+
S(t(_a), {
|
|
2404
2420
|
class: "format-button",
|
|
2405
2421
|
text: "",
|
|
2406
2422
|
theme: "primary"
|
|
2407
2423
|
}, {
|
|
2408
|
-
default:
|
|
2409
|
-
|
|
2410
|
-
|
|
2424
|
+
default: $(() => [
|
|
2425
|
+
J(
|
|
2426
|
+
y(t(n)("查看支持格式")),
|
|
2411
2427
|
1
|
|
2412
2428
|
/* TEXT */
|
|
2413
2429
|
)
|
|
@@ -2424,154 +2440,154 @@ const at = { class: "date-wrapper" }, et = { class: "date-input" }, tt = { class
|
|
|
2424
2440
|
};
|
|
2425
2441
|
}
|
|
2426
2442
|
});
|
|
2427
|
-
const
|
|
2443
|
+
const dt = { class: "natural-picker" }, mt = ["onClick"], ht = "__", vt = /* @__PURE__ */ X({
|
|
2428
2444
|
__name: "natural-picker",
|
|
2429
2445
|
props: {
|
|
2430
2446
|
value: {}
|
|
2431
2447
|
},
|
|
2432
2448
|
emits: ["change"],
|
|
2433
|
-
setup(
|
|
2434
|
-
const
|
|
2435
|
-
|
|
2436
|
-
const [g,
|
|
2437
|
-
if (d.isDayjs(g) || d.isDayjs(
|
|
2449
|
+
setup(l, { emit: a }) {
|
|
2450
|
+
const i = L(), e = a, r = l, f = L(), h = ea(Aa.slice()), m = L(Ya[0].id), c = L(""), s = L(), u = L(h.value[0]);
|
|
2451
|
+
te(ga(), "session").forEach((x) => {
|
|
2452
|
+
const [g, I] = x;
|
|
2453
|
+
if (d.isDayjs(g) || d.isDayjs(I))
|
|
2438
2454
|
return;
|
|
2439
|
-
const T = new
|
|
2440
|
-
if (!
|
|
2441
|
-
const
|
|
2442
|
-
ia[
|
|
2455
|
+
const T = new ra(x), { startNum: R, startUnit: _ } = T;
|
|
2456
|
+
if (!h.value.find((b) => b.id === g)) {
|
|
2457
|
+
const b = `${`${n("前")} ${R} ${n(
|
|
2458
|
+
ia[_]
|
|
2443
2459
|
)}`}`;
|
|
2444
|
-
|
|
2460
|
+
h.value.unshift({
|
|
2445
2461
|
id: g,
|
|
2446
|
-
name:
|
|
2462
|
+
name: b,
|
|
2447
2463
|
type: aa.custom
|
|
2448
2464
|
});
|
|
2449
2465
|
}
|
|
2450
2466
|
}), oa(
|
|
2451
|
-
() =>
|
|
2452
|
-
(
|
|
2453
|
-
if (!
|
|
2467
|
+
() => r.value,
|
|
2468
|
+
(x) => {
|
|
2469
|
+
if (!x || x.dateMode !== k.NATURAL)
|
|
2454
2470
|
return;
|
|
2455
|
-
const [g,
|
|
2456
|
-
if (d.isDayjs(g) || d.isDayjs(
|
|
2471
|
+
const [g, I] = x.dateValue;
|
|
2472
|
+
if (d.isDayjs(g) || d.isDayjs(I))
|
|
2457
2473
|
return;
|
|
2458
|
-
const { startNum: T, startUnit: R } =
|
|
2459
|
-
|
|
2460
|
-
const
|
|
2461
|
-
if (
|
|
2462
|
-
|
|
2474
|
+
const { startNum: T, startUnit: R } = x;
|
|
2475
|
+
m.value = I === P ? ha.NOW : ha.ALL;
|
|
2476
|
+
const _ = h.value.find((b) => b.id === g && b.type === aa.custom);
|
|
2477
|
+
if (_) {
|
|
2478
|
+
u.value = _;
|
|
2463
2479
|
return;
|
|
2464
2480
|
}
|
|
2465
|
-
const
|
|
2466
|
-
if (
|
|
2467
|
-
const
|
|
2481
|
+
const V = Aa.find((b) => b.id === g && b.type === aa.default);
|
|
2482
|
+
if (I !== P && g !== I && V || !V) {
|
|
2483
|
+
const b = `${`${n("前")} ${T} ${n(
|
|
2468
2484
|
ia[R]
|
|
2469
2485
|
)}`}`;
|
|
2470
|
-
|
|
2486
|
+
h.value.unshift({
|
|
2471
2487
|
id: g,
|
|
2472
|
-
name:
|
|
2488
|
+
name: b,
|
|
2473
2489
|
type: aa.custom
|
|
2474
|
-
}), [
|
|
2490
|
+
}), [u.value] = h.value;
|
|
2475
2491
|
return;
|
|
2476
2492
|
}
|
|
2477
|
-
|
|
2493
|
+
V && (u.value = V);
|
|
2478
2494
|
},
|
|
2479
2495
|
{
|
|
2480
2496
|
immediate: !0
|
|
2481
2497
|
}
|
|
2482
2498
|
);
|
|
2483
|
-
const
|
|
2484
|
-
const g =
|
|
2485
|
-
if (
|
|
2486
|
-
const [,
|
|
2487
|
-
return Math.abs(+
|
|
2499
|
+
const D = (x) => `${x.id}${ht}${x.type}`, M = (x) => {
|
|
2500
|
+
const g = x.id;
|
|
2501
|
+
if (m.value === ha.ALL) {
|
|
2502
|
+
const [, I, T, R] = g.match(Ia) || [];
|
|
2503
|
+
return Math.abs(+I) > 1 ? Math.abs(+I) === 2 && T === "d" ? [g, g] : [g, `now-1${T}/${R}`] : [g, g];
|
|
2488
2504
|
}
|
|
2489
2505
|
return [g, P];
|
|
2490
|
-
},
|
|
2506
|
+
}, C = (x) => {
|
|
2491
2507
|
var g;
|
|
2492
|
-
if (
|
|
2493
|
-
|
|
2494
|
-
var
|
|
2495
|
-
(R = (T = (
|
|
2508
|
+
if (x.type === aa.edit) {
|
|
2509
|
+
s.value = 1, c.value = x.id, setTimeout(() => {
|
|
2510
|
+
var I, T, R;
|
|
2511
|
+
(R = (T = (I = i.value) == null ? void 0 : I[0]) == null ? void 0 : T.focus) == null || R.call(T);
|
|
2496
2512
|
}, 20);
|
|
2497
2513
|
return;
|
|
2498
2514
|
}
|
|
2499
|
-
|
|
2500
|
-
},
|
|
2501
|
-
|
|
2502
|
-
},
|
|
2503
|
-
var R,
|
|
2515
|
+
u.value = x, c.value = "", (g = f.value) == null || g.hidePopover();
|
|
2516
|
+
}, Y = (x) => {
|
|
2517
|
+
m.value = x;
|
|
2518
|
+
}, N = (x, g) => {
|
|
2519
|
+
var R, _;
|
|
2504
2520
|
c.value = "";
|
|
2505
|
-
const
|
|
2521
|
+
const I = `now-${+x}${g.unit}/${g.unit}`, T = h.value.find((V) => V.id === I);
|
|
2506
2522
|
if (T) {
|
|
2507
|
-
|
|
2523
|
+
u.value = T, (R = f.value) == null || R.hidePopover();
|
|
2508
2524
|
return;
|
|
2509
2525
|
}
|
|
2510
|
-
|
|
2511
|
-
id:
|
|
2512
|
-
name: g.name.replace("N",
|
|
2526
|
+
h.value.unshift({
|
|
2527
|
+
id: I,
|
|
2528
|
+
name: g.name.replace("N", x.toString()),
|
|
2513
2529
|
type: aa.custom
|
|
2514
|
-
}), [
|
|
2515
|
-
},
|
|
2516
|
-
!g || +g < 1 ||
|
|
2517
|
-
},
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
}), e("change",
|
|
2530
|
+
}), [u.value] = h.value, (_ = f.value) == null || _.hidePopover();
|
|
2531
|
+
}, B = (x, g, I) => {
|
|
2532
|
+
!g || +g < 1 || x.key !== "Enter" || !c.value || N(Math.ceil(g), I);
|
|
2533
|
+
}, F = () => {
|
|
2534
|
+
h.value.filter((x) => x.type === aa.custom).forEach((x) => {
|
|
2535
|
+
ie(M(x), ga(), "session");
|
|
2536
|
+
}), e("change", M(u.value));
|
|
2521
2537
|
};
|
|
2522
|
-
return (
|
|
2523
|
-
|
|
2538
|
+
return (x, g) => (A(), E("div", dt, [
|
|
2539
|
+
S(t(Z), {
|
|
2524
2540
|
clearable: !1,
|
|
2525
2541
|
"input-search": !1,
|
|
2526
|
-
"model-value":
|
|
2527
|
-
"no-match-text": t(
|
|
2542
|
+
"model-value": D(u.value),
|
|
2543
|
+
"no-match-text": t(n)("无匹配数据"),
|
|
2528
2544
|
"popover-options": { boundary: "parent", extCls: "__bk-date-picker-popover__" },
|
|
2529
|
-
prefix: t(
|
|
2530
|
-
"search-placeholder": t(
|
|
2545
|
+
prefix: t(n)("自然日期"),
|
|
2546
|
+
"search-placeholder": t(n)("请输入"),
|
|
2531
2547
|
class: "natural-date",
|
|
2532
2548
|
filterable: "",
|
|
2533
2549
|
ref_key: "naturalSelectRef",
|
|
2534
|
-
ref:
|
|
2550
|
+
ref: f
|
|
2535
2551
|
}, {
|
|
2536
|
-
default:
|
|
2537
|
-
(A(!0),
|
|
2538
|
-
|
|
2552
|
+
default: $(() => [
|
|
2553
|
+
(A(!0), E(
|
|
2554
|
+
U,
|
|
2539
2555
|
null,
|
|
2540
|
-
O(
|
|
2541
|
-
id:
|
|
2542
|
-
key:
|
|
2543
|
-
name:
|
|
2556
|
+
O(h.value, (I) => (A(), H(t(Z).Option, {
|
|
2557
|
+
id: D(I),
|
|
2558
|
+
key: D(I),
|
|
2559
|
+
name: I.name
|
|
2544
2560
|
}, {
|
|
2545
|
-
default:
|
|
2561
|
+
default: $(() => [
|
|
2546
2562
|
v("div", {
|
|
2547
|
-
onClick: g[1] || (g[1] =
|
|
2563
|
+
onClick: g[1] || (g[1] = Oa(() => {
|
|
2548
2564
|
}, ["prevent", "stop"])),
|
|
2549
2565
|
style: { width: "100%", padding: "0 12px", margin: "0 -12px" }
|
|
2550
2566
|
}, [
|
|
2551
|
-
c.value ===
|
|
2567
|
+
c.value === I.id ? (A(), H(t(Wa), {
|
|
2552
2568
|
key: 0,
|
|
2553
2569
|
clearable: !1,
|
|
2554
2570
|
min: 1,
|
|
2555
|
-
placeholder: t(
|
|
2571
|
+
placeholder: t(n)("请输入"),
|
|
2556
2572
|
precision: 0,
|
|
2557
|
-
prefix:
|
|
2573
|
+
prefix: I.prefix,
|
|
2558
2574
|
"show-control": !0,
|
|
2559
|
-
suffix:
|
|
2560
|
-
onKeypress: (T, R) =>
|
|
2575
|
+
suffix: I.suffix,
|
|
2576
|
+
onKeypress: (T, R) => B(R, T, I),
|
|
2561
2577
|
autofocus: "true",
|
|
2562
2578
|
ref_for: !0,
|
|
2563
2579
|
ref_key: "inputRef",
|
|
2564
|
-
ref:
|
|
2580
|
+
ref: i,
|
|
2565
2581
|
size: "small",
|
|
2566
2582
|
style: { width: "100%" },
|
|
2567
2583
|
type: "number",
|
|
2568
|
-
modelValue:
|
|
2569
|
-
"onUpdate:modelValue": g[0] || (g[0] = (T) =>
|
|
2570
|
-
}, null, 8, ["placeholder", "prefix", "suffix", "onKeypress", "modelValue"])) : (A(),
|
|
2584
|
+
modelValue: s.value,
|
|
2585
|
+
"onUpdate:modelValue": g[0] || (g[0] = (T) => s.value = T)
|
|
2586
|
+
}, null, 8, ["placeholder", "prefix", "suffix", "onKeypress", "modelValue"])) : (A(), E("div", {
|
|
2571
2587
|
key: 1,
|
|
2572
|
-
onClick: (T) =>
|
|
2588
|
+
onClick: (T) => C(I),
|
|
2573
2589
|
style: { width: "100%" }
|
|
2574
|
-
},
|
|
2590
|
+
}, y(I.name), 9, mt))
|
|
2575
2591
|
])
|
|
2576
2592
|
]),
|
|
2577
2593
|
_: 2
|
|
@@ -2584,21 +2600,21 @@ const mt = { class: "natural-picker" }, ht = ["onClick"], vt = "__", bt = /* @__
|
|
|
2584
2600
|
_: 1
|
|
2585
2601
|
/* STABLE */
|
|
2586
2602
|
}, 8, ["model-value", "no-match-text", "prefix", "search-placeholder"]),
|
|
2587
|
-
|
|
2603
|
+
S(t(Z), {
|
|
2588
2604
|
clearable: !1,
|
|
2589
|
-
"model-value":
|
|
2605
|
+
"model-value": m.value,
|
|
2590
2606
|
"popover-options": { boundary: "parent" },
|
|
2591
|
-
onChange:
|
|
2607
|
+
onChange: Y,
|
|
2592
2608
|
class: "natural-unit"
|
|
2593
2609
|
}, {
|
|
2594
|
-
default:
|
|
2595
|
-
(A(!0),
|
|
2596
|
-
|
|
2610
|
+
default: $(() => [
|
|
2611
|
+
(A(!0), E(
|
|
2612
|
+
U,
|
|
2597
2613
|
null,
|
|
2598
|
-
O(t(
|
|
2599
|
-
id:
|
|
2600
|
-
key:
|
|
2601
|
-
name:
|
|
2614
|
+
O(t(Ya), (I) => (A(), H(t(Z).Option, {
|
|
2615
|
+
id: I.id,
|
|
2616
|
+
key: I.id,
|
|
2617
|
+
name: I.name
|
|
2602
2618
|
}, null, 8, ["id", "name"]))),
|
|
2603
2619
|
128
|
|
2604
2620
|
/* KEYED_FRAGMENT */
|
|
@@ -2607,157 +2623,150 @@ const mt = { class: "natural-picker" }, ht = ["onClick"], vt = "__", bt = /* @__
|
|
|
2607
2623
|
_: 1
|
|
2608
2624
|
/* STABLE */
|
|
2609
2625
|
}, 8, ["model-value"]),
|
|
2610
|
-
|
|
2626
|
+
S(ya, { onSubmit: F })
|
|
2611
2627
|
]));
|
|
2612
2628
|
}
|
|
2613
2629
|
});
|
|
2614
|
-
const
|
|
2630
|
+
const bt = { class: "recent-picker" }, ft = /* @__PURE__ */ X({
|
|
2615
2631
|
__name: "recent-picker",
|
|
2616
2632
|
props: {
|
|
2617
|
-
type: { default:
|
|
2633
|
+
type: { default: k.RECENT },
|
|
2618
2634
|
value: {}
|
|
2619
2635
|
},
|
|
2620
2636
|
emits: ["change"],
|
|
2621
|
-
setup(
|
|
2622
|
-
const
|
|
2637
|
+
setup(l, { emit: a }) {
|
|
2638
|
+
const i = a, e = l, r = L("m"), f = L();
|
|
2623
2639
|
oa(
|
|
2624
2640
|
() => e.value,
|
|
2625
|
-
(
|
|
2626
|
-
|
|
2641
|
+
(c) => {
|
|
2642
|
+
c && e.type === c.dateMode && (r.value = c.recentOrFuturedateUnit, f.value = c.recentOrFuturedateNum || void 0);
|
|
2627
2643
|
},
|
|
2628
2644
|
{
|
|
2629
2645
|
immediate: !0
|
|
2630
2646
|
}
|
|
2631
2647
|
);
|
|
2632
|
-
const
|
|
2633
|
-
if (
|
|
2634
|
-
if (e.type ===
|
|
2635
|
-
|
|
2648
|
+
const h = W(() => !!f.value && !!r.value), m = () => {
|
|
2649
|
+
if (f.value) {
|
|
2650
|
+
if (e.type === k.FUTURE) {
|
|
2651
|
+
i("change", [P, `${k.FUTURE}${f.value}${r.value}`]);
|
|
2636
2652
|
return;
|
|
2637
2653
|
}
|
|
2638
|
-
|
|
2654
|
+
i("change", [`${k.RECENT}${f.value}${r.value}`, P]);
|
|
2639
2655
|
}
|
|
2640
2656
|
};
|
|
2641
|
-
return (
|
|
2642
|
-
|
|
2643
|
-
class: la({ "is-focused": o.value }),
|
|
2657
|
+
return (c, s) => (A(), E("div", bt, [
|
|
2658
|
+
S(t(Wa), {
|
|
2644
2659
|
min: 1,
|
|
2645
|
-
placeholder: t(
|
|
2660
|
+
placeholder: t(n)("请输入"),
|
|
2646
2661
|
precision: 0,
|
|
2647
|
-
prefix:
|
|
2662
|
+
prefix: c.type === "now-" ? t(n)("最近") : t(n)("未来"),
|
|
2663
|
+
class: "recent-input",
|
|
2648
2664
|
type: "number",
|
|
2649
|
-
modelValue:
|
|
2650
|
-
"onUpdate:modelValue":
|
|
2665
|
+
modelValue: f.value,
|
|
2666
|
+
"onUpdate:modelValue": s[0] || (s[0] = (u) => f.value = u)
|
|
2667
|
+
}, null, 8, ["placeholder", "prefix", "modelValue"]),
|
|
2668
|
+
S(t(Z), {
|
|
2669
|
+
clearable: !1,
|
|
2670
|
+
"popover-options": { boundary: "parent" },
|
|
2671
|
+
class: "recent-unit",
|
|
2672
|
+
filterable: "",
|
|
2673
|
+
modelValue: r.value,
|
|
2674
|
+
"onUpdate:modelValue": s[1] || (s[1] = (u) => r.value = u)
|
|
2651
2675
|
}, {
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
(A(!0), S(
|
|
2665
|
-
L,
|
|
2666
|
-
null,
|
|
2667
|
-
O(t(Ja), (f) => (A(), H(t(J).Option, {
|
|
2668
|
-
id: f.id,
|
|
2669
|
-
key: f.id,
|
|
2670
|
-
name: f.name
|
|
2671
|
-
}, null, 8, ["id", "name"]))),
|
|
2672
|
-
128
|
|
2673
|
-
/* KEYED_FRAGMENT */
|
|
2674
|
-
))
|
|
2675
|
-
]),
|
|
2676
|
-
_: 1
|
|
2677
|
-
/* STABLE */
|
|
2678
|
-
}, 8, ["modelValue"])
|
|
2676
|
+
default: $(() => [
|
|
2677
|
+
(A(!0), E(
|
|
2678
|
+
U,
|
|
2679
|
+
null,
|
|
2680
|
+
O(t(Za), (u) => (A(), H(t(Z).Option, {
|
|
2681
|
+
id: u.id,
|
|
2682
|
+
key: u.id,
|
|
2683
|
+
name: u.name
|
|
2684
|
+
}, null, 8, ["id", "name"]))),
|
|
2685
|
+
128
|
|
2686
|
+
/* KEYED_FRAGMENT */
|
|
2687
|
+
))
|
|
2679
2688
|
]),
|
|
2680
2689
|
_: 1
|
|
2681
2690
|
/* STABLE */
|
|
2682
|
-
}, 8, ["
|
|
2683
|
-
|
|
2684
|
-
disabled: !
|
|
2685
|
-
onSubmit:
|
|
2691
|
+
}, 8, ["modelValue"]),
|
|
2692
|
+
S(ya, {
|
|
2693
|
+
disabled: !h.value,
|
|
2694
|
+
onSubmit: m
|
|
2686
2695
|
}, null, 8, ["disabled"])
|
|
2687
2696
|
]));
|
|
2688
2697
|
}
|
|
2689
2698
|
});
|
|
2690
|
-
const
|
|
2699
|
+
const pt = { class: "option-name" }, At = { class: "option-country" }, gt = { class: "option-utc" }, xt = { class: "option-name" }, It = { class: "option-country" }, kt = { class: "option-utc" }, _t = /* @__PURE__ */ X({
|
|
2691
2700
|
__name: "timezone-picker",
|
|
2692
2701
|
props: {
|
|
2693
2702
|
value: {}
|
|
2694
2703
|
},
|
|
2695
2704
|
emits: ["change"],
|
|
2696
|
-
setup(
|
|
2697
|
-
const
|
|
2698
|
-
const
|
|
2699
|
-
|
|
2700
|
-
},
|
|
2701
|
-
var c,
|
|
2702
|
-
return ((c =
|
|
2705
|
+
setup(l, { emit: a }) {
|
|
2706
|
+
const i = a, e = ea(ae), r = (h) => {
|
|
2707
|
+
const m = ee(h);
|
|
2708
|
+
i("change", h, m);
|
|
2709
|
+
}, f = (h, m) => {
|
|
2710
|
+
var c, s, u, D;
|
|
2711
|
+
return ((c = m.label) == null ? void 0 : c.toLowerCase().includes(h.toLowerCase())) || ((s = m.country) == null ? void 0 : s.toLowerCase().includes(h.toLowerCase())) || ((u = m.abbreviation) == null ? void 0 : u.toLowerCase().includes(h.toLowerCase())) || ((D = m.utc) == null ? void 0 : D.toLowerCase().includes(h.toLowerCase()));
|
|
2703
2712
|
};
|
|
2704
|
-
return (
|
|
2713
|
+
return (h, m) => (A(), H(t(Z), {
|
|
2705
2714
|
clearable: !1,
|
|
2706
|
-
"filter-option":
|
|
2715
|
+
"filter-option": f,
|
|
2707
2716
|
"input-search": !1,
|
|
2708
|
-
"model-value":
|
|
2709
|
-
"no-match-text": t(
|
|
2710
|
-
placeholder: t(
|
|
2717
|
+
"model-value": h.value,
|
|
2718
|
+
"no-match-text": t(n)("无匹配数据"),
|
|
2719
|
+
placeholder: t(n)("请输入搜索(国家,城市,简称)"),
|
|
2711
2720
|
"popover-options": { "ext-cls": "__bk-date-picker-popover__" },
|
|
2712
|
-
"search-placeholder": t(
|
|
2713
|
-
onChange:
|
|
2721
|
+
"search-placeholder": t(n)("请输入搜索(国家,城市,简称)"),
|
|
2722
|
+
onChange: r,
|
|
2714
2723
|
class: "timezone-picker",
|
|
2715
2724
|
filterable: ""
|
|
2716
2725
|
}, {
|
|
2717
|
-
default:
|
|
2718
|
-
(A(!0),
|
|
2719
|
-
|
|
2726
|
+
default: $(() => [
|
|
2727
|
+
(A(!0), E(
|
|
2728
|
+
U,
|
|
2720
2729
|
null,
|
|
2721
|
-
O(e.value, (c) => (A(),
|
|
2722
|
-
|
|
2730
|
+
O(e.value, (c) => (A(), E(
|
|
2731
|
+
U,
|
|
2723
2732
|
null,
|
|
2724
2733
|
[
|
|
2725
|
-
c.label.length < 1 ? (A(!0),
|
|
2726
|
-
|
|
2734
|
+
c.label.length < 1 ? (A(!0), E(
|
|
2735
|
+
U,
|
|
2727
2736
|
{ key: 0 },
|
|
2728
|
-
O(c.options, (
|
|
2729
|
-
id:
|
|
2730
|
-
key:
|
|
2731
|
-
name:
|
|
2737
|
+
O(c.options, (s) => (A(), H(t(Z).Option, $a(s, {
|
|
2738
|
+
id: s.label,
|
|
2739
|
+
key: s.label,
|
|
2740
|
+
name: s.label
|
|
2732
2741
|
}), {
|
|
2733
|
-
default:
|
|
2742
|
+
default: $(() => [
|
|
2734
2743
|
v(
|
|
2735
2744
|
"div",
|
|
2736
2745
|
{
|
|
2737
|
-
class:
|
|
2746
|
+
class: ua({
|
|
2738
2747
|
"timezone-picker-option": !0,
|
|
2739
|
-
"is-selected":
|
|
2748
|
+
"is-selected": s.label === h.value
|
|
2740
2749
|
})
|
|
2741
2750
|
},
|
|
2742
2751
|
[
|
|
2743
2752
|
v(
|
|
2744
2753
|
"span",
|
|
2745
|
-
|
|
2746
|
-
|
|
2754
|
+
pt,
|
|
2755
|
+
y(t(n)("浏览器时区")) + " " + y(s.label),
|
|
2747
2756
|
1
|
|
2748
2757
|
/* TEXT */
|
|
2749
2758
|
),
|
|
2750
2759
|
v(
|
|
2751
2760
|
"span",
|
|
2752
|
-
|
|
2753
|
-
|
|
2761
|
+
At,
|
|
2762
|
+
y(s.country) + ", " + y(s.abbreviation),
|
|
2754
2763
|
1
|
|
2755
2764
|
/* TEXT */
|
|
2756
2765
|
),
|
|
2757
2766
|
v(
|
|
2758
2767
|
"span",
|
|
2759
|
-
|
|
2760
|
-
|
|
2768
|
+
gt,
|
|
2769
|
+
y(s.utc),
|
|
2761
2770
|
1
|
|
2762
2771
|
/* TEXT */
|
|
2763
2772
|
)
|
|
@@ -2771,51 +2780,51 @@ const At = { class: "option-name" }, gt = { class: "option-country" }, xt = { cl
|
|
|
2771
2780
|
}, 1040, ["id", "name"]))),
|
|
2772
2781
|
128
|
|
2773
2782
|
/* KEYED_FRAGMENT */
|
|
2774
|
-
)) : (A(),
|
|
2775
|
-
|
|
2783
|
+
)) : (A(), E(
|
|
2784
|
+
U,
|
|
2776
2785
|
{ key: 1 },
|
|
2777
2786
|
[
|
|
2778
|
-
c.options.length ? (A(), H(t(
|
|
2787
|
+
c.options.length ? (A(), H(t(Z).Group, {
|
|
2779
2788
|
key: c.label,
|
|
2780
2789
|
label: c.label
|
|
2781
2790
|
}, {
|
|
2782
|
-
default:
|
|
2783
|
-
(A(!0),
|
|
2784
|
-
|
|
2791
|
+
default: $(() => [
|
|
2792
|
+
(A(!0), E(
|
|
2793
|
+
U,
|
|
2785
2794
|
null,
|
|
2786
|
-
O(c.options, (
|
|
2787
|
-
id:
|
|
2788
|
-
key:
|
|
2789
|
-
name:
|
|
2795
|
+
O(c.options, (s) => (A(), H(t(Z).Option, $a(s, {
|
|
2796
|
+
id: s.label,
|
|
2797
|
+
key: s.label,
|
|
2798
|
+
name: s.label
|
|
2790
2799
|
}), {
|
|
2791
|
-
default:
|
|
2800
|
+
default: $(() => [
|
|
2792
2801
|
v(
|
|
2793
2802
|
"div",
|
|
2794
2803
|
{
|
|
2795
|
-
class:
|
|
2804
|
+
class: ua({
|
|
2796
2805
|
"timezone-picker-option": !0,
|
|
2797
|
-
"is-selected":
|
|
2806
|
+
"is-selected": s.label === h.value
|
|
2798
2807
|
})
|
|
2799
2808
|
},
|
|
2800
2809
|
[
|
|
2801
2810
|
v(
|
|
2802
2811
|
"span",
|
|
2803
|
-
|
|
2804
|
-
|
|
2812
|
+
xt,
|
|
2813
|
+
y(s.label),
|
|
2805
2814
|
1
|
|
2806
2815
|
/* TEXT */
|
|
2807
2816
|
),
|
|
2808
2817
|
v(
|
|
2809
2818
|
"span",
|
|
2810
|
-
|
|
2811
|
-
|
|
2819
|
+
It,
|
|
2820
|
+
y(s.country) + ", " + y(s.abbreviation),
|
|
2812
2821
|
1
|
|
2813
2822
|
/* TEXT */
|
|
2814
2823
|
),
|
|
2815
2824
|
v(
|
|
2816
2825
|
"span",
|
|
2817
|
-
|
|
2818
|
-
|
|
2826
|
+
kt,
|
|
2827
|
+
y(s.utc),
|
|
2819
2828
|
1
|
|
2820
2829
|
/* TEXT */
|
|
2821
2830
|
)
|
|
@@ -2833,7 +2842,7 @@ const At = { class: "option-name" }, gt = { class: "option-country" }, xt = { cl
|
|
|
2833
2842
|
]),
|
|
2834
2843
|
_: 2
|
|
2835
2844
|
/* DYNAMIC */
|
|
2836
|
-
}, 1032, ["label"])) :
|
|
2845
|
+
}, 1032, ["label"])) : na("v-if", !0)
|
|
2837
2846
|
],
|
|
2838
2847
|
64
|
|
2839
2848
|
/* STABLE_FRAGMENT */
|
|
@@ -2851,16 +2860,16 @@ const At = { class: "option-name" }, gt = { class: "option-country" }, xt = { cl
|
|
|
2851
2860
|
}, 8, ["model-value", "no-match-text", "placeholder", "search-placeholder"]));
|
|
2852
2861
|
}
|
|
2853
2862
|
});
|
|
2854
|
-
const
|
|
2863
|
+
const yt = { class: "panel-wrapper" }, wt = {
|
|
2855
2864
|
key: 0,
|
|
2856
2865
|
class: "common-date-list"
|
|
2857
|
-
},
|
|
2866
|
+
}, Dt = ["onClick"], Mt = {
|
|
2858
2867
|
key: 1,
|
|
2859
2868
|
class: "common-wrapper"
|
|
2860
|
-
}, zt = { class: "empty-tips" },
|
|
2869
|
+
}, zt = { class: "empty-tips" }, Et = {
|
|
2861
2870
|
key: 2,
|
|
2862
2871
|
class: "time-zone-panel"
|
|
2863
|
-
},
|
|
2872
|
+
}, St = { class: "time-zone" }, Ct = { class: "time-zone-area" }, Pt = { class: "time-zone-tag" }, Tt = { class: "time-zone-picker" }, Vt = /* @__PURE__ */ X({
|
|
2864
2873
|
__name: "panel-wrapper",
|
|
2865
2874
|
props: {
|
|
2866
2875
|
defaultDate: {},
|
|
@@ -2868,65 +2877,65 @@ const wt = { class: "panel-wrapper" }, Dt = {
|
|
|
2868
2877
|
timezone: {}
|
|
2869
2878
|
},
|
|
2870
2879
|
emits: ["change", "update:timezone"],
|
|
2871
|
-
setup(
|
|
2872
|
-
const
|
|
2873
|
-
const
|
|
2874
|
-
return
|
|
2875
|
-
}),
|
|
2876
|
-
() => (
|
|
2877
|
-
(
|
|
2880
|
+
setup(l, { emit: a }) {
|
|
2881
|
+
const i = l, { commonUseList: e, format: r, storeKey: f, timezoneInfo: h, version: m } = Xa(), c = a, s = L(!1), u = L("common"), D = W(() => {
|
|
2882
|
+
const _ = localStorage.getItem(Ba(m.value));
|
|
2883
|
+
return _ ? Object.values(k).includes(_) ? _ : null : k.Date;
|
|
2884
|
+
}), M = L(D.value || i.defaultDate.dateMode), C = d.tz.guess(), Y = ea(te(f.value)), N = W(
|
|
2885
|
+
() => (u.value === "common" ? e.value || xa : Y.value).map(
|
|
2886
|
+
(_) => new ra(_, r.value, i.timezone)
|
|
2878
2887
|
)
|
|
2879
|
-
),
|
|
2880
|
-
c("change",
|
|
2881
|
-
},
|
|
2882
|
-
switch (
|
|
2883
|
-
case
|
|
2884
|
-
case
|
|
2885
|
-
return
|
|
2886
|
-
case
|
|
2887
|
-
return
|
|
2888
|
-
case
|
|
2888
|
+
), B = (_) => {
|
|
2889
|
+
c("change", _);
|
|
2890
|
+
}, F = () => {
|
|
2891
|
+
switch (M.value) {
|
|
2892
|
+
case k.RECENT:
|
|
2893
|
+
case k.FUTURE:
|
|
2894
|
+
return ft;
|
|
2895
|
+
case k.NATURAL:
|
|
2896
|
+
return vt;
|
|
2897
|
+
case k.Date:
|
|
2889
2898
|
default:
|
|
2890
|
-
return
|
|
2899
|
+
return ot;
|
|
2891
2900
|
}
|
|
2892
|
-
},
|
|
2893
|
-
|
|
2894
|
-
}, g = (
|
|
2895
|
-
c("update:timezone",
|
|
2896
|
-
},
|
|
2897
|
-
|
|
2898
|
-
}, T = (
|
|
2899
|
-
var
|
|
2900
|
-
return !
|
|
2901
|
+
}, x = () => {
|
|
2902
|
+
s.value = !s.value;
|
|
2903
|
+
}, g = (_, V) => {
|
|
2904
|
+
c("update:timezone", _, V);
|
|
2905
|
+
}, I = (_) => {
|
|
2906
|
+
M.value = _, localStorage.setItem(Ba(m.value), _);
|
|
2907
|
+
}, T = (_, V) => {
|
|
2908
|
+
var b, j, p, o, w, z;
|
|
2909
|
+
return !_ || !V ? !1 : ((j = (b = _.dateValue) == null ? void 0 : b.join) == null ? void 0 : j.call(b, "~")) === ((o = (p = V == null ? void 0 : V.dateValue) == null ? void 0 : p.join) == null ? void 0 : o.call(p, "~")) || ((w = _ == null ? void 0 : _.toDisplayString) == null ? void 0 : w.call(_)) === ((z = V == null ? void 0 : V.toDisplayString) == null ? void 0 : z.call(V));
|
|
2901
2910
|
}, R = () => {
|
|
2902
|
-
|
|
2911
|
+
Y.value = [], localStorage.removeItem(f.value);
|
|
2903
2912
|
};
|
|
2904
|
-
return (
|
|
2905
|
-
|
|
2906
|
-
panels: t(
|
|
2907
|
-
"show-delete-all":
|
|
2913
|
+
return (_, V) => (A(), E("div", yt, [
|
|
2914
|
+
S(Ra, {
|
|
2915
|
+
panels: t(ze),
|
|
2916
|
+
"show-delete-all": u.value === "recent" && !!Y.value.length,
|
|
2908
2917
|
onConfirm: R,
|
|
2909
|
-
modelValue:
|
|
2910
|
-
"onUpdate:modelValue":
|
|
2918
|
+
modelValue: u.value,
|
|
2919
|
+
"onUpdate:modelValue": V[0] || (V[0] = (b) => u.value = b)
|
|
2911
2920
|
}, null, 8, ["panels", "show-delete-all", "modelValue"]),
|
|
2912
|
-
|
|
2913
|
-
(A(!0),
|
|
2914
|
-
|
|
2921
|
+
N.value.length ? (A(), E("ul", wt, [
|
|
2922
|
+
(A(!0), E(
|
|
2923
|
+
U,
|
|
2915
2924
|
null,
|
|
2916
|
-
O(
|
|
2917
|
-
class:
|
|
2925
|
+
O(N.value, (b, j) => (A(), E("li", {
|
|
2926
|
+
class: ua({
|
|
2918
2927
|
"list-item": !0,
|
|
2919
|
-
"is-recent-item":
|
|
2920
|
-
"is-selected": T(
|
|
2928
|
+
"is-recent-item": u.value === "recent",
|
|
2929
|
+
"is-selected": T(b, _.defaultDate)
|
|
2921
2930
|
}),
|
|
2922
2931
|
key: j,
|
|
2923
|
-
onClick: (
|
|
2924
|
-
},
|
|
2932
|
+
onClick: (p) => B(b.dateValue)
|
|
2933
|
+
}, y(b.toDisplayString()), 11, Dt))),
|
|
2925
2934
|
128
|
|
2926
2935
|
/* KEYED_FRAGMENT */
|
|
2927
2936
|
))
|
|
2928
|
-
])) : (A(),
|
|
2929
|
-
|
|
2937
|
+
])) : (A(), E("div", Mt, [
|
|
2938
|
+
S(t(ke), {
|
|
2930
2939
|
class: "empty-content",
|
|
2931
2940
|
scene: "part",
|
|
2932
2941
|
type: "empty"
|
|
@@ -2934,67 +2943,66 @@ const wt = { class: "panel-wrapper" }, Dt = {
|
|
|
2934
2943
|
v(
|
|
2935
2944
|
"div",
|
|
2936
2945
|
zt,
|
|
2937
|
-
|
|
2946
|
+
y(u.value === "recent" ? t(n)("暂无最近使用记录") : t(n)("暂无常用时间")),
|
|
2938
2947
|
1
|
|
2939
2948
|
/* TEXT */
|
|
2940
2949
|
)
|
|
2941
2950
|
])),
|
|
2942
|
-
|
|
2943
|
-
"model-value":
|
|
2944
|
-
panels: t(
|
|
2945
|
-
"onUpdate:modelValue":
|
|
2951
|
+
S(Ra, {
|
|
2952
|
+
"model-value": M.value,
|
|
2953
|
+
panels: t(Ee),
|
|
2954
|
+
"onUpdate:modelValue": I,
|
|
2946
2955
|
class: "date-pick-tab"
|
|
2947
2956
|
}, null, 8, ["model-value", "panels"]),
|
|
2948
2957
|
(A(), H(
|
|
2949
|
-
|
|
2958
|
+
de,
|
|
2950
2959
|
null,
|
|
2951
2960
|
[
|
|
2952
|
-
(A(), H(
|
|
2953
|
-
key:
|
|
2954
|
-
type:
|
|
2955
|
-
value:
|
|
2956
|
-
onChange:
|
|
2961
|
+
(A(), H(me(F()), {
|
|
2962
|
+
key: M.value,
|
|
2963
|
+
type: M.value,
|
|
2964
|
+
value: _.defaultDate,
|
|
2965
|
+
onChange: B
|
|
2957
2966
|
}, null, 40, ["type", "value"]))
|
|
2958
2967
|
],
|
|
2959
2968
|
1024
|
|
2960
2969
|
/* DYNAMIC_SLOTS */
|
|
2961
2970
|
)),
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2971
|
+
_.needTimezone ? (A(), E("div", Et, [
|
|
2972
|
+
J(
|
|
2973
|
+
y(t(h).label === t(C) ? t(n)("浏览器时区") : "") + " ",
|
|
2965
2974
|
1
|
|
2966
2975
|
/* TEXT */
|
|
2967
2976
|
),
|
|
2968
|
-
v("span",
|
|
2969
|
-
|
|
2970
|
-
|
|
2977
|
+
v("span", St, [
|
|
2978
|
+
J(
|
|
2979
|
+
y(t(h).label) + " ",
|
|
2971
2980
|
1
|
|
2972
2981
|
/* TEXT */
|
|
2973
2982
|
),
|
|
2974
2983
|
v(
|
|
2975
2984
|
"span",
|
|
2976
|
-
|
|
2977
|
-
|
|
2985
|
+
Ct,
|
|
2986
|
+
y(t(h).country) + ", " + y(t(h).abbreviation),
|
|
2978
2987
|
1
|
|
2979
2988
|
/* TEXT */
|
|
2980
2989
|
)
|
|
2981
2990
|
]),
|
|
2982
2991
|
v(
|
|
2983
2992
|
"span",
|
|
2984
|
-
|
|
2985
|
-
|
|
2993
|
+
Pt,
|
|
2994
|
+
y(t(h).utc),
|
|
2986
2995
|
1
|
|
2987
2996
|
/* TEXT */
|
|
2988
2997
|
),
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
size: "small"
|
|
2993
|
-
theme: "primary"
|
|
2998
|
+
S(t(_a), {
|
|
2999
|
+
onClick: x,
|
|
3000
|
+
class: "time-zone-btn",
|
|
3001
|
+
size: "small"
|
|
2994
3002
|
}, {
|
|
2995
|
-
default:
|
|
2996
|
-
|
|
2997
|
-
|
|
3003
|
+
default: $(() => [
|
|
3004
|
+
J(
|
|
3005
|
+
y(t(n)("时区设置")),
|
|
2998
3006
|
1
|
|
2999
3007
|
/* TEXT */
|
|
3000
3008
|
)
|
|
@@ -3002,25 +3010,25 @@ const wt = { class: "panel-wrapper" }, Dt = {
|
|
|
3002
3010
|
_: 1
|
|
3003
3011
|
/* STABLE */
|
|
3004
3012
|
})
|
|
3005
|
-
])) :
|
|
3006
|
-
|
|
3013
|
+
])) : na("v-if", !0),
|
|
3014
|
+
va(v(
|
|
3007
3015
|
"div",
|
|
3008
|
-
|
|
3016
|
+
Tt,
|
|
3009
3017
|
[
|
|
3010
|
-
|
|
3011
|
-
value:
|
|
3018
|
+
S(_t, {
|
|
3019
|
+
value: _.timezone || t(C),
|
|
3012
3020
|
onChange: g
|
|
3013
3021
|
}, null, 8, ["value"])
|
|
3014
3022
|
],
|
|
3015
3023
|
512
|
|
3016
3024
|
/* NEED_PATCH */
|
|
3017
3025
|
), [
|
|
3018
|
-
[
|
|
3026
|
+
[he, s.value]
|
|
3019
3027
|
])
|
|
3020
3028
|
]));
|
|
3021
3029
|
}
|
|
3022
3030
|
});
|
|
3023
|
-
const
|
|
3031
|
+
const Nt = /* @__PURE__ */ v(
|
|
3024
3032
|
"svg",
|
|
3025
3033
|
{
|
|
3026
3034
|
class: "date-content-icon",
|
|
@@ -3043,15 +3051,18 @@ const $t = /* @__PURE__ */ v(
|
|
|
3043
3051
|
],
|
|
3044
3052
|
-1
|
|
3045
3053
|
/* HOISTED */
|
|
3046
|
-
),
|
|
3054
|
+
), $t = {
|
|
3047
3055
|
key: 0,
|
|
3048
3056
|
class: "date-content-utc"
|
|
3049
|
-
},
|
|
3057
|
+
}, jt = { class: "date-tooltips-timezone" }, Yt = {
|
|
3058
|
+
key: 0,
|
|
3059
|
+
class: "date-tooltips-diff"
|
|
3060
|
+
}, fi = /* @__PURE__ */ X({
|
|
3050
3061
|
name: "DatePicker",
|
|
3051
3062
|
__name: "date-picker",
|
|
3052
3063
|
props: {
|
|
3053
3064
|
behavior: { default: "normal" },
|
|
3054
|
-
commonUseList: { default:
|
|
3065
|
+
commonUseList: { default: xa },
|
|
3055
3066
|
disabled: { type: Boolean },
|
|
3056
3067
|
format: { default: "YYYY-MM-DD HH:mm:ss" },
|
|
3057
3068
|
modelValue: {},
|
|
@@ -3060,149 +3071,157 @@ const $t = /* @__PURE__ */ v(
|
|
|
3060
3071
|
version: { default: "1.0" }
|
|
3061
3072
|
},
|
|
3062
3073
|
emits: ["update:modelValue", "update:timezone"],
|
|
3063
|
-
setup(
|
|
3074
|
+
setup(l, { expose: a, emit: i }) {
|
|
3064
3075
|
d.locale({
|
|
3065
|
-
...
|
|
3076
|
+
...ba === "en" ? xe : Ie,
|
|
3066
3077
|
weekStart: 1
|
|
3067
3078
|
}), be({
|
|
3068
3079
|
prefix: "bk"
|
|
3069
3080
|
});
|
|
3070
|
-
const e =
|
|
3081
|
+
const e = l, r = i, f = L(), h = L(), m = W(() => e.format), c = W(() => ee(e.timezone || d.tz.guess())), s = W(() => {
|
|
3082
|
+
const b = e.timezone;
|
|
3083
|
+
if (!b || e.timezone === d.tz.guess())
|
|
3084
|
+
return "";
|
|
3085
|
+
const j = d().utcOffset(), o = (d.tz(d(), b).utcOffset() - j) / 60;
|
|
3086
|
+
return o > 0 ? `+${o}` : o + "";
|
|
3087
|
+
}), u = ea(new ra(e.modelValue, e.format, e.timezone)), D = W(() => ga(e.version)), M = L(!1), C = L(!1);
|
|
3071
3088
|
oa(
|
|
3072
3089
|
() => e.modelValue,
|
|
3073
|
-
(
|
|
3074
|
-
var
|
|
3075
|
-
(
|
|
3090
|
+
(b) => {
|
|
3091
|
+
var j, p;
|
|
3092
|
+
(p = (j = u.value) == null ? void 0 : j.dateValue) != null && p.length && u.value.dateValue.every((o, w) => o === (b == null ? void 0 : b[w])) || (u.value = new ra(b, m.value, e.timezone));
|
|
3076
3093
|
},
|
|
3077
3094
|
{
|
|
3078
3095
|
immediate: !0
|
|
3079
3096
|
}
|
|
3080
3097
|
);
|
|
3081
|
-
const Y =
|
|
3082
|
-
var
|
|
3083
|
-
return (
|
|
3098
|
+
const Y = W(() => {
|
|
3099
|
+
var b;
|
|
3100
|
+
return (b = e.commonUseList) != null && b.length ? e.commonUseList : xa;
|
|
3084
3101
|
});
|
|
3085
3102
|
$e({
|
|
3086
3103
|
commonUseList: Y,
|
|
3087
|
-
format:
|
|
3088
|
-
storeKey:
|
|
3089
|
-
t:
|
|
3104
|
+
format: m,
|
|
3105
|
+
storeKey: D,
|
|
3106
|
+
t: n,
|
|
3090
3107
|
timezoneInfo: c,
|
|
3091
|
-
version:
|
|
3092
|
-
}),
|
|
3093
|
-
|
|
3108
|
+
version: W(() => e.version)
|
|
3109
|
+
}), ve(() => {
|
|
3110
|
+
C.value = !1, M.value = !1;
|
|
3094
3111
|
});
|
|
3095
3112
|
const N = () => {
|
|
3096
|
-
I.value = !0;
|
|
3097
|
-
}, $ = () => {
|
|
3098
3113
|
setTimeout(() => {
|
|
3099
|
-
|
|
3100
|
-
},
|
|
3101
|
-
},
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3114
|
+
C.value = !0;
|
|
3115
|
+
}, 64);
|
|
3116
|
+
}, B = () => {
|
|
3117
|
+
setTimeout(() => {
|
|
3118
|
+
C.value = !1;
|
|
3119
|
+
}, 64);
|
|
3120
|
+
}, F = (b) => {
|
|
3121
|
+
M.value = !1;
|
|
3122
|
+
const [j, p] = b, [o, w] = e.modelValue || [];
|
|
3123
|
+
if (j && p && j === o && p === w)
|
|
3105
3124
|
return;
|
|
3106
|
-
|
|
3107
|
-
const
|
|
3108
|
-
|
|
3109
|
-
},
|
|
3110
|
-
|
|
3111
|
-
},
|
|
3112
|
-
|
|
3113
|
-
},
|
|
3114
|
-
var
|
|
3115
|
-
if (((
|
|
3125
|
+
u.value = new ra(b, m.value, e.timezone);
|
|
3126
|
+
const z = u.value.toEmitValue();
|
|
3127
|
+
r("update:modelValue", ...z), !Y.value.some((da) => da[0] === j && da[1] === p) && u.value.isValidate && ie(b, D.value);
|
|
3128
|
+
}, x = (b, j) => {
|
|
3129
|
+
u.value = new ra(e.modelValue, m.value, b), r("update:timezone", b, { ...j }), sessionStorage.setItem(Pe, b);
|
|
3130
|
+
}, g = () => {
|
|
3131
|
+
M.value = !1;
|
|
3132
|
+
}, I = (b) => {
|
|
3133
|
+
var z;
|
|
3134
|
+
if (((z = u.value.dateValue) == null ? void 0 : z.length) < 2)
|
|
3116
3135
|
return;
|
|
3117
|
-
const { endDate:
|
|
3118
|
-
|
|
3119
|
-
}, y = () => {
|
|
3120
|
-
g("left");
|
|
3136
|
+
const { endDate: j, startDate: p } = u.value, o = u.value.dateDuration(), w = b === "left" ? [p.subtract(o).format(m.value), j.subtract(o).format(m.value)] : [p.add(o).format(m.value), j.add(o).format(m.value)];
|
|
3137
|
+
F(w);
|
|
3121
3138
|
}, T = () => {
|
|
3122
|
-
|
|
3123
|
-
}, R = (
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3139
|
+
I("left");
|
|
3140
|
+
}, R = () => {
|
|
3141
|
+
I("right");
|
|
3142
|
+
}, _ = (b) => {
|
|
3143
|
+
M.value && (Array.from(document.querySelectorAll(".__bk-date-picker-popover__")).some(
|
|
3144
|
+
(j) => j.contains(b.target)
|
|
3145
|
+
) || g());
|
|
3146
|
+
}, V = () => {
|
|
3147
|
+
M.value = !M.value, M.value && (C.value = !1);
|
|
3129
3148
|
};
|
|
3130
3149
|
return a({
|
|
3131
3150
|
handleHidePanel: () => {
|
|
3132
|
-
|
|
3151
|
+
M.value = !1;
|
|
3133
3152
|
},
|
|
3134
3153
|
handleShowPanel: () => {
|
|
3135
|
-
|
|
3154
|
+
M.value = !0;
|
|
3136
3155
|
}
|
|
3137
|
-
}), (
|
|
3156
|
+
}), (b, j) => (A(), E(
|
|
3138
3157
|
"div",
|
|
3139
3158
|
{
|
|
3140
|
-
class:
|
|
3159
|
+
class: ua({
|
|
3141
3160
|
__bk_date_picker__: !0,
|
|
3142
|
-
"is-simplicity":
|
|
3143
|
-
"is-disabled":
|
|
3161
|
+
"is-simplicity": b.behavior === "simplicity",
|
|
3162
|
+
"is-disabled": b.disabled
|
|
3144
3163
|
})
|
|
3145
3164
|
},
|
|
3146
3165
|
[
|
|
3147
3166
|
v("span", {
|
|
3148
|
-
onClick:
|
|
3167
|
+
onClick: T,
|
|
3149
3168
|
class: "date-icon"
|
|
3150
3169
|
}, [
|
|
3151
|
-
|
|
3170
|
+
S(t(Ga), { class: "date-icon-left" })
|
|
3152
3171
|
]),
|
|
3153
|
-
|
|
3172
|
+
S(t(la), {
|
|
3154
3173
|
arrow: !1,
|
|
3155
|
-
"is-show":
|
|
3174
|
+
"is-show": M.value,
|
|
3156
3175
|
offset: { mainAxis: 10, crossAxis: 10, alignmentAxis: -32 },
|
|
3157
|
-
onAfterHidden:
|
|
3176
|
+
onAfterHidden: g,
|
|
3158
3177
|
"ext-cls": "bk-date-picker-popover __bk-date-picker-popover__",
|
|
3159
3178
|
placement: "bottom-start",
|
|
3160
3179
|
theme: "light",
|
|
3161
3180
|
trigger: "manual"
|
|
3162
3181
|
}, {
|
|
3163
|
-
content:
|
|
3164
|
-
|
|
3165
|
-
"default-date":
|
|
3166
|
-
"need-timezone":
|
|
3167
|
-
timezone:
|
|
3168
|
-
onChange:
|
|
3169
|
-
"onUpdate:timezone":
|
|
3182
|
+
content: $(() => [
|
|
3183
|
+
S(Vt, {
|
|
3184
|
+
"default-date": u.value,
|
|
3185
|
+
"need-timezone": b.needTimezone,
|
|
3186
|
+
timezone: b.timezone,
|
|
3187
|
+
onChange: F,
|
|
3188
|
+
"onUpdate:timezone": x
|
|
3170
3189
|
}, null, 8, ["default-date", "need-timezone", "timezone"])
|
|
3171
3190
|
]),
|
|
3172
|
-
default:
|
|
3173
|
-
var
|
|
3191
|
+
default: $(() => {
|
|
3192
|
+
var p;
|
|
3174
3193
|
return [
|
|
3175
|
-
|
|
3194
|
+
va((A(), E(
|
|
3176
3195
|
"span",
|
|
3177
3196
|
{
|
|
3178
|
-
onClick:
|
|
3197
|
+
onClick: V,
|
|
3179
3198
|
onMouseenter: N,
|
|
3180
|
-
onMouseleave:
|
|
3199
|
+
onMouseleave: B,
|
|
3181
3200
|
class: "date-content",
|
|
3182
3201
|
ref_key: "dateContentRef",
|
|
3183
|
-
ref:
|
|
3202
|
+
ref: h
|
|
3184
3203
|
},
|
|
3185
3204
|
[
|
|
3186
|
-
|
|
3205
|
+
Nt,
|
|
3187
3206
|
v(
|
|
3188
3207
|
"span",
|
|
3189
3208
|
null,
|
|
3190
|
-
|
|
3209
|
+
y(u.value.toDisplayString()),
|
|
3191
3210
|
1
|
|
3192
3211
|
/* TEXT */
|
|
3193
3212
|
),
|
|
3194
|
-
|
|
3213
|
+
b.needTimezone && c.value.label !== t(d).tz.guess() ? (A(), E(
|
|
3195
3214
|
"span",
|
|
3196
|
-
|
|
3197
|
-
|
|
3215
|
+
$t,
|
|
3216
|
+
y(c.value.abbreviation || ((p = c.value.utc) == null ? void 0 : p.replace("UTC", "").replace(":00", ""))),
|
|
3198
3217
|
1
|
|
3199
3218
|
/* TEXT */
|
|
3200
|
-
)) :
|
|
3219
|
+
)) : na("v-if", !0)
|
|
3201
3220
|
],
|
|
3202
3221
|
32
|
|
3203
3222
|
/* HYDRATE_EVENTS */
|
|
3204
3223
|
)), [
|
|
3205
|
-
[t(
|
|
3224
|
+
[t(fa), _]
|
|
3206
3225
|
])
|
|
3207
3226
|
];
|
|
3208
3227
|
}),
|
|
@@ -3210,52 +3229,59 @@ const $t = /* @__PURE__ */ v(
|
|
|
3210
3229
|
/* STABLE */
|
|
3211
3230
|
}, 8, ["is-show"]),
|
|
3212
3231
|
v("span", {
|
|
3213
|
-
onClick:
|
|
3232
|
+
onClick: R,
|
|
3214
3233
|
class: "date-icon"
|
|
3215
3234
|
}, [
|
|
3216
|
-
|
|
3235
|
+
S(t(Ja), { class: "date-icon-right" })
|
|
3217
3236
|
]),
|
|
3218
|
-
|
|
3219
|
-
"is-show":
|
|
3237
|
+
S(t(la), {
|
|
3238
|
+
"is-show": C.value,
|
|
3220
3239
|
offset: 12,
|
|
3221
|
-
target:
|
|
3240
|
+
target: h.value,
|
|
3222
3241
|
placement: "top",
|
|
3223
3242
|
trigger: "manual"
|
|
3224
3243
|
}, {
|
|
3225
|
-
content:
|
|
3226
|
-
var
|
|
3244
|
+
content: $(() => {
|
|
3245
|
+
var p, o;
|
|
3227
3246
|
return [
|
|
3228
3247
|
v(
|
|
3229
3248
|
"div",
|
|
3230
3249
|
{
|
|
3231
|
-
style:
|
|
3250
|
+
style: Fa({ maxWidth: t(ba) === "en" ? "210px" : "156px" }),
|
|
3232
3251
|
class: "__date-tooltips__",
|
|
3233
3252
|
ref_key: "dateTooltipsRef",
|
|
3234
|
-
ref:
|
|
3253
|
+
ref: f
|
|
3235
3254
|
},
|
|
3236
3255
|
[
|
|
3237
3256
|
v(
|
|
3238
3257
|
"div",
|
|
3239
3258
|
null,
|
|
3240
|
-
|
|
3259
|
+
y((p = u.value) == null ? void 0 : p.startDisplayText),
|
|
3241
3260
|
1
|
|
3242
3261
|
/* TEXT */
|
|
3243
3262
|
),
|
|
3244
|
-
|
|
3263
|
+
J(" to "),
|
|
3245
3264
|
v(
|
|
3246
3265
|
"div",
|
|
3247
3266
|
null,
|
|
3248
|
-
|
|
3267
|
+
y((o = u.value) == null ? void 0 : o.endDisplayText),
|
|
3249
3268
|
1
|
|
3250
3269
|
/* TEXT */
|
|
3251
3270
|
),
|
|
3252
3271
|
v(
|
|
3253
3272
|
"div",
|
|
3254
|
-
|
|
3255
|
-
|
|
3273
|
+
jt,
|
|
3274
|
+
y(c.value.label === t(d).tz.guess() ? `${t(n)("浏览器时区")} (${c.value.label})` : c.value.label),
|
|
3256
3275
|
1
|
|
3257
3276
|
/* TEXT */
|
|
3258
|
-
)
|
|
3277
|
+
),
|
|
3278
|
+
s.value ? (A(), E(
|
|
3279
|
+
"div",
|
|
3280
|
+
Yt,
|
|
3281
|
+
y(t(n)("时差:n小时").replace("n", s.value)),
|
|
3282
|
+
1
|
|
3283
|
+
/* TEXT */
|
|
3284
|
+
)) : na("v-if", !0)
|
|
3259
3285
|
],
|
|
3260
3286
|
4
|
|
3261
3287
|
/* STYLE */
|
|
@@ -3271,36 +3297,36 @@ const $t = /* @__PURE__ */ v(
|
|
|
3271
3297
|
));
|
|
3272
3298
|
}
|
|
3273
3299
|
});
|
|
3274
|
-
d.extend(Ua);
|
|
3275
|
-
d.extend(se);
|
|
3276
3300
|
d.extend(Ha);
|
|
3301
|
+
d.extend(ce);
|
|
3277
3302
|
d.extend(Ka);
|
|
3303
|
+
d.extend(qa);
|
|
3278
3304
|
export {
|
|
3279
|
-
|
|
3305
|
+
Aa as CommonNaturalOptions,
|
|
3280
3306
|
vi as DATE_REGEX_FORMAT,
|
|
3281
3307
|
Ne as DATE_REGEX_PARSE,
|
|
3282
3308
|
fi as DatePicker,
|
|
3283
|
-
|
|
3284
|
-
|
|
3309
|
+
ra as DateRange,
|
|
3310
|
+
Za as DateUnitList,
|
|
3285
3311
|
aa as NaturalOptionType,
|
|
3286
|
-
|
|
3312
|
+
ha as NaturalUnit,
|
|
3287
3313
|
P as NowConstant,
|
|
3288
|
-
|
|
3289
|
-
|
|
3314
|
+
xa as commonDateList,
|
|
3315
|
+
ca as commonDateRegexp,
|
|
3290
3316
|
Te as dateFormatList,
|
|
3291
|
-
|
|
3317
|
+
Ee as datePickTabList,
|
|
3292
3318
|
sa as dateUnit,
|
|
3293
3319
|
gi as dayjs,
|
|
3294
3320
|
fi as default,
|
|
3295
3321
|
Le as futureDateRegexp,
|
|
3296
|
-
|
|
3322
|
+
ga as getStoreKey,
|
|
3297
3323
|
Ba as getStoreTabKey,
|
|
3298
|
-
|
|
3324
|
+
Ia as naturalDateRegexp,
|
|
3299
3325
|
Ve as naturalDateShortcutMap,
|
|
3300
|
-
|
|
3301
|
-
|
|
3326
|
+
Ya as naturalUnitOptions,
|
|
3327
|
+
ze as panels,
|
|
3302
3328
|
Re as recentDateRegexp,
|
|
3303
3329
|
Pe as timezoneStoreKey,
|
|
3304
3330
|
bi as transformDateRange2Dayjs,
|
|
3305
|
-
|
|
3331
|
+
ka as transformValue2Dayjs
|
|
3306
3332
|
};
|