You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
183 KiB
1 lines
183 KiB
{"version":3,"file":"index.js","sources":["node_modules/@vue/babel-helper-vue-jsx-merge-props/dist/helper.js","node_modules/date-format-parse/es/util.js","node_modules/date-format-parse/es/locale/en.js","node_modules/date-format-parse/es/format.js","node_modules/date-format-parse/es/parse.js","src/util/date.js","src/util/base.js","node_modules/date-format-parse/lib/locale/en.js","src/locale/en.js","src/locale.js","src/util/throttle.js","src/util/dom.js","src/popup.vue","src/calendar/icon-button.vue","src/calendar/table-date.vue","src/calendar/table-month.vue","src/calendar/table-year.vue","src/calendar/calendar-panel.js","src/calendar/calendar-range.js","src/util/scrollbar-width.js","src/scrollbar/scrollbar-vertical.vue","src/time/list-columns.vue","src/time/list-options.vue","src/time/time-panel.vue","src/time/time-range.js","src/datetime/datetime-panel.js","src/datetime/datetime-range.js","src/date-picker.js","src/index.js"],"sourcesContent":["\"use strict\";function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}var normalMerge=[\"attrs\",\"props\",\"domProps\"],toArrayMerge=[\"class\",\"style\",\"directives\"],functionalMerge=[\"on\",\"nativeOn\"],mergeJsxProps=function(a){return a.reduce(function(c,a){for(var b in a)if(!c[b])c[b]=a[b];else if(-1!==normalMerge.indexOf(b))c[b]=_extends({},c[b],a[b]);else if(-1!==toArrayMerge.indexOf(b)){var d=c[b]instanceof Array?c[b]:[c[b]],e=a[b]instanceof Array?a[b]:[a[b]];c[b]=d.concat(e)}else if(-1!==functionalMerge.indexOf(b)){for(var f in a[b])if(c[b][f]){var g=c[b][f]instanceof Array?c[b][f]:[c[b][f]],h=a[b][f]instanceof Array?a[b][f]:[a[b][f]];c[b][f]=g.concat(h)}else c[b][f]=a[b][f];}else if(\"hook\"==b)for(var i in a[b])c[b][i]=c[b][i]?mergeFn(c[b][i],a[b][i]):a[b][i];else c[b]=a[b];return c},{})},mergeFn=function(a,b){return function(){a&&a.apply(this,arguments),b&&b.apply(this,arguments)}};module.exports=mergeJsxProps;\n","export function isDate(value) {\n return value instanceof Date || Object.prototype.toString.call(value) === '[object Date]';\n}\nexport function toDate(value) {\n if (isDate(value)) {\n return new Date(value.getTime());\n }\n\n if (value == null) {\n return new Date(NaN);\n }\n\n return new Date(value);\n}\nexport function isValidDate(value) {\n return isDate(value) && !isNaN(value.getTime());\n}\nexport function startOfWeek(value) {\n var firstDayOfWeek = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n if (!(firstDayOfWeek >= 0 && firstDayOfWeek <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6');\n }\n\n var date = toDate(value);\n var day = date.getDay();\n var diff = (day + 7 - firstDayOfWeek) % 7;\n date.setDate(date.getDate() - diff);\n date.setHours(0, 0, 0, 0);\n return date;\n}\nexport function startOfWeekYear(value) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$firstDayOfWeek = _ref.firstDayOfWeek,\n firstDayOfWeek = _ref$firstDayOfWeek === void 0 ? 0 : _ref$firstDayOfWeek,\n _ref$firstWeekContain = _ref.firstWeekContainsDate,\n firstWeekContainsDate = _ref$firstWeekContain === void 0 ? 1 : _ref$firstWeekContain;\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7');\n }\n\n var date = toDate(value);\n var year = date.getFullYear();\n var firstDateOfFirstWeek = new Date(0);\n\n for (var i = year + 1; i >= year - 1; i--) {\n firstDateOfFirstWeek.setFullYear(i, 0, firstWeekContainsDate);\n firstDateOfFirstWeek.setHours(0, 0, 0, 0);\n firstDateOfFirstWeek = startOfWeek(firstDateOfFirstWeek, firstDayOfWeek);\n\n if (date.getTime() >= firstDateOfFirstWeek.getTime()) {\n break;\n }\n }\n\n return firstDateOfFirstWeek;\n}\nexport function getWeek(value) {\n var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref2$firstDayOfWeek = _ref2.firstDayOfWeek,\n firstDayOfWeek = _ref2$firstDayOfWeek === void 0 ? 0 : _ref2$firstDayOfWeek,\n _ref2$firstWeekContai = _ref2.firstWeekContainsDate,\n firstWeekContainsDate = _ref2$firstWeekContai === void 0 ? 1 : _ref2$firstWeekContai;\n\n var date = toDate(value);\n var firstDateOfThisWeek = startOfWeek(date, firstDayOfWeek);\n var firstDateOfFirstWeek = startOfWeekYear(date, {\n firstDayOfWeek: firstDayOfWeek,\n firstWeekContainsDate: firstWeekContainsDate\n });\n var diff = firstDateOfThisWeek.getTime() - firstDateOfFirstWeek.getTime();\n return Math.round(diff / (7 * 24 * 3600 * 1000)) + 1;\n}","var locale = {\n months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n weekdaysMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n firstDayOfWeek: 0,\n firstWeekContainsDate: 1\n};\nexport default locale;","import { toDate, isValidDate, getWeek } from './util';\nimport defaultLocale from './locale/en';\nvar REGEX_FORMAT = /\\[([^\\]]+)]|YYYY|YY?|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|Z{1,2}|S{1,3}|w{1,2}|x|X|a|A/g;\n\nfunction pad(val) {\n var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;\n var output = \"\".concat(Math.abs(val));\n var sign = val < 0 ? '-' : '';\n\n while (output.length < len) {\n output = \"0\".concat(output);\n }\n\n return sign + output;\n}\n\nfunction formatTimezone(offset) {\n var delimeter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = Math.floor(absOffset / 60);\n var minutes = absOffset % 60;\n return sign + pad(hours, 2) + delimeter + pad(minutes, 2);\n}\n\nvar meridiem = function meridiem(h, _, isLowercase) {\n var word = h < 12 ? 'AM' : 'PM';\n return isLowercase ? word.toLocaleLowerCase() : word;\n};\n\nvar formatFlags = {\n Y: function Y(date) {\n var y = date.getFullYear();\n return y <= 9999 ? \"\".concat(y) : \"+\".concat(y);\n },\n // Year: 00, 01, ..., 99\n YY: function YY(date) {\n return pad(date.getFullYear(), 4).substr(2);\n },\n // Year: 1900, 1901, ..., 2099\n YYYY: function YYYY(date) {\n return pad(date.getFullYear(), 4);\n },\n // Month: 1, 2, ..., 12\n M: function M(date) {\n return date.getMonth() + 1;\n },\n // Month: 01, 02, ..., 12\n MM: function MM(date) {\n return pad(date.getMonth() + 1, 2);\n },\n MMM: function MMM(date, locale) {\n return locale.monthsShort[date.getMonth()];\n },\n MMMM: function MMMM(date, locale) {\n return locale.months[date.getMonth()];\n },\n // Day of month: 1, 2, ..., 31\n D: function D(date) {\n return date.getDate();\n },\n // Day of month: 01, 02, ..., 31\n DD: function DD(date) {\n return pad(date.getDate(), 2);\n },\n // Hour: 0, 1, ... 23\n H: function H(date) {\n return date.getHours();\n },\n // Hour: 00, 01, ..., 23\n HH: function HH(date) {\n return pad(date.getHours(), 2);\n },\n // Hour: 1, 2, ..., 12\n h: function h(date) {\n var hours = date.getHours();\n\n if (hours === 0) {\n return 12;\n }\n\n if (hours > 12) {\n return hours % 12;\n }\n\n return hours;\n },\n // Hour: 01, 02, ..., 12\n hh: function hh() {\n var hours = formatFlags.h.apply(formatFlags, arguments);\n return pad(hours, 2);\n },\n // Minute: 0, 1, ..., 59\n m: function m(date) {\n return date.getMinutes();\n },\n // Minute: 00, 01, ..., 59\n mm: function mm(date) {\n return pad(date.getMinutes(), 2);\n },\n // Second: 0, 1, ..., 59\n s: function s(date) {\n return date.getSeconds();\n },\n // Second: 00, 01, ..., 59\n ss: function ss(date) {\n return pad(date.getSeconds(), 2);\n },\n // 1/10 of second: 0, 1, ..., 9\n S: function S(date) {\n return Math.floor(date.getMilliseconds() / 100);\n },\n // 1/100 of second: 00, 01, ..., 99\n SS: function SS(date) {\n return pad(Math.floor(date.getMilliseconds() / 10), 2);\n },\n // Millisecond: 000, 001, ..., 999\n SSS: function SSS(date) {\n return pad(date.getMilliseconds(), 3);\n },\n // Day of week: 0, 1, ..., 6\n d: function d(date) {\n return date.getDay();\n },\n // Day of week: 'Su', 'Mo', ..., 'Sa'\n dd: function dd(date, locale) {\n return locale.weekdaysMin[date.getDay()];\n },\n // Day of week: 'Sun', 'Mon',..., 'Sat'\n ddd: function ddd(date, locale) {\n return locale.weekdaysShort[date.getDay()];\n },\n // Day of week: 'Sunday', 'Monday', ...,'Saturday'\n dddd: function dddd(date, locale) {\n return locale.weekdays[date.getDay()];\n },\n // AM, PM\n A: function A(date, locale) {\n var meridiemFunc = locale.meridiem || meridiem;\n return meridiemFunc(date.getHours(), date.getMinutes(), false);\n },\n // am, pm\n a: function a(date, locale) {\n var meridiemFunc = locale.meridiem || meridiem;\n return meridiemFunc(date.getHours(), date.getMinutes(), true);\n },\n // Timezone: -01:00, +00:00, ... +12:00\n Z: function Z(date) {\n return formatTimezone(date.getTimezoneOffset(), ':');\n },\n // Timezone: -0100, +0000, ... +1200\n ZZ: function ZZ(date) {\n return formatTimezone(date.getTimezoneOffset());\n },\n // Seconds timestamp: 512969520\n X: function X(date) {\n return Math.floor(date.getTime() / 1000);\n },\n // Milliseconds timestamp: 512969520900\n x: function x(date) {\n return date.getTime();\n },\n w: function w(date, locale) {\n return getWeek(date, {\n firstDayOfWeek: locale.firstDayOfWeek,\n firstWeekContainsDate: locale.firstWeekContainsDate\n });\n },\n ww: function ww(date, locale) {\n return pad(formatFlags.w(date, locale), 2);\n }\n};\n\nfunction format(val, str) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var formatStr = str ? String(str) : 'YYYY-MM-DDTHH:mm:ss.SSSZ';\n var date = toDate(val);\n\n if (!isValidDate(date)) {\n return 'Invalid Date';\n }\n\n var locale = options.locale || defaultLocale;\n return formatStr.replace(REGEX_FORMAT, function (match, p1) {\n if (p1) {\n return p1;\n }\n\n if (typeof formatFlags[match] === 'function') {\n return \"\".concat(formatFlags[match](date, locale));\n }\n\n return match;\n });\n}\n\nexport default format;","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport defaultLocale from './locale/en';\nimport { startOfWeekYear } from './util';\nvar formattingTokens = /(\\[[^\\[]*\\])|(MM?M?M?|Do|DD?|ddd?d?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|S{1,3}|x|X|ZZ?|.)/g;\nvar match1 = /\\d/; // 0 - 9\n\nvar match2 = /\\d\\d/; // 00 - 99\n\nvar match3 = /\\d{3}/; // 000 - 999\n\nvar match4 = /\\d{4}/; // 0000 - 9999\n\nvar match1to2 = /\\d\\d?/; // 0 - 99\n\nvar matchShortOffset = /[+-]\\d\\d:?\\d\\d/; // +00:00 -00:00 +0000 or -0000\n\nvar matchSigned = /[+-]?\\d+/; // -inf - inf\n\nvar matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n// const matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i; // Word\n\nvar YEAR = 'year';\nvar MONTH = 'month';\nvar DAY = 'day';\nvar HOUR = 'hour';\nvar MINUTE = 'minute';\nvar SECOND = 'second';\nvar MILLISECOND = 'millisecond';\nvar parseFlags = {};\n\nvar addParseFlag = function addParseFlag(token, regex, callback) {\n var tokens = Array.isArray(token) ? token : [token];\n var func;\n\n if (typeof callback === 'string') {\n func = function func(input) {\n var value = parseInt(input, 10);\n return _defineProperty({}, callback, value);\n };\n } else {\n func = callback;\n }\n\n tokens.forEach(function (key) {\n parseFlags[key] = [regex, func];\n });\n};\n\nvar escapeStringRegExp = function escapeStringRegExp(str) {\n return str.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n};\n\nvar matchWordRegExp = function matchWordRegExp(localeKey) {\n return function (locale) {\n var array = locale[localeKey];\n\n if (!Array.isArray(array)) {\n throw new Error(\"Locale[\".concat(localeKey, \"] need an array\"));\n }\n\n return new RegExp(array.map(escapeStringRegExp).join('|'));\n };\n};\n\nvar matchWordCallback = function matchWordCallback(localeKey, key) {\n return function (input, locale) {\n var array = locale[localeKey];\n\n if (!Array.isArray(array)) {\n throw new Error(\"Locale[\".concat(localeKey, \"] need an array\"));\n }\n\n var index = array.indexOf(input);\n\n if (index < 0) {\n throw new Error('Invalid Word');\n }\n\n return _defineProperty({}, key, index);\n };\n};\n\naddParseFlag('Y', matchSigned, YEAR);\naddParseFlag('YY', match2, function (input) {\n var year = new Date().getFullYear();\n var cent = Math.floor(year / 100);\n var value = parseInt(input, 10);\n value = (value > 68 ? cent - 1 : cent) * 100 + value;\n return _defineProperty({}, YEAR, value);\n});\naddParseFlag('YYYY', match4, YEAR);\naddParseFlag('M', match1to2, function (input) {\n return _defineProperty({}, MONTH, parseInt(input, 10) - 1);\n});\naddParseFlag('MM', match2, function (input) {\n return _defineProperty({}, MONTH, parseInt(input, 10) - 1);\n});\naddParseFlag('MMM', matchWordRegExp('monthsShort'), matchWordCallback('monthsShort', MONTH));\naddParseFlag('MMMM', matchWordRegExp('months'), matchWordCallback('months', MONTH));\naddParseFlag('D', match1to2, DAY);\naddParseFlag('DD', match2, DAY);\naddParseFlag(['H', 'h'], match1to2, HOUR);\naddParseFlag(['HH', 'hh'], match2, HOUR);\naddParseFlag('m', match1to2, MINUTE);\naddParseFlag('mm', match2, MINUTE);\naddParseFlag('s', match1to2, SECOND);\naddParseFlag('ss', match2, SECOND);\naddParseFlag('S', match1, function (input) {\n return _defineProperty({}, MILLISECOND, parseInt(input, 10) * 100);\n});\naddParseFlag('SS', match2, function (input) {\n return _defineProperty({}, MILLISECOND, parseInt(input, 10) * 10);\n});\naddParseFlag('SSS', match3, MILLISECOND);\n\nfunction matchMeridiem(locale) {\n return locale.meridiemParse || /[ap]\\.?m?\\.?/i;\n}\n\nfunction defaultIsPM(input) {\n return \"\".concat(input).toLowerCase().charAt(0) === 'p';\n}\n\naddParseFlag(['A', 'a'], matchMeridiem, function (input, locale) {\n var isPM = typeof locale.isPM === 'function' ? locale.isPM(input) : defaultIsPM(input);\n return {\n isPM: isPM\n };\n});\n\nfunction offsetFromString(str) {\n var _ref8 = str.match(/([+-]|\\d\\d)/g) || ['-', '0', '0'],\n _ref9 = _slicedToArray(_ref8, 3),\n symbol = _ref9[0],\n hour = _ref9[1],\n minute = _ref9[2];\n\n var minutes = parseInt(hour, 10) * 60 + parseInt(minute, 10);\n\n if (minutes === 0) {\n return 0;\n }\n\n return symbol === '+' ? -minutes : +minutes;\n}\n\naddParseFlag(['Z', 'ZZ'], matchShortOffset, function (input) {\n return {\n offset: offsetFromString(input)\n };\n});\naddParseFlag('x', matchSigned, function (input) {\n return {\n date: new Date(parseInt(input, 10))\n };\n});\naddParseFlag('X', matchTimestamp, function (input) {\n return {\n date: new Date(parseFloat(input) * 1000)\n };\n});\naddParseFlag('d', match1, 'weekday');\naddParseFlag('dd', matchWordRegExp('weekdaysMin'), matchWordCallback('weekdaysMin', 'weekday'));\naddParseFlag('ddd', matchWordRegExp('weekdaysShort'), matchWordCallback('weekdaysShort', 'weekday'));\naddParseFlag('dddd', matchWordRegExp('weekdays'), matchWordCallback('weekdays', 'weekday'));\naddParseFlag('w', match1to2, 'week');\naddParseFlag('ww', match2, 'week');\n\nfunction to24hour(hour, isPM) {\n if (hour !== undefined && isPM !== undefined) {\n if (isPM) {\n if (hour < 12) {\n return hour + 12;\n }\n } else if (hour === 12) {\n return 0;\n }\n }\n\n return hour;\n}\n\nfunction getFullInputArray(input) {\n var backupDate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date();\n var result = [0, 0, 1, 0, 0, 0, 0];\n var backupArr = [backupDate.getFullYear(), backupDate.getMonth(), backupDate.getDate(), backupDate.getHours(), backupDate.getMinutes(), backupDate.getSeconds(), backupDate.getMilliseconds()];\n var useBackup = true;\n\n for (var i = 0; i < 7; i++) {\n if (input[i] === undefined) {\n result[i] = useBackup ? backupArr[i] : result[i];\n } else {\n result[i] = input[i];\n useBackup = false;\n }\n }\n\n return result;\n}\n\nfunction createUTCDate() {\n var date;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var y = args[0];\n\n if (y < 100 && y >= 0) {\n args[0] += 400;\n date = new Date(Date.UTC.apply(Date, args)); // eslint-disable-next-line no-restricted-globals\n\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(Date, args));\n }\n\n return date;\n}\n\nfunction makeParser(dateString, format, locale) {\n var tokens = format.match(formattingTokens);\n\n if (!tokens) {\n throw new Error();\n }\n\n var length = tokens.length;\n var mark = {};\n\n for (var i = 0; i < length; i += 1) {\n var token = tokens[i];\n var parseTo = parseFlags[token];\n\n if (!parseTo) {\n var word = token.replace(/^\\[|\\]$/g, '');\n\n if (dateString.indexOf(word) === 0) {\n dateString = dateString.substr(word.length);\n } else {\n throw new Error('not match');\n }\n } else {\n var regex = typeof parseTo[0] === 'function' ? parseTo[0](locale) : parseTo[0];\n var parser = parseTo[1];\n var value = (regex.exec(dateString) || [])[0];\n var obj = parser(value, locale);\n mark = _objectSpread({}, mark, {}, obj);\n dateString = dateString.replace(value, '');\n }\n }\n\n return mark;\n}\n\nexport default function parse(str, format) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n try {\n var _options$locale = options.locale,\n _locale = _options$locale === void 0 ? defaultLocale : _options$locale,\n _options$backupDate = options.backupDate,\n backupDate = _options$backupDate === void 0 ? new Date() : _options$backupDate;\n\n var parseResult = makeParser(str, format, _locale);\n var year = parseResult.year,\n month = parseResult.month,\n day = parseResult.day,\n hour = parseResult.hour,\n minute = parseResult.minute,\n second = parseResult.second,\n millisecond = parseResult.millisecond,\n isPM = parseResult.isPM,\n date = parseResult.date,\n offset = parseResult.offset,\n weekday = parseResult.weekday,\n week = parseResult.week;\n\n if (date) {\n return date;\n }\n\n var inputArray = [year, month, day, hour, minute, second, millisecond];\n inputArray[3] = to24hour(inputArray[3], isPM); // check week\n\n if (week !== undefined && month === undefined && day === undefined) {\n // new Date(year, 3) make sure in current year\n var firstDate = startOfWeekYear(year === undefined ? backupDate : new Date(year, 3), {\n firstDayOfWeek: _locale.firstDayOfWeek,\n firstWeekContainsDate: _locale.firstWeekContainsDate\n });\n return new Date(firstDate.getTime() + (week - 1) * 7 * 24 * 3600 * 1000);\n }\n\n var utcDate = createUTCDate.apply(void 0, _toConsumableArray(getFullInputArray(inputArray, backupDate)));\n var offsetMilliseconds = (offset === undefined ? utcDate.getTimezoneOffset() : offset) * 60 * 1000;\n var parsedDate = new Date(utcDate.getTime() + offsetMilliseconds); // check weekday\n\n if (weekday !== undefined && parsedDate.getDay() !== weekday) {\n return new Date(NaN);\n }\n\n return parsedDate;\n } catch (e) {\n return new Date(NaN);\n }\n}","// new Date(10, 0, 1) The year from 0 to 99 will be incremented by 1900 automatically.\nexport function createDate(y, M = 0, d = 1, h = 0, m = 0, s = 0, ms = 0) {\n const date = new Date(y, M, d, h, m, s, ms);\n if (y < 100 && y >= 0) {\n date.setFullYear(y);\n }\n return date;\n}\n\nexport function isValidDate(date) {\n return date instanceof Date && !isNaN(date);\n}\n\nexport function isValidRangeDate(date) {\n return Array.isArray(date) && date.length === 2 && date.every(isValidDate) && date[0] <= date[1];\n}\n\nexport function isValidDates(dates) {\n return Array.isArray(dates) && dates.every(isValidDate);\n}\n\nexport function getValidDate(value, ...backup) {\n const date = new Date(value);\n if (isValidDate(date)) {\n return date;\n }\n if (backup.length) {\n return getValidDate(...backup);\n }\n return new Date();\n}\n\nexport function startOfYear(value) {\n const date = new Date(value);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\nexport function startOfMonth(value) {\n const date = new Date(value);\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\nexport function startOfDay(value) {\n const date = new Date(value);\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\nexport function getCalendar({ firstDayOfWeek, year, month }) {\n const arr = [];\n // change to the last day of the last month\n const calendar = createDate(year, month, 0);\n const lastDayInLastMonth = calendar.getDate();\n // getDay() 0 is Sunday, 1 is Monday\n const firstDayInLastMonth = lastDayInLastMonth - ((calendar.getDay() + 7 - firstDayOfWeek) % 7);\n for (let i = firstDayInLastMonth; i <= lastDayInLastMonth; i++) {\n arr.push(createDate(year, month, i - lastDayInLastMonth));\n }\n // change to the last day of the current month\n calendar.setMonth(month + 1, 0);\n const lastDayInCurrentMonth = calendar.getDate();\n for (let i = 1; i <= lastDayInCurrentMonth; i++) {\n arr.push(createDate(year, month, i));\n }\n\n const lastMonthLength = lastDayInLastMonth - firstDayInLastMonth + 1;\n const nextMonthLength = 6 * 7 - lastMonthLength - lastDayInCurrentMonth;\n for (let i = 1; i <= nextMonthLength; i++) {\n arr.push(createDate(year, month, lastDayInCurrentMonth + i));\n }\n return arr;\n}\n\nexport function setMonth(dirtyDate, dirtyMonth) {\n const date = new Date(dirtyDate);\n const month = Number(dirtyMonth);\n const year = date.getFullYear();\n const daysInMonth = createDate(year, month + 1, 0).getDate();\n const day = date.getDate();\n date.setMonth(month, Math.min(day, daysInMonth));\n return date;\n}\n\nexport function assignTime(target, source) {\n const date = new Date(target);\n const time = new Date(source);\n date.setHours(time.getHours(), time.getMinutes(), time.getSeconds());\n return date;\n}\n","/**\n * chunk the array\n * @param {Array} arr\n * @param {Number} size\n */\nexport function chunk(arr, size) {\n if (!Array.isArray(arr)) {\n return [];\n }\n const result = [];\n const len = arr.length;\n let i = 0;\n size = size || len;\n while (i < len) {\n result.push(arr.slice(i, (i += size)));\n }\n return result;\n}\n\n/**\n * isObject\n * @param {*} obj\n * @returns {Boolean}\n */\nexport function isObject(obj) {\n return Object.prototype.toString.call(obj) === '[object Object]';\n}\n\n/**\n * pick object\n * @param {Object} obj\n * @param {Array|String} props\n */\nexport function pick(obj, props) {\n if (!isObject(obj)) return {};\n if (!Array.isArray(props)) {\n props = [props];\n }\n const res = {};\n props.forEach(prop => {\n if (prop in obj) {\n res[prop] = obj[prop];\n }\n });\n return res;\n}\n\n/**\n * deep merge two object without merging array\n * @param {object} target\n * @param {object} source\n */\nexport function mergeDeep(target, source) {\n if (!isObject(target)) {\n return {};\n }\n let result = target;\n if (isObject(source)) {\n Object.keys(source).forEach(key => {\n let value = source[key];\n if (isObject(value) && isObject(target[key])) {\n value = mergeDeep(target[key], value);\n }\n result = { ...result, [key]: value };\n });\n }\n return result;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\nvar locale = {\n months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n weekdaysMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n firstDayOfWeek: 0,\n firstWeekContainsDate: 1\n};\nvar _default = locale;\nexports[\"default\"] = _default;\nmodule.exports = exports.default;","import en from 'date-format-parse/lib/locale/en';\n\nconst lang = {\n formatLocale: en,\n yearFormat: 'YYYY',\n monthFormat: 'MMM',\n monthBeforeYear: true,\n};\n\nexport default lang;\n","import enUS from './locale/en';\n\nlet defaultLocale = 'en';\nconst locales = {};\nlocales[defaultLocale] = enUS;\n\nexport function locale(name, object, isLocal) {\n if (typeof name !== 'string') return locales[defaultLocale];\n let l = defaultLocale;\n if (locales[name]) {\n l = name;\n }\n if (object) {\n locales[name] = object;\n l = name;\n }\n if (!isLocal) {\n defaultLocale = l;\n }\n return locales[name] || locales[defaultLocale];\n}\n\n/**\n * get locale object\n * @param {string} name lang\n */\nexport function getLocale(name) {\n return locale(name, null, true);\n}\n","/* istanbul ignore file */\nexport function rafThrottle(fn) {\n let isRunning = false;\n return function fnBinfRaf(...args) {\n if (isRunning) return;\n isRunning = true;\n requestAnimationFrame(() => {\n isRunning = false;\n fn.apply(this, args);\n });\n };\n}\n","/**\n * get the hidden element width, height\n * @param {HTMLElement} element dom\n */\nexport function getPopupElementSize(element) {\n const originalDisplay = element.style.display;\n const originalVisibility = element.style.visibility;\n element.style.display = 'block';\n element.style.visibility = 'hidden';\n const styles = window.getComputedStyle(element);\n const width =\n element.offsetWidth + parseInt(styles.marginLeft, 10) + parseInt(styles.marginRight, 10);\n const height =\n element.offsetHeight + parseInt(styles.marginTop, 10) + parseInt(styles.marginBottom, 10);\n element.style.display = originalDisplay;\n element.style.visibility = originalVisibility;\n return { width, height };\n}\n\n/**\n * get the popup position\n * @param {HTMLElement} el relative element\n * @param {Number} targetWidth target element's width\n * @param {Number} targetHeight target element's height\n * @param {Boolean} fixed\n */\nexport function getRelativePosition(el, targetWidth, targetHeight, fixed) {\n let left = 0;\n let top = 0;\n let offsetX = 0;\n let offsetY = 0;\n const relativeRect = el.getBoundingClientRect();\n const dw = document.documentElement.clientWidth;\n const dh = document.documentElement.clientHeight;\n if (fixed) {\n offsetX = window.pageXOffset + relativeRect.left;\n offsetY = window.pageYOffset + relativeRect.top;\n }\n if (dw - relativeRect.left < targetWidth && relativeRect.right < targetWidth) {\n left = offsetX - relativeRect.left + 1;\n } else if (relativeRect.left + relativeRect.width / 2 <= dw / 2) {\n left = offsetX;\n } else {\n left = offsetX + relativeRect.width - targetWidth;\n }\n if (relativeRect.top <= targetHeight && dh - relativeRect.bottom <= targetHeight) {\n top = offsetY + dh - relativeRect.top - targetHeight;\n } else if (relativeRect.top + relativeRect.height / 2 <= dh / 2) {\n top = offsetY + relativeRect.height;\n } else {\n top = offsetY - targetHeight;\n }\n return { left: `${left}px`, top: `${top}px` };\n}\n\nexport function getScrollParent(node, until = document.body) {\n if (!node || node === until) {\n return null;\n }\n\n const style = (value, prop) => getComputedStyle(value, null).getPropertyValue(prop);\n\n const regex = /(auto|scroll)/;\n\n const scroll = regex.test(\n style(node, 'overflow') + style(node, 'overflow-y') + style(node, 'overflow-x')\n );\n\n return scroll ? node : getScrollParent(node.parentNode, until);\n}\n","<template>\n <transition :name=\"`${prefixClass}-zoom-in-down`\">\n <div\n v-if=\"visible\"\n :class=\"`${prefixClass}-datepicker-main ${prefixClass}-datepicker-popup`\"\n :style=\"{ top, left, position: 'absolute' }\"\n >\n <slot></slot>\n </div>\n </transition>\n</template>\n\n<script>\nimport { rafThrottle } from './util/throttle';\nimport { getPopupElementSize, getRelativePosition, getScrollParent } from './util/dom';\n\nexport default {\n name: 'Popup',\n inject: {\n prefixClass: {\n default: 'mx',\n },\n },\n props: {\n visible: {\n type: Boolean,\n default: false,\n },\n appendToBody: {\n type: Boolean,\n default: true,\n },\n },\n data() {\n return {\n top: '',\n left: '',\n };\n },\n watch: {\n visible: {\n immediate: true,\n handler(val) {\n this.$nextTick(() => {\n if (val) {\n this.displayPopup();\n }\n });\n },\n },\n },\n mounted() {\n if (this.appendToBody) {\n document.body.appendChild(this.$el);\n }\n this._clickoutEvent = 'ontouchend' in document ? 'touchstart' : 'mousedown';\n\n document.addEventListener(this._clickoutEvent, this.handleClickOutside);\n\n // change the popup position when resize or scroll\n const relativeElement = this.$parent.$el;\n this._displayPopup = rafThrottle(() => this.displayPopup());\n this._scrollParent = getScrollParent(relativeElement) || window;\n this._scrollParent.addEventListener('scroll', this._displayPopup);\n window.addEventListener('resize', this._displayPopup);\n },\n beforeDestroy() {\n if (this.appendToBody && this.$el.parentNode) {\n this.$el.parentNode.removeChild(this.$el);\n }\n\n document.removeEventListener(this._clickoutEvent, this.handleClickOutside);\n\n this._scrollParent.removeEventListener('scroll', this._displayPopup);\n window.removeEventListener('resize', this._displayPopup);\n },\n methods: {\n handleClickOutside(evt) {\n if (!this.visible) return;\n const { target } = evt;\n const el = this.$el;\n if (el && !el.contains(target)) {\n this.$emit('clickoutside', evt);\n }\n },\n displayPopup() {\n if (!this.visible) return;\n const popup = this.$el;\n const relativeElement = this.$parent.$el;\n const { appendToBody } = this;\n if (!this._popupRect) {\n this._popupRect = getPopupElementSize(popup);\n }\n const { width, height } = this._popupRect;\n const { left, top } = getRelativePosition(relativeElement, width, height, appendToBody);\n this.left = left;\n this.top = top;\n },\n },\n};\n</script>\n","<template>\n <button\n type=\"button\"\n :class=\"`${prefixClass}-btn ${prefixClass}-btn-text ${prefixClass}-btn-icon-${type}`\"\n v-on=\"$listeners\"\n >\n <i :class=\"`${prefixClass}-icon-${type}`\"></i>\n </button>\n</template>\n\n<script>\nexport default {\n props: {\n type: String,\n },\n inject: {\n prefixClass: {\n default: 'mx',\n },\n },\n};\n</script>\n","<template>\n <div :class=\"`${prefixClass}-calendar ${prefixClass}-calendar-panel-date`\">\n <div :class=\"`${prefixClass}-calendar-header`\">\n <icon-button type=\"double-left\" @click=\"handleIconDoubleLeftClick\"></icon-button>\n <icon-button type=\"left\" @click=\"handleIconLeftClick\"></icon-button>\n <icon-button type=\"double-right\" @click=\"handleIconDoubleRightClick\"></icon-button>\n <icon-button type=\"right\" @click=\"handleIconRightClick\"></icon-button>\n <span :class=\"`${prefixClass}-calendar-header-label`\">\n <button\n v-for=\"item in yearMonth\"\n :key=\"item.panel\"\n type=\"button\"\n :class=\"\n `${prefixClass}-btn ${prefixClass}-btn-text ${prefixClass}-btn-current-${item.panel}`\n \"\n @click=\"handlePanelChange(item.panel)\"\n >\n {{ item.label }}\n </button>\n </span>\n </div>\n <div :class=\"`${prefixClass}-calendar-content`\">\n <table :class=\"`${prefixClass}-table ${prefixClass}-table-date`\">\n <thead>\n <tr>\n <th v-if=\"showWeekNumber\" :class=\"`${prefixClass}-week-number-header`\"></th>\n <th v-for=\"day in days\" :key=\"day\">{{ day }}</th>\n </tr>\n </thead>\n <tbody @click=\"handleCellClick\">\n <tr\n v-for=\"(row, i) in dates\"\n :key=\"i\"\n :class=\"[`${prefixClass}-date-row`, getRowClasses(row)]\"\n >\n <td\n v-if=\"showWeekNumber\"\n :data-row-col=\"`${i},0`\"\n :class=\"`${prefixClass}-week-number`\"\n >\n {{ getWeekNumber(row[0]) }}\n </td>\n <td\n v-for=\"(cell, j) in row\"\n :key=\"j\"\n :data-row-col=\"`${i},${j}`\"\n class=\"cell\"\n :class=\"getCellClasses(cell)\"\n :title=\"getCellTitle(cell)\"\n >\n <div>{{ cell.getDate() }}</div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n\n<script>\nimport { getWeek, format } from 'date-format-parse';\nimport IconButton from './icon-button';\nimport { chunk } from '../util/base';\nimport { createDate, getCalendar } from '../util/date';\nimport { getLocale } from '../locale';\n\nexport default {\n name: 'TableDate',\n components: { IconButton },\n inject: {\n getLocale: {\n default: () => getLocale,\n },\n getWeek: {\n default: () => getWeek,\n },\n prefixClass: {\n default: 'mx',\n },\n },\n props: {\n calendar: {\n type: Date,\n default: () => new Date(),\n },\n showWeekNumber: {\n type: Boolean,\n default: false,\n },\n titleFormat: {\n type: String,\n default: 'YYYY-MM-DD',\n },\n getRowClasses: {\n type: Function,\n default: () => [],\n },\n getCellClasses: {\n type: Function,\n default: () => [],\n },\n },\n computed: {\n firstDayOfWeek() {\n return this.getLocale().formatLocale.firstDayOfWeek || 0;\n },\n yearMonth() {\n const { yearFormat, monthBeforeYear, monthFormat = 'MMM' } = this.getLocale();\n const yearLabel = {\n panel: 'year',\n label: this.formatDate(this.calendar, yearFormat),\n };\n const monthLabel = {\n panel: 'month',\n label: this.formatDate(this.calendar, monthFormat),\n };\n return monthBeforeYear ? [monthLabel, yearLabel] : [yearLabel, monthLabel];\n },\n days() {\n const locale = this.getLocale();\n const days = locale.days || locale.formatLocale.weekdaysMin;\n return days.concat(days).slice(this.firstDayOfWeek, this.firstDayOfWeek + 7);\n },\n dates() {\n const year = this.calendar.getFullYear();\n const month = this.calendar.getMonth();\n const arr = getCalendar({\n firstDayOfWeek: this.firstDayOfWeek,\n year,\n month,\n });\n return chunk(arr, 7);\n },\n },\n methods: {\n getNextCalendar(diffMonth) {\n const year = this.calendar.getFullYear();\n const month = this.calendar.getMonth();\n return createDate(year, month + diffMonth);\n },\n handleIconLeftClick() {\n this.$emit('changecalendar', this.getNextCalendar(-1), 'last-month');\n },\n handleIconRightClick() {\n this.$emit('changecalendar', this.getNextCalendar(1), 'next-month');\n },\n handleIconDoubleLeftClick() {\n this.$emit('changecalendar', this.getNextCalendar(-12), 'last-year');\n },\n handleIconDoubleRightClick() {\n this.$emit('changecalendar', this.getNextCalendar(12), 'next-year');\n },\n handlePanelChange(panel) {\n this.$emit('changepanel', panel);\n },\n handleCellClick(evt) {\n let { target } = evt;\n if (target.tagName.toUpperCase() === 'DIV') {\n target = target.parentNode;\n }\n const index = target.getAttribute('data-row-col');\n if (index) {\n const [row, col] = index.split(',').map(v => parseInt(v, 10));\n const date = this.dates[row][col];\n this.$emit('select', new Date(date));\n }\n },\n formatDate(date, fmt) {\n return format(date, fmt, { locale: this.getLocale().formatLocale });\n },\n getCellTitle(date) {\n const fmt = this.titleFormat;\n return this.formatDate(date, fmt);\n },\n getWeekNumber(date) {\n return this.getWeek(date, this.getLocale().formatLocale);\n },\n },\n};\n</script>\n","<template>\n <div :class=\"`${prefixClass}-calendar ${prefixClass}-calendar-panel-month`\">\n <div :class=\"`${prefixClass}-calendar-header`\">\n <icon-button type=\"double-left\" @click=\"handleIconDoubleLeftClick\"></icon-button>\n <icon-button type=\"double-right\" @click=\"handleIconDoubleRightClick\"></icon-button>\n <span :class=\"`${prefixClass}-calendar-header-label`\">\n <button\n type=\"button\"\n :class=\"`${prefixClass}-btn ${prefixClass}-btn-text`\"\n @click=\"handlePanelChange\"\n >\n {{ calendarYear }}\n </button>\n </span>\n </div>\n <div :class=\"`${prefixClass}-calendar-content`\">\n <table :class=\"`${prefixClass}-table ${prefixClass}-table-month`\" @click=\"handleClick\">\n <tr v-for=\"(row, i) in months\" :key=\"i\">\n <td\n v-for=\"(cell, j) in row\"\n :key=\"j\"\n :data-month=\"cell.month\"\n class=\"cell\"\n :class=\"getCellClasses(cell.month)\"\n >\n <div>{{ cell.text }}</div>\n </td>\n </tr>\n </table>\n </div>\n </div>\n</template>\n\n<script>\nimport { chunk } from '../util/base';\nimport IconButton from './icon-button';\nimport { getLocale } from '../locale';\nimport { createDate } from '../util/date';\n\nexport default {\n name: 'TableMonth',\n components: { IconButton },\n inject: {\n getLocale: {\n default: () => getLocale,\n },\n prefixClass: {\n default: 'mx',\n },\n },\n props: {\n calendar: {\n type: Date,\n default: () => new Date(),\n },\n getCellClasses: {\n type: Function,\n default: () => [],\n },\n },\n computed: {\n calendarYear() {\n return this.calendar.getFullYear();\n },\n months() {\n const locale = this.getLocale();\n const monthsLocale = locale.months || locale.formatLocale.monthsShort;\n const months = monthsLocale.map((text, month) => {\n return { text, month };\n });\n return chunk(months, 3);\n },\n },\n methods: {\n getNextCalendar(diffYear) {\n const year = this.calendar.getFullYear();\n const month = this.calendar.getMonth();\n return createDate(year + diffYear, month);\n },\n handleIconDoubleLeftClick() {\n this.$emit('changecalendar', this.getNextCalendar(-1), 'last-year');\n },\n handleIconDoubleRightClick() {\n this.$emit('changecalendar', this.getNextCalendar(1), 'next-year');\n },\n handlePanelChange() {\n this.$emit('changepanel', 'year');\n },\n handleClick(evt) {\n let { target } = evt;\n if (target.tagName.toUpperCase() === 'DIV') {\n target = target.parentNode;\n }\n const month = target.getAttribute('data-month');\n if (month) {\n this.$emit('select', parseInt(month, 10));\n }\n },\n },\n};\n</script>\n","<template>\n <div :class=\"`${prefixClass}-calendar ${prefixClass}-calendar-panel-year`\">\n <div :class=\"`${prefixClass}-calendar-header`\">\n <icon-button type=\"double-left\" @click=\"handleIconDoubleLeftClick\"></icon-button>\n <icon-button type=\"double-right\" @click=\"handleIconDoubleRightClick\"></icon-button>\n <span :class=\"`${prefixClass}-calendar-header-label`\">\n <span>{{ firstYear }}</span>\n <span :class=\"`${prefixClass}-calendar-decade-separator`\"></span>\n <span>{{ lastYear }}</span>\n </span>\n </div>\n <div :class=\"`${prefixClass}-calendar-content`\">\n <table :class=\"`${prefixClass}-table ${prefixClass}-table-year`\" @click=\"handleClick\">\n <tr v-for=\"(row, i) in years\" :key=\"i\">\n <td\n v-for=\"(cell, j) in row\"\n :key=\"j\"\n :data-year=\"cell\"\n class=\"cell\"\n :class=\"getCellClasses(cell)\"\n >\n <div>{{ cell }}</div>\n </td>\n </tr>\n </table>\n </div>\n </div>\n</template>\n\n<script>\nimport IconButton from './icon-button';\nimport { chunk } from '../util/base';\nimport { createDate } from '../util/date';\n\nexport default {\n name: 'TableYear',\n components: { IconButton },\n inject: {\n prefixClass: {\n default: 'mx',\n },\n },\n props: {\n calendar: {\n type: Date,\n default: () => new Date(),\n },\n getCellClasses: {\n type: Function,\n default: () => [],\n },\n getYearPanel: {\n type: Function,\n },\n },\n computed: {\n years() {\n const calendar = new Date(this.calendar);\n if (typeof this.getYearPanel === 'function') {\n return this.getYearPanel(calendar);\n }\n return this.getYears(calendar);\n },\n firstYear() {\n return this.years[0][0];\n },\n lastYear() {\n const last = arr => arr[arr.length - 1];\n return last(last(this.years));\n },\n },\n methods: {\n getYears(calendar) {\n const firstYear = Math.floor(calendar.getFullYear() / 10) * 10;\n const years = [];\n for (let i = 0; i < 10; i++) {\n years.push(firstYear + i);\n }\n return chunk(years, 2);\n },\n getNextCalendar(diffYear) {\n const year = this.calendar.getFullYear();\n const month = this.calendar.getMonth();\n return createDate(year + diffYear, month);\n },\n handleIconDoubleLeftClick() {\n this.$emit('changecalendar', this.getNextCalendar(-10), 'last-decade');\n },\n handleIconDoubleRightClick() {\n this.$emit('changecalendar', this.getNextCalendar(10), 'next-decade');\n },\n handleClick(evt) {\n let { target } = evt;\n if (target.tagName.toUpperCase() === 'DIV') {\n target = target.parentNode;\n }\n const year = target.getAttribute('data-year');\n if (year) {\n this.$emit('select', parseInt(year, 10));\n }\n },\n },\n};\n</script>\n","import {\n getValidDate,\n isValidDate,\n createDate,\n setMonth,\n startOfYear,\n startOfMonth,\n startOfDay,\n} from '../util/date';\nimport TableDate from './table-date';\nimport TableMonth from './table-month';\nimport TableYear from './table-year';\n\nexport default {\n name: 'CalendarPanel',\n inject: {\n prefixClass: {\n default: 'mx',\n },\n dispatchDatePicker: {\n default: () => () => {},\n },\n },\n props: {\n value: {},\n defaultValue: {\n default() {\n const date = new Date();\n date.setHours(0, 0, 0, 0);\n return date;\n },\n },\n defaultPanel: {\n type: String,\n },\n disabledDate: {\n type: Function,\n default: () => false,\n },\n type: {\n type: String,\n default: 'date',\n },\n getClasses: {\n type: Function,\n default: () => [],\n },\n showWeekNumber: {\n type: Boolean,\n default: undefined,\n },\n getYearPanel: {\n type: Function,\n },\n titleFormat: {\n type: String,\n default: 'YYYY-MM-DD',\n },\n calendar: Date,\n // update date when select year or month\n partialUpdate: {\n type: Boolean,\n default: false,\n },\n },\n data() {\n const panels = ['date', 'month', 'year'];\n const index = Math.max(panels.indexOf(this.type), panels.indexOf(this.defaultPanel));\n const panel = index !== -1 ? panels[index] : 'date';\n return {\n panel,\n innerCalendar: new Date(),\n };\n },\n computed: {\n innerValue() {\n const value = Array.isArray(this.value) ? this.value : [this.value];\n const map = {\n year: startOfYear,\n month: startOfMonth,\n date: startOfDay,\n };\n const start = map[this.type] || map.date;\n return value.filter(isValidDate).map(v => start(v));\n },\n calendarYear() {\n return this.innerCalendar.getFullYear();\n },\n calendarMonth() {\n return this.innerCalendar.getMonth();\n },\n },\n watch: {\n value: {\n immediate: true,\n handler: 'initCalendar',\n },\n calendar: {\n handler: 'initCalendar',\n },\n defaultValue: {\n handler: 'initCalendar',\n },\n },\n methods: {\n initCalendar() {\n let calendarDate = this.calendar;\n if (!isValidDate(calendarDate)) {\n const { length } = this.innerValue;\n calendarDate = getValidDate(length > 0 ? this.innerValue[length - 1] : this.defaultValue);\n }\n this.innerCalendar = startOfMonth(calendarDate);\n },\n isDisabled(date) {\n return this.disabledDate(new Date(date), this.innerValue);\n },\n emitDate(date, type) {\n if (!this.isDisabled(date)) {\n this.$emit('select', date, type, this.innerValue);\n // someone need get the first selected date to set range value. (#429)\n this.dispatchDatePicker('pick', date, type);\n }\n },\n handleCalendarChange(calendar, type) {\n const oldCalendar = new Date(this.innerCalendar);\n this.innerCalendar = calendar;\n this.$emit('update:calendar', calendar);\n this.dispatchDatePicker('calendar-change', calendar, oldCalendar, type);\n },\n handelPanelChange(panel) {\n const oldPanel = this.panel;\n this.panel = panel;\n this.dispatchDatePicker('panel-change', panel, oldPanel);\n },\n handleSelectYear(year) {\n if (this.type === 'year') {\n const date = this.getYearCellDate(year);\n this.emitDate(date, 'year');\n } else {\n this.handleCalendarChange(createDate(year, this.calendarMonth), 'year');\n this.handelPanelChange('month');\n if (this.partialUpdate && this.innerValue.length === 1) {\n const date = new Date(this.innerValue[0]);\n date.setFullYear(year);\n this.emitDate(date, 'year');\n }\n }\n },\n handleSelectMonth(month) {\n if (this.type === 'month') {\n const date = this.getMonthCellDate(month);\n this.emitDate(date, 'month');\n } else {\n this.handleCalendarChange(createDate(this.calendarYear, month), 'month');\n this.handelPanelChange('date');\n if (this.partialUpdate && this.innerValue.length === 1) {\n const date = new Date(this.innerValue[0]);\n date.setFullYear(this.calendarYear);\n this.emitDate(setMonth(date, month), 'month');\n }\n }\n },\n handleSelectDate(date) {\n this.emitDate(date, this.type === 'week' ? 'week' : 'date');\n },\n getMonthCellDate(month) {\n return createDate(this.calendarYear, month);\n },\n getYearCellDate(year) {\n return createDate(year, 0);\n },\n getDateClasses(cellDate) {\n const notCurrentMonth = cellDate.getMonth() !== this.calendarMonth;\n const classes = [];\n if (cellDate.getTime() === new Date().setHours(0, 0, 0, 0)) {\n classes.push('today');\n }\n if (notCurrentMonth) {\n classes.push('not-current-month');\n }\n const state = this.getStateClass(cellDate);\n if (!(state === 'active' && notCurrentMonth)) {\n classes.push(state);\n }\n return classes.concat(this.getClasses(cellDate, this.innerValue, classes.join(' ')));\n },\n getMonthClasses(month) {\n if (this.type !== 'month') {\n return this.calendarMonth === month ? 'active' : '';\n }\n const classes = [];\n const cellDate = this.getMonthCellDate(month);\n classes.push(this.getStateClass(cellDate));\n return classes.concat(this.getClasses(cellDate, this.innerValue, classes.join(' ')));\n },\n getYearClasses(year) {\n if (this.type !== 'year') {\n return this.calendarYear === year ? 'active' : '';\n }\n const classes = [];\n const cellDate = this.getYearCellDate(year);\n classes.push(this.getStateClass(cellDate));\n return classes.concat(this.getClasses(cellDate, this.innerValue, classes.join(' ')));\n },\n getStateClass(cellDate) {\n if (this.isDisabled(cellDate)) {\n return 'disabled';\n }\n if (this.innerValue.some(v => v.getTime() === cellDate.getTime())) {\n return 'active';\n }\n return '';\n },\n getWeekState(row) {\n if (this.type !== 'week') return '';\n const start = row[0].getTime();\n const end = row[6].getTime();\n const active = this.innerValue.some(v => {\n const time = v.getTime();\n return time >= start && time <= end;\n });\n return active ? `${this.prefixClass}-active-week` : '';\n },\n },\n render() {\n const { panel, innerCalendar } = this;\n if (panel === 'year') {\n return (\n <TableYear\n calendar={innerCalendar}\n getCellClasses={this.getYearClasses}\n getYearPanel={this.getYearPanel}\n onSelect={this.handleSelectYear}\n onChangecalendar={this.handleCalendarChange}\n />\n );\n }\n if (panel === 'month') {\n return (\n <TableMonth\n calendar={innerCalendar}\n getCellClasses={this.getMonthClasses}\n onSelect={this.handleSelectMonth}\n onChangepanel={this.handelPanelChange}\n onChangecalendar={this.handleCalendarChange}\n />\n );\n }\n return (\n <TableDate\n class={{ [`${this.prefixClass}-calendar-week-mode`]: this.type === 'week' }}\n calendar={innerCalendar}\n getCellClasses={this.getDateClasses}\n getRowClasses={this.getWeekState}\n titleFormat={this.titleFormat}\n showWeekNumber={\n typeof this.showWeekNumber === 'boolean' ? this.showWeekNumber : this.type === 'week'\n }\n onSelect={this.handleSelectDate}\n onChangepanel={this.handelPanelChange}\n onChangecalendar={this.handleCalendarChange}\n />\n );\n },\n};\n","import CalendarPanel from './calendar-panel';\nimport { getValidDate, isValidDate, isValidRangeDate, startOfMonth } from '../util/date';\n\nexport default {\n name: 'CalendarRange',\n components: { CalendarPanel },\n inject: {\n prefixClass: {\n default: 'mx',\n },\n },\n props: {\n ...CalendarPanel.props,\n },\n data() {\n return {\n innerValue: [],\n calendars: [],\n };\n },\n computed: {\n // Minimum difference between start and end calendars\n calendarMinDiff() {\n const map = {\n date: 1, // type:date min 1 month\n month: 1 * 12, // type:month min 1 year\n year: 10 * 12, // type:year min 10 year\n };\n return map[this.type] || map.date;\n },\n calendarMaxDiff() {\n return Infinity;\n },\n defaultValues() {\n return Array.isArray(this.defaultValue)\n ? this.defaultValue\n : [this.defaultValue, this.defaultValue];\n },\n },\n watch: {\n value: {\n immediate: true,\n handler() {\n this.innerValue = isValidRangeDate(this.value)\n ? this.value\n : [new Date(NaN), new Date(NaN)];\n const calendars = this.innerValue.map((v, i) =>\n startOfMonth(getValidDate(v, this.defaultValues[i]))\n );\n this.updateCalendars(calendars);\n },\n },\n },\n methods: {\n handleSelect(date, type) {\n const [startValue, endValue] = this.innerValue;\n if (isValidDate(startValue) && !isValidDate(endValue)) {\n if (startValue.getTime() > date.getTime()) {\n this.innerValue = [date, startValue];\n } else {\n this.innerValue = [startValue, date];\n }\n this.emitDate(this.innerValue, type);\n } else {\n this.innerValue = [date, new Date(NaN)];\n }\n },\n emitDate(dates, type) {\n this.$emit('select', dates, type);\n },\n updateStartCalendar(value) {\n this.updateCalendars([value, this.calendars[1]], 1);\n },\n updateEndCalendar(value) {\n this.updateCalendars([this.calendars[0], value], 0);\n },\n updateCalendars(calendars, adjustIndex = 1) {\n const gap = this.getCalendarGap(calendars);\n if (gap) {\n const calendar = new Date(calendars[adjustIndex]);\n calendar.setMonth(calendar.getMonth() + (adjustIndex === 0 ? -gap : gap));\n calendars[adjustIndex] = calendar;\n }\n this.calendars = calendars;\n },\n getCalendarGap(calendars) {\n const [calendarLeft, calendarRight] = calendars;\n const yearDiff = calendarRight.getFullYear() - calendarLeft.getFullYear();\n const monthDiff = calendarRight.getMonth() - calendarLeft.getMonth();\n const diff = yearDiff * 12 + monthDiff;\n const min = this.calendarMinDiff;\n const max = this.calendarMaxDiff;\n if (diff < min) {\n return min - diff;\n }\n if (diff > max) {\n return max - diff;\n }\n return 0;\n },\n getRangeClasses(cellDate, currentDates, classnames) {\n const classes = [].concat(this.getClasses(cellDate, currentDates, classnames));\n if (\n !/disabled|active|not-current-month/.test(classnames) &&\n currentDates.length === 2 &&\n cellDate.getTime() > currentDates[0].getTime() &&\n cellDate.getTime() < currentDates[1].getTime()\n ) {\n classes.push('in-range');\n }\n return classes;\n },\n },\n render() {\n const calendarRange = this.calendars.map((calendar, index) => {\n const props = {\n ...this.$props,\n calendar,\n value: this.innerValue,\n defaultValue: this.defaultValues[index],\n getClasses: this.getRangeClasses,\n // don't update when range is true\n partialUpdate: false,\n };\n const on = {\n select: this.handleSelect,\n 'update:calendar': index === 0 ? this.updateStartCalendar : this.updateEndCalendar,\n };\n return <calendar-panel {...{ props, on }}></calendar-panel>;\n });\n\n const { prefixClass } = this;\n\n return <div class={`${prefixClass}-range-wrapper`}>{calendarRange}</div>;\n },\n};\n","let scrollBarWidth;\n\nexport default function() {\n if (typeof window === 'undefined') return 0;\n if (scrollBarWidth !== undefined) return scrollBarWidth;\n\n const outer = document.createElement('div');\n outer.style.visibility = 'hidden';\n outer.style.overflow = 'scroll';\n outer.style.width = '100px';\n outer.style.position = 'absolute';\n outer.style.top = '-9999px';\n document.body.appendChild(outer);\n\n const inner = document.createElement('div');\n inner.style.width = '100%';\n outer.appendChild(inner);\n\n scrollBarWidth = outer.offsetWidth - inner.offsetWidth;\n outer.parentNode.removeChild(outer);\n\n return scrollBarWidth;\n}\n","<template>\n <div\n :class=\"`${prefixClass}-scrollbar`\"\n :style=\"{\n position: 'relative',\n overflow: 'hidden',\n }\"\n >\n <div\n ref=\"wrap\"\n :class=\"`${prefixClass}-scrollbar-wrap`\"\n :style=\"{ marginRight: `-${scrollbarWidth}px` }\"\n @scroll=\"handleScroll\"\n >\n <slot></slot>\n </div>\n <div :class=\"`${prefixClass}-scrollbar-track`\">\n <div\n ref=\"thumb\"\n :class=\"`${prefixClass}-scrollbar-thumb`\"\n :style=\"{ height: thumbHeight, top: thumbTop }\"\n @mousedown=\"handleDragstart\"\n ></div>\n </div>\n </div>\n</template>\n\n<script>\n/* istanbul ignore file */\nimport getScrollbarWidth from '../util/scrollbar-width';\n\nexport default {\n inject: {\n prefixClass: {\n default: 'mx',\n },\n },\n data() {\n return {\n scrollbarWidth: 0,\n thumbTop: '',\n thumbHeight: '',\n };\n },\n created() {\n this.scrollbarWidth = getScrollbarWidth();\n document.addEventListener('mouseup', this.handleDragend);\n },\n beforeDestroy() {\n document.addEventListener('mouseup', this.handleDragend);\n },\n mounted() {\n this.$nextTick(this.getThumbSize);\n },\n methods: {\n getThumbSize() {\n const { wrap } = this.$refs;\n if (!wrap) return;\n const heightPercentage = (wrap.clientHeight * 100) / wrap.scrollHeight;\n this.thumbHeight = heightPercentage < 100 ? `${heightPercentage}%` : '';\n },\n handleScroll(evt) {\n const el = evt.currentTarget;\n const { scrollHeight, scrollTop } = el;\n this.thumbTop = `${(scrollTop * 100) / scrollHeight}%`;\n },\n handleDragstart(evt) {\n evt.stopImmediatePropagation();\n this._draggable = true;\n const { offsetTop } = this.$refs.thumb;\n this._prevY = evt.clientY - offsetTop;\n document.addEventListener('mousemove', this.handleDraging);\n },\n handleDraging(evt) {\n if (!this._draggable) return;\n const { clientY } = evt;\n const { wrap } = this.$refs;\n const { scrollHeight, clientHeight } = wrap;\n const offsetY = clientY - this._prevY;\n const top = (offsetY * scrollHeight) / clientHeight;\n wrap.scrollTop = top;\n },\n handleDragend() {\n if (this._draggable) {\n this._draggable = false;\n document.removeEventListener('mousemove', this.handleDraging);\n }\n },\n },\n};\n</script>\n","<template>\n <div :class=\"`${prefixClass}-time-columns`\">\n <scrollbar-vertical v-for=\"(col, i) in columns\" :key=\"i\" :class=\"`${prefixClass}-time-column`\">\n <ul\n :class=\"`${prefixClass}-time-list`\"\n :data-type=\"col.type\"\n :data-index=\"i\"\n @click=\"handleSelect\"\n >\n <li\n v-for=\"(item, j) in col.list\"\n :key=\"item.value\"\n :data-index=\"j\"\n :class=\"[`${prefixClass}-time-item`, getClasses(item.value)]\"\n >\n {{ item.text }}\n </li>\n </ul>\n </scrollbar-vertical>\n </div>\n</template>\n\n<script>\nimport ScrollbarVertical from '../scrollbar/scrollbar-vertical';\nimport { getScrollParent } from '../util/dom';\n\nconst padNumber = value => {\n value = parseInt(value, 10);\n return value < 10 ? `0${value}` : `${value}`;\n};\n\nconst generateOptions = (length, step, options) => {\n if (Array.isArray(options)) {\n return options.filter(v => v >= 0 && v < length);\n }\n if (step <= 0) {\n step = 1;\n }\n const arr = [];\n for (let i = 0; i < length; i += step) {\n arr.push(i);\n }\n return arr;\n};\n\nconst scrollTo = (element, to, duration = 0) => {\n // jump to target if duration zero\n if (duration <= 0) {\n requestAnimationFrame(() => {\n element.scrollTop = to;\n });\n return;\n }\n const difference = to - element.scrollTop;\n const tick = (difference / duration) * 10;\n requestAnimationFrame(() => {\n const scrollTop = element.scrollTop + tick;\n if (scrollTop >= to) {\n element.scrollTop = to;\n return;\n }\n element.scrollTop = scrollTop;\n scrollTo(element, to, duration - 10);\n });\n};\n\nexport default {\n name: 'ListColumns',\n components: { ScrollbarVertical },\n inject: {\n prefixClass: {\n default: 'mx',\n },\n },\n props: {\n date: Date,\n scrollDuration: {\n type: Number,\n default: 100,\n },\n getClasses: {\n type: Function,\n default: () => [],\n },\n hourOptions: Array,\n minuteOptions: Array,\n secondOptions: Array,\n showHour: {\n type: Boolean,\n default: true,\n },\n showMinute: {\n type: Boolean,\n default: true,\n },\n showSecond: {\n type: Boolean,\n default: true,\n },\n hourStep: {\n type: Number,\n default: 1,\n },\n minuteStep: {\n type: Number,\n default: 1,\n },\n secondStep: {\n type: Number,\n default: 1,\n },\n use12h: {\n type: Boolean,\n default: false,\n },\n },\n computed: {\n columns() {\n const cols = [];\n if (this.showHour) cols.push({ type: 'hour', list: this.getHoursList() });\n if (this.showMinute) cols.push({ type: 'minute', list: this.getMinutesList() });\n if (this.showSecond) cols.push({ type: 'second', list: this.getSecondsList() });\n if (this.use12h) cols.push({ type: 'ampm', list: this.getAMPMList() });\n\n return cols.filter(v => v.list.length > 0);\n },\n },\n watch: {\n date: {\n handler() {\n this.$nextTick(() => {\n this.scrollToSelected(this.scrollDuration);\n });\n },\n },\n },\n mounted() {\n this.scrollToSelected(0);\n },\n methods: {\n getHoursList() {\n return generateOptions(this.use12h ? 12 : 24, this.hourStep, this.hourOptions).map(num => {\n const date = new Date(this.date);\n let text = padNumber(num);\n if (this.use12h) {\n if (num === 0) {\n text = '12';\n }\n if (date.getHours() >= 12) {\n num += 12;\n }\n }\n const value = date.setHours(num);\n return { value, text };\n });\n },\n getMinutesList() {\n return generateOptions(60, this.minuteStep, this.minuteOptions).map(num => {\n const value = new Date(this.date).setMinutes(num);\n return { value, text: padNumber(num) };\n });\n },\n getSecondsList() {\n return generateOptions(60, this.secondStep, this.secondOptions).map(num => {\n const value = new Date(this.date).setSeconds(num);\n return { value, text: padNumber(num) };\n });\n },\n getAMPMList() {\n return ['AM', 'PM'].map((text, i) => {\n const date = new Date(this.date);\n const value = date.setHours((date.getHours() % 12) + i * 12);\n return { text, value };\n });\n },\n scrollToSelected(duration) {\n const elements = this.$el.querySelectorAll('.active');\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n const scrollElement = getScrollParent(element, this.$el);\n if (scrollElement) {\n const to = element.offsetTop;\n scrollTo(scrollElement, to, duration);\n }\n }\n },\n handleSelect(evt) {\n const { target, currentTarget } = evt;\n if (target.tagName.toUpperCase() !== 'LI') return;\n const type = currentTarget.getAttribute('data-type');\n const colIndex = parseInt(currentTarget.getAttribute('data-index'), 10);\n const cellIndex = parseInt(target.getAttribute('data-index'), 10);\n const { value } = this.columns[colIndex].list[cellIndex];\n this.$emit('select', value, type);\n },\n },\n};\n</script>\n","<template>\n <scrollbar-vertical>\n <div\n v-for=\"item in list\"\n :key=\"item.value\"\n :class=\"[`${prefixClass}-time-option`, getClasses(item.value)]\"\n @click=\"handleSelect(item.value)\"\n >\n {{ item.text }}\n </div>\n </scrollbar-vertical>\n</template>\n\n<script>\nimport { format } from 'date-format-parse';\nimport ScrollbarVertical from '../scrollbar/scrollbar-vertical';\nimport { getScrollParent } from '../util/dom';\nimport { getLocale } from '../locale';\n\nfunction parseOption(time = '') {\n const values = time.split(':');\n if (values.length >= 2) {\n const hours = parseInt(values[0], 10);\n const minutes = parseInt(values[1], 10);\n return {\n hours,\n minutes,\n };\n }\n return null;\n}\n\nconst scrollTo = (element, to) => {\n if (element) {\n element.scrollTop = to;\n }\n};\n\nexport default {\n name: 'ListOptions',\n components: { ScrollbarVertical },\n inject: {\n getLocale: {\n default: () => getLocale,\n },\n prefixClass: {\n default: 'mx',\n },\n },\n props: {\n date: Date,\n options: {\n type: [Object, Function],\n default() {\n return [];\n },\n },\n format: {\n type: String,\n default: 'HH:mm:ss',\n },\n getClasses: {\n type: Function,\n default: () => [],\n },\n },\n computed: {\n list() {\n const result = [];\n const { options } = this;\n if (typeof options === 'function') {\n return options() || [];\n }\n const start = parseOption(options.start);\n const end = parseOption(options.end);\n const step = parseOption(options.step);\n const fmt = options.format || this.format;\n if (start && end && step) {\n const startMinutes = start.minutes + start.hours * 60;\n const endMinutes = end.minutes + end.hours * 60;\n const stepMinutes = step.minutes + step.hours * 60;\n const len = Math.floor((endMinutes - startMinutes) / stepMinutes);\n for (let i = 0; i <= len; i++) {\n const timeMinutes = startMinutes + i * stepMinutes;\n const hours = Math.floor(timeMinutes / 60);\n const minutes = timeMinutes % 60;\n const value = new Date(this.date).setHours(hours, minutes, 0);\n result.push({\n value,\n text: this.formatDate(value, fmt),\n });\n }\n }\n return result;\n },\n },\n mounted() {\n this.scrollToSelected();\n },\n methods: {\n formatDate(date, fmt) {\n return format(date, fmt, { locale: this.getLocale().formatLocale });\n },\n scrollToSelected() {\n const element = this.$el.querySelector('.active');\n if (!element) return;\n const scrollElement = getScrollParent(element, this.$el);\n if (!scrollElement) return;\n const to = element.offsetTop;\n scrollTo(scrollElement, to);\n },\n handleSelect(value) {\n this.$emit('select', value, 'time');\n },\n },\n};\n</script>\n","<template>\n <div :class=\"`${prefixClass}-time`\">\n <div v-if=\"showTimeHeader\" :class=\"`${prefixClass}-time-header`\">\n <button\n type=\"button\"\n :class=\"`${prefixClass}-btn ${prefixClass}-btn-text ${prefixClass}-time-header-title`\"\n @click=\"handleClickTitle\"\n >\n {{ title }}\n </button>\n </div>\n <div :class=\"`${prefixClass}-time-content`\">\n <list-options\n v-if=\"timePickerOptions\"\n :date=\"innerValue\"\n :get-classes=\"getClasses\"\n :options=\"timePickerOptions\"\n :format=\"innerForamt\"\n @select=\"handleSelect\"\n ></list-options>\n <list-columns\n v-else\n :date=\"innerValue\"\n :get-classes=\"getClasses\"\n :hour-options=\"hourOptions\"\n :minute-options=\"minuteOptions\"\n :second-options=\"secondOptions\"\n :hour-step=\"hourStep\"\n :minute-step=\"minuteStep\"\n :second-step=\"secondStep\"\n :scroll-duration=\"scrollDuration\"\n v-bind=\"ShowHourMinuteSecondAMPM\"\n @select=\"handleSelect\"\n ></list-columns>\n </div>\n </div>\n</template>\n\n<script>\nimport { format } from 'date-format-parse';\nimport { getValidDate } from '../util/date';\nimport ListColumns from './list-columns';\nimport ListOptions from './list-options';\nimport { getLocale } from '../locale';\n\nexport default {\n name: 'TimePanel',\n components: { ListColumns, ListOptions },\n inject: {\n getLocale: {\n default: () => getLocale,\n },\n prefixClass: {\n default: 'mx',\n },\n },\n props: {\n value: {},\n defaultValue: {\n default() {\n const date = new Date();\n date.setHours(0, 0, 0, 0);\n return date;\n },\n },\n format: {\n default: 'HH:mm:ss',\n },\n timeTitleFormat: {\n type: String,\n default: 'YYYY-MM-DD',\n },\n showTimeHeader: {\n type: Boolean,\n default: false,\n },\n disabledTime: {\n type: Function,\n default: () => false,\n },\n timePickerOptions: {\n type: [Object, Function],\n default() {\n return null;\n },\n },\n hourOptions: Array,\n minuteOptions: Array,\n secondOptions: Array,\n hourStep: {\n type: Number,\n default: 1,\n },\n minuteStep: {\n type: Number,\n default: 1,\n },\n secondStep: {\n type: Number,\n default: 1,\n },\n showHour: {\n type: Boolean,\n default: undefined,\n },\n showMinute: {\n type: Boolean,\n default: undefined,\n },\n showSecond: {\n type: Boolean,\n default: undefined,\n },\n use12h: {\n type: Boolean,\n default: undefined,\n },\n scrollDuration: {\n type: Number,\n default: 100,\n },\n },\n computed: {\n innerValue() {\n return getValidDate(this.value, this.defaultValue);\n },\n title() {\n const titleFormat = this.timeTitleFormat;\n const date = new Date(this.innerValue);\n return this.formatDate(date, titleFormat);\n },\n innerForamt() {\n return typeof this.format === 'string' ? this.format : 'HH:mm:ss';\n },\n ShowHourMinuteSecondAMPM() {\n const fmt = this.innerForamt;\n const defaultProps = {\n showHour: /[HhKk]/.test(fmt),\n showMinute: /m/.test(fmt),\n showSecond: /s/.test(fmt),\n use12h: /a/i.test(fmt),\n };\n const obj = {};\n Object.keys(defaultProps).forEach(key => {\n obj[key] = typeof this[key] === 'boolean' ? this[key] : defaultProps[key];\n });\n return obj;\n },\n },\n methods: {\n formatDate(date, fmt) {\n return format(date, fmt, { locale: this.getLocale().formatLocale });\n },\n isDisabled(date) {\n return this.disabledTime(new Date(date));\n },\n handleSelect(value, type) {\n const date = new Date(value);\n if (!this.isDisabled(value)) {\n this.$emit('select', date, type);\n }\n },\n handleClickTitle() {\n this.$emit('clicktitle');\n },\n getClasses(value) {\n const cellDate = new Date(value);\n if (this.isDisabled(value)) {\n return 'disabled';\n }\n if (cellDate.getTime() === this.innerValue.getTime()) {\n return 'active';\n }\n return '';\n },\n },\n};\n</script>\n","import TimePanel from './time-panel';\nimport { isValidRangeDate } from '../util/date';\n\nexport default {\n name: 'TimeRange',\n inject: {\n prefixClass: {\n default: 'mx',\n },\n },\n props: {\n ...TimePanel.props,\n },\n data() {\n return {\n startValue: new Date(NaN),\n endValue: new Date(NaN),\n };\n },\n watch: {\n value: {\n immediate: true,\n handler() {\n if (isValidRangeDate(this.value)) {\n const [startValue, endValue] = this.value;\n this.startValue = startValue;\n this.endValue = endValue;\n } else {\n this.startValue = new Date(NaN);\n this.endValue = new Date(NaN);\n }\n },\n },\n },\n methods: {\n emitChange(type, index) {\n const date = [this.startValue, this.endValue];\n this.$emit('select', date, type === 'time' ? 'time-range' : type, index);\n },\n handleSelectStart(date, type) {\n this.startValue = date;\n // check the NaN\n if (!(this.endValue.getTime() >= date.getTime())) {\n this.endValue = date;\n }\n this.emitChange(type, 0);\n },\n handleSelectEnd(date, type) {\n // check the NaN\n this.endValue = date;\n if (!(this.startValue.getTime() <= date.getTime())) {\n this.startValue = date;\n }\n this.emitChange(type, 1);\n },\n disabledStartTime(date) {\n return this.disabledTime(date, 0);\n },\n disabledEndTime(date) {\n return date.getTime() < this.startValue.getTime() || this.disabledTime(date, 1);\n },\n },\n render() {\n const defaultValues = Array.isArray(this.defaultValue)\n ? this.defaultValue\n : [this.defaultValue, this.defaultValue];\n\n const { prefixClass } = this;\n\n return (\n <div class={`${prefixClass}-range-wrapper`}>\n <TimePanel\n {...{\n props: {\n ...this.$props,\n value: this.startValue,\n defaultValue: defaultValues[0],\n disabledTime: this.disabledStartTime,\n },\n on: {\n ...this.$listeners,\n select: this.handleSelectStart,\n },\n }}\n />\n <TimePanel\n {...{\n props: {\n ...this.$props,\n value: this.endValue,\n defaultValue: defaultValues[1],\n disabledTime: this.disabledEndTime,\n },\n on: {\n ...this.$listeners,\n select: this.handleSelectEnd,\n },\n }}\n />\n </div>\n );\n },\n};\n","import CalendarPanel from '../calendar/calendar-panel';\nimport TimePanel from '../time/time-panel';\nimport { assignTime, getValidDate } from '../util/date';\nimport { pick } from '../util/base';\n\nexport default {\n name: 'DatetimePanel',\n inject: {\n prefixClass: {\n default: 'mx',\n },\n },\n emits: ['select', 'update:show-time-panel'],\n props: {\n ...CalendarPanel.props,\n ...TimePanel.props,\n showTimePanel: {\n type: Boolean,\n default: undefined,\n },\n },\n data() {\n return {\n defaultTimeVisible: false,\n currentValue: this.value,\n };\n },\n computed: {\n timeVisible() {\n return typeof this.showTimePanel === 'boolean' ? this.showTimePanel : this.defaultTimeVisible;\n },\n },\n watch: {\n value(val) {\n this.currentValue = val;\n },\n defaultTimeVisible(val) {\n this.$emit('update:show-time-panel', val);\n },\n },\n methods: {\n closeTimePanel() {\n this.defaultTimeVisible = false;\n },\n openTimePanel() {\n this.defaultTimeVisible = true;\n },\n emitDate(date, type) {\n this.$emit('select', date, type);\n },\n handleSelect(date, type) {\n if (type === 'date') {\n this.openTimePanel();\n }\n let datetime = assignTime(date, getValidDate(this.value, this.defaultValue));\n if (this.disabledTime(new Date(datetime))) {\n // set the time of defalutValue;\n datetime = assignTime(date, this.defaultValue);\n if (this.disabledTime(new Date(datetime))) {\n // if disabled don't emit date\n this.currentValue = datetime;\n return;\n }\n }\n this.emitDate(datetime, type);\n },\n },\n render() {\n const calendarProps = {\n props: {\n ...pick(this.$props, Object.keys(CalendarPanel.props)),\n type: 'date',\n value: this.currentValue,\n },\n on: {\n select: this.handleSelect,\n },\n };\n const timeProps = {\n props: {\n ...pick(this.$props, Object.keys(TimePanel.props)),\n showTimeHeader: true,\n value: this.currentValue,\n },\n on: {\n select: this.emitDate,\n clicktitle: this.closeTimePanel,\n },\n };\n\n const { prefixClass } = this;\n\n return (\n <div>\n <CalendarPanel {...calendarProps} />\n {this.timeVisible && <TimePanel class={`${prefixClass}-calendar-time`} {...timeProps} />}\n </div>\n );\n },\n};\n","import CalendarRange from '../calendar/calendar-range';\nimport TimeRange from '../time/time-range';\nimport { pick } from '../util/base';\nimport { isValidRangeDate, assignTime } from '../util/date';\n\nexport default {\n name: 'DatetimeRange',\n inject: {\n prefixClass: {\n default: 'mx',\n },\n },\n emits: ['select', 'update:show-time-panel'],\n props: {\n ...CalendarRange.props,\n ...TimeRange.props,\n showTimePanel: {\n type: Boolean,\n default: undefined,\n },\n },\n data() {\n return {\n defaultTimeVisible: false,\n currentValue: this.value,\n };\n },\n computed: {\n timeVisible() {\n return typeof this.showTimePanel === 'boolean' ? this.showTimePanel : this.defaultTimeVisible;\n },\n },\n watch: {\n value(val) {\n this.currentValue = val;\n },\n defaultTimeVisible(val) {\n this.$emit('update:show-time-panel', val);\n },\n },\n methods: {\n closeTimePanel() {\n this.defaultTimeVisible = false;\n },\n openTimePanel() {\n this.defaultTimeVisible = true;\n },\n emitDate(dates, type) {\n this.$emit('select', dates, type);\n },\n handleSelect(dates, type) {\n if (type === 'date') {\n this.openTimePanel();\n }\n const defaultValues = Array.isArray(this.defaultValue)\n ? this.defaultValue\n : [this.defaultValue, this.defaultValue];\n let datetimes = dates.map((date, i) => {\n const time = isValidRangeDate(this.value) ? this.value[i] : defaultValues[i];\n return assignTime(date, time);\n });\n if (datetimes[1].getTime() < datetimes[0].getTime()) {\n datetimes = [datetimes[0], datetimes[0]];\n }\n if (datetimes.some(this.disabledTime)) {\n datetimes = dates.map((date, i) => assignTime(date, defaultValues[i]));\n if (datetimes.some(this.disabledTime)) {\n this.currentValue = datetimes;\n return;\n }\n }\n this.emitDate(datetimes, type);\n },\n },\n render() {\n const calendarProps = {\n props: {\n ...pick(this.$props, Object.keys(CalendarRange.props)),\n type: 'date',\n value: this.currentValue,\n },\n on: {\n select: this.handleSelect,\n },\n };\n const timeProps = {\n props: {\n ...pick(this.$props, Object.keys(TimeRange.props)),\n value: this.currentValue,\n showTimeHeader: true,\n },\n on: {\n select: this.emitDate,\n clicktitle: this.closeTimePanel,\n },\n };\n\n const { prefixClass } = this;\n\n return (\n <div>\n <CalendarRange {...calendarProps} />\n {this.timeVisible && <TimeRange class={`${prefixClass}-calendar-time`} {...timeProps} />}\n </div>\n );\n },\n};\n","import { parse, format, getWeek } from 'date-format-parse';\nimport { isValidDate, isValidRangeDate, isValidDates } from './util/date';\nimport { pick, isObject, mergeDeep } from './util/base';\nimport { getLocale } from './locale';\nimport Popup from './popup';\nimport IconCalendar from './icon/icon-calendar';\nimport IconClose from './icon/icon-close';\nimport CalendarPanel from './calendar/calendar-panel';\nimport CalendarRange from './calendar/calendar-range';\nimport TimePanel from './time/time-panel';\nimport TimeRange from './time/time-range';\nimport DatetimePanel from './datetime/datetime-panel';\nimport DatetimeRange from './datetime/datetime-range';\n\nconst componentMap = {\n default: CalendarPanel,\n time: TimePanel,\n datetime: DatetimePanel,\n};\nconst componentRangeMap = {\n default: CalendarRange,\n time: TimeRange,\n datetime: DatetimeRange,\n};\n\nexport default {\n name: 'DatePicker',\n provide() {\n return {\n // make locale reactive\n getLocale: () => this.locale,\n getWeek: this.getWeek,\n prefixClass: this.prefixClass,\n dispatchDatePicker: this.$emit.bind(this),\n };\n },\n props: {\n ...DatetimePanel.props,\n value: {},\n valueType: {\n type: String,\n default: 'date', // date, format, timestamp, or token like 'YYYY-MM-DD'\n },\n type: {\n type: String, // ['date', 'datetime', 'time', 'year', 'month', 'week']\n default: 'date',\n },\n format: {\n type: String,\n },\n formatter: {\n type: Object,\n },\n range: {\n type: Boolean,\n default: false,\n },\n multiple: {\n type: Boolean,\n default: false,\n },\n rangeSeparator: {\n type: String,\n },\n lang: {\n type: [String, Object],\n },\n placeholder: {\n type: String,\n default: '',\n },\n editable: {\n type: Boolean,\n default: true,\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n clearable: {\n type: Boolean,\n default: true,\n },\n prefixClass: {\n type: String,\n default: 'mx',\n },\n inputClass: {},\n inputAttr: {\n type: Object,\n default: () => ({}),\n },\n appendToBody: {\n type: Boolean,\n default: true,\n },\n open: {\n type: Boolean,\n default: undefined,\n },\n popupClass: {},\n popupStyle: {\n type: Object,\n default: () => ({}),\n },\n inline: {\n type: Boolean,\n default: false,\n },\n confirm: {\n type: Boolean,\n default: false,\n },\n confirmText: {\n type: String,\n default: 'OK',\n },\n renderInputText: {\n type: Function,\n },\n shortcuts: {\n type: Array,\n validator(value) {\n return (\n Array.isArray(value) &&\n value.every(\n v => isObject(v) && typeof v.text === 'string' && typeof v.onClick === 'function'\n )\n );\n },\n default() {\n return [];\n },\n },\n },\n data() {\n return {\n // cache the innervalue, wait to confirm\n currentValue: null,\n userInput: null,\n defaultOpen: false,\n };\n },\n computed: {\n popupVisible() {\n return !this.disabled && (typeof this.open === 'boolean' ? this.open : this.defaultOpen);\n },\n innerRangeSeparator() {\n return this.rangeSeparator || (this.multiple ? ',' : ' ~ ');\n },\n innerFormat() {\n const map = {\n date: 'YYYY-MM-DD',\n datetime: 'YYYY-MM-DD HH:mm:ss',\n year: 'YYYY',\n month: 'YYYY-MM',\n time: 'HH:mm:ss',\n week: 'w',\n };\n return this.format || map[this.type] || map.date;\n },\n innerValue() {\n let { value } = this;\n if (this.validMultipleType) {\n value = Array.isArray(value) ? value : [];\n return value.map(this.value2date);\n }\n if (this.range) {\n value = Array.isArray(value) ? value.slice(0, 2) : [null, null];\n return value.map(this.value2date);\n }\n return this.value2date(value);\n },\n text() {\n if (this.userInput !== null) {\n return this.userInput;\n }\n if (typeof this.renderInputText === 'function') {\n return this.renderInputText(this.innerValue);\n }\n if (!this.isValidValue(this.innerValue)) {\n return '';\n }\n if (Array.isArray(this.innerValue)) {\n return this.innerValue.map(v => this.formatDate(v)).join(this.innerRangeSeparator);\n }\n return this.formatDate(this.innerValue);\n },\n showClearIcon() {\n return !this.disabled && this.clearable && this.text;\n },\n locale() {\n if (isObject(this.lang)) {\n return mergeDeep(getLocale(), this.lang);\n }\n return getLocale(this.lang);\n },\n validMultipleType() {\n const types = ['date', 'month', 'year'];\n return this.multiple && !this.range && types.indexOf(this.type) !== -1;\n },\n },\n watch: {\n innerValue: {\n immediate: true,\n handler(val) {\n this.currentValue = val;\n },\n },\n },\n created() {\n if (typeof this.format === 'object') {\n console.warn(\n \"[vue2-datepicker]: The prop `format` don't support Object any more. You can use the new prop `formatter` to replace it\"\n );\n }\n },\n methods: {\n handleClickOutSide(evt) {\n const { target } = evt;\n if (!this.$el.contains(target)) {\n this.closePopup();\n }\n },\n getFormatter(key) {\n return (\n (isObject(this.formatter) && this.formatter[key]) ||\n (isObject(this.format) && this.format[key])\n );\n },\n getWeek(date, options) {\n if (typeof this.getFormatter('getWeek') === 'function') {\n return this.getFormatter('getWeek')(date, options);\n }\n return getWeek(date, options);\n },\n parseDate(value, fmt) {\n fmt = fmt || this.innerFormat;\n if (typeof this.getFormatter('parse') === 'function') {\n return this.getFormatter('parse')(value, fmt);\n }\n const backupDate = new Date();\n return parse(value, fmt, { locale: this.locale.formatLocale, backupDate });\n },\n formatDate(date, fmt) {\n fmt = fmt || this.innerFormat;\n if (typeof this.getFormatter('stringify') === 'function') {\n return this.getFormatter('stringify')(date, fmt);\n }\n return format(date, fmt, { locale: this.locale.formatLocale });\n },\n // transform the outer value to inner date\n value2date(value) {\n switch (this.valueType) {\n case 'date':\n return value instanceof Date ? new Date(value.getTime()) : new Date(NaN);\n case 'timestamp':\n return typeof value === 'number' ? new Date(value) : new Date(NaN);\n case 'format':\n return typeof value === 'string' ? this.parseDate(value) : new Date(NaN);\n default:\n return typeof value === 'string' ? this.parseDate(value, this.valueType) : new Date(NaN);\n }\n },\n // transform the inner date to outer value\n date2value(date) {\n if (!isValidDate(date)) return null;\n switch (this.valueType) {\n case 'date':\n return date;\n case 'timestamp':\n return date.getTime();\n case 'format':\n return this.formatDate(date);\n default:\n return this.formatDate(date, this.valueType);\n }\n },\n emitValue(date, type) {\n // fix IE11/10 trigger input event when input is focused. (placeholder !== '')\n this.userInput = null;\n const value = Array.isArray(date) ? date.map(this.date2value) : this.date2value(date);\n this.$emit('input', value);\n this.$emit('change', value, type);\n this.afterEmitValue(type);\n return value;\n },\n afterEmitValue(type) {\n // this.type === 'datetime', click the time should close popup\n if (!type || type === this.type || type === 'time') {\n this.closePopup();\n }\n },\n isValidValue(value) {\n if (this.validMultipleType) {\n return isValidDates(value);\n }\n if (this.range) {\n return isValidRangeDate(value);\n }\n return isValidDate(value);\n },\n isValidValueAndNotDisabled(value) {\n if (!this.isValidValue(value)) {\n return false;\n }\n const disabledDate =\n typeof this.disabledDate === 'function' ? this.disabledDate : () => false;\n const disabledTime =\n typeof this.disabledTime === 'function' ? this.disabledTime : () => false;\n if (!Array.isArray(value)) {\n value = [value];\n }\n return value.every(v => !disabledDate(v) && !disabledTime(v));\n },\n handleMultipleDates(date, dates) {\n if (this.validMultipleType && dates) {\n const nextDates = dates.filter(v => v.getTime() !== date.getTime());\n if (nextDates.length === dates.length) {\n nextDates.push(date);\n }\n return nextDates;\n }\n return date;\n },\n handleSelectDate(val, type, dates) {\n val = this.handleMultipleDates(val, dates);\n if (this.confirm) {\n this.currentValue = val;\n } else {\n this.emitValue(val, this.validMultipleType ? `multiple-${type}` : type);\n }\n },\n clear() {\n this.emitValue(this.range ? [null, null] : null);\n this.$emit('clear');\n },\n handleClear(evt) {\n evt.stopPropagation();\n this.clear();\n },\n handleConfirmDate() {\n const value = this.emitValue(this.currentValue);\n this.$emit('confirm', value);\n },\n handleSelectShortcut(evt) {\n const index = evt.currentTarget.getAttribute('data-index');\n const item = this.shortcuts[parseInt(index, 10)];\n if (isObject(item) && typeof item.onClick === 'function') {\n const date = item.onClick(this);\n if (date) {\n this.emitValue(date);\n }\n }\n },\n openPopup(evt) {\n if (this.popupVisible) return;\n this.defaultOpen = true;\n this.$emit('open', evt);\n this.$emit('update:open', true);\n },\n closePopup() {\n if (!this.popupVisible) return;\n this.defaultOpen = false;\n this.$emit('close');\n this.$emit('update:open', false);\n },\n blur() {\n // when use slot input\n if (this.$refs.input) {\n this.$refs.input.blur();\n }\n },\n focus() {\n if (this.$refs.input) {\n this.$refs.input.focus();\n }\n },\n handleInputChange() {\n if (!this.editable || this.userInput === null) return;\n const text = this.userInput.trim();\n this.userInput = null;\n if (text === '') {\n this.clear();\n return;\n }\n let date;\n if (this.validMultipleType) {\n date = text.split(this.innerRangeSeparator).map(v => this.parseDate(v.trim()));\n } else if (this.range) {\n let arr = text.split(this.innerRangeSeparator);\n if (arr.length !== 2) {\n // Maybe the separator during the day is the same as the separator for the date\n // eg: 2019-10-09-2020-01-02\n arr = text.split(this.innerRangeSeparator.trim());\n }\n date = arr.map(v => this.parseDate(v.trim()));\n } else {\n date = this.parseDate(text);\n }\n if (this.isValidValueAndNotDisabled(date)) {\n this.emitValue(date);\n this.blur();\n } else {\n this.$emit('input-error', text);\n }\n },\n handleInputInput(evt) {\n // slot input v-model\n this.userInput = typeof evt === 'string' ? evt : evt.target.value;\n },\n handleInputKeydown(evt) {\n const { keyCode } = evt;\n // Tab 9 or Enter 13\n if (keyCode === 9) {\n this.closePopup();\n } else if (keyCode === 13) {\n this.handleInputChange();\n }\n },\n handleInputBlur(evt) {\n // tab close\n this.$emit('blur', evt);\n },\n handleInputFocus(evt) {\n this.openPopup(evt);\n this.$emit('focus', evt);\n },\n hasSlot(name) {\n return !!(this.$slots[name] || this.$scopedSlots[name]);\n },\n renderSlot(name, fallback, props) {\n const slotFn = this.$scopedSlots[name];\n if (slotFn) {\n return slotFn(props) || fallback;\n }\n return this.$slots[name] || fallback;\n },\n renderInput() {\n const { prefixClass } = this;\n const props = {\n name: 'date',\n type: 'text',\n autocomplete: 'off',\n value: this.text,\n class: this.inputClass || `${this.prefixClass}-input`,\n readonly: !this.editable,\n disabled: this.disabled,\n placeholder: this.placeholder,\n ...this.inputAttr,\n };\n const { value, class: className, ...attrs } = props;\n const events = {\n keydown: this.handleInputKeydown,\n focus: this.handleInputFocus,\n blur: this.handleInputBlur,\n input: this.handleInputInput,\n change: this.handleInputChange,\n };\n const input = this.renderSlot(\n 'input',\n <input value={value} class={className} {...{ attrs, on: events }} ref=\"input\" />,\n {\n props,\n events,\n }\n );\n return (\n <div class={`${prefixClass}-input-wrapper`} onMousedown={this.openPopup}>\n {input}\n {this.showClearIcon ? (\n <i class={`${prefixClass}-icon-clear`} onMousedown={this.handleClear}>\n {this.renderSlot('icon-clear', <IconClose />)}\n </i>\n ) : null}\n <i class={`${prefixClass}-icon-calendar`}>\n {this.renderSlot('icon-calendar', <IconCalendar />)}\n </i>\n </div>\n );\n },\n renderContent() {\n const map = this.range ? componentRangeMap : componentMap;\n const Component = map[this.type] || map.default;\n const props = {\n ...pick(this.$props, Object.keys(Component.props)),\n value: this.currentValue,\n };\n const on = {\n ...pick(this.$listeners, Component.emits || []),\n select: this.handleSelectDate,\n };\n const content = <Component {...{ props, on, ref: 'picker' }} />;\n return (\n <div class={`${this.prefixClass}-datepicker-body`}>\n {this.renderSlot('content', content, {\n value: this.currentValue,\n emit: this.handleSelectDate,\n })}\n </div>\n );\n },\n renderSidebar() {\n const { prefixClass } = this;\n return (\n <div class={`${prefixClass}-datepicker-sidebar`}>\n {this.renderSlot('sidebar', null, {\n value: this.currentValue,\n emit: this.handleSelectDate,\n })}\n {this.shortcuts.map((v, i) => (\n <button\n key={i}\n data-index={i}\n type=\"button\"\n class={`${prefixClass}-btn ${prefixClass}-btn-text ${prefixClass}-btn-shortcut`}\n onClick={this.handleSelectShortcut}\n >\n {v.text}\n </button>\n ))}\n </div>\n );\n },\n renderHeader() {\n return (\n <div class={`${this.prefixClass}-datepicker-header`}>\n {this.renderSlot('header', null, {\n value: this.currentValue,\n emit: this.handleSelectDate,\n })}\n </div>\n );\n },\n renderFooter() {\n const { prefixClass } = this;\n return (\n <div class={`${prefixClass}-datepicker-footer`}>\n {this.renderSlot('footer', null, {\n value: this.currentValue,\n emit: this.handleSelectDate,\n })}\n {this.confirm ? (\n <button\n type=\"button\"\n class={`${prefixClass}-btn ${prefixClass}-datepicker-btn-confirm`}\n onClick={this.handleConfirmDate}\n >\n {this.confirmText}\n </button>\n ) : null}\n </div>\n );\n },\n },\n render() {\n const { prefixClass, inline, disabled } = this;\n const sidedar = this.hasSlot('sidebar') || this.shortcuts.length ? this.renderSidebar() : null;\n const content = (\n <div class={`${prefixClass}-datepicker-content`}>\n {this.hasSlot('header') ? this.renderHeader() : null}\n {this.renderContent()}\n {this.hasSlot('footer') || this.confirm ? this.renderFooter() : null}\n </div>\n );\n return (\n <div\n class={{\n [`${prefixClass}-datepicker`]: true,\n [`${prefixClass}-datepicker-range`]: this.range,\n [`${prefixClass}-datepicker-inline`]: inline,\n disabled,\n }}\n >\n {!inline ? this.renderInput() : null}\n {!inline ? (\n <Popup\n ref=\"popup\"\n class={this.popupClass}\n style={this.popupStyle}\n visible={this.popupVisible}\n appendToBody={this.appendToBody}\n onClickoutside={this.handleClickOutSide}\n >\n {sidedar}\n {content}\n </Popup>\n ) : (\n <div class={`${prefixClass}-datepicker-main`}>\n {sidedar}\n {content}\n </div>\n )}\n </div>\n );\n },\n};\n","/* istanbul ignore file */\nimport DatePicker from './date-picker';\nimport CalendarPanel from './calendar/calendar-panel';\nimport CalendarRange from './calendar/calendar-range';\nimport TimePanel from './time/time-panel';\nimport TimeRange from './time/time-range';\nimport DatetimePanel from './datetime/datetime-panel';\nimport DatetimeRange from './datetime/datetime-range';\nimport { locale } from './locale';\n\nDatePicker.locale = locale;\n\nDatePicker.install = function install(Vue) {\n Vue.component(DatePicker.name, DatePicker);\n};\n\nif (typeof window !== 'undefined' && window.Vue) {\n DatePicker.install(window.Vue);\n}\n\nObject.assign(DatePicker, {\n CalendarPanel,\n CalendarRange,\n TimePanel,\n TimeRange,\n DatetimePanel,\n DatetimeRange,\n});\n\nexport default DatePicker;\n"],"names":["_extends","Object","assign","a","b","c","arguments","length","d","prototype","hasOwnProperty","call","apply","normalMerge","toArrayMerge","functionalMerge","mergeJsxProps","reduce","indexOf","Array","e","concat","f","g","h","i","mergeFn","module","isDate","value","Date","toString","toDate","getTime","NaN","isValidDate","isNaN","startOfWeek","firstDayOfWeek","undefined","RangeError","date","day","getDay","diff","setDate","getDate","setHours","startOfWeekYear","_ref","_ref$firstDayOfWeek","_ref$firstWeekContain","firstWeekContainsDate","year","getFullYear","firstDateOfFirstWeek","setFullYear","getWeek","_ref2","_ref2$firstDayOfWeek","_ref2$firstWeekContai","firstDateOfThisWeek","Math","round","locale","months","monthsShort","weekdays","weekdaysShort","weekdaysMin","REGEX_FORMAT","pad","val","len","output","abs","sign","formatTimezone","offset","delimeter","absOffset","hours","floor","minutes","meridiem","_","isLowercase","word","toLocaleLowerCase","formatFlags","Y","y","YY","substr","YYYY","M","getMonth","MM","MMM","MMMM","D","DD","H","getHours","HH","hh","m","getMinutes","mm","s","getSeconds","ss","S","getMilliseconds","SS","SSS","dd","ddd","dddd","A","meridiemFunc","Z","getTimezoneOffset","ZZ","X","x","w","ww","format","str","options","formatStr","String","defaultLocale","replace","match","p1","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","TypeError","iter","Symbol","iterator","from","isArray","arr2","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","_objectSpread","target","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_nonIterableRest","_arr","_n","_d","_e","_i","_s","next","done","err","obj","configurable","writable","formattingTokens","match1","match2","match3","match4","match1to2","matchShortOffset","matchSigned","matchTimestamp","YEAR","MONTH","DAY","HOUR","MINUTE","SECOND","MILLISECOND","parseFlags","addParseFlag","token","regex","callback","tokens","func","input","parseInt","escapeStringRegExp","matchWordRegExp","localeKey","array","Error","RegExp","map","join","matchWordCallback","index","cent","matchMeridiem","meridiemParse","defaultIsPM","toLowerCase","charAt","isPM","offsetFromString","_ref8","_ref9","symbol","hour","minute","parseFloat","to24hour","getFullInputArray","backupDate","result","backupArr","useBackup","createUTCDate","_len","args","_key","UTC","isFinite","getUTCFullYear","setUTCFullYear","makeParser","dateString","mark","parseTo","parser","exec","parse","_options$locale","_locale","_options$backupDate","parseResult","month","second","millisecond","weekday","week","inputArray","firstDate","utcDate","offsetMilliseconds","parsedDate","createDate","ms","isValidRangeDate","every","isValidDates","dates","getValidDate","backup","startOfYear","setMonth","startOfMonth","startOfDay","getCalendar","calendar","lastDayInLastMonth","firstDayInLastMonth","lastDayInCurrentMonth","lastMonthLength","nextMonthLength","dirtyDate","dirtyMonth","Number","daysInMonth","min","assignTime","time","chunk","size","slice","isObject","pick","props","res","prop","mergeDeep","exports","_default","default","lang","formatLocale","en","yearFormat","monthFormat","monthBeforeYear","locales","enUS","name","isLocal","l","getLocale","rafThrottle","fn","isRunning","fnBinfRaf","requestAnimationFrame","getPopupElementSize","element","originalDisplay","style","display","originalVisibility","visibility","styles","window","getComputedStyle","width","offsetWidth","marginLeft","marginRight","height","offsetHeight","marginTop","marginBottom","getRelativePosition","el","targetWidth","targetHeight","fixed","left","top","offsetX","offsetY","relativeRect","getBoundingClientRect","dw","document","documentElement","clientWidth","dh","clientHeight","pageXOffset","pageYOffset","right","bottom","getScrollParent","node","until","body","getPropertyValue","scroll","test","parentNode","inject","prefixClass","dispatchDatePicker","defaultValue","defaultPanel","type","disabledDate","Function","getClasses","showWeekNumber","Boolean","getYearPanel","titleFormat","partialUpdate","data","panels","max","panel","innerCalendar","computed","innerValue","start","v","calendarYear","calendarMonth","watch","immediate","handler","methods","initCalendar","calendarDate","isDisabled","emitDate","$emit","handleCalendarChange","oldCalendar","handelPanelChange","oldPanel","handleSelectYear","getYearCellDate","handleSelectMonth","getMonthCellDate","handleSelectDate","getDateClasses","cellDate","notCurrentMonth","classes","state","getStateClass","getMonthClasses","getYearClasses","some","getWeekState","row","end","active","render","components","CalendarPanel","calendars","calendarMinDiff","calendarMaxDiff","Infinity","defaultValues","updateCalendars","handleSelect","startValue","endValue","updateStartCalendar","updateEndCalendar","adjustIndex","gap","getCalendarGap","calendarLeft","calendarRight","yearDiff","monthDiff","getRangeClasses","currentDates","classnames","calendarRange","$props","on","select","scrollBarWidth","outer","createElement","overflow","position","appendChild","inner","removeChild","TimePanel","emitChange","handleSelectStart","handleSelectEnd","disabledStartTime","disabledTime","disabledEndTime","$listeners","emits","showTimePanel","defaultTimeVisible","currentValue","timeVisible","closeTimePanel","openTimePanel","datetime","calendarProps","timeProps","showTimeHeader","clicktitle","CalendarRange","TimeRange","datetimes","componentMap","DatetimePanel","componentRangeMap","DatetimeRange","provide","bind","valueType","formatter","range","multiple","rangeSeparator","placeholder","editable","disabled","clearable","inputClass","inputAttr","appendToBody","open","popupClass","popupStyle","inline","confirm","confirmText","renderInputText","shortcuts","validator","text","onClick","userInput","defaultOpen","popupVisible","innerRangeSeparator","innerFormat","validMultipleType","value2date","isValidValue","formatDate","showClearIcon","types","created","console","warn","handleClickOutSide","evt","$el","contains","closePopup","getFormatter","parseDate","fmt","date2value","emitValue","afterEmitValue","isValidValueAndNotDisabled","handleMultipleDates","nextDates","clear","handleClear","stopPropagation","handleConfirmDate","handleSelectShortcut","currentTarget","getAttribute","item","openPopup","blur","$refs","focus","handleInputChange","trim","split","handleInputInput","handleInputKeydown","keyCode","handleInputBlur","handleInputFocus","hasSlot","$slots","$scopedSlots","renderSlot","fallback","slotFn","renderInput","autocomplete","class","readonly","className","attrs","events","keydown","change","renderContent","Component","content","ref","emit","renderSidebar","renderHeader","renderFooter","sidedar","DatePicker","install","Vue","component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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