@94ai/nf-timezone-picker 5.0.32 → 5.0.36
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/lib/nf-timezone-picker.cjs.js +247 -1490
- package/lib/nf-timezone-picker.esm-bundler.js +122 -1365
- package/package.json +3 -3
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
}
|
|
12
12
|
})();
|
|
13
13
|
import Vue from "vue";
|
|
14
|
+
import { isDateObject, getWeekNumber, formatDate, parseDate, getRangeHours, getRangeMinutes, modifyTime, limitTimeRange, isDate, clearMilliseconds, timeWithinRange, getDayCountOfYear, range, nextDate, getDayCountOfMonth, getStartDateOfMonth, getFirstDayOfMonth, prevDate, clearTime, extractTimeFormat, extractDateFormat, prevMonth, nextMonth, prevYear, nextYear, modifyWithTimeString, modifyDate, changeYearMonthAndClampDate } from "element-ui/src/utils/date-util";
|
|
14
15
|
import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
|
|
16
|
+
import Locale from "element-ui/lib/mixins/locale";
|
|
15
17
|
import "fs";
|
|
16
18
|
import "path";
|
|
17
19
|
import "vue-demi";
|
|
@@ -172,788 +174,6 @@ const Clickoutside = {
|
|
|
172
174
|
delete el[ctx];
|
|
173
175
|
}
|
|
174
176
|
};
|
|
175
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
176
|
-
function getDefaultExportFromCjs(x) {
|
|
177
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
178
|
-
}
|
|
179
|
-
var date = { exports: {} };
|
|
180
|
-
(function(module) {
|
|
181
|
-
(function(main) {
|
|
182
|
-
var fecha2 = {};
|
|
183
|
-
var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
|
|
184
|
-
var twoDigits = "\\d\\d?";
|
|
185
|
-
var threeDigits = "\\d{3}";
|
|
186
|
-
var fourDigits = "\\d{4}";
|
|
187
|
-
var word = "[^\\s]+";
|
|
188
|
-
var literal = /\[([^]*?)\]/gm;
|
|
189
|
-
var noop2 = function() {
|
|
190
|
-
};
|
|
191
|
-
function regexEscape(str) {
|
|
192
|
-
return str.replace(/[|\\{()[^$+*?.-]/g, "\\$&");
|
|
193
|
-
}
|
|
194
|
-
function shorten(arr, sLen) {
|
|
195
|
-
var newArr = [];
|
|
196
|
-
for (var i = 0, len = arr.length; i < len; i++) {
|
|
197
|
-
newArr.push(arr[i].substr(0, sLen));
|
|
198
|
-
}
|
|
199
|
-
return newArr;
|
|
200
|
-
}
|
|
201
|
-
function monthUpdate(arrName) {
|
|
202
|
-
return function(d, v, i18n3) {
|
|
203
|
-
var index = i18n3[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase());
|
|
204
|
-
if (~index) {
|
|
205
|
-
d.month = index;
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
function pad(val, len) {
|
|
210
|
-
val = String(val);
|
|
211
|
-
len = len || 2;
|
|
212
|
-
while (val.length < len) {
|
|
213
|
-
val = "0" + val;
|
|
214
|
-
}
|
|
215
|
-
return val;
|
|
216
|
-
}
|
|
217
|
-
var dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
|
218
|
-
var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
219
|
-
var monthNamesShort = shorten(monthNames, 3);
|
|
220
|
-
var dayNamesShort = shorten(dayNames, 3);
|
|
221
|
-
fecha2.i18n = {
|
|
222
|
-
dayNamesShort,
|
|
223
|
-
dayNames,
|
|
224
|
-
monthNamesShort,
|
|
225
|
-
monthNames,
|
|
226
|
-
amPm: ["am", "pm"],
|
|
227
|
-
DoFn: function DoFn(D) {
|
|
228
|
-
return D + ["th", "st", "nd", "rd"][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10];
|
|
229
|
-
}
|
|
230
|
-
};
|
|
231
|
-
var formatFlags = {
|
|
232
|
-
D: function(dateObj) {
|
|
233
|
-
return dateObj.getDay();
|
|
234
|
-
},
|
|
235
|
-
DD: function(dateObj) {
|
|
236
|
-
return pad(dateObj.getDay());
|
|
237
|
-
},
|
|
238
|
-
Do: function(dateObj, i18n3) {
|
|
239
|
-
return i18n3.DoFn(dateObj.getDate());
|
|
240
|
-
},
|
|
241
|
-
d: function(dateObj) {
|
|
242
|
-
return dateObj.getDate();
|
|
243
|
-
},
|
|
244
|
-
dd: function(dateObj) {
|
|
245
|
-
return pad(dateObj.getDate());
|
|
246
|
-
},
|
|
247
|
-
ddd: function(dateObj, i18n3) {
|
|
248
|
-
return i18n3.dayNamesShort[dateObj.getDay()];
|
|
249
|
-
},
|
|
250
|
-
dddd: function(dateObj, i18n3) {
|
|
251
|
-
return i18n3.dayNames[dateObj.getDay()];
|
|
252
|
-
},
|
|
253
|
-
M: function(dateObj) {
|
|
254
|
-
return dateObj.getMonth() + 1;
|
|
255
|
-
},
|
|
256
|
-
MM: function(dateObj) {
|
|
257
|
-
return pad(dateObj.getMonth() + 1);
|
|
258
|
-
},
|
|
259
|
-
MMM: function(dateObj, i18n3) {
|
|
260
|
-
return i18n3.monthNamesShort[dateObj.getMonth()];
|
|
261
|
-
},
|
|
262
|
-
MMMM: function(dateObj, i18n3) {
|
|
263
|
-
return i18n3.monthNames[dateObj.getMonth()];
|
|
264
|
-
},
|
|
265
|
-
yy: function(dateObj) {
|
|
266
|
-
return pad(String(dateObj.getFullYear()), 4).substr(2);
|
|
267
|
-
},
|
|
268
|
-
yyyy: function(dateObj) {
|
|
269
|
-
return pad(dateObj.getFullYear(), 4);
|
|
270
|
-
},
|
|
271
|
-
h: function(dateObj) {
|
|
272
|
-
return dateObj.getHours() % 12 || 12;
|
|
273
|
-
},
|
|
274
|
-
hh: function(dateObj) {
|
|
275
|
-
return pad(dateObj.getHours() % 12 || 12);
|
|
276
|
-
},
|
|
277
|
-
H: function(dateObj) {
|
|
278
|
-
return dateObj.getHours();
|
|
279
|
-
},
|
|
280
|
-
HH: function(dateObj) {
|
|
281
|
-
return pad(dateObj.getHours());
|
|
282
|
-
},
|
|
283
|
-
m: function(dateObj) {
|
|
284
|
-
return dateObj.getMinutes();
|
|
285
|
-
},
|
|
286
|
-
mm: function(dateObj) {
|
|
287
|
-
return pad(dateObj.getMinutes());
|
|
288
|
-
},
|
|
289
|
-
s: function(dateObj) {
|
|
290
|
-
return dateObj.getSeconds();
|
|
291
|
-
},
|
|
292
|
-
ss: function(dateObj) {
|
|
293
|
-
return pad(dateObj.getSeconds());
|
|
294
|
-
},
|
|
295
|
-
S: function(dateObj) {
|
|
296
|
-
return Math.round(dateObj.getMilliseconds() / 100);
|
|
297
|
-
},
|
|
298
|
-
SS: function(dateObj) {
|
|
299
|
-
return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
|
|
300
|
-
},
|
|
301
|
-
SSS: function(dateObj) {
|
|
302
|
-
return pad(dateObj.getMilliseconds(), 3);
|
|
303
|
-
},
|
|
304
|
-
a: function(dateObj, i18n3) {
|
|
305
|
-
return dateObj.getHours() < 12 ? i18n3.amPm[0] : i18n3.amPm[1];
|
|
306
|
-
},
|
|
307
|
-
A: function(dateObj, i18n3) {
|
|
308
|
-
return dateObj.getHours() < 12 ? i18n3.amPm[0].toUpperCase() : i18n3.amPm[1].toUpperCase();
|
|
309
|
-
},
|
|
310
|
-
ZZ: function(dateObj) {
|
|
311
|
-
var o = dateObj.getTimezoneOffset();
|
|
312
|
-
return (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
|
|
313
|
-
}
|
|
314
|
-
};
|
|
315
|
-
var parseFlags = {
|
|
316
|
-
d: [twoDigits, function(d, v) {
|
|
317
|
-
d.day = v;
|
|
318
|
-
}],
|
|
319
|
-
Do: [twoDigits + word, function(d, v) {
|
|
320
|
-
d.day = parseInt(v, 10);
|
|
321
|
-
}],
|
|
322
|
-
M: [twoDigits, function(d, v) {
|
|
323
|
-
d.month = v - 1;
|
|
324
|
-
}],
|
|
325
|
-
yy: [twoDigits, function(d, v) {
|
|
326
|
-
var da = /* @__PURE__ */ new Date(), cent = +("" + da.getFullYear()).substr(0, 2);
|
|
327
|
-
d.year = "" + (v > 68 ? cent - 1 : cent) + v;
|
|
328
|
-
}],
|
|
329
|
-
h: [twoDigits, function(d, v) {
|
|
330
|
-
d.hour = v;
|
|
331
|
-
}],
|
|
332
|
-
m: [twoDigits, function(d, v) {
|
|
333
|
-
d.minute = v;
|
|
334
|
-
}],
|
|
335
|
-
s: [twoDigits, function(d, v) {
|
|
336
|
-
d.second = v;
|
|
337
|
-
}],
|
|
338
|
-
yyyy: [fourDigits, function(d, v) {
|
|
339
|
-
d.year = v;
|
|
340
|
-
}],
|
|
341
|
-
S: ["\\d", function(d, v) {
|
|
342
|
-
d.millisecond = v * 100;
|
|
343
|
-
}],
|
|
344
|
-
SS: ["\\d{2}", function(d, v) {
|
|
345
|
-
d.millisecond = v * 10;
|
|
346
|
-
}],
|
|
347
|
-
SSS: [threeDigits, function(d, v) {
|
|
348
|
-
d.millisecond = v;
|
|
349
|
-
}],
|
|
350
|
-
D: [twoDigits, noop2],
|
|
351
|
-
ddd: [word, noop2],
|
|
352
|
-
MMM: [word, monthUpdate("monthNamesShort")],
|
|
353
|
-
MMMM: [word, monthUpdate("monthNames")],
|
|
354
|
-
a: [word, function(d, v, i18n3) {
|
|
355
|
-
var val = v.toLowerCase();
|
|
356
|
-
if (val === i18n3.amPm[0]) {
|
|
357
|
-
d.isPm = false;
|
|
358
|
-
} else if (val === i18n3.amPm[1]) {
|
|
359
|
-
d.isPm = true;
|
|
360
|
-
}
|
|
361
|
-
}],
|
|
362
|
-
ZZ: ["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z", function(d, v) {
|
|
363
|
-
var parts = (v + "").match(/([+-]|\d\d)/gi), minutes;
|
|
364
|
-
if (parts) {
|
|
365
|
-
minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
|
|
366
|
-
d.timezoneOffset = parts[0] === "+" ? minutes : -minutes;
|
|
367
|
-
}
|
|
368
|
-
}]
|
|
369
|
-
};
|
|
370
|
-
parseFlags.dd = parseFlags.d;
|
|
371
|
-
parseFlags.dddd = parseFlags.ddd;
|
|
372
|
-
parseFlags.DD = parseFlags.D;
|
|
373
|
-
parseFlags.mm = parseFlags.m;
|
|
374
|
-
parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
|
|
375
|
-
parseFlags.MM = parseFlags.M;
|
|
376
|
-
parseFlags.ss = parseFlags.s;
|
|
377
|
-
parseFlags.A = parseFlags.a;
|
|
378
|
-
fecha2.masks = {
|
|
379
|
-
default: "ddd MMM dd yyyy HH:mm:ss",
|
|
380
|
-
shortDate: "M/D/yy",
|
|
381
|
-
mediumDate: "MMM d, yyyy",
|
|
382
|
-
longDate: "MMMM d, yyyy",
|
|
383
|
-
fullDate: "dddd, MMMM d, yyyy",
|
|
384
|
-
shortTime: "HH:mm",
|
|
385
|
-
mediumTime: "HH:mm:ss",
|
|
386
|
-
longTime: "HH:mm:ss.SSS"
|
|
387
|
-
};
|
|
388
|
-
fecha2.format = function(dateObj, mask, i18nSettings) {
|
|
389
|
-
var i18n3 = i18nSettings || fecha2.i18n;
|
|
390
|
-
if (typeof dateObj === "number") {
|
|
391
|
-
dateObj = new Date(dateObj);
|
|
392
|
-
}
|
|
393
|
-
if (Object.prototype.toString.call(dateObj) !== "[object Date]" || isNaN(dateObj.getTime())) {
|
|
394
|
-
throw new Error("Invalid Date in fecha.format");
|
|
395
|
-
}
|
|
396
|
-
mask = fecha2.masks[mask] || mask || fecha2.masks["default"];
|
|
397
|
-
var literals = [];
|
|
398
|
-
mask = mask.replace(literal, function($0, $1) {
|
|
399
|
-
literals.push($1);
|
|
400
|
-
return "@@@";
|
|
401
|
-
});
|
|
402
|
-
mask = mask.replace(token, function($0) {
|
|
403
|
-
return $0 in formatFlags ? formatFlags[$0](dateObj, i18n3) : $0.slice(1, $0.length - 1);
|
|
404
|
-
});
|
|
405
|
-
return mask.replace(/@@@/g, function() {
|
|
406
|
-
return literals.shift();
|
|
407
|
-
});
|
|
408
|
-
};
|
|
409
|
-
fecha2.parse = function(dateStr, format2, i18nSettings) {
|
|
410
|
-
var i18n3 = i18nSettings || fecha2.i18n;
|
|
411
|
-
if (typeof format2 !== "string") {
|
|
412
|
-
throw new Error("Invalid format in fecha.parse");
|
|
413
|
-
}
|
|
414
|
-
format2 = fecha2.masks[format2] || format2;
|
|
415
|
-
if (dateStr.length > 1e3) {
|
|
416
|
-
return null;
|
|
417
|
-
}
|
|
418
|
-
var dateInfo = {};
|
|
419
|
-
var parseInfo = [];
|
|
420
|
-
var literals = [];
|
|
421
|
-
format2 = format2.replace(literal, function($0, $1) {
|
|
422
|
-
literals.push($1);
|
|
423
|
-
return "@@@";
|
|
424
|
-
});
|
|
425
|
-
var newFormat = regexEscape(format2).replace(token, function($0) {
|
|
426
|
-
if (parseFlags[$0]) {
|
|
427
|
-
var info = parseFlags[$0];
|
|
428
|
-
parseInfo.push(info[1]);
|
|
429
|
-
return "(" + info[0] + ")";
|
|
430
|
-
}
|
|
431
|
-
return $0;
|
|
432
|
-
});
|
|
433
|
-
newFormat = newFormat.replace(/@@@/g, function() {
|
|
434
|
-
return literals.shift();
|
|
435
|
-
});
|
|
436
|
-
var matches = dateStr.match(new RegExp(newFormat, "i"));
|
|
437
|
-
if (!matches) {
|
|
438
|
-
return null;
|
|
439
|
-
}
|
|
440
|
-
for (var i = 1; i < matches.length; i++) {
|
|
441
|
-
parseInfo[i - 1](dateInfo, matches[i], i18n3);
|
|
442
|
-
}
|
|
443
|
-
var today = /* @__PURE__ */ new Date();
|
|
444
|
-
if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
|
|
445
|
-
dateInfo.hour = +dateInfo.hour + 12;
|
|
446
|
-
} else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
|
|
447
|
-
dateInfo.hour = 0;
|
|
448
|
-
}
|
|
449
|
-
var date2;
|
|
450
|
-
if (dateInfo.timezoneOffset != null) {
|
|
451
|
-
dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
|
|
452
|
-
date2 = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0));
|
|
453
|
-
} else {
|
|
454
|
-
date2 = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
|
|
455
|
-
}
|
|
456
|
-
return date2;
|
|
457
|
-
};
|
|
458
|
-
if (module.exports) {
|
|
459
|
-
module.exports = fecha2;
|
|
460
|
-
} else {
|
|
461
|
-
main.fecha = fecha2;
|
|
462
|
-
}
|
|
463
|
-
})(commonjsGlobal);
|
|
464
|
-
})(date);
|
|
465
|
-
var dateExports = date.exports;
|
|
466
|
-
const fecha = /* @__PURE__ */ getDefaultExportFromCjs(dateExports);
|
|
467
|
-
const defaultLang = {
|
|
468
|
-
el: {
|
|
469
|
-
colorpicker: {
|
|
470
|
-
confirm: "确定",
|
|
471
|
-
clear: "清空"
|
|
472
|
-
},
|
|
473
|
-
datepicker: {
|
|
474
|
-
now: "此刻",
|
|
475
|
-
today: "今天",
|
|
476
|
-
cancel: "取消",
|
|
477
|
-
clear: "清空",
|
|
478
|
-
confirm: "确定",
|
|
479
|
-
selectDate: "选择日期",
|
|
480
|
-
selectTime: "选择时间",
|
|
481
|
-
startDate: "开始日期",
|
|
482
|
-
startTime: "开始时间",
|
|
483
|
-
endDate: "结束日期",
|
|
484
|
-
endTime: "结束时间",
|
|
485
|
-
prevYear: "前一年",
|
|
486
|
-
nextYear: "后一年",
|
|
487
|
-
prevMonth: "上个月",
|
|
488
|
-
nextMonth: "下个月",
|
|
489
|
-
year: "年",
|
|
490
|
-
month1: "1 月",
|
|
491
|
-
month2: "2 月",
|
|
492
|
-
month3: "3 月",
|
|
493
|
-
month4: "4 月",
|
|
494
|
-
month5: "5 月",
|
|
495
|
-
month6: "6 月",
|
|
496
|
-
month7: "7 月",
|
|
497
|
-
month8: "8 月",
|
|
498
|
-
month9: "9 月",
|
|
499
|
-
month10: "10 月",
|
|
500
|
-
month11: "11 月",
|
|
501
|
-
month12: "12 月",
|
|
502
|
-
// week: '周次',
|
|
503
|
-
weeks: {
|
|
504
|
-
sun: "日",
|
|
505
|
-
mon: "一",
|
|
506
|
-
tue: "二",
|
|
507
|
-
wed: "三",
|
|
508
|
-
thu: "四",
|
|
509
|
-
fri: "五",
|
|
510
|
-
sat: "六"
|
|
511
|
-
},
|
|
512
|
-
months: {
|
|
513
|
-
jan: "一月",
|
|
514
|
-
feb: "二月",
|
|
515
|
-
mar: "三月",
|
|
516
|
-
apr: "四月",
|
|
517
|
-
may: "五月",
|
|
518
|
-
jun: "六月",
|
|
519
|
-
jul: "七月",
|
|
520
|
-
aug: "八月",
|
|
521
|
-
sep: "九月",
|
|
522
|
-
oct: "十月",
|
|
523
|
-
nov: "十一月",
|
|
524
|
-
dec: "十二月"
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
select: {
|
|
528
|
-
loading: "加载中",
|
|
529
|
-
noMatch: "无匹配数据",
|
|
530
|
-
noData: "无数据",
|
|
531
|
-
placeholder: "请选择"
|
|
532
|
-
},
|
|
533
|
-
cascader: {
|
|
534
|
-
noMatch: "无匹配数据",
|
|
535
|
-
loading: "加载中",
|
|
536
|
-
placeholder: "请选择",
|
|
537
|
-
noData: "暂无数据"
|
|
538
|
-
},
|
|
539
|
-
pagination: {
|
|
540
|
-
goto: "前往",
|
|
541
|
-
pagesize: "条/页",
|
|
542
|
-
total: "共 {total} 条",
|
|
543
|
-
pageClassifier: "页"
|
|
544
|
-
},
|
|
545
|
-
messagebox: {
|
|
546
|
-
title: "提示",
|
|
547
|
-
confirm: "确定",
|
|
548
|
-
cancel: "取消",
|
|
549
|
-
error: "输入的数据不合法!"
|
|
550
|
-
},
|
|
551
|
-
upload: {
|
|
552
|
-
deleteTip: "按 delete 键可删除",
|
|
553
|
-
delete: "删除",
|
|
554
|
-
preview: "查看图片",
|
|
555
|
-
continue: "继续上传"
|
|
556
|
-
},
|
|
557
|
-
table: {
|
|
558
|
-
emptyText: "暂无数据",
|
|
559
|
-
confirmFilter: "筛选",
|
|
560
|
-
resetFilter: "重置",
|
|
561
|
-
clearFilter: "全部",
|
|
562
|
-
sumText: "合计"
|
|
563
|
-
},
|
|
564
|
-
tree: {
|
|
565
|
-
emptyText: "暂无数据"
|
|
566
|
-
},
|
|
567
|
-
transfer: {
|
|
568
|
-
noMatch: "无匹配数据",
|
|
569
|
-
noData: "无数据",
|
|
570
|
-
titles: ["列表 1", "列表 2"],
|
|
571
|
-
filterPlaceholder: "请输入搜索内容",
|
|
572
|
-
noCheckedFormat: "共 {total} 项",
|
|
573
|
-
hasCheckedFormat: "已选 {checked}/{total} 项"
|
|
574
|
-
},
|
|
575
|
-
image: {
|
|
576
|
-
error: "加载失败"
|
|
577
|
-
},
|
|
578
|
-
pageHeader: {
|
|
579
|
-
title: "返回"
|
|
580
|
-
},
|
|
581
|
-
popconfirm: {
|
|
582
|
-
confirmButtonText: "确定",
|
|
583
|
-
cancelButtonText: "取消"
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
};
|
|
587
|
-
var isMergeableObject = function isMergeableObject2(value) {
|
|
588
|
-
return isNonNullObject(value) && !isSpecial(value);
|
|
589
|
-
};
|
|
590
|
-
function isNonNullObject(value) {
|
|
591
|
-
return !!value && typeof value === "object";
|
|
592
|
-
}
|
|
593
|
-
function isSpecial(value) {
|
|
594
|
-
var stringValue = Object.prototype.toString.call(value);
|
|
595
|
-
return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
|
|
596
|
-
}
|
|
597
|
-
var canUseSymbol = typeof Symbol === "function" && Symbol.for;
|
|
598
|
-
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
|
|
599
|
-
function isReactElement(value) {
|
|
600
|
-
return value.$$typeof === REACT_ELEMENT_TYPE;
|
|
601
|
-
}
|
|
602
|
-
function emptyTarget(val) {
|
|
603
|
-
return Array.isArray(val) ? [] : {};
|
|
604
|
-
}
|
|
605
|
-
function cloneIfNecessary(value, optionsArgument) {
|
|
606
|
-
var clone = optionsArgument && optionsArgument.clone === true;
|
|
607
|
-
return clone && isMergeableObject(value) ? deepmerge(emptyTarget(value), value, optionsArgument) : value;
|
|
608
|
-
}
|
|
609
|
-
function defaultArrayMerge(target, source, optionsArgument) {
|
|
610
|
-
var destination = target.slice();
|
|
611
|
-
source.forEach(function(e, i) {
|
|
612
|
-
if (typeof destination[i] === "undefined") {
|
|
613
|
-
destination[i] = cloneIfNecessary(e, optionsArgument);
|
|
614
|
-
} else if (isMergeableObject(e)) {
|
|
615
|
-
destination[i] = deepmerge(target[i], e, optionsArgument);
|
|
616
|
-
} else if (target.indexOf(e) === -1) {
|
|
617
|
-
destination.push(cloneIfNecessary(e, optionsArgument));
|
|
618
|
-
}
|
|
619
|
-
});
|
|
620
|
-
return destination;
|
|
621
|
-
}
|
|
622
|
-
function mergeObject(target, source, optionsArgument) {
|
|
623
|
-
var destination = {};
|
|
624
|
-
if (isMergeableObject(target)) {
|
|
625
|
-
Object.keys(target).forEach(function(key) {
|
|
626
|
-
destination[key] = cloneIfNecessary(target[key], optionsArgument);
|
|
627
|
-
});
|
|
628
|
-
}
|
|
629
|
-
Object.keys(source).forEach(function(key) {
|
|
630
|
-
if (!isMergeableObject(source[key]) || !target[key]) {
|
|
631
|
-
destination[key] = cloneIfNecessary(source[key], optionsArgument);
|
|
632
|
-
} else {
|
|
633
|
-
destination[key] = deepmerge(target[key], source[key], optionsArgument);
|
|
634
|
-
}
|
|
635
|
-
});
|
|
636
|
-
return destination;
|
|
637
|
-
}
|
|
638
|
-
function deepmerge(target, source, optionsArgument) {
|
|
639
|
-
var sourceIsArray = Array.isArray(source);
|
|
640
|
-
var targetIsArray = Array.isArray(target);
|
|
641
|
-
var options = optionsArgument || {
|
|
642
|
-
arrayMerge: defaultArrayMerge
|
|
643
|
-
};
|
|
644
|
-
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
645
|
-
if (!sourceAndTargetTypesMatch) {
|
|
646
|
-
return cloneIfNecessary(source, optionsArgument);
|
|
647
|
-
} else if (sourceIsArray) {
|
|
648
|
-
var arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
649
|
-
return arrayMerge(target, source, optionsArgument);
|
|
650
|
-
} else {
|
|
651
|
-
return mergeObject(target, source, optionsArgument);
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
deepmerge.all = function deepmergeAll(array, optionsArgument) {
|
|
655
|
-
if (!Array.isArray(array) || array.length < 2) {
|
|
656
|
-
throw new Error("first argument should be an array with at least two elements");
|
|
657
|
-
}
|
|
658
|
-
return array.reduce(function(prev, next) {
|
|
659
|
-
return deepmerge(prev, next, optionsArgument);
|
|
660
|
-
});
|
|
661
|
-
};
|
|
662
|
-
var deepmerge_1 = deepmerge;
|
|
663
|
-
var cjs = deepmerge_1;
|
|
664
|
-
const deepmerge$1 = /* @__PURE__ */ getDefaultExportFromCjs(cjs);
|
|
665
|
-
const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
666
|
-
function hasOwn$1(obj, key) {
|
|
667
|
-
return hasOwnProperty$1.call(obj, key);
|
|
668
|
-
}
|
|
669
|
-
const arrayFindIndex$1 = function(arr, pred) {
|
|
670
|
-
for (let i = 0; i !== arr.length; ++i) {
|
|
671
|
-
if (pred(arr[i])) {
|
|
672
|
-
return i;
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
return -1;
|
|
676
|
-
};
|
|
677
|
-
const arrayFind = function(arr, pred) {
|
|
678
|
-
const idx = arrayFindIndex$1(arr, pred);
|
|
679
|
-
return idx !== -1 ? arr[idx] : void 0;
|
|
680
|
-
};
|
|
681
|
-
const coerceTruthyValueToArray = function(val) {
|
|
682
|
-
if (Array.isArray(val)) {
|
|
683
|
-
return val;
|
|
684
|
-
} else if (val) {
|
|
685
|
-
return [val];
|
|
686
|
-
} else {
|
|
687
|
-
return [];
|
|
688
|
-
}
|
|
689
|
-
};
|
|
690
|
-
const RE_NARGS$1 = /(%|)\{([0-9a-zA-Z_]+)\}/g;
|
|
691
|
-
function Format(Vue2) {
|
|
692
|
-
function template(string, ...args) {
|
|
693
|
-
if (args.length === 1 && typeof args[0] === "object") {
|
|
694
|
-
args = args[0];
|
|
695
|
-
}
|
|
696
|
-
if (!args || !args.hasOwnProperty) {
|
|
697
|
-
args = {};
|
|
698
|
-
}
|
|
699
|
-
return string.replace(RE_NARGS$1, (match, prefix, i, index) => {
|
|
700
|
-
let result;
|
|
701
|
-
if (string[index - 1] === "{" && string[index + match.length] === "}") {
|
|
702
|
-
return i;
|
|
703
|
-
} else {
|
|
704
|
-
result = hasOwn$1(args, i) ? args[i] : null;
|
|
705
|
-
if (result === null || result === void 0) {
|
|
706
|
-
return "";
|
|
707
|
-
}
|
|
708
|
-
return result;
|
|
709
|
-
}
|
|
710
|
-
});
|
|
711
|
-
}
|
|
712
|
-
return template;
|
|
713
|
-
}
|
|
714
|
-
const format$2 = Format();
|
|
715
|
-
let lang$1 = defaultLang;
|
|
716
|
-
let merged$1 = false;
|
|
717
|
-
let i18nHandler$1 = function() {
|
|
718
|
-
const vuei18n = Object.getPrototypeOf(this || Vue).$t;
|
|
719
|
-
if (typeof vuei18n === "function" && !!Vue.locale) {
|
|
720
|
-
if (!merged$1) {
|
|
721
|
-
merged$1 = true;
|
|
722
|
-
Vue.locale(Vue.config.lang, deepmerge$1(lang$1, Vue.locale(Vue.config.lang) || {}, {
|
|
723
|
-
clone: true
|
|
724
|
-
}));
|
|
725
|
-
}
|
|
726
|
-
return vuei18n.apply(this, arguments);
|
|
727
|
-
}
|
|
728
|
-
};
|
|
729
|
-
const t$1 = function(path, options) {
|
|
730
|
-
let value = i18nHandler$1.apply(this, arguments);
|
|
731
|
-
if (value !== null && value !== void 0)
|
|
732
|
-
return value;
|
|
733
|
-
const array = path.split(".");
|
|
734
|
-
let current = lang$1;
|
|
735
|
-
for (let i = 0, j = array.length; i < j; i++) {
|
|
736
|
-
const property = array[i];
|
|
737
|
-
value = current[property];
|
|
738
|
-
if (i === j - 1)
|
|
739
|
-
return format$2(value, options);
|
|
740
|
-
if (!value)
|
|
741
|
-
return "";
|
|
742
|
-
current = value;
|
|
743
|
-
}
|
|
744
|
-
return "";
|
|
745
|
-
};
|
|
746
|
-
const weeks = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
|
|
747
|
-
const months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
|
|
748
|
-
const newArray = function(start, end) {
|
|
749
|
-
let result = [];
|
|
750
|
-
for (let i = start; i <= end; i++) {
|
|
751
|
-
result.push(i);
|
|
752
|
-
}
|
|
753
|
-
return result;
|
|
754
|
-
};
|
|
755
|
-
const getI18nSettings = () => {
|
|
756
|
-
return {
|
|
757
|
-
dayNamesShort: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
|
|
758
|
-
dayNames: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
|
|
759
|
-
monthNamesShort: months.map((month) => t$1(`el.datepicker.months.${month}`)),
|
|
760
|
-
monthNames: months.map((month, index) => t$1(`el.datepicker.month${index + 1}`)),
|
|
761
|
-
amPm: ["am", "pm"]
|
|
762
|
-
};
|
|
763
|
-
};
|
|
764
|
-
const toDate = function(date2) {
|
|
765
|
-
return isDate(date2) ? new Date(date2) : null;
|
|
766
|
-
};
|
|
767
|
-
const isDate = function(date2) {
|
|
768
|
-
if (date2 === null || date2 === void 0)
|
|
769
|
-
return false;
|
|
770
|
-
if (isNaN(new Date(date2).getTime()))
|
|
771
|
-
return false;
|
|
772
|
-
if (Array.isArray(date2))
|
|
773
|
-
return false;
|
|
774
|
-
return true;
|
|
775
|
-
};
|
|
776
|
-
const isDateObject = function(val) {
|
|
777
|
-
return val instanceof Date;
|
|
778
|
-
};
|
|
779
|
-
const formatDate = function(date2, format2) {
|
|
780
|
-
date2 = toDate(date2);
|
|
781
|
-
if (!date2)
|
|
782
|
-
return "";
|
|
783
|
-
return fecha.format(date2, format2 || "yyyy-MM-dd", getI18nSettings());
|
|
784
|
-
};
|
|
785
|
-
const parseDate = function(string, format2) {
|
|
786
|
-
return fecha.parse(string, format2 || "yyyy-MM-dd", getI18nSettings());
|
|
787
|
-
};
|
|
788
|
-
const getDayCountOfMonth = function(year, month) {
|
|
789
|
-
if (month === 3 || month === 5 || month === 8 || month === 10) {
|
|
790
|
-
return 30;
|
|
791
|
-
}
|
|
792
|
-
if (month === 1) {
|
|
793
|
-
if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
|
|
794
|
-
return 29;
|
|
795
|
-
} else {
|
|
796
|
-
return 28;
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
return 31;
|
|
800
|
-
};
|
|
801
|
-
const getDayCountOfYear = function(year) {
|
|
802
|
-
const isLeapYear = year % 400 === 0 || year % 100 !== 0 && year % 4 === 0;
|
|
803
|
-
return isLeapYear ? 366 : 365;
|
|
804
|
-
};
|
|
805
|
-
const getFirstDayOfMonth = function(date2) {
|
|
806
|
-
const temp = new Date(date2.getTime());
|
|
807
|
-
temp.setDate(1);
|
|
808
|
-
return temp.getDay();
|
|
809
|
-
};
|
|
810
|
-
const prevDate = function(date2, amount = 1) {
|
|
811
|
-
return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate() - amount);
|
|
812
|
-
};
|
|
813
|
-
const nextDate = function(date2, amount = 1) {
|
|
814
|
-
return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate() + amount);
|
|
815
|
-
};
|
|
816
|
-
const getStartDateOfMonth = function(year, month) {
|
|
817
|
-
const result = new Date(year, month, 1);
|
|
818
|
-
const day = result.getDay();
|
|
819
|
-
if (day === 0) {
|
|
820
|
-
return prevDate(result, 7);
|
|
821
|
-
} else {
|
|
822
|
-
return prevDate(result, day);
|
|
823
|
-
}
|
|
824
|
-
};
|
|
825
|
-
const getWeekNumber = function(src) {
|
|
826
|
-
if (!isDate(src))
|
|
827
|
-
return null;
|
|
828
|
-
const date2 = new Date(src.getTime());
|
|
829
|
-
date2.setHours(0, 0, 0, 0);
|
|
830
|
-
date2.setDate(date2.getDate() + 3 - (date2.getDay() + 6) % 7);
|
|
831
|
-
const week1 = new Date(date2.getFullYear(), 0, 4);
|
|
832
|
-
return 1 + Math.round(((date2.getTime() - week1.getTime()) / 864e5 - 3 + (week1.getDay() + 6) % 7) / 7);
|
|
833
|
-
};
|
|
834
|
-
const getRangeHours = function(ranges) {
|
|
835
|
-
const hours = [];
|
|
836
|
-
let disabledHours = [];
|
|
837
|
-
(ranges || []).forEach((range2) => {
|
|
838
|
-
const value = range2.map((date2) => date2.getHours());
|
|
839
|
-
disabledHours = disabledHours.concat(newArray(value[0], value[1]));
|
|
840
|
-
});
|
|
841
|
-
if (disabledHours.length) {
|
|
842
|
-
for (let i = 0; i < 24; i++) {
|
|
843
|
-
hours[i] = disabledHours.indexOf(i) === -1;
|
|
844
|
-
}
|
|
845
|
-
} else {
|
|
846
|
-
for (let i = 0; i < 24; i++) {
|
|
847
|
-
hours[i] = false;
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
return hours;
|
|
851
|
-
};
|
|
852
|
-
function setRangeData(arr, start, end, value) {
|
|
853
|
-
for (let i = start; i < end; i++) {
|
|
854
|
-
arr[i] = value;
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
const getRangeMinutes = function(ranges, hour) {
|
|
858
|
-
const minutes = new Array(60);
|
|
859
|
-
if (ranges.length > 0) {
|
|
860
|
-
ranges.forEach((range2) => {
|
|
861
|
-
const start = range2[0];
|
|
862
|
-
const end = range2[1];
|
|
863
|
-
const startHour = start.getHours();
|
|
864
|
-
const startMinute = start.getMinutes();
|
|
865
|
-
const endHour = end.getHours();
|
|
866
|
-
const endMinute = end.getMinutes();
|
|
867
|
-
if (startHour === hour && endHour !== hour) {
|
|
868
|
-
setRangeData(minutes, startMinute, 60, true);
|
|
869
|
-
} else if (startHour === hour && endHour === hour) {
|
|
870
|
-
setRangeData(minutes, startMinute, endMinute + 1, true);
|
|
871
|
-
} else if (startHour !== hour && endHour === hour) {
|
|
872
|
-
setRangeData(minutes, 0, endMinute + 1, true);
|
|
873
|
-
} else if (startHour < hour && endHour > hour) {
|
|
874
|
-
setRangeData(minutes, 0, 60, true);
|
|
875
|
-
}
|
|
876
|
-
});
|
|
877
|
-
} else {
|
|
878
|
-
setRangeData(minutes, 0, 60, true);
|
|
879
|
-
}
|
|
880
|
-
return minutes;
|
|
881
|
-
};
|
|
882
|
-
const range = function(n) {
|
|
883
|
-
return Array.apply(null, {
|
|
884
|
-
length: n
|
|
885
|
-
}).map((_, n2) => n2);
|
|
886
|
-
};
|
|
887
|
-
const modifyDate = function(date2, y, m, d) {
|
|
888
|
-
return new Date(y, m, d, date2.getHours(), date2.getMinutes(), date2.getSeconds(), date2.getMilliseconds());
|
|
889
|
-
};
|
|
890
|
-
const modifyTime = function(date2, h, m, s) {
|
|
891
|
-
return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), h, m, s, date2.getMilliseconds());
|
|
892
|
-
};
|
|
893
|
-
const modifyWithTimeString = (date2, time) => {
|
|
894
|
-
if (date2 == null || !time) {
|
|
895
|
-
return date2;
|
|
896
|
-
}
|
|
897
|
-
time = parseDate(time, "HH:mm:ss");
|
|
898
|
-
return modifyTime(date2, time.getHours(), time.getMinutes(), time.getSeconds());
|
|
899
|
-
};
|
|
900
|
-
const clearTime = function(date2) {
|
|
901
|
-
return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
|
|
902
|
-
};
|
|
903
|
-
const clearMilliseconds = function(date2) {
|
|
904
|
-
return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), date2.getHours(), date2.getMinutes(), date2.getSeconds(), 0);
|
|
905
|
-
};
|
|
906
|
-
const limitTimeRange = function(date2, ranges, format2 = "HH:mm:ss") {
|
|
907
|
-
if (ranges.length === 0)
|
|
908
|
-
return date2;
|
|
909
|
-
const normalizeDate = (date3) => fecha.parse(fecha.format(date3, format2), format2);
|
|
910
|
-
const ndate = normalizeDate(date2);
|
|
911
|
-
const nranges = ranges.map((range2) => range2.map(normalizeDate));
|
|
912
|
-
if (nranges.some((nrange) => ndate >= nrange[0] && ndate <= nrange[1]))
|
|
913
|
-
return date2;
|
|
914
|
-
let minDate = nranges[0][0];
|
|
915
|
-
let maxDate = nranges[0][0];
|
|
916
|
-
nranges.forEach((nrange) => {
|
|
917
|
-
minDate = new Date(Math.min(nrange[0], minDate));
|
|
918
|
-
maxDate = new Date(Math.max(nrange[1], minDate));
|
|
919
|
-
});
|
|
920
|
-
const ret = ndate < minDate ? minDate : maxDate;
|
|
921
|
-
return modifyDate(ret, date2.getFullYear(), date2.getMonth(), date2.getDate());
|
|
922
|
-
};
|
|
923
|
-
const timeWithinRange = function(date2, selectableRange, format2) {
|
|
924
|
-
const limitedDate = limitTimeRange(date2, selectableRange, format2);
|
|
925
|
-
return limitedDate.getTime() === date2.getTime();
|
|
926
|
-
};
|
|
927
|
-
const changeYearMonthAndClampDate = function(date2, year, month) {
|
|
928
|
-
const monthDate = Math.min(date2.getDate(), getDayCountOfMonth(year, month));
|
|
929
|
-
return modifyDate(date2, year, month, monthDate);
|
|
930
|
-
};
|
|
931
|
-
const prevMonth = function(date2) {
|
|
932
|
-
const year = date2.getFullYear();
|
|
933
|
-
const month = date2.getMonth();
|
|
934
|
-
return month === 0 ? changeYearMonthAndClampDate(date2, year - 1, 11) : changeYearMonthAndClampDate(date2, year, month - 1);
|
|
935
|
-
};
|
|
936
|
-
const nextMonth = function(date2) {
|
|
937
|
-
const year = date2.getFullYear();
|
|
938
|
-
const month = date2.getMonth();
|
|
939
|
-
return month === 11 ? changeYearMonthAndClampDate(date2, year + 1, 0) : changeYearMonthAndClampDate(date2, year, month + 1);
|
|
940
|
-
};
|
|
941
|
-
const prevYear = function(date2, amount = 1) {
|
|
942
|
-
const year = date2.getFullYear();
|
|
943
|
-
const month = date2.getMonth();
|
|
944
|
-
return changeYearMonthAndClampDate(date2, year - amount, month);
|
|
945
|
-
};
|
|
946
|
-
const nextYear = function(date2, amount = 1) {
|
|
947
|
-
const year = date2.getFullYear();
|
|
948
|
-
const month = date2.getMonth();
|
|
949
|
-
return changeYearMonthAndClampDate(date2, year + amount, month);
|
|
950
|
-
};
|
|
951
|
-
const extractDateFormat = function(format2) {
|
|
952
|
-
return format2.replace(/\W?m{1,2}|\W?ZZ/g, "").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, "").trim();
|
|
953
|
-
};
|
|
954
|
-
const extractTimeFormat = function(format2) {
|
|
955
|
-
return format2.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, "").trim();
|
|
956
|
-
};
|
|
957
177
|
function merge(target) {
|
|
958
178
|
for (let i = 1, j = arguments.length; i < j; i++) {
|
|
959
179
|
let source = arguments[i] || {};
|
|
@@ -1135,6 +355,10 @@ if (!Vue.prototype.$isServer) {
|
|
|
1135
355
|
}
|
|
1136
356
|
});
|
|
1137
357
|
}
|
|
358
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
359
|
+
function getDefaultExportFromCjs(x) {
|
|
360
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
361
|
+
}
|
|
1138
362
|
var popper$1 = { exports: {} };
|
|
1139
363
|
/**
|
|
1140
364
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
@@ -1423,7 +647,7 @@ var popper$1 = { exports: {} };
|
|
|
1423
647
|
modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
|
|
1424
648
|
}
|
|
1425
649
|
modifiersToRun.forEach((function(modifier) {
|
|
1426
|
-
if (
|
|
650
|
+
if (isFunction(modifier)) {
|
|
1427
651
|
data = modifier.call(this, data);
|
|
1428
652
|
}
|
|
1429
653
|
}).bind(this));
|
|
@@ -1735,7 +959,7 @@ var popper$1 = { exports: {} };
|
|
|
1735
959
|
element.style[prop] = styles[prop] + unit;
|
|
1736
960
|
});
|
|
1737
961
|
}
|
|
1738
|
-
function
|
|
962
|
+
function isFunction(functionToCheck) {
|
|
1739
963
|
var getType = {};
|
|
1740
964
|
return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
|
|
1741
965
|
}
|
|
@@ -1752,8 +976,8 @@ var popper$1 = { exports: {} };
|
|
|
1752
976
|
}
|
|
1753
977
|
function getBoundingClientRect(element) {
|
|
1754
978
|
var rect = element.getBoundingClientRect();
|
|
1755
|
-
var
|
|
1756
|
-
var rectTop =
|
|
979
|
+
var isIE = navigator.userAgent.indexOf("MSIE") != -1;
|
|
980
|
+
var rectTop = isIE && element.tagName === "HTML" ? -element.scrollTop : rect.top;
|
|
1757
981
|
return {
|
|
1758
982
|
left: rect.left,
|
|
1759
983
|
top: rectTop,
|
|
@@ -2057,34 +1281,34 @@ const DEFAULT_FORMATS = {
|
|
|
2057
1281
|
year: "yyyy"
|
|
2058
1282
|
};
|
|
2059
1283
|
const HAVE_TRIGGER_TYPES = ["date", "datetime", "time", "time-select", "week", "month", "year", "daterange", "monthrange", "timerange", "datetimerange", "dates"];
|
|
2060
|
-
const DATE_FORMATTER = function(value,
|
|
2061
|
-
if (
|
|
1284
|
+
const DATE_FORMATTER = function(value, format) {
|
|
1285
|
+
if (format === "timestamp")
|
|
2062
1286
|
return value.getTime();
|
|
2063
|
-
return formatDate(value,
|
|
1287
|
+
return formatDate(value, format);
|
|
2064
1288
|
};
|
|
2065
|
-
const DATE_PARSER = function(text,
|
|
2066
|
-
if (
|
|
1289
|
+
const DATE_PARSER = function(text, format) {
|
|
1290
|
+
if (format === "timestamp")
|
|
2067
1291
|
return new Date(Number(text));
|
|
2068
|
-
return parseDate(text,
|
|
1292
|
+
return parseDate(text, format);
|
|
2069
1293
|
};
|
|
2070
|
-
const RANGE_FORMATTER = function(value,
|
|
1294
|
+
const RANGE_FORMATTER = function(value, format) {
|
|
2071
1295
|
if (Array.isArray(value) && value.length === 2) {
|
|
2072
1296
|
const start = value[0];
|
|
2073
1297
|
const end = value[1];
|
|
2074
1298
|
if (start && end) {
|
|
2075
|
-
return [DATE_FORMATTER(start,
|
|
1299
|
+
return [DATE_FORMATTER(start, format), DATE_FORMATTER(end, format)];
|
|
2076
1300
|
}
|
|
2077
1301
|
}
|
|
2078
1302
|
return "";
|
|
2079
1303
|
};
|
|
2080
|
-
const RANGE_PARSER = function(array,
|
|
1304
|
+
const RANGE_PARSER = function(array, format, separator) {
|
|
2081
1305
|
if (!Array.isArray(array)) {
|
|
2082
1306
|
array = array.split(separator);
|
|
2083
1307
|
}
|
|
2084
1308
|
if (array.length === 2) {
|
|
2085
1309
|
const range1 = array[0];
|
|
2086
1310
|
const range2 = array[1];
|
|
2087
|
-
return [DATE_PARSER(range1,
|
|
1311
|
+
return [DATE_PARSER(range1, format), DATE_PARSER(range2, format)];
|
|
2088
1312
|
}
|
|
2089
1313
|
return [];
|
|
2090
1314
|
};
|
|
@@ -2102,7 +1326,7 @@ const TYPE_VALUE_RESOLVER_MAP = {
|
|
|
2102
1326
|
}
|
|
2103
1327
|
},
|
|
2104
1328
|
week: {
|
|
2105
|
-
formatter(value,
|
|
1329
|
+
formatter(value, format) {
|
|
2106
1330
|
const week = getWeekNumber(value);
|
|
2107
1331
|
const month = value.getMonth();
|
|
2108
1332
|
const trueDate = new Date(value);
|
|
@@ -2110,12 +1334,12 @@ const TYPE_VALUE_RESOLVER_MAP = {
|
|
|
2110
1334
|
trueDate.setHours(0, 0, 0, 0);
|
|
2111
1335
|
trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
|
|
2112
1336
|
}
|
|
2113
|
-
let
|
|
2114
|
-
|
|
2115
|
-
return
|
|
1337
|
+
let date = formatDate(trueDate, format);
|
|
1338
|
+
date = /WW/.test(date) ? date.replace(/WW/, week < 10 ? "0" + week : week) : date.replace(/W/, week);
|
|
1339
|
+
return date;
|
|
2116
1340
|
},
|
|
2117
|
-
parser(text,
|
|
2118
|
-
return TYPE_VALUE_RESOLVER_MAP.date.parser(text,
|
|
1341
|
+
parser(text, format) {
|
|
1342
|
+
return TYPE_VALUE_RESOLVER_MAP.date.parser(text, format);
|
|
2119
1343
|
}
|
|
2120
1344
|
},
|
|
2121
1345
|
date: {
|
|
@@ -2170,11 +1394,11 @@ const TYPE_VALUE_RESOLVER_MAP = {
|
|
|
2170
1394
|
}
|
|
2171
1395
|
},
|
|
2172
1396
|
dates: {
|
|
2173
|
-
formatter(value,
|
|
2174
|
-
return value.map((
|
|
1397
|
+
formatter(value, format) {
|
|
1398
|
+
return value.map((date) => DATE_FORMATTER(date, format));
|
|
2175
1399
|
},
|
|
2176
|
-
parser(value,
|
|
2177
|
-
return (typeof value === "string" ? value.split(", ") : value).map((
|
|
1400
|
+
parser(value, format) {
|
|
1401
|
+
return (typeof value === "string" ? value.split(", ") : value).map((date) => date instanceof Date ? date : DATE_PARSER(date, format));
|
|
2178
1402
|
}
|
|
2179
1403
|
}
|
|
2180
1404
|
};
|
|
@@ -2187,15 +1411,15 @@ const parseAsFormatAndType = (value, customFormat, type, rangeSeparator = "-") =
|
|
|
2187
1411
|
if (!value)
|
|
2188
1412
|
return null;
|
|
2189
1413
|
const parser = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP["default"]).parser;
|
|
2190
|
-
const
|
|
2191
|
-
return parser(value,
|
|
1414
|
+
const format = customFormat || DEFAULT_FORMATS[type];
|
|
1415
|
+
return parser(value, format, rangeSeparator);
|
|
2192
1416
|
};
|
|
2193
1417
|
const formatAsFormatAndType = (value, customFormat, type) => {
|
|
2194
1418
|
if (!value)
|
|
2195
1419
|
return null;
|
|
2196
1420
|
const formatter = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP["default"]).formatter;
|
|
2197
|
-
const
|
|
2198
|
-
return formatter(value,
|
|
1421
|
+
const format = customFormat || DEFAULT_FORMATS[type];
|
|
1422
|
+
return formatter(value, format);
|
|
2199
1423
|
};
|
|
2200
1424
|
const valueEquals = function(a, b) {
|
|
2201
1425
|
const dateEquals = function(a2, b2) {
|
|
@@ -2222,11 +1446,11 @@ const valueEquals = function(a, b) {
|
|
|
2222
1446
|
}
|
|
2223
1447
|
return false;
|
|
2224
1448
|
};
|
|
2225
|
-
const isString
|
|
1449
|
+
const isString = function(val) {
|
|
2226
1450
|
return typeof val === "string" || val instanceof String;
|
|
2227
1451
|
};
|
|
2228
1452
|
const validator = function(val) {
|
|
2229
|
-
return val === null || val === void 0 || isString
|
|
1453
|
+
return val === null || val === void 0 || isString(val) || Array.isArray(val) && val.length === 2 && val.every(isString);
|
|
2230
1454
|
};
|
|
2231
1455
|
const _sfc_main$9 = {
|
|
2232
1456
|
directives: {
|
|
@@ -2478,12 +1702,12 @@ const _sfc_main$9 = {
|
|
|
2478
1702
|
return value;
|
|
2479
1703
|
}
|
|
2480
1704
|
},
|
|
2481
|
-
formatToValue(
|
|
2482
|
-
const isFormattable = isDateObject(
|
|
1705
|
+
formatToValue(date) {
|
|
1706
|
+
const isFormattable = isDateObject(date) || Array.isArray(date) && date.every(isDateObject);
|
|
2483
1707
|
if (this.valueFormat && isFormattable) {
|
|
2484
|
-
return formatAsFormatAndType(
|
|
1708
|
+
return formatAsFormatAndType(date, this.valueFormat, this.type, this.rangeSeparator);
|
|
2485
1709
|
} else {
|
|
2486
|
-
return
|
|
1710
|
+
return date;
|
|
2487
1711
|
}
|
|
2488
1712
|
},
|
|
2489
1713
|
// {parse, formatTo} String deals with user input
|
|
@@ -2680,17 +1904,17 @@ const _sfc_main$9 = {
|
|
|
2680
1904
|
this.picker.selectionMode = this.selectionMode;
|
|
2681
1905
|
this.picker.unlinkPanels = this.unlinkPanels;
|
|
2682
1906
|
this.picker.arrowControl = this.arrowControl || this.timeArrowControl || false;
|
|
2683
|
-
this.$watch("format", (
|
|
2684
|
-
this.picker.format =
|
|
1907
|
+
this.$watch("format", (format) => {
|
|
1908
|
+
this.picker.format = format;
|
|
2685
1909
|
});
|
|
2686
1910
|
const updateOptions = () => {
|
|
2687
1911
|
const options = this.pickerOptions;
|
|
2688
1912
|
if (options && options.selectableRange) {
|
|
2689
1913
|
let ranges = options.selectableRange;
|
|
2690
1914
|
const parser = TYPE_VALUE_RESOLVER_MAP.datetimerange.parser;
|
|
2691
|
-
const
|
|
1915
|
+
const format = DEFAULT_FORMATS.timerange;
|
|
2692
1916
|
ranges = Array.isArray(ranges) ? ranges : [ranges];
|
|
2693
|
-
this.picker.selectableRange = ranges.map((range2) => parser(range2,
|
|
1917
|
+
this.picker.selectableRange = ranges.map((range2) => parser(range2, format, this.rangeSeparator));
|
|
2694
1918
|
}
|
|
2695
1919
|
for (const option in options) {
|
|
2696
1920
|
if (options.hasOwnProperty(option) && // 忽略 time-picker 的该配置项
|
|
@@ -2709,10 +1933,10 @@ const _sfc_main$9 = {
|
|
|
2709
1933
|
this.$el.appendChild(this.picker.$el);
|
|
2710
1934
|
this.picker.resetView && this.picker.resetView();
|
|
2711
1935
|
this.picker.$on("dodestroy", this.doDestroy);
|
|
2712
|
-
this.picker.$on("pick", (
|
|
1936
|
+
this.picker.$on("pick", (date = "", visible = false) => {
|
|
2713
1937
|
this.userInput = null;
|
|
2714
1938
|
this.pickerVisible = this.picker.visible = visible;
|
|
2715
|
-
this.emitInput(
|
|
1939
|
+
this.emitInput(date);
|
|
2716
1940
|
this.picker.resetView && this.picker.resetView();
|
|
2717
1941
|
});
|
|
2718
1942
|
this.picker.$on("select-range", (start, end, pos) => {
|
|
@@ -2890,494 +2114,6 @@ var _sfc_render$9 = function render() {
|
|
|
2890
2114
|
var _sfc_staticRenderFns$9 = [];
|
|
2891
2115
|
var __component__$9 = /* @__PURE__ */ normalizeComponent(_sfc_main$9, _sfc_render$9, _sfc_staticRenderFns$9, false, null, null, null, null);
|
|
2892
2116
|
const Picker = __component__$9.exports;
|
|
2893
|
-
var locale = {};
|
|
2894
|
-
var zhCN = {};
|
|
2895
|
-
zhCN.__esModule = true;
|
|
2896
|
-
zhCN.default = {
|
|
2897
|
-
el: {
|
|
2898
|
-
colorpicker: {
|
|
2899
|
-
confirm: "确定",
|
|
2900
|
-
clear: "清空"
|
|
2901
|
-
},
|
|
2902
|
-
datepicker: {
|
|
2903
|
-
now: "此刻",
|
|
2904
|
-
today: "今天",
|
|
2905
|
-
cancel: "取消",
|
|
2906
|
-
clear: "清空",
|
|
2907
|
-
confirm: "确定",
|
|
2908
|
-
selectDate: "选择日期",
|
|
2909
|
-
selectTime: "选择时间",
|
|
2910
|
-
startDate: "开始日期",
|
|
2911
|
-
startTime: "开始时间",
|
|
2912
|
-
endDate: "结束日期",
|
|
2913
|
-
endTime: "结束时间",
|
|
2914
|
-
prevYear: "前一年",
|
|
2915
|
-
nextYear: "后一年",
|
|
2916
|
-
prevMonth: "上个月",
|
|
2917
|
-
nextMonth: "下个月",
|
|
2918
|
-
year: "年",
|
|
2919
|
-
month1: "1 月",
|
|
2920
|
-
month2: "2 月",
|
|
2921
|
-
month3: "3 月",
|
|
2922
|
-
month4: "4 月",
|
|
2923
|
-
month5: "5 月",
|
|
2924
|
-
month6: "6 月",
|
|
2925
|
-
month7: "7 月",
|
|
2926
|
-
month8: "8 月",
|
|
2927
|
-
month9: "9 月",
|
|
2928
|
-
month10: "10 月",
|
|
2929
|
-
month11: "11 月",
|
|
2930
|
-
month12: "12 月",
|
|
2931
|
-
// week: '周次',
|
|
2932
|
-
weeks: {
|
|
2933
|
-
sun: "日",
|
|
2934
|
-
mon: "一",
|
|
2935
|
-
tue: "二",
|
|
2936
|
-
wed: "三",
|
|
2937
|
-
thu: "四",
|
|
2938
|
-
fri: "五",
|
|
2939
|
-
sat: "六"
|
|
2940
|
-
},
|
|
2941
|
-
months: {
|
|
2942
|
-
jan: "一月",
|
|
2943
|
-
feb: "二月",
|
|
2944
|
-
mar: "三月",
|
|
2945
|
-
apr: "四月",
|
|
2946
|
-
may: "五月",
|
|
2947
|
-
jun: "六月",
|
|
2948
|
-
jul: "七月",
|
|
2949
|
-
aug: "八月",
|
|
2950
|
-
sep: "九月",
|
|
2951
|
-
oct: "十月",
|
|
2952
|
-
nov: "十一月",
|
|
2953
|
-
dec: "十二月"
|
|
2954
|
-
}
|
|
2955
|
-
},
|
|
2956
|
-
select: {
|
|
2957
|
-
loading: "加载中",
|
|
2958
|
-
noMatch: "无匹配数据",
|
|
2959
|
-
noData: "无数据",
|
|
2960
|
-
placeholder: "请选择"
|
|
2961
|
-
},
|
|
2962
|
-
cascader: {
|
|
2963
|
-
noMatch: "无匹配数据",
|
|
2964
|
-
loading: "加载中",
|
|
2965
|
-
placeholder: "请选择",
|
|
2966
|
-
noData: "暂无数据"
|
|
2967
|
-
},
|
|
2968
|
-
pagination: {
|
|
2969
|
-
goto: "前往",
|
|
2970
|
-
pagesize: "条/页",
|
|
2971
|
-
total: "共 {total} 条",
|
|
2972
|
-
pageClassifier: "页"
|
|
2973
|
-
},
|
|
2974
|
-
messagebox: {
|
|
2975
|
-
title: "提示",
|
|
2976
|
-
confirm: "确定",
|
|
2977
|
-
cancel: "取消",
|
|
2978
|
-
error: "输入的数据不合法!"
|
|
2979
|
-
},
|
|
2980
|
-
upload: {
|
|
2981
|
-
deleteTip: "按 delete 键可删除",
|
|
2982
|
-
delete: "删除",
|
|
2983
|
-
preview: "查看图片",
|
|
2984
|
-
continue: "继续上传"
|
|
2985
|
-
},
|
|
2986
|
-
table: {
|
|
2987
|
-
emptyText: "暂无数据",
|
|
2988
|
-
confirmFilter: "筛选",
|
|
2989
|
-
resetFilter: "重置",
|
|
2990
|
-
clearFilter: "全部",
|
|
2991
|
-
sumText: "合计"
|
|
2992
|
-
},
|
|
2993
|
-
tree: {
|
|
2994
|
-
emptyText: "暂无数据"
|
|
2995
|
-
},
|
|
2996
|
-
transfer: {
|
|
2997
|
-
noMatch: "无匹配数据",
|
|
2998
|
-
noData: "无数据",
|
|
2999
|
-
titles: ["列表 1", "列表 2"],
|
|
3000
|
-
filterPlaceholder: "请输入搜索内容",
|
|
3001
|
-
noCheckedFormat: "共 {total} 项",
|
|
3002
|
-
hasCheckedFormat: "已选 {checked}/{total} 项"
|
|
3003
|
-
},
|
|
3004
|
-
image: {
|
|
3005
|
-
error: "加载失败"
|
|
3006
|
-
},
|
|
3007
|
-
pageHeader: {
|
|
3008
|
-
title: "返回"
|
|
3009
|
-
},
|
|
3010
|
-
popconfirm: {
|
|
3011
|
-
confirmButtonText: "确定",
|
|
3012
|
-
cancelButtonText: "取消"
|
|
3013
|
-
}
|
|
3014
|
-
}
|
|
3015
|
-
};
|
|
3016
|
-
var format$1 = {};
|
|
3017
|
-
var util = {};
|
|
3018
|
-
var types = {};
|
|
3019
|
-
types.__esModule = true;
|
|
3020
|
-
types.isString = isString;
|
|
3021
|
-
types.isObject = isObject;
|
|
3022
|
-
types.isHtmlElement = isHtmlElement;
|
|
3023
|
-
function isString(obj) {
|
|
3024
|
-
return Object.prototype.toString.call(obj) === "[object String]";
|
|
3025
|
-
}
|
|
3026
|
-
function isObject(obj) {
|
|
3027
|
-
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
3028
|
-
}
|
|
3029
|
-
function isHtmlElement(node) {
|
|
3030
|
-
return node && node.nodeType === Node.ELEMENT_NODE;
|
|
3031
|
-
}
|
|
3032
|
-
types.isFunction = function isFunction(functionToCheck) {
|
|
3033
|
-
var getType = {};
|
|
3034
|
-
return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
|
|
3035
|
-
};
|
|
3036
|
-
types.isUndefined = function isUndefined(val) {
|
|
3037
|
-
return val === void 0;
|
|
3038
|
-
};
|
|
3039
|
-
types.isDefined = function isDefined(val) {
|
|
3040
|
-
return val !== void 0 && val !== null;
|
|
3041
|
-
};
|
|
3042
|
-
util.__esModule = true;
|
|
3043
|
-
util.isEmpty = util.isEqual = util.arrayEquals = util.looseEqual = util.capitalize = util.kebabCase = util.autoprefixer = util.isFirefox = util.isEdge = util.isIE = util.coerceTruthyValueToArray = util.arrayFind = util.arrayFindIndex = util.escapeRegexpString = util.valueEquals = util.generateId = util.getValueByPath = void 0;
|
|
3044
|
-
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
3045
|
-
return typeof obj;
|
|
3046
|
-
} : function(obj) {
|
|
3047
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
3048
|
-
};
|
|
3049
|
-
util.noop = noop;
|
|
3050
|
-
util.hasOwn = hasOwn;
|
|
3051
|
-
util.toObject = toObject;
|
|
3052
|
-
util.getPropByPath = getPropByPath;
|
|
3053
|
-
util.rafThrottle = rafThrottle;
|
|
3054
|
-
util.objToArray = objToArray;
|
|
3055
|
-
var _vue$1 = Vue;
|
|
3056
|
-
var _vue2$1 = _interopRequireDefault$1(_vue$1);
|
|
3057
|
-
var _types = types;
|
|
3058
|
-
function _interopRequireDefault$1(obj) {
|
|
3059
|
-
return obj && obj.__esModule ? obj : {
|
|
3060
|
-
default: obj
|
|
3061
|
-
};
|
|
3062
|
-
}
|
|
3063
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
3064
|
-
function noop() {
|
|
3065
|
-
}
|
|
3066
|
-
function hasOwn(obj, key) {
|
|
3067
|
-
return hasOwnProperty.call(obj, key);
|
|
3068
|
-
}
|
|
3069
|
-
function extend(to, _from) {
|
|
3070
|
-
for (var key in _from) {
|
|
3071
|
-
to[key] = _from[key];
|
|
3072
|
-
}
|
|
3073
|
-
return to;
|
|
3074
|
-
}
|
|
3075
|
-
function toObject(arr) {
|
|
3076
|
-
var res = {};
|
|
3077
|
-
for (var i = 0; i < arr.length; i++) {
|
|
3078
|
-
if (arr[i]) {
|
|
3079
|
-
extend(res, arr[i]);
|
|
3080
|
-
}
|
|
3081
|
-
}
|
|
3082
|
-
return res;
|
|
3083
|
-
}
|
|
3084
|
-
util.getValueByPath = function getValueByPath(object, prop) {
|
|
3085
|
-
prop = prop || "";
|
|
3086
|
-
var paths = prop.split(".");
|
|
3087
|
-
var current = object;
|
|
3088
|
-
var result = null;
|
|
3089
|
-
for (var i = 0, j = paths.length; i < j; i++) {
|
|
3090
|
-
var path = paths[i];
|
|
3091
|
-
if (!current)
|
|
3092
|
-
break;
|
|
3093
|
-
if (i === j - 1) {
|
|
3094
|
-
result = current[path];
|
|
3095
|
-
break;
|
|
3096
|
-
}
|
|
3097
|
-
current = current[path];
|
|
3098
|
-
}
|
|
3099
|
-
return result;
|
|
3100
|
-
};
|
|
3101
|
-
function getPropByPath(obj, path, strict) {
|
|
3102
|
-
var tempObj = obj;
|
|
3103
|
-
path = path.replace(/\[(\w+)\]/g, ".$1");
|
|
3104
|
-
path = path.replace(/^\./, "");
|
|
3105
|
-
var keyArr = path.split(".");
|
|
3106
|
-
var i = 0;
|
|
3107
|
-
for (var len = keyArr.length; i < len - 1; ++i) {
|
|
3108
|
-
if (!tempObj && !strict)
|
|
3109
|
-
break;
|
|
3110
|
-
var key = keyArr[i];
|
|
3111
|
-
if (key in tempObj) {
|
|
3112
|
-
tempObj = tempObj[key];
|
|
3113
|
-
} else {
|
|
3114
|
-
if (strict) {
|
|
3115
|
-
throw new Error("please transfer a valid prop path to form item!");
|
|
3116
|
-
}
|
|
3117
|
-
break;
|
|
3118
|
-
}
|
|
3119
|
-
}
|
|
3120
|
-
return {
|
|
3121
|
-
o: tempObj,
|
|
3122
|
-
k: keyArr[i],
|
|
3123
|
-
v: tempObj ? tempObj[keyArr[i]] : null
|
|
3124
|
-
};
|
|
3125
|
-
}
|
|
3126
|
-
util.generateId = function generateId() {
|
|
3127
|
-
return Math.floor(Math.random() * 1e4);
|
|
3128
|
-
};
|
|
3129
|
-
util.valueEquals = function valueEquals2(a, b) {
|
|
3130
|
-
if (a === b)
|
|
3131
|
-
return true;
|
|
3132
|
-
if (!(a instanceof Array))
|
|
3133
|
-
return false;
|
|
3134
|
-
if (!(b instanceof Array))
|
|
3135
|
-
return false;
|
|
3136
|
-
if (a.length !== b.length)
|
|
3137
|
-
return false;
|
|
3138
|
-
for (var i = 0; i !== a.length; ++i) {
|
|
3139
|
-
if (a[i] !== b[i])
|
|
3140
|
-
return false;
|
|
3141
|
-
}
|
|
3142
|
-
return true;
|
|
3143
|
-
};
|
|
3144
|
-
util.escapeRegexpString = function escapeRegexpString() {
|
|
3145
|
-
var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
3146
|
-
return String(value).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
|
|
3147
|
-
};
|
|
3148
|
-
var arrayFindIndex = util.arrayFindIndex = function arrayFindIndex2(arr, pred) {
|
|
3149
|
-
for (var i = 0; i !== arr.length; ++i) {
|
|
3150
|
-
if (pred(arr[i])) {
|
|
3151
|
-
return i;
|
|
3152
|
-
}
|
|
3153
|
-
}
|
|
3154
|
-
return -1;
|
|
3155
|
-
};
|
|
3156
|
-
util.arrayFind = function arrayFind2(arr, pred) {
|
|
3157
|
-
var idx = arrayFindIndex(arr, pred);
|
|
3158
|
-
return idx !== -1 ? arr[idx] : void 0;
|
|
3159
|
-
};
|
|
3160
|
-
util.coerceTruthyValueToArray = function coerceTruthyValueToArray2(val) {
|
|
3161
|
-
if (Array.isArray(val)) {
|
|
3162
|
-
return val;
|
|
3163
|
-
} else if (val) {
|
|
3164
|
-
return [val];
|
|
3165
|
-
} else {
|
|
3166
|
-
return [];
|
|
3167
|
-
}
|
|
3168
|
-
};
|
|
3169
|
-
util.isIE = function isIE() {
|
|
3170
|
-
return !_vue2$1.default.prototype.$isServer && !isNaN(Number(document.documentMode));
|
|
3171
|
-
};
|
|
3172
|
-
util.isEdge = function isEdge() {
|
|
3173
|
-
return !_vue2$1.default.prototype.$isServer && navigator.userAgent.indexOf("Edge") > -1;
|
|
3174
|
-
};
|
|
3175
|
-
util.isFirefox = function isFirefox() {
|
|
3176
|
-
return !_vue2$1.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
|
|
3177
|
-
};
|
|
3178
|
-
util.autoprefixer = function autoprefixer(style) {
|
|
3179
|
-
if ((typeof style === "undefined" ? "undefined" : _typeof$1(style)) !== "object")
|
|
3180
|
-
return style;
|
|
3181
|
-
var rules = ["transform", "transition", "animation"];
|
|
3182
|
-
var prefixes = ["ms-", "webkit-"];
|
|
3183
|
-
rules.forEach(function(rule) {
|
|
3184
|
-
var value = style[rule];
|
|
3185
|
-
if (rule && value) {
|
|
3186
|
-
prefixes.forEach(function(prefix) {
|
|
3187
|
-
style[prefix + rule] = value;
|
|
3188
|
-
});
|
|
3189
|
-
}
|
|
3190
|
-
});
|
|
3191
|
-
return style;
|
|
3192
|
-
};
|
|
3193
|
-
util.kebabCase = function kebabCase(str) {
|
|
3194
|
-
var hyphenateRE = /([^-])([A-Z])/g;
|
|
3195
|
-
return str.replace(hyphenateRE, "$1-$2").replace(hyphenateRE, "$1-$2").toLowerCase();
|
|
3196
|
-
};
|
|
3197
|
-
util.capitalize = function capitalize(str) {
|
|
3198
|
-
if (!(0, _types.isString)(str))
|
|
3199
|
-
return str;
|
|
3200
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
3201
|
-
};
|
|
3202
|
-
var looseEqual = util.looseEqual = function looseEqual2(a, b) {
|
|
3203
|
-
var isObjectA = (0, _types.isObject)(a);
|
|
3204
|
-
var isObjectB = (0, _types.isObject)(b);
|
|
3205
|
-
if (isObjectA && isObjectB) {
|
|
3206
|
-
return JSON.stringify(a) === JSON.stringify(b);
|
|
3207
|
-
} else if (!isObjectA && !isObjectB) {
|
|
3208
|
-
return String(a) === String(b);
|
|
3209
|
-
} else {
|
|
3210
|
-
return false;
|
|
3211
|
-
}
|
|
3212
|
-
};
|
|
3213
|
-
var arrayEquals = util.arrayEquals = function arrayEquals2(arrayA, arrayB) {
|
|
3214
|
-
arrayA = arrayA || [];
|
|
3215
|
-
arrayB = arrayB || [];
|
|
3216
|
-
if (arrayA.length !== arrayB.length) {
|
|
3217
|
-
return false;
|
|
3218
|
-
}
|
|
3219
|
-
for (var i = 0; i < arrayA.length; i++) {
|
|
3220
|
-
if (!looseEqual(arrayA[i], arrayB[i])) {
|
|
3221
|
-
return false;
|
|
3222
|
-
}
|
|
3223
|
-
}
|
|
3224
|
-
return true;
|
|
3225
|
-
};
|
|
3226
|
-
util.isEqual = function isEqual(value1, value2) {
|
|
3227
|
-
if (Array.isArray(value1) && Array.isArray(value2)) {
|
|
3228
|
-
return arrayEquals(value1, value2);
|
|
3229
|
-
}
|
|
3230
|
-
return looseEqual(value1, value2);
|
|
3231
|
-
};
|
|
3232
|
-
var isEmpty = util.isEmpty = function isEmpty2(val) {
|
|
3233
|
-
if (val == null)
|
|
3234
|
-
return true;
|
|
3235
|
-
if (typeof val === "boolean")
|
|
3236
|
-
return false;
|
|
3237
|
-
if (typeof val === "number")
|
|
3238
|
-
return !val;
|
|
3239
|
-
if (val instanceof Error)
|
|
3240
|
-
return val.message === "";
|
|
3241
|
-
switch (Object.prototype.toString.call(val)) {
|
|
3242
|
-
case "[object String]":
|
|
3243
|
-
case "[object Array]":
|
|
3244
|
-
return !val.length;
|
|
3245
|
-
case "[object File]":
|
|
3246
|
-
case "[object Map]":
|
|
3247
|
-
case "[object Set]": {
|
|
3248
|
-
return !val.size;
|
|
3249
|
-
}
|
|
3250
|
-
case "[object Object]": {
|
|
3251
|
-
return !Object.keys(val).length;
|
|
3252
|
-
}
|
|
3253
|
-
}
|
|
3254
|
-
return false;
|
|
3255
|
-
};
|
|
3256
|
-
function rafThrottle(fn) {
|
|
3257
|
-
var locked = false;
|
|
3258
|
-
return function() {
|
|
3259
|
-
var _this = this;
|
|
3260
|
-
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
3261
|
-
args[_key] = arguments[_key];
|
|
3262
|
-
}
|
|
3263
|
-
if (locked)
|
|
3264
|
-
return;
|
|
3265
|
-
locked = true;
|
|
3266
|
-
window.requestAnimationFrame(function(_) {
|
|
3267
|
-
fn.apply(_this, args);
|
|
3268
|
-
locked = false;
|
|
3269
|
-
});
|
|
3270
|
-
};
|
|
3271
|
-
}
|
|
3272
|
-
function objToArray(obj) {
|
|
3273
|
-
if (Array.isArray(obj)) {
|
|
3274
|
-
return obj;
|
|
3275
|
-
}
|
|
3276
|
-
return isEmpty(obj) ? [] : [obj];
|
|
3277
|
-
}
|
|
3278
|
-
format$1.__esModule = true;
|
|
3279
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
3280
|
-
return typeof obj;
|
|
3281
|
-
} : function(obj) {
|
|
3282
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
3283
|
-
};
|
|
3284
|
-
format$1.default = function(Vue2) {
|
|
3285
|
-
function template(string) {
|
|
3286
|
-
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
3287
|
-
args[_key - 1] = arguments[_key];
|
|
3288
|
-
}
|
|
3289
|
-
if (args.length === 1 && _typeof(args[0]) === "object") {
|
|
3290
|
-
args = args[0];
|
|
3291
|
-
}
|
|
3292
|
-
if (!args || !args.hasOwnProperty) {
|
|
3293
|
-
args = {};
|
|
3294
|
-
}
|
|
3295
|
-
return string.replace(RE_NARGS, function(match, prefix, i, index) {
|
|
3296
|
-
var result = void 0;
|
|
3297
|
-
if (string[index - 1] === "{" && string[index + match.length] === "}") {
|
|
3298
|
-
return i;
|
|
3299
|
-
} else {
|
|
3300
|
-
result = (0, _util.hasOwn)(args, i) ? args[i] : null;
|
|
3301
|
-
if (result === null || result === void 0) {
|
|
3302
|
-
return "";
|
|
3303
|
-
}
|
|
3304
|
-
return result;
|
|
3305
|
-
}
|
|
3306
|
-
});
|
|
3307
|
-
}
|
|
3308
|
-
return template;
|
|
3309
|
-
};
|
|
3310
|
-
var _util = util;
|
|
3311
|
-
var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
|
|
3312
|
-
locale.__esModule = true;
|
|
3313
|
-
locale.i18n = locale.use = locale.t = void 0;
|
|
3314
|
-
var _zhCN = zhCN;
|
|
3315
|
-
var _zhCN2 = _interopRequireDefault(_zhCN);
|
|
3316
|
-
var _vue = Vue;
|
|
3317
|
-
var _vue2 = _interopRequireDefault(_vue);
|
|
3318
|
-
var _deepmerge = cjs;
|
|
3319
|
-
var _deepmerge2 = _interopRequireDefault(_deepmerge);
|
|
3320
|
-
var _format = format$1;
|
|
3321
|
-
var _format2 = _interopRequireDefault(_format);
|
|
3322
|
-
function _interopRequireDefault(obj) {
|
|
3323
|
-
return obj && obj.__esModule ? obj : {
|
|
3324
|
-
default: obj
|
|
3325
|
-
};
|
|
3326
|
-
}
|
|
3327
|
-
var format = (0, _format2.default)(_vue2.default);
|
|
3328
|
-
var lang = _zhCN2.default;
|
|
3329
|
-
var merged = false;
|
|
3330
|
-
var i18nHandler = function i18nHandler2() {
|
|
3331
|
-
var vuei18n = Object.getPrototypeOf(this || _vue2.default).$t;
|
|
3332
|
-
if (typeof vuei18n === "function" && !!_vue2.default.locale) {
|
|
3333
|
-
if (!merged) {
|
|
3334
|
-
merged = true;
|
|
3335
|
-
_vue2.default.locale(_vue2.default.config.lang, (0, _deepmerge2.default)(lang, _vue2.default.locale(_vue2.default.config.lang) || {}, {
|
|
3336
|
-
clone: true
|
|
3337
|
-
}));
|
|
3338
|
-
}
|
|
3339
|
-
return vuei18n.apply(this, arguments);
|
|
3340
|
-
}
|
|
3341
|
-
};
|
|
3342
|
-
var t = locale.t = function t2(path, options) {
|
|
3343
|
-
var value = i18nHandler.apply(this, arguments);
|
|
3344
|
-
if (value !== null && value !== void 0)
|
|
3345
|
-
return value;
|
|
3346
|
-
var array = path.split(".");
|
|
3347
|
-
var current = lang;
|
|
3348
|
-
for (var i = 0, j = array.length; i < j; i++) {
|
|
3349
|
-
var property = array[i];
|
|
3350
|
-
value = current[property];
|
|
3351
|
-
if (i === j - 1)
|
|
3352
|
-
return format(value, options);
|
|
3353
|
-
if (!value)
|
|
3354
|
-
return "";
|
|
3355
|
-
current = value;
|
|
3356
|
-
}
|
|
3357
|
-
return "";
|
|
3358
|
-
};
|
|
3359
|
-
var use = locale.use = function use2(l) {
|
|
3360
|
-
lang = l || lang;
|
|
3361
|
-
};
|
|
3362
|
-
var i18n = locale.i18n = function i18n2(fn) {
|
|
3363
|
-
i18nHandler = fn || i18nHandler;
|
|
3364
|
-
};
|
|
3365
|
-
locale.default = {
|
|
3366
|
-
use,
|
|
3367
|
-
t,
|
|
3368
|
-
i18n
|
|
3369
|
-
};
|
|
3370
|
-
var _locale = locale;
|
|
3371
|
-
var _default = {
|
|
3372
|
-
methods: {
|
|
3373
|
-
t: function t3() {
|
|
3374
|
-
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
3375
|
-
args[_key] = arguments[_key];
|
|
3376
|
-
}
|
|
3377
|
-
return _locale.t.apply(this, args);
|
|
3378
|
-
}
|
|
3379
|
-
}
|
|
3380
|
-
};
|
|
3381
2117
|
const RepeatClick = {
|
|
3382
2118
|
bind(el, binding, vnode) {
|
|
3383
2119
|
let interval = null;
|
|
@@ -3804,7 +2540,7 @@ const _sfc_main$7 = {
|
|
|
3804
2540
|
components: {
|
|
3805
2541
|
TimeSpinner
|
|
3806
2542
|
},
|
|
3807
|
-
mixins: [
|
|
2543
|
+
mixins: [Locale],
|
|
3808
2544
|
props: {
|
|
3809
2545
|
visible: Boolean,
|
|
3810
2546
|
timeArrowControl: Boolean
|
|
@@ -3849,13 +2585,13 @@ const _sfc_main$7 = {
|
|
|
3849
2585
|
}
|
|
3850
2586
|
},
|
|
3851
2587
|
value(newVal) {
|
|
3852
|
-
let
|
|
2588
|
+
let date;
|
|
3853
2589
|
if (newVal instanceof Date) {
|
|
3854
|
-
|
|
2590
|
+
date = limitTimeRange(newVal, this.selectableRange, this.format);
|
|
3855
2591
|
} else if (!newVal) {
|
|
3856
|
-
|
|
2592
|
+
date = this.defaultValue ? new Date(this.defaultValue) : /* @__PURE__ */ new Date();
|
|
3857
2593
|
}
|
|
3858
|
-
this.date =
|
|
2594
|
+
this.date = date;
|
|
3859
2595
|
if (this.visible && this.needInitAdjust) {
|
|
3860
2596
|
this.$nextTick((_) => this.adjustSpinners());
|
|
3861
2597
|
this.needInitAdjust = false;
|
|
@@ -3878,9 +2614,9 @@ const _sfc_main$7 = {
|
|
|
3878
2614
|
handleCancel() {
|
|
3879
2615
|
this.$emit("pick", this.oldValue, false);
|
|
3880
2616
|
},
|
|
3881
|
-
handleChange(
|
|
2617
|
+
handleChange(date) {
|
|
3882
2618
|
if (this.visible) {
|
|
3883
|
-
this.date = clearMilliseconds(
|
|
2619
|
+
this.date = clearMilliseconds(date);
|
|
3884
2620
|
if (this.isValidValue(this.date)) {
|
|
3885
2621
|
this.$emit("pick", this.date, true);
|
|
3886
2622
|
}
|
|
@@ -3893,8 +2629,8 @@ const _sfc_main$7 = {
|
|
|
3893
2629
|
handleConfirm(visible = false, first) {
|
|
3894
2630
|
if (first)
|
|
3895
2631
|
return;
|
|
3896
|
-
const
|
|
3897
|
-
this.$emit("pick",
|
|
2632
|
+
const date = clearMilliseconds(limitTimeRange(this.date, this.selectableRange, this.format));
|
|
2633
|
+
this.$emit("pick", date, visible, first);
|
|
3898
2634
|
},
|
|
3899
2635
|
handleKeydown(event) {
|
|
3900
2636
|
const keyCode = event.keyCode;
|
|
@@ -3917,8 +2653,8 @@ const _sfc_main$7 = {
|
|
|
3917
2653
|
return;
|
|
3918
2654
|
}
|
|
3919
2655
|
},
|
|
3920
|
-
isValidValue(
|
|
3921
|
-
return timeWithinRange(
|
|
2656
|
+
isValidValue(date) {
|
|
2657
|
+
return timeWithinRange(date, this.selectableRange, this.format);
|
|
3922
2658
|
},
|
|
3923
2659
|
adjustSpinners() {
|
|
3924
2660
|
return this.$refs.spinner.adjustSpinners();
|
|
@@ -3997,6 +2733,27 @@ var _sfc_render$7 = function render3() {
|
|
|
3997
2733
|
var _sfc_staticRenderFns$7 = [];
|
|
3998
2734
|
var __component__$7 = /* @__PURE__ */ normalizeComponent(_sfc_main$7, _sfc_render$7, _sfc_staticRenderFns$7, false, null, null, null, null);
|
|
3999
2735
|
const TimePicker = __component__$7.exports;
|
|
2736
|
+
const arrayFindIndex = function(arr, pred) {
|
|
2737
|
+
for (let i = 0; i !== arr.length; ++i) {
|
|
2738
|
+
if (pred(arr[i])) {
|
|
2739
|
+
return i;
|
|
2740
|
+
}
|
|
2741
|
+
}
|
|
2742
|
+
return -1;
|
|
2743
|
+
};
|
|
2744
|
+
const arrayFind = function(arr, pred) {
|
|
2745
|
+
const idx = arrayFindIndex(arr, pred);
|
|
2746
|
+
return idx !== -1 ? arr[idx] : void 0;
|
|
2747
|
+
};
|
|
2748
|
+
const coerceTruthyValueToArray = function(val) {
|
|
2749
|
+
if (Array.isArray(val)) {
|
|
2750
|
+
return val;
|
|
2751
|
+
} else if (val) {
|
|
2752
|
+
return [val];
|
|
2753
|
+
} else {
|
|
2754
|
+
return [];
|
|
2755
|
+
}
|
|
2756
|
+
};
|
|
4000
2757
|
const datesInYear = (year) => {
|
|
4001
2758
|
const numOfDays = getDayCountOfYear(year);
|
|
4002
2759
|
const firstDay = new Date(year, 0, 1);
|
|
@@ -4023,7 +2780,7 @@ const _sfc_main$6 = {
|
|
|
4023
2780
|
const style = {};
|
|
4024
2781
|
const today = /* @__PURE__ */ new Date();
|
|
4025
2782
|
style.disabled = typeof this.disabledDate === "function" ? datesInYear(year).every(this.disabledDate) : false;
|
|
4026
|
-
style.current = arrayFindIndex
|
|
2783
|
+
style.current = arrayFindIndex(coerceTruthyValueToArray(this.value), (date) => date.getFullYear() === year) >= 0;
|
|
4027
2784
|
style.today = today.getFullYear() === year;
|
|
4028
2785
|
style.default = this.defaultValue && this.defaultValue.getFullYear() === year;
|
|
4029
2786
|
return style;
|
|
@@ -4106,8 +2863,8 @@ const datesInMonth = (year, month) => {
|
|
|
4106
2863
|
const firstDay = new Date(year, month, 1);
|
|
4107
2864
|
return range(numOfDays).map((n) => nextDate(firstDay, n));
|
|
4108
2865
|
};
|
|
4109
|
-
const clearDate = (
|
|
4110
|
-
return new Date(
|
|
2866
|
+
const clearDate = (date) => {
|
|
2867
|
+
return new Date(date.getFullYear(), date.getMonth());
|
|
4111
2868
|
};
|
|
4112
2869
|
const getMonthTimestamp = function(time) {
|
|
4113
2870
|
if (typeof time === "number" || typeof time === "string") {
|
|
@@ -4119,7 +2876,7 @@ const getMonthTimestamp = function(time) {
|
|
|
4119
2876
|
}
|
|
4120
2877
|
};
|
|
4121
2878
|
const _sfc_main$5 = {
|
|
4122
|
-
mixins: [
|
|
2879
|
+
mixins: [Locale],
|
|
4123
2880
|
props: {
|
|
4124
2881
|
disabledDate: {},
|
|
4125
2882
|
value: {},
|
|
@@ -4184,7 +2941,7 @@ const _sfc_main$5 = {
|
|
|
4184
2941
|
cell.text = index;
|
|
4185
2942
|
const cellDate = new Date(time);
|
|
4186
2943
|
cell.disabled = typeof disabledDate === "function" && disabledDate(cellDate);
|
|
4187
|
-
cell.selected = arrayFind(selectedDate, (
|
|
2944
|
+
cell.selected = arrayFind(selectedDate, (date) => date.getTime() === cellDate.getTime());
|
|
4188
2945
|
this.$set(row, j, cell);
|
|
4189
2946
|
}
|
|
4190
2947
|
}
|
|
@@ -4207,8 +2964,8 @@ const _sfc_main$5 = {
|
|
|
4207
2964
|
}
|
|
4208
2965
|
},
|
|
4209
2966
|
methods: {
|
|
4210
|
-
cellMatchesDate(cell,
|
|
4211
|
-
const value = new Date(
|
|
2967
|
+
cellMatchesDate(cell, date) {
|
|
2968
|
+
const value = new Date(date);
|
|
4212
2969
|
return this.date.getFullYear() === value.getFullYear() && Number(cell.text) === value.getMonth();
|
|
4213
2970
|
},
|
|
4214
2971
|
getCellStyle(cell) {
|
|
@@ -4218,9 +2975,9 @@ const _sfc_main$5 = {
|
|
|
4218
2975
|
const month = cell.text;
|
|
4219
2976
|
const defaultValue = this.defaultValue ? Array.isArray(this.defaultValue) ? this.defaultValue : [this.defaultValue] : [];
|
|
4220
2977
|
style.disabled = typeof this.disabledDate === "function" ? datesInMonth(year, month).every(this.disabledDate) : false;
|
|
4221
|
-
style.current = arrayFindIndex
|
|
2978
|
+
style.current = arrayFindIndex(coerceTruthyValueToArray(this.value), (date) => date.getFullYear() === year && date.getMonth() === month) >= 0;
|
|
4222
2979
|
style.today = today.getFullYear() === year && today.getMonth() === month;
|
|
4223
|
-
style.default = defaultValue.some((
|
|
2980
|
+
style.default = defaultValue.some((date) => this.cellMatchesDate(cell, date));
|
|
4224
2981
|
if (cell.inRange) {
|
|
4225
2982
|
style["in-range"] = true;
|
|
4226
2983
|
if (cell.start) {
|
|
@@ -4374,10 +3131,10 @@ const mul = (arg1, arg2) => {
|
|
|
4374
3131
|
};
|
|
4375
3132
|
const div = (arg1, arg2) => {
|
|
4376
3133
|
const t1 = (arg1.toString().split(".")[1] || "").length;
|
|
4377
|
-
const
|
|
3134
|
+
const t2 = (arg2.toString().split(".")[1] || "").length;
|
|
4378
3135
|
const r1 = Number(arg1.toString().replace(".", ""));
|
|
4379
3136
|
const r2 = Number(arg2.toString().replace(".", ""));
|
|
4380
|
-
return r1 / r2 * Math.pow(10,
|
|
3137
|
+
return r1 / r2 * Math.pow(10, t2 - t1);
|
|
4381
3138
|
};
|
|
4382
3139
|
function getLocalTime(i) {
|
|
4383
3140
|
let time = i;
|
|
@@ -4408,11 +3165,11 @@ const getDateTimestamp = function(time) {
|
|
|
4408
3165
|
}
|
|
4409
3166
|
};
|
|
4410
3167
|
const removeFromArray = function(arr, pred) {
|
|
4411
|
-
const idx = typeof pred === "function" ? arrayFindIndex
|
|
3168
|
+
const idx = typeof pred === "function" ? arrayFindIndex(arr, pred) : arr.indexOf(pred);
|
|
4412
3169
|
return idx >= 0 ? [...arr.slice(0, idx), ...arr.slice(idx + 1)] : arr;
|
|
4413
3170
|
};
|
|
4414
3171
|
const _sfc_main$4 = {
|
|
4415
|
-
mixins: [
|
|
3172
|
+
mixins: [Locale],
|
|
4416
3173
|
props: {
|
|
4417
3174
|
firstDayOfWeek: {
|
|
4418
3175
|
default: 7,
|
|
@@ -4477,10 +3234,10 @@ const _sfc_main$4 = {
|
|
|
4477
3234
|
return getStartDateOfMonth(this.year, this.month);
|
|
4478
3235
|
},
|
|
4479
3236
|
rows() {
|
|
4480
|
-
const
|
|
4481
|
-
let day = getFirstDayOfMonth(
|
|
4482
|
-
const dateCountOfMonth = getDayCountOfMonth(
|
|
4483
|
-
const dateCountOfLastMonth = getDayCountOfMonth(
|
|
3237
|
+
const date = new Date(this.year, this.month, 1);
|
|
3238
|
+
let day = getFirstDayOfMonth(date);
|
|
3239
|
+
const dateCountOfMonth = getDayCountOfMonth(date.getFullYear(), date.getMonth());
|
|
3240
|
+
const dateCountOfLastMonth = getDayCountOfMonth(date.getFullYear(), date.getMonth() === 0 ? 11 : date.getMonth() - 1);
|
|
4484
3241
|
day = day === 0 ? 7 : day;
|
|
4485
3242
|
const offset = this.offsetDay;
|
|
4486
3243
|
const rows = this.tableRows;
|
|
@@ -4540,7 +3297,7 @@ const _sfc_main$4 = {
|
|
|
4540
3297
|
}
|
|
4541
3298
|
const cellDate = new Date(time);
|
|
4542
3299
|
cell.disabled = typeof disabledDate === "function" && disabledDate(cellDate);
|
|
4543
|
-
cell.selected = arrayFind(selectedDate, (
|
|
3300
|
+
cell.selected = arrayFind(selectedDate, (date2) => date2.getTime() === cellDate.getTime());
|
|
4544
3301
|
cell.customClass = typeof cellClassName === "function" && cellClassName(cellDate);
|
|
4545
3302
|
this.$set(row, this.showWeekNumber ? j + 1 : j, cell);
|
|
4546
3303
|
}
|
|
@@ -4573,8 +3330,8 @@ const _sfc_main$4 = {
|
|
|
4573
3330
|
}
|
|
4574
3331
|
},
|
|
4575
3332
|
methods: {
|
|
4576
|
-
cellMatchesDate(cell,
|
|
4577
|
-
const value = new Date(
|
|
3333
|
+
cellMatchesDate(cell, date) {
|
|
3334
|
+
const value = new Date(date);
|
|
4578
3335
|
return this.year === value.getFullYear() && this.month === value.getMonth() && Number(cell.text) === value.getDate();
|
|
4579
3336
|
},
|
|
4580
3337
|
getCellClasses(cell) {
|
|
@@ -4589,7 +3346,7 @@ const _sfc_main$4 = {
|
|
|
4589
3346
|
} else {
|
|
4590
3347
|
classes.push(cell.type);
|
|
4591
3348
|
}
|
|
4592
|
-
if (cell.type === "normal" && defaultValue.some((
|
|
3349
|
+
if (cell.type === "normal" && defaultValue.some((date) => this.cellMatchesDate(cell, date))) {
|
|
4593
3350
|
classes.push("default");
|
|
4594
3351
|
}
|
|
4595
3352
|
if (selectionMode === "day" && (cell.type === "normal" || cell.type === "today") && this.cellMatchesDate(cell, this.value)) {
|
|
@@ -4740,7 +3497,7 @@ const _sfc_main$4 = {
|
|
|
4740
3497
|
});
|
|
4741
3498
|
} else if (this.selectionMode === "dates") {
|
|
4742
3499
|
const value = this.value || [];
|
|
4743
|
-
const newValue = cell.selected ? removeFromArray(value, (
|
|
3500
|
+
const newValue = cell.selected ? removeFromArray(value, (date) => date.getTime() === newDate.getTime()) : [...value, newDate];
|
|
4744
3501
|
this.$emit("pick", newValue);
|
|
4745
3502
|
}
|
|
4746
3503
|
}
|
|
@@ -4793,7 +3550,7 @@ const _sfc_main$3 = {
|
|
|
4793
3550
|
MonthTable,
|
|
4794
3551
|
DateTable
|
|
4795
3552
|
},
|
|
4796
|
-
mixins: [
|
|
3553
|
+
mixins: [Locale],
|
|
4797
3554
|
data() {
|
|
4798
3555
|
return {
|
|
4799
3556
|
timezone: "",
|
|
@@ -4917,24 +3674,24 @@ const _sfc_main$3 = {
|
|
|
4917
3674
|
},
|
|
4918
3675
|
methods: {
|
|
4919
3676
|
proxyTimePickerDataProperties() {
|
|
4920
|
-
const
|
|
3677
|
+
const format = (timeFormat) => {
|
|
4921
3678
|
this.$refs.timepicker.format = timeFormat;
|
|
4922
3679
|
};
|
|
4923
3680
|
const value = (value2) => {
|
|
4924
3681
|
this.$refs.timepicker.value = value2;
|
|
4925
3682
|
};
|
|
4926
|
-
const
|
|
4927
|
-
this.$refs.timepicker.date =
|
|
3683
|
+
const date = (date2) => {
|
|
3684
|
+
this.$refs.timepicker.date = date2;
|
|
4928
3685
|
};
|
|
4929
3686
|
const selectableRange = (selectableRange2) => {
|
|
4930
3687
|
this.$refs.timepicker.selectableRange = selectableRange2;
|
|
4931
3688
|
};
|
|
4932
3689
|
this.$watch("value", value);
|
|
4933
|
-
this.$watch("date",
|
|
3690
|
+
this.$watch("date", date);
|
|
4934
3691
|
this.$watch("selectableRange", selectableRange);
|
|
4935
|
-
|
|
3692
|
+
format(this.timeFormat);
|
|
4936
3693
|
value(this.value);
|
|
4937
|
-
|
|
3694
|
+
date(this.date);
|
|
4938
3695
|
selectableRange(this.selectableRange);
|
|
4939
3696
|
},
|
|
4940
3697
|
handleClear() {
|
|
@@ -4945,7 +3702,7 @@ const _sfc_main$3 = {
|
|
|
4945
3702
|
if (!value) {
|
|
4946
3703
|
this.$emit("pick", value, ...args);
|
|
4947
3704
|
} else if (Array.isArray(value)) {
|
|
4948
|
-
const dates = value.map((
|
|
3705
|
+
const dates = value.map((date) => this.showTime ? clearMilliseconds(date) : clearTime(date));
|
|
4949
3706
|
this.$emit("pick", dates, ...args);
|
|
4950
3707
|
} else {
|
|
4951
3708
|
this.$emit("pick", this.showTime ? clearMilliseconds(value) : clearTime(value), ...args);
|
|
@@ -5094,28 +3851,28 @@ const _sfc_main$3 = {
|
|
|
5094
3851
|
40: 4,
|
|
5095
3852
|
37: -1,
|
|
5096
3853
|
39: 1,
|
|
5097
|
-
offset: (
|
|
3854
|
+
offset: (date, step) => date.setFullYear(date.getFullYear() + step)
|
|
5098
3855
|
},
|
|
5099
3856
|
"month": {
|
|
5100
3857
|
38: -4,
|
|
5101
3858
|
40: 4,
|
|
5102
3859
|
37: -1,
|
|
5103
3860
|
39: 1,
|
|
5104
|
-
offset: (
|
|
3861
|
+
offset: (date, step) => date.setMonth(date.getMonth() + step)
|
|
5105
3862
|
},
|
|
5106
3863
|
"week": {
|
|
5107
3864
|
38: -1,
|
|
5108
3865
|
40: 1,
|
|
5109
3866
|
37: -1,
|
|
5110
3867
|
39: 1,
|
|
5111
|
-
offset: (
|
|
3868
|
+
offset: (date, step) => date.setDate(date.getDate() + step * 7)
|
|
5112
3869
|
},
|
|
5113
3870
|
"day": {
|
|
5114
3871
|
38: -7,
|
|
5115
3872
|
40: 7,
|
|
5116
3873
|
37: -1,
|
|
5117
3874
|
39: 1,
|
|
5118
|
-
offset: (
|
|
3875
|
+
offset: (date, step) => date.setDate(date.getDate() + step)
|
|
5119
3876
|
}
|
|
5120
3877
|
};
|
|
5121
3878
|
const mode = this.selectionMode;
|
|
@@ -5144,12 +3901,12 @@ const _sfc_main$3 = {
|
|
|
5144
3901
|
}
|
|
5145
3902
|
},
|
|
5146
3903
|
handleVisibleDateChange(value) {
|
|
5147
|
-
const
|
|
5148
|
-
if (
|
|
5149
|
-
if (typeof this.disabledDate === "function" && this.disabledDate(
|
|
3904
|
+
const date = parseDate(value, this.dateFormat);
|
|
3905
|
+
if (date) {
|
|
3906
|
+
if (typeof this.disabledDate === "function" && this.disabledDate(date)) {
|
|
5150
3907
|
return;
|
|
5151
3908
|
}
|
|
5152
|
-
this.date = modifyTime(
|
|
3909
|
+
this.date = modifyTime(date, this.date.getHours(), this.date.getMinutes(), this.date.getSeconds());
|
|
5153
3910
|
this.userInputDate = null;
|
|
5154
3911
|
this.resetView();
|
|
5155
3912
|
this.emit(this.date, true);
|
|
@@ -5161,8 +3918,8 @@ const _sfc_main$3 = {
|
|
|
5161
3918
|
getDefaultValue() {
|
|
5162
3919
|
return this.defaultValue ? new Date(this.defaultValue) : /* @__PURE__ */ new Date();
|
|
5163
3920
|
},
|
|
5164
|
-
checkDateWithinRange(
|
|
5165
|
-
return this.selectableRange.length > 0 ? timeWithinRange(
|
|
3921
|
+
checkDateWithinRange(date) {
|
|
3922
|
+
return this.selectableRange.length > 0 ? timeWithinRange(date, this.selectableRange, this.format || "HH:mm:ss") : true;
|
|
5166
3923
|
}
|
|
5167
3924
|
}
|
|
5168
3925
|
};
|
|
@@ -5446,7 +4203,7 @@ const _sfc_main$2 = {
|
|
|
5446
4203
|
TimePicker,
|
|
5447
4204
|
DateTable
|
|
5448
4205
|
},
|
|
5449
|
-
mixins: [
|
|
4206
|
+
mixins: [Locale],
|
|
5450
4207
|
data() {
|
|
5451
4208
|
return {
|
|
5452
4209
|
timezone: "",
|
|
@@ -5570,8 +4327,8 @@ const _sfc_main$2 = {
|
|
|
5570
4327
|
this.timeUserInput.min = null;
|
|
5571
4328
|
this.$nextTick(() => {
|
|
5572
4329
|
if (this.$refs.maxTimePicker && this.maxDate && this.maxDate < this.minDate) {
|
|
5573
|
-
const
|
|
5574
|
-
this.$refs.maxTimePicker.selectableRange = [[parseDate(formatDate(this.minDate,
|
|
4330
|
+
const format = "HH:mm:ss";
|
|
4331
|
+
this.$refs.maxTimePicker.selectableRange = [[parseDate(formatDate(this.minDate, format), format), parseDate("23:59:59", format)]];
|
|
5575
4332
|
}
|
|
5576
4333
|
});
|
|
5577
4334
|
if (val && this.$refs.minTimePicker) {
|
|
@@ -6152,7 +4909,7 @@ const _sfc_main$1 = {
|
|
|
6152
4909
|
components: {
|
|
6153
4910
|
MonthTable
|
|
6154
4911
|
},
|
|
6155
|
-
mixins: [
|
|
4912
|
+
mixins: [Locale],
|
|
6156
4913
|
data() {
|
|
6157
4914
|
return {
|
|
6158
4915
|
popperClass: "",
|