app模板、应用模板、组件模板、widget模板
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.
 
 

4032 lines
111 KiB

module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/dist/";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 531);
/******/ })
/************************************************************************/
/******/ ({
/***/ 10:
/***/ (function(module, exports) {
module.exports = require("tis-ui/lib/utils/util");
/***/ }),
/***/ 111:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time.vue?vue&type=template&id=3d939089&
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c(
"transition",
{
attrs: { name: "el-zoom-in-top" },
on: {
"after-leave": function($event) {
_vm.$emit("dodestroy")
}
}
},
[
_c(
"div",
{
directives: [
{
name: "show",
rawName: "v-show",
value: _vm.visible,
expression: "visible"
}
],
staticClass: "el-time-panel el-popper",
class: _vm.popperClass
},
[
_c(
"div",
{
staticClass: "el-time-panel__content",
class: { "has-seconds": _vm.showSeconds }
},
[
_c("time-spinner", {
ref: "spinner",
attrs: {
"arrow-control": _vm.useArrow,
"show-seconds": _vm.showSeconds,
"am-pm-mode": _vm.amPmMode,
date: _vm.date
},
on: {
change: _vm.handleChange,
"select-range": _vm.setSelectionRange
}
})
],
1
),
_c("div", { staticClass: "el-time-panel__footer" }, [
_c(
"button",
{
staticClass: "el-time-panel__btn cancel",
attrs: { type: "button" },
on: { click: _vm.handleCancel }
},
[_vm._v(_vm._s(_vm.t("el.datepicker.cancel")))]
),
_c(
"button",
{
staticClass: "el-time-panel__btn",
class: { confirm: !_vm.disabled },
attrs: { type: "button" },
on: {
click: function($event) {
_vm.handleConfirm()
}
}
},
[_vm._v(_vm._s(_vm.t("el.datepicker.confirm")))]
)
])
]
)
]
)
}
var staticRenderFns = []
render._withStripped = true
// CONCATENATED MODULE: ./packages/date-picker/src/panel/time.vue?vue&type=template&id=3d939089&
// EXTERNAL MODULE: external "tis-ui/lib/utils/date-util"
var date_util_ = __webpack_require__(8);
// EXTERNAL MODULE: external "tis-ui/lib/mixins/locale"
var locale_ = __webpack_require__(38);
var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
// EXTERNAL MODULE: ./packages/date-picker/src/basic/time-spinner.vue + 4 modules
var time_spinner = __webpack_require__(123);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var timevue_type_script_lang_js_ = ({
mixins: [locale_default.a],
components: {
TimeSpinner: time_spinner["a" /* default */]
},
props: {
visible: Boolean,
timeArrowControl: Boolean
},
watch: {
visible: function visible(val) {
var _this = this;
if (val) {
this.oldValue = this.value;
this.$nextTick(function () {
return _this.$refs.spinner.emitSelectRange('hours');
});
} else {
this.needInitAdjust = true;
}
},
value: function value(newVal) {
var _this2 = this;
var date = void 0;
if (newVal instanceof Date) {
date = Object(date_util_["limitTimeRange"])(newVal, this.selectableRange, this.format);
} else if (!newVal) {
date = this.defaultValue ? new Date(this.defaultValue) : new Date();
}
this.date = date;
if (this.visible && this.needInitAdjust) {
this.$nextTick(function (_) {
return _this2.adjustSpinners();
});
this.needInitAdjust = false;
}
},
selectableRange: function selectableRange(val) {
this.$refs.spinner.selectableRange = val;
},
defaultValue: function defaultValue(val) {
if (!Object(date_util_["isDate"])(this.value)) {
this.date = val ? new Date(val) : new Date();
}
}
},
data: function data() {
return {
popperClass: '',
format: 'HH:mm:ss',
value: '',
defaultValue: null,
date: new Date(),
oldValue: new Date(),
selectableRange: [],
selectionRange: [0, 2],
disabled: false,
arrowControl: false,
needInitAdjust: true
};
},
computed: {
showSeconds: function showSeconds() {
return (this.format || '').indexOf('ss') !== -1;
},
useArrow: function useArrow() {
return this.arrowControl || this.timeArrowControl || false;
},
amPmMode: function amPmMode() {
if ((this.format || '').indexOf('A') !== -1) return 'A';
if ((this.format || '').indexOf('a') !== -1) return 'a';
return '';
}
},
methods: {
handleCancel: function handleCancel() {
this.$emit('pick', this.oldValue, false);
},
handleChange: function handleChange(date) {
// this.visible avoids edge cases, when use scrolls during panel closing animation
if (this.visible) {
this.date = Object(date_util_["clearMilliseconds"])(date);
// if date is out of range, do not emit
if (this.isValidValue(this.date)) {
this.$emit('pick', this.date, true);
}
}
},
setSelectionRange: function setSelectionRange(start, end) {
this.$emit('select-range', start, end);
this.selectionRange = [start, end];
},
handleConfirm: function handleConfirm() {
var visible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
var first = arguments[1];
if (first) return;
var date = Object(date_util_["clearMilliseconds"])(Object(date_util_["limitTimeRange"])(this.date, this.selectableRange, this.format));
this.$emit('pick', date, visible, first);
},
handleKeydown: function handleKeydown(event) {
var keyCode = event.keyCode;
var mapping = { 38: -1, 40: 1, 37: -1, 39: 1 };
// Left or Right
if (keyCode === 37 || keyCode === 39) {
var step = mapping[keyCode];
this.changeSelectionRange(step);
event.preventDefault();
return;
}
// Up or Down
if (keyCode === 38 || keyCode === 40) {
var _step = mapping[keyCode];
this.$refs.spinner.scrollDown(_step);
event.preventDefault();
return;
}
},
isValidValue: function isValidValue(date) {
return Object(date_util_["timeWithinRange"])(date, this.selectableRange, this.format);
},
adjustSpinners: function adjustSpinners() {
return this.$refs.spinner.adjustSpinners();
},
changeSelectionRange: function changeSelectionRange(step) {
var list = [0, 3].concat(this.showSeconds ? [6] : []);
var mapping = ['hours', 'minutes'].concat(this.showSeconds ? ['seconds'] : []);
var index = list.indexOf(this.selectionRange[0]);
var next = (index + step + list.length) % list.length;
this.$refs.spinner.emitSelectRange(mapping[next]);
}
},
mounted: function mounted() {
var _this3 = this;
this.$nextTick(function () {
return _this3.handleConfirm(true, true);
});
this.$emit('mounted');
}
});
// CONCATENATED MODULE: ./packages/date-picker/src/panel/time.vue?vue&type=script&lang=js&
/* harmony default export */ var panel_timevue_type_script_lang_js_ = (timevue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);
// CONCATENATED MODULE: ./packages/date-picker/src/panel/time.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
panel_timevue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "packages/date-picker/src/panel/time.vue"
/* harmony default export */ var time = __webpack_exports__["a"] = (component.exports);
/***/ }),
/***/ 113:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/picker.vue?vue&type=template&id=79ae069f&
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return !_vm.ranged
? _c(
"tis-input",
_vm._b(
{
directives: [
{
name: "clickoutside",
rawName: "v-clickoutside",
value: _vm.handleClose,
expression: "handleClose"
}
],
ref: "reference",
staticClass: "el-date-editor",
class: "el-date-editor--" + _vm.type,
attrs: {
readonly:
!_vm.editable ||
_vm.readonly ||
_vm.type === "dates" ||
_vm.type === "week",
disabled: _vm.pickerDisabled,
size: _vm.pickerSize,
name: _vm.name,
placeholder: _vm.placeholder,
value: _vm.displayValue,
validateEvent: false
},
on: {
focus: _vm.handleFocus,
input: function(value) {
return (_vm.userInput = value)
},
change: _vm.handleChange
},
nativeOn: {
keydown: function($event) {
return _vm.handleKeydown($event)
},
mouseenter: function($event) {
return _vm.handleMouseEnter($event)
},
mouseleave: function($event) {
_vm.showClose = false
}
}
},
"tis-input",
_vm.firstInputId,
false
),
[
_c("i", {
staticClass: "el-input__icon",
class: _vm.triggerClass,
attrs: { slot: "prefix" },
on: { click: _vm.handleFocus },
slot: "prefix"
}),
_vm.haveTrigger
? _c("i", {
staticClass: "el-input__icon",
class: [_vm.showClose ? "" + _vm.clearIcon : ""],
attrs: { slot: "suffix" },
on: { click: _vm.handleClickIcon },
slot: "suffix"
})
: _vm._e()
]
)
: _c(
"div",
{
directives: [
{
name: "clickoutside",
rawName: "v-clickoutside",
value: _vm.handleClose,
expression: "handleClose"
}
],
ref: "reference",
staticClass: "el-date-editor el-range-editor el-input__inner",
class: [
"el-date-editor--" + _vm.type,
_vm.pickerSize ? "el-range-editor--" + _vm.pickerSize : "",
_vm.pickerDisabled ? "is-disabled" : "",
_vm.pickerVisible ? "is-active" : ""
],
on: {
click: _vm.handleRangeClick,
mouseenter: _vm.handleMouseEnter,
mouseleave: function($event) {
_vm.showClose = false
},
keydown: _vm.handleKeydown
}
},
[
_c("i", {
class: ["el-input__icon", "el-range__icon", _vm.triggerClass]
}),
_c(
"input",
_vm._b(
{
staticClass: "el-range-input",
attrs: {
autocomplete: "off",
placeholder: _vm.startPlaceholder,
disabled: _vm.pickerDisabled,
readonly: !_vm.editable || _vm.readonly,
name: _vm.name && _vm.name[0]
},
domProps: { value: _vm.displayValue && _vm.displayValue[0] },
on: {
input: _vm.handleStartInput,
change: _vm.handleStartChange,
focus: _vm.handleFocus
}
},
"input",
_vm.firstInputId,
false
)
),
_vm._t("range-separator", [
_c("span", { staticClass: "el-range-separator" }, [
_vm._v(_vm._s(_vm.rangeSeparator))
])
]),
_c(
"input",
_vm._b(
{
staticClass: "el-range-input",
attrs: {
autocomplete: "off",
placeholder: _vm.endPlaceholder,
disabled: _vm.pickerDisabled,
readonly: !_vm.editable || _vm.readonly,
name: _vm.name && _vm.name[1]
},
domProps: { value: _vm.displayValue && _vm.displayValue[1] },
on: {
input: _vm.handleEndInput,
change: _vm.handleEndChange,
focus: _vm.handleFocus
}
},
"input",
_vm.secondInputId,
false
)
),
_vm.haveTrigger
? _c("i", {
staticClass: "el-input__icon el-range__close-icon",
class: [_vm.showClose ? "" + _vm.clearIcon : ""],
on: { click: _vm.handleClickIcon }
})
: _vm._e()
],
2
)
}
var staticRenderFns = []
render._withStripped = true
// CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=template&id=79ae069f&
// EXTERNAL MODULE: external "vue"
var external_vue_ = __webpack_require__(4);
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
// EXTERNAL MODULE: external "tis-ui/lib/utils/clickoutside"
var clickoutside_ = __webpack_require__(61);
var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
// EXTERNAL MODULE: external "tis-ui/lib/utils/date-util"
var date_util_ = __webpack_require__(8);
// EXTERNAL MODULE: external "tis-ui/lib/utils/vue-popper"
var vue_popper_ = __webpack_require__(34);
var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
// EXTERNAL MODULE: external "tis-ui/lib/mixins/emitter"
var emitter_ = __webpack_require__(13);
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
// EXTERNAL MODULE: ./packages/input/index.js + 6 modules
var input = __webpack_require__(52);
// EXTERNAL MODULE: external "tis-ui/lib/utils/merge"
var merge_ = __webpack_require__(33);
var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/picker.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var NewPopper = {
props: {
appendToBody: vue_popper_default.a.props.appendToBody,
offset: vue_popper_default.a.props.offset,
boundariesPadding: vue_popper_default.a.props.boundariesPadding,
arrowOffset: vue_popper_default.a.props.arrowOffset
},
methods: vue_popper_default.a.methods,
data: function data() {
return merge_default()({ visibleArrow: true }, vue_popper_default.a.data);
},
beforeDestroy: vue_popper_default.a.beforeDestroy
};
var DEFAULT_FORMATS = {
date: 'yyyy-MM-dd',
month: 'yyyy-MM',
datetime: 'yyyy-MM-dd HH:mm:ss',
time: 'HH:mm:ss',
week: 'yyyywWW',
timerange: 'HH:mm:ss',
daterange: 'yyyy-MM-dd',
monthrange: 'yyyy-MM',
datetimerange: 'yyyy-MM-dd HH:mm:ss',
year: 'yyyy'
};
var HAVE_TRIGGER_TYPES = ['date', 'datetime', 'time', 'time-select', 'week', 'month', 'year', 'daterange', 'monthrange', 'timerange', 'datetimerange', 'dates'];
var pickervue_type_script_lang_js_DATE_FORMATTER = function DATE_FORMATTER(value, format) {
if (format === 'timestamp') return value.getTime();
return Object(date_util_["formatDate"])(value, format);
};
var pickervue_type_script_lang_js_DATE_PARSER = function DATE_PARSER(text, format) {
if (format === 'timestamp') return new Date(Number(text));
return Object(date_util_["parseDate"])(text, format);
};
var RANGE_FORMATTER = function RANGE_FORMATTER(value, format) {
if (Array.isArray(value) && value.length === 2) {
var start = value[0];
var end = value[1];
if (start && end) {
return [pickervue_type_script_lang_js_DATE_FORMATTER(start, format), pickervue_type_script_lang_js_DATE_FORMATTER(end, format)];
}
}
return '';
};
var RANGE_PARSER = function RANGE_PARSER(array, format, separator) {
if (!Array.isArray(array)) {
array = array.split(separator);
}
if (array.length === 2) {
var range1 = array[0];
var range2 = array[1];
return [pickervue_type_script_lang_js_DATE_PARSER(range1, format), pickervue_type_script_lang_js_DATE_PARSER(range2, format)];
}
return [];
};
var TYPE_VALUE_RESOLVER_MAP = {
default: {
formatter: function formatter(value) {
if (!value) return '';
return '' + value;
},
parser: function parser(text) {
if (text === undefined || text === '') return null;
return text;
}
},
week: {
formatter: function formatter(value, format) {
var week = Object(date_util_["getWeekNumber"])(value);
var month = value.getMonth();
var trueDate = new Date(value);
if (week === 1 && month === 11) {
trueDate.setHours(0, 0, 0, 0);
trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
}
var date = Object(date_util_["formatDate"])(trueDate, format);
date = /WW/.test(date) ? date.replace(/WW/, week < 10 ? '0' + week : week) : date.replace(/W/, week);
return date;
},
parser: function parser(text, format) {
// parse as if a normal date
return TYPE_VALUE_RESOLVER_MAP.date.parser(text, format);
}
},
date: {
formatter: pickervue_type_script_lang_js_DATE_FORMATTER,
parser: pickervue_type_script_lang_js_DATE_PARSER
},
datetime: {
formatter: pickervue_type_script_lang_js_DATE_FORMATTER,
parser: pickervue_type_script_lang_js_DATE_PARSER
},
daterange: {
formatter: RANGE_FORMATTER,
parser: RANGE_PARSER
},
monthrange: {
formatter: RANGE_FORMATTER,
parser: RANGE_PARSER
},
datetimerange: {
formatter: RANGE_FORMATTER,
parser: RANGE_PARSER
},
timerange: {
formatter: RANGE_FORMATTER,
parser: RANGE_PARSER
},
time: {
formatter: pickervue_type_script_lang_js_DATE_FORMATTER,
parser: pickervue_type_script_lang_js_DATE_PARSER
},
month: {
formatter: pickervue_type_script_lang_js_DATE_FORMATTER,
parser: pickervue_type_script_lang_js_DATE_PARSER
},
year: {
formatter: pickervue_type_script_lang_js_DATE_FORMATTER,
parser: pickervue_type_script_lang_js_DATE_PARSER
},
number: {
formatter: function formatter(value) {
if (!value) return '';
return '' + value;
},
parser: function parser(text) {
var result = Number(text);
if (!isNaN(text)) {
return result;
} else {
return null;
}
}
},
dates: {
formatter: function formatter(value, format) {
return value.map(function (date) {
return pickervue_type_script_lang_js_DATE_FORMATTER(date, format);
});
},
parser: function parser(value, format) {
return (typeof value === 'string' ? value.split(', ') : value).map(function (date) {
return date instanceof Date ? date : pickervue_type_script_lang_js_DATE_PARSER(date, format);
});
}
}
};
var PLACEMENT_MAP = {
left: 'bottom-start',
center: 'bottom',
right: 'bottom-end'
};
var parseAsFormatAndType = function parseAsFormatAndType(value, customFormat, type) {
var rangeSeparator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '-';
if (!value) return null;
var parser = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP['default']).parser;
var format = customFormat || DEFAULT_FORMATS[type];
return parser(value, format, rangeSeparator);
};
var formatAsFormatAndType = function formatAsFormatAndType(value, customFormat, type) {
if (!value) return null;
var formatter = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP['default']).formatter;
var format = customFormat || DEFAULT_FORMATS[type];
return formatter(value, format);
};
/*
* Considers:
* 1. Date object
* 2. date string
* 3. array of 1 or 2
*/
var valueEquals = function valueEquals(a, b) {
// considers Date object and string
var dateEquals = function dateEquals(a, b) {
var aIsDate = a instanceof Date;
var bIsDate = b instanceof Date;
if (aIsDate && bIsDate) {
return a.getTime() === b.getTime();
}
if (!aIsDate && !bIsDate) {
return a === b;
}
return false;
};
var aIsArray = a instanceof Array;
var bIsArray = b instanceof Array;
if (aIsArray && bIsArray) {
if (a.length !== b.length) {
return false;
}
return a.every(function (item, index) {
return dateEquals(item, b[index]);
});
}
if (!aIsArray && !bIsArray) {
return dateEquals(a, b);
}
return false;
};
var isString = function isString(val) {
return typeof val === 'string' || val instanceof String;
};
var validator = function validator(val) {
// either: String, Array of String, null / undefined
return val === null || val === undefined || isString(val) || Array.isArray(val) && val.length === 2 && val.every(isString);
};
/* harmony default export */ var pickervue_type_script_lang_js_ = ({
mixins: [emitter_default.a, NewPopper],
inject: {
elForm: {
default: ''
},
elFormItem: {
default: ''
}
},
props: {
size: String,
format: String,
valueFormat: String,
readonly: Boolean,
placeholder: String,
startPlaceholder: String,
endPlaceholder: String,
prefixIcon: String,
clearIcon: {
type: String,
default: 'el-icon-circle-close'
},
name: {
default: '',
validator: validator
},
disabled: Boolean,
clearable: {
type: Boolean,
default: true
},
id: {
default: '',
validator: validator
},
popperClass: String,
editable: {
type: Boolean,
default: true
},
align: {
type: String,
default: 'left'
},
value: {},
defaultValue: {},
defaultTime: {},
rangeSeparator: {
default: '-'
},
pickerOptions: {},
unlinkPanels: Boolean,
validateEvent: {
type: Boolean,
default: true
}
},
components: { ElInput: input["default"] },
directives: { Clickoutside: clickoutside_default.a },
data: function data() {
return {
pickerVisible: false,
showClose: false,
userInput: null,
valueOnOpen: null, // value when picker opens, used to determine whether to emit change
unwatchPickerOptions: null
};
},
watch: {
pickerVisible: function pickerVisible(val) {
if (this.readonly || this.pickerDisabled) return;
if (val) {
this.showPicker();
this.valueOnOpen = Array.isArray(this.value) ? [].concat(this.value) : this.value;
} else {
this.hidePicker();
this.emitChange(this.value);
this.userInput = null;
if (this.validateEvent) {
this.dispatch('ElFormItem', 'el.form.blur');
}
this.$emit('blur', this);
this.blur();
}
},
parsedValue: {
immediate: true,
handler: function handler(val) {
if (this.picker) {
this.picker.value = val;
}
}
},
defaultValue: function defaultValue(val) {
// NOTE: should eventually move to jsx style picker + panel ?
if (this.picker) {
this.picker.defaultValue = val;
}
},
value: function value(val, oldVal) {
if (!valueEquals(val, oldVal) && !this.pickerVisible && this.validateEvent) {
this.dispatch('ElFormItem', 'el.form.change', val);
}
}
},
computed: {
ranged: function ranged() {
return this.type.indexOf('range') > -1;
},
reference: function reference() {
var reference = this.$refs.reference;
return reference.$el || reference;
},
refInput: function refInput() {
if (this.reference) {
return [].slice.call(this.reference.querySelectorAll('input'));
}
return [];
},
valueIsEmpty: function valueIsEmpty() {
var val = this.value;
if (Array.isArray(val)) {
for (var i = 0, len = val.length; i < len; i++) {
if (val[i]) {
return false;
}
}
} else {
if (val) {
return false;
}
}
return true;
},
triggerClass: function triggerClass() {
return this.prefixIcon || (this.type.indexOf('time') !== -1 ? 'el-icon-time' : 'el-icon-date');
},
selectionMode: function selectionMode() {
if (this.type === 'week') {
return 'week';
} else if (this.type === 'month') {
return 'month';
} else if (this.type === 'year') {
return 'year';
} else if (this.type === 'dates') {
return 'dates';
}
return 'day';
},
haveTrigger: function haveTrigger() {
if (typeof this.showTrigger !== 'undefined') {
return this.showTrigger;
}
return HAVE_TRIGGER_TYPES.indexOf(this.type) !== -1;
},
displayValue: function displayValue() {
var formattedValue = formatAsFormatAndType(this.parsedValue, this.format, this.type, this.rangeSeparator);
if (Array.isArray(this.userInput)) {
return [this.userInput[0] || formattedValue && formattedValue[0] || '', this.userInput[1] || formattedValue && formattedValue[1] || ''];
} else if (this.userInput !== null) {
return this.userInput;
} else if (formattedValue) {
return this.type === 'dates' ? formattedValue.join(', ') : formattedValue;
} else {
return '';
}
},
parsedValue: function parsedValue() {
if (!this.value) return this.value; // component value is not set
if (this.type === 'time-select') return this.value; // time-select does not require parsing, this might change in next major version
var valueIsDateObject = Object(date_util_["isDateObject"])(this.value) || Array.isArray(this.value) && this.value.every(date_util_["isDateObject"]);
if (valueIsDateObject) {
return this.value;
}
if (this.valueFormat) {
return parseAsFormatAndType(this.value, this.valueFormat, this.type, this.rangeSeparator) || this.value;
}
// NOTE: deal with common but incorrect usage, should remove in next major version
// user might provide string / timestamp without value-format, coerce them into date (or array of date)
return Array.isArray(this.value) ? this.value.map(function (val) {
return new Date(val);
}) : new Date(this.value);
},
_elFormItemSize: function _elFormItemSize() {
return (this.elFormItem || {}).elFormItemSize;
},
pickerSize: function pickerSize() {
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
},
pickerDisabled: function pickerDisabled() {
return this.disabled || (this.elForm || {}).disabled;
},
firstInputId: function firstInputId() {
var obj = {};
var id = void 0;
if (this.ranged) {
id = this.id && this.id[0];
} else {
id = this.id;
}
if (id) obj.id = id;
return obj;
},
secondInputId: function secondInputId() {
var obj = {};
var id = void 0;
if (this.ranged) {
id = this.id && this.id[1];
}
if (id) obj.id = id;
return obj;
}
},
created: function created() {
// vue-popper
this.popperOptions = {
boundariesPadding: 0,
gpuAcceleration: false
};
this.placement = PLACEMENT_MAP[this.align] || PLACEMENT_MAP.left;
this.$on('fieldReset', this.handleFieldReset);
},
methods: {
focus: function focus() {
if (!this.ranged) {
this.$refs.reference.focus();
} else {
this.handleFocus();
}
},
blur: function blur() {
this.refInput.forEach(function (input) {
return input.blur();
});
},
// {parse, formatTo} Value deals maps component value with internal Date
parseValue: function parseValue(value) {
var isParsed = Object(date_util_["isDateObject"])(value) || Array.isArray(value) && value.every(date_util_["isDateObject"]);
if (this.valueFormat && !isParsed) {
return parseAsFormatAndType(value, this.valueFormat, this.type, this.rangeSeparator) || value;
} else {
return value;
}
},
formatToValue: function formatToValue(date) {
var isFormattable = Object(date_util_["isDateObject"])(date) || Array.isArray(date) && date.every(date_util_["isDateObject"]);
if (this.valueFormat && isFormattable) {
return formatAsFormatAndType(date, this.valueFormat, this.type, this.rangeSeparator);
} else {
return date;
}
},
// {parse, formatTo} String deals with user input
parseString: function parseString(value) {
var type = Array.isArray(value) ? this.type : this.type.replace('range', '');
return parseAsFormatAndType(value, this.format, type);
},
formatToString: function formatToString(value) {
var type = Array.isArray(value) ? this.type : this.type.replace('range', '');
return formatAsFormatAndType(value, this.format, type);
},
handleMouseEnter: function handleMouseEnter() {
if (this.readonly || this.pickerDisabled) return;
if (!this.valueIsEmpty && this.clearable) {
this.showClose = true;
}
},
handleChange: function handleChange() {
if (this.userInput) {
var value = this.parseString(this.displayValue);
if (value) {
this.picker.value = value;
if (this.isValidValue(value)) {
this.emitInput(value);
this.userInput = null;
}
}
}
if (this.userInput === '') {
this.emitInput(null);
this.emitChange(null);
this.userInput = null;
}
},
handleStartInput: function handleStartInput(event) {
if (this.userInput) {
this.userInput = [event.target.value, this.userInput[1]];
} else {
this.userInput = [event.target.value, null];
}
},
handleEndInput: function handleEndInput(event) {
if (this.userInput) {
this.userInput = [this.userInput[0], event.target.value];
} else {
this.userInput = [null, event.target.value];
}
},
handleStartChange: function handleStartChange(event) {
var value = this.parseString(this.userInput && this.userInput[0]);
if (value) {
this.userInput = [this.formatToString(value), this.displayValue[1]];
var newValue = [value, this.picker.value && this.picker.value[1]];
this.picker.value = newValue;
if (this.isValidValue(newValue)) {
this.emitInput(newValue);
this.userInput = null;
}
}
},
handleEndChange: function handleEndChange(event) {
var value = this.parseString(this.userInput && this.userInput[1]);
if (value) {
this.userInput = [this.displayValue[0], this.formatToString(value)];
var newValue = [this.picker.value && this.picker.value[0], value];
this.picker.value = newValue;
if (this.isValidValue(newValue)) {
this.emitInput(newValue);
this.userInput = null;
}
}
},
handleClickIcon: function handleClickIcon(event) {
if (this.readonly || this.pickerDisabled) return;
if (this.showClose) {
this.valueOnOpen = this.value;
event.stopPropagation();
this.emitInput(null);
this.emitChange(null);
this.showClose = false;
if (this.picker && typeof this.picker.handleClear === 'function') {
this.picker.handleClear();
}
} else {
this.pickerVisible = !this.pickerVisible;
}
},
handleClose: function handleClose() {
if (!this.pickerVisible) return;
this.pickerVisible = false;
if (this.type === 'dates') {
// restore to former value
var oldValue = parseAsFormatAndType(this.valueOnOpen, this.valueFormat, this.type, this.rangeSeparator) || this.valueOnOpen;
this.emitInput(oldValue);
}
},
handleFieldReset: function handleFieldReset(initialValue) {
this.userInput = initialValue === '' ? null : initialValue;
},
handleFocus: function handleFocus() {
var type = this.type;
if (HAVE_TRIGGER_TYPES.indexOf(type) !== -1 && !this.pickerVisible) {
this.pickerVisible = true;
}
this.$emit('focus', this);
},
handleKeydown: function handleKeydown(event) {
var _this = this;
var keyCode = event.keyCode;
// ESC
if (keyCode === 27) {
this.pickerVisible = false;
event.stopPropagation();
return;
}
// Tab
if (keyCode === 9) {
if (!this.ranged) {
this.handleChange();
this.pickerVisible = this.picker.visible = false;
this.blur();
event.stopPropagation();
} else {
// user may change focus between two input
setTimeout(function () {
if (_this.refInput.indexOf(document.activeElement) === -1) {
_this.pickerVisible = false;
_this.blur();
event.stopPropagation();
}
}, 0);
}
return;
}
// Enter
if (keyCode === 13) {
if (this.userInput === '' || this.isValidValue(this.parseString(this.displayValue))) {
this.handleChange();
this.pickerVisible = this.picker.visible = false;
this.blur();
}
event.stopPropagation();
return;
}
// if user is typing, do not let picker handle key input
if (this.userInput) {
event.stopPropagation();
return;
}
// delegate other keys to panel
if (this.picker && this.picker.handleKeydown) {
this.picker.handleKeydown(event);
}
},
handleRangeClick: function handleRangeClick() {
var type = this.type;
if (HAVE_TRIGGER_TYPES.indexOf(type) !== -1 && !this.pickerVisible) {
this.pickerVisible = true;
}
this.$emit('focus', this);
},
hidePicker: function hidePicker() {
if (this.picker) {
this.picker.resetView && this.picker.resetView();
this.pickerVisible = this.picker.visible = false;
this.destroyPopper();
}
},
showPicker: function showPicker() {
var _this2 = this;
if (this.$isServer) return;
if (!this.picker) {
this.mountPicker();
}
this.pickerVisible = this.picker.visible = true;
this.updatePopper();
this.picker.value = this.parsedValue;
this.picker.resetView && this.picker.resetView();
this.$nextTick(function () {
_this2.picker.adjustSpinners && _this2.picker.adjustSpinners();
});
},
mountPicker: function mountPicker() {
var _this3 = this;
this.picker = new external_vue_default.a(this.panel).$mount();
this.picker.defaultValue = this.defaultValue;
this.picker.defaultTime = this.defaultTime;
this.picker.popperClass = this.popperClass;
this.popperElm = this.picker.$el;
this.picker.width = this.reference.getBoundingClientRect().width;
this.picker.showTime = this.type === 'datetime' || this.type === 'datetimerange';
this.picker.selectionMode = this.selectionMode;
this.picker.unlinkPanels = this.unlinkPanels;
this.picker.arrowControl = this.arrowControl || this.timeArrowControl || false;
this.$watch('format', function (format) {
_this3.picker.format = format;
});
var updateOptions = function updateOptions() {
var options = _this3.pickerOptions;
if (options && options.selectableRange) {
var ranges = options.selectableRange;
var parser = TYPE_VALUE_RESOLVER_MAP.datetimerange.parser;
var format = DEFAULT_FORMATS.timerange;
ranges = Array.isArray(ranges) ? ranges : [ranges];
_this3.picker.selectableRange = ranges.map(function (range) {
return parser(range, format, _this3.rangeSeparator);
});
}
for (var option in options) {
if (options.hasOwnProperty(option) &&
// 忽略 time-picker 的该配置项
option !== 'selectableRange') {
_this3.picker[option] = options[option];
}
}
// main format must prevail over undocumented pickerOptions.format
if (_this3.format) {
_this3.picker.format = _this3.format;
}
};
updateOptions();
this.unwatchPickerOptions = this.$watch('pickerOptions', function () {
return updateOptions();
}, { deep: true });
this.$el.appendChild(this.picker.$el);
this.picker.resetView && this.picker.resetView();
this.picker.$on('dodestroy', this.doDestroy);
this.picker.$on('pick', function () {
var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var visible = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
_this3.userInput = null;
_this3.pickerVisible = _this3.picker.visible = visible;
_this3.emitInput(date);
_this3.picker.resetView && _this3.picker.resetView();
});
this.picker.$on('select-range', function (start, end, pos) {
if (_this3.refInput.length === 0) return;
if (!pos || pos === 'min') {
_this3.refInput[0].setSelectionRange(start, end);
_this3.refInput[0].focus();
} else if (pos === 'max') {
_this3.refInput[1].setSelectionRange(start, end);
_this3.refInput[1].focus();
}
});
},
unmountPicker: function unmountPicker() {
if (this.picker) {
this.picker.$destroy();
this.picker.$off();
if (typeof this.unwatchPickerOptions === 'function') {
this.unwatchPickerOptions();
}
this.picker.$el.parentNode.removeChild(this.picker.$el);
}
},
emitChange: function emitChange(val) {
// determine user real change only
if (!valueEquals(val, this.valueOnOpen)) {
this.$emit('change', val);
this.valueOnOpen = val;
if (this.validateEvent) {
this.dispatch('ElFormItem', 'el.form.change', val);
}
}
},
emitInput: function emitInput(val) {
var formatted = this.formatToValue(val);
if (!valueEquals(this.value, formatted)) {
this.$emit('input', formatted);
}
},
isValidValue: function isValidValue(value) {
if (!this.picker) {
this.mountPicker();
}
if (this.picker.isValidValue) {
return value && this.picker.isValidValue(value);
} else {
return true;
}
}
}
});
// CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=script&lang=js&
/* harmony default export */ var src_pickervue_type_script_lang_js_ = (pickervue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);
// CONCATENATED MODULE: ./packages/date-picker/src/picker.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
src_pickervue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "packages/date-picker/src/picker.vue"
/* harmony default export */ var picker = __webpack_exports__["a"] = (component.exports);
/***/ }),
/***/ 123:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/time-spinner.vue?vue&type=template&id=1facadeb&
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c(
"div",
{
staticClass: "el-time-spinner",
class: { "has-seconds": _vm.showSeconds }
},
[
!_vm.arrowControl
? [
_c(
"tis-scrollbar",
{
ref: "hours",
staticClass: "el-time-spinner__wrapper",
attrs: {
"wrap-style": "max-height: inherit;",
"view-class": "el-time-spinner__list",
noresize: "",
tag: "ul"
},
nativeOn: {
mouseenter: function($event) {
_vm.emitSelectRange("hours")
},
mousemove: function($event) {
_vm.adjustCurrentSpinner("hours")
}
}
},
_vm._l(_vm.hoursList, function(disabled, hour) {
return _c(
"li",
{
key: hour,
staticClass: "el-time-spinner__item",
class: { active: hour === _vm.hours, disabled: disabled },
on: {
click: function($event) {
_vm.handleClick("hours", {
value: hour,
disabled: disabled
})
}
}
},
[
_vm._v(
_vm._s(
("0" + (_vm.amPmMode ? hour % 12 || 12 : hour)).slice(
-2
)
) + _vm._s(_vm.amPm(hour))
)
]
)
}),
0
),
_c(
"tis-scrollbar",
{
ref: "minutes",
staticClass: "el-time-spinner__wrapper",
attrs: {
"wrap-style": "max-height: inherit;",
"view-class": "el-time-spinner__list",
noresize: "",
tag: "ul"
},
nativeOn: {
mouseenter: function($event) {
_vm.emitSelectRange("minutes")
},
mousemove: function($event) {
_vm.adjustCurrentSpinner("minutes")
}
}
},
_vm._l(_vm.minutesList, function(enabled, key) {
return _c(
"li",
{
key: key,
staticClass: "el-time-spinner__item",
class: { active: key === _vm.minutes, disabled: !enabled },
on: {
click: function($event) {
_vm.handleClick("minutes", {
value: key,
disabled: false
})
}
}
},
[_vm._v(_vm._s(("0" + key).slice(-2)))]
)
}),
0
),
_c(
"tis-scrollbar",
{
directives: [
{
name: "show",
rawName: "v-show",
value: _vm.showSeconds,
expression: "showSeconds"
}
],
ref: "seconds",
staticClass: "el-time-spinner__wrapper",
attrs: {
"wrap-style": "max-height: inherit;",
"view-class": "el-time-spinner__list",
noresize: "",
tag: "ul"
},
nativeOn: {
mouseenter: function($event) {
_vm.emitSelectRange("seconds")
},
mousemove: function($event) {
_vm.adjustCurrentSpinner("seconds")
}
}
},
_vm._l(60, function(second, key) {
return _c(
"li",
{
key: key,
staticClass: "el-time-spinner__item",
class: { active: key === _vm.seconds },
on: {
click: function($event) {
_vm.handleClick("seconds", {
value: key,
disabled: false
})
}
}
},
[_vm._v(_vm._s(("0" + key).slice(-2)))]
)
}),
0
)
]
: _vm._e(),
_vm.arrowControl
? [
_c(
"div",
{
staticClass: "el-time-spinner__wrapper is-arrow",
on: {
mouseenter: function($event) {
_vm.emitSelectRange("hours")
}
}
},
[
_c("i", {
directives: [
{
name: "repeat-click",
rawName: "v-repeat-click",
value: _vm.decrease,
expression: "decrease"
}
],
staticClass: "el-time-spinner__arrow el-icon-arrow-up"
}),
_c("i", {
directives: [
{
name: "repeat-click",
rawName: "v-repeat-click",
value: _vm.increase,
expression: "increase"
}
],
staticClass: "el-time-spinner__arrow el-icon-arrow-down"
}),
_c(
"ul",
{ ref: "hours", staticClass: "el-time-spinner__list" },
_vm._l(_vm.arrowHourList, function(hour, key) {
return _c(
"li",
{
key: key,
staticClass: "el-time-spinner__item",
class: {
active: hour === _vm.hours,
disabled: _vm.hoursList[hour]
}
},
[
_vm._v(
_vm._s(
hour === undefined
? ""
: (
"0" + (_vm.amPmMode ? hour % 12 || 12 : hour)
).slice(-2) + _vm.amPm(hour)
)
)
]
)
}),
0
)
]
),
_c(
"div",
{
staticClass: "el-time-spinner__wrapper is-arrow",
on: {
mouseenter: function($event) {
_vm.emitSelectRange("minutes")
}
}
},
[
_c("i", {
directives: [
{
name: "repeat-click",
rawName: "v-repeat-click",
value: _vm.decrease,
expression: "decrease"
}
],
staticClass: "el-time-spinner__arrow el-icon-arrow-up"
}),
_c("i", {
directives: [
{
name: "repeat-click",
rawName: "v-repeat-click",
value: _vm.increase,
expression: "increase"
}
],
staticClass: "el-time-spinner__arrow el-icon-arrow-down"
}),
_c(
"ul",
{ ref: "minutes", staticClass: "el-time-spinner__list" },
_vm._l(_vm.arrowMinuteList, function(minute, key) {
return _c(
"li",
{
key: key,
staticClass: "el-time-spinner__item",
class: { active: minute === _vm.minutes }
},
[
_vm._v(
"\n " +
_vm._s(
minute === undefined
? ""
: ("0" + minute).slice(-2)
) +
"\n "
)
]
)
}),
0
)
]
),
_vm.showSeconds
? _c(
"div",
{
staticClass: "el-time-spinner__wrapper is-arrow",
on: {
mouseenter: function($event) {
_vm.emitSelectRange("seconds")
}
}
},
[
_c("i", {
directives: [
{
name: "repeat-click",
rawName: "v-repeat-click",
value: _vm.decrease,
expression: "decrease"
}
],
staticClass: "el-time-spinner__arrow el-icon-arrow-up"
}),
_c("i", {
directives: [
{
name: "repeat-click",
rawName: "v-repeat-click",
value: _vm.increase,
expression: "increase"
}
],
staticClass: "el-time-spinner__arrow el-icon-arrow-down"
}),
_c(
"ul",
{ ref: "seconds", staticClass: "el-time-spinner__list" },
_vm._l(_vm.arrowSecondList, function(second, key) {
return _c(
"li",
{
key: key,
staticClass: "el-time-spinner__item",
class: { active: second === _vm.seconds }
},
[
_vm._v(
"\n " +
_vm._s(
second === undefined
? ""
: ("0" + second).slice(-2)
) +
"\n "
)
]
)
}),
0
)
]
)
: _vm._e()
]
: _vm._e()
],
2
)
}
var staticRenderFns = []
render._withStripped = true
// CONCATENATED MODULE: ./packages/date-picker/src/basic/time-spinner.vue?vue&type=template&id=1facadeb&
// EXTERNAL MODULE: external "tis-ui/lib/utils/date-util"
var date_util_ = __webpack_require__(8);
// EXTERNAL MODULE: ./packages/scrollbar/index.js + 3 modules
var scrollbar = __webpack_require__(66);
// EXTERNAL MODULE: ./src/directives/repeat-click.js
var repeat_click = __webpack_require__(99);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/time-spinner.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var time_spinnervue_type_script_lang_js_ = ({
components: { ElScrollbar: scrollbar["default"] },
directives: {
repeatClick: repeat_click["a" /* default */]
},
props: {
date: {},
defaultValue: {}, // reserved for future use
showSeconds: {
type: Boolean,
default: true
},
arrowControl: Boolean,
amPmMode: {
type: String,
default: '' // 'a': am/pm; 'A': AM/PM
}
},
computed: {
hours: function hours() {
return this.date.getHours();
},
minutes: function minutes() {
return this.date.getMinutes();
},
seconds: function seconds() {
return this.date.getSeconds();
},
hoursList: function hoursList() {
return Object(date_util_["getRangeHours"])(this.selectableRange);
},
minutesList: function minutesList() {
return Object(date_util_["getRangeMinutes"])(this.selectableRange, this.hours);
},
arrowHourList: function arrowHourList() {
var hours = this.hours;
return [hours > 0 ? hours - 1 : undefined, hours, hours < 23 ? hours + 1 : undefined];
},
arrowMinuteList: function arrowMinuteList() {
var minutes = this.minutes;
return [minutes > 0 ? minutes - 1 : undefined, minutes, minutes < 59 ? minutes + 1 : undefined];
},
arrowSecondList: function arrowSecondList() {
var seconds = this.seconds;
return [seconds > 0 ? seconds - 1 : undefined, seconds, seconds < 59 ? seconds + 1 : undefined];
}
},
data: function data() {
return {
selectableRange: [],
currentScrollbar: null
};
},
mounted: function mounted() {
var _this = this;
this.$nextTick(function () {
!_this.arrowControl && _this.bindScrollEvent();
});
},
methods: {
increase: function increase() {
this.scrollDown(1);
},
decrease: function decrease() {
this.scrollDown(-1);
},
modifyDateField: function modifyDateField(type, value) {
switch (type) {
case 'hours':
this.$emit('change', Object(date_util_["modifyTime"])(this.date, value, this.minutes, this.seconds));break;
case 'minutes':
this.$emit('change', Object(date_util_["modifyTime"])(this.date, this.hours, value, this.seconds));break;
case 'seconds':
this.$emit('change', Object(date_util_["modifyTime"])(this.date, this.hours, this.minutes, value));break;
}
},
handleClick: function handleClick(type, _ref) {
var value = _ref.value,
disabled = _ref.disabled;
if (!disabled) {
this.modifyDateField(type, value);
this.emitSelectRange(type);
this.adjustSpinner(type, value);
}
},
emitSelectRange: function emitSelectRange(type) {
if (type === 'hours') {
this.$emit('select-range', 0, 2);
} else if (type === 'minutes') {
this.$emit('select-range', 3, 5);
} else if (type === 'seconds') {
this.$emit('select-range', 6, 8);
}
this.currentScrollbar = type;
},
bindScrollEvent: function bindScrollEvent() {
var _this2 = this;
var bindFuntion = function bindFuntion(type) {
_this2.$refs[type].wrap.onscroll = function (e) {
// TODO: scroll is emitted when set scrollTop programatically
// should find better solutions in the future!
_this2.handleScroll(type, e);
};
};
bindFuntion('hours');
bindFuntion('minutes');
bindFuntion('seconds');
},
handleScroll: function handleScroll(type) {
var value = Math.min(Math.round((this.$refs[type].wrap.scrollTop - (this.scrollBarHeight(type) * 0.5 - 10) / this.typeItemHeight(type) + 3) / this.typeItemHeight(type)), type === 'hours' ? 23 : 59);
this.modifyDateField(type, value);
},
// NOTE: used by datetime / date-range panel
// renamed from adjustScrollTop
// should try to refactory it
adjustSpinners: function adjustSpinners() {
this.adjustSpinner('hours', this.hours);
this.adjustSpinner('minutes', this.minutes);
this.adjustSpinner('seconds', this.seconds);
},
adjustCurrentSpinner: function adjustCurrentSpinner(type) {
this.adjustSpinner(type, this[type]);
},
adjustSpinner: function adjustSpinner(type, value) {
if (this.arrowControl) return;
var el = this.$refs[type].wrap;
if (el) {
el.scrollTop = Math.max(0, value * this.typeItemHeight(type));
}
},
scrollDown: function scrollDown(step) {
var _this3 = this;
if (!this.currentScrollbar) {
this.emitSelectRange('hours');
}
var label = this.currentScrollbar;
var hoursList = this.hoursList;
var now = this[label];
if (this.currentScrollbar === 'hours') {
var total = Math.abs(step);
step = step > 0 ? 1 : -1;
var length = hoursList.length;
while (length-- && total) {
now = (now + step + hoursList.length) % hoursList.length;
if (hoursList[now]) {
continue;
}
total--;
}
if (hoursList[now]) return;
} else {
now = (now + step + 60) % 60;
}
this.modifyDateField(label, now);
this.adjustSpinner(label, now);
this.$nextTick(function () {
return _this3.emitSelectRange(_this3.currentScrollbar);
});
},
amPm: function amPm(hour) {
var shouldShowAmPm = this.amPmMode.toLowerCase() === 'a';
if (!shouldShowAmPm) return '';
var isCapital = this.amPmMode === 'A';
var content = hour < 12 ? ' am' : ' pm';
if (isCapital) content = content.toUpperCase();
return content;
},
typeItemHeight: function typeItemHeight(type) {
return this.$refs[type].$el.querySelector('li').offsetHeight;
},
scrollBarHeight: function scrollBarHeight(type) {
return this.$refs[type].$el.offsetHeight;
}
}
});
// CONCATENATED MODULE: ./packages/date-picker/src/basic/time-spinner.vue?vue&type=script&lang=js&
/* harmony default export */ var basic_time_spinnervue_type_script_lang_js_ = (time_spinnervue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);
// CONCATENATED MODULE: ./packages/date-picker/src/basic/time-spinner.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
basic_time_spinnervue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "packages/date-picker/src/basic/time-spinner.vue"
/* harmony default export */ var time_spinner = __webpack_exports__["a"] = (component.exports);
/***/ }),
/***/ 13:
/***/ (function(module, exports) {
module.exports = require("tis-ui/lib/mixins/emitter");
/***/ }),
/***/ 2:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
/* globals __VUE_SSR_CONTEXT__ */
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.
function normalizeComponent (
scriptExports,
render,
staticRenderFns,
functionalTemplate,
injectStyles,
scopeId,
moduleIdentifier, /* server only */
shadowMode /* vue-cli only */
) {
// Vue.extend constructor export interop
var options = typeof scriptExports === 'function'
? scriptExports.options
: scriptExports
// render functions
if (render) {
options.render = render
options.staticRenderFns = staticRenderFns
options._compiled = true
}
// functional template
if (functionalTemplate) {
options.functional = true
}
// scopedId
if (scopeId) {
options._scopeId = 'data-v-' + scopeId
}
var hook
if (moduleIdentifier) { // server build
hook = function (context) {
// 2.3 injection
context =
context || // cached call
(this.$vnode && this.$vnode.ssrContext) || // stateful
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
// 2.2 with runInNewContext: true
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
context = __VUE_SSR_CONTEXT__
}
// inject component styles
if (injectStyles) {
injectStyles.call(this, context)
}
// register component module identifier for async chunk inferrence
if (context && context._registeredComponents) {
context._registeredComponents.add(moduleIdentifier)
}
}
// used by ssr in case component is cached and beforeCreate
// never gets called
options._ssrRegister = hook
} else if (injectStyles) {
hook = shadowMode
? function () {
injectStyles.call(
this,
(options.functional ? this.parent : this).$root.$options.shadowRoot
)
}
: injectStyles
}
if (hook) {
if (options.functional) {
// for template-only hot-reload because in that case the render fn doesn't
// go through the normalizer
options._injectStyles = hook
// register for functional component in vue file
var originalRender = options.render
options.render = function renderWithStyleInjection (h, context) {
hook.call(context)
return originalRender(h, context)
}
} else {
// inject component registration as beforeCreate hook
var existing = options.beforeCreate
options.beforeCreate = existing
? [].concat(existing, hook)
: [hook]
}
}
return {
exports: scriptExports,
options: options
}
}
/***/ }),
/***/ 33:
/***/ (function(module, exports) {
module.exports = require("tis-ui/lib/utils/merge");
/***/ }),
/***/ 34:
/***/ (function(module, exports) {
module.exports = require("tis-ui/lib/utils/vue-popper");
/***/ }),
/***/ 36:
/***/ (function(module, exports) {
module.exports = require("tis-ui/lib/mixins/migrating");
/***/ }),
/***/ 38:
/***/ (function(module, exports) {
module.exports = require("tis-ui/lib/mixins/locale");
/***/ }),
/***/ 4:
/***/ (function(module, exports) {
module.exports = require("vue");
/***/ }),
/***/ 44:
/***/ (function(module, exports) {
module.exports = require("tis-ui/lib/utils/resize-event");
/***/ }),
/***/ 49:
/***/ (function(module, exports) {
module.exports = require("tis-ui/lib/utils/shared");
/***/ }),
/***/ 52:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=template&id=343dd774&
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c(
"div",
{
class: [
_vm.type === "textarea" ? "el-textarea" : "el-input",
_vm.inputSize ? "el-input--" + _vm.inputSize : "",
{
"is-disabled": _vm.inputDisabled,
"is-exceed": _vm.inputExceed,
"el-input-group": _vm.$slots.prepend || _vm.$slots.append,
"el-input-group--append": _vm.$slots.append,
"el-input-group--prepend": _vm.$slots.prepend,
"el-input--prefix": _vm.$slots.prefix || _vm.prefixIcon,
"el-input--suffix":
_vm.$slots.suffix ||
_vm.suffixIcon ||
_vm.clearable ||
_vm.showPassword
}
],
on: {
mouseenter: function($event) {
_vm.hovering = true
},
mouseleave: function($event) {
_vm.hovering = false
}
}
},
[
_vm.type !== "textarea"
? [
_vm.$slots.prepend
? _c(
"div",
{ staticClass: "el-input-group__prepend" },
[_vm._t("prepend")],
2
)
: _vm._e(),
_vm.type !== "textarea"
? _c(
"input",
_vm._b(
{
ref: "input",
staticClass: "el-input__inner",
attrs: {
tabindex: _vm.tabindex,
type: _vm.showPassword
? _vm.passwordVisible
? "text"
: "password"
: _vm.type,
disabled: _vm.inputDisabled,
readonly: _vm.readonly,
autocomplete: _vm.autoComplete || _vm.autocomplete,
"aria-label": _vm.label
},
on: {
compositionstart: _vm.handleCompositionStart,
compositionupdate: _vm.handleCompositionUpdate,
compositionend: _vm.handleCompositionEnd,
input: _vm.handleInput,
focus: _vm.handleFocus,
blur: _vm.handleBlur,
change: _vm.handleChange
}
},
"input",
_vm.$attrs,
false
)
)
: _vm._e(),
_vm.$slots.prefix || _vm.prefixIcon
? _c(
"span",
{ staticClass: "el-input__prefix" },
[
_vm._t("prefix"),
_vm.prefixIcon
? _c("i", {
staticClass: "el-input__icon",
class: _vm.prefixIcon
})
: _vm._e()
],
2
)
: _vm._e(),
_vm.getSuffixVisible()
? _c("span", { staticClass: "el-input__suffix" }, [
_c(
"span",
{ staticClass: "el-input__suffix-inner" },
[
!_vm.showClear ||
!_vm.showPwdVisible ||
!_vm.isWordLimitVisible
? [
_vm._t("suffix"),
_vm.suffixIcon
? _c("i", {
staticClass: "el-input__icon",
class: _vm.suffixIcon
})
: _vm._e()
]
: _vm._e(),
_vm.showClear
? _c("i", {
staticClass:
"el-input__icon el-icon-circle-close el-input__clear",
on: {
mousedown: function($event) {
$event.preventDefault()
},
click: _vm.clear
}
})
: _vm._e(),
_vm.showPwdVisible
? _c("i", {
staticClass:
"el-input__icon el-icon-view el-input__clear",
on: { click: _vm.handlePasswordVisible }
})
: _vm._e(),
_vm.isWordLimitVisible
? _c("span", { staticClass: "el-input__count" }, [
_c(
"span",
{ staticClass: "el-input__count-inner" },
[
_vm._v(
"\n " +
_vm._s(_vm.textLength) +
"/" +
_vm._s(_vm.upperLimit) +
"\n "
)
]
)
])
: _vm._e()
],
2
),
_vm.validateState
? _c("i", {
staticClass: "el-input__icon",
class: ["el-input__validateIcon", _vm.validateIcon]
})
: _vm._e()
])
: _vm._e(),
_vm.$slots.append
? _c(
"div",
{ staticClass: "el-input-group__append" },
[_vm._t("append")],
2
)
: _vm._e()
]
: _c(
"textarea",
_vm._b(
{
ref: "textarea",
staticClass: "el-textarea__inner",
style: _vm.textareaStyle,
attrs: {
tabindex: _vm.tabindex,
disabled: _vm.inputDisabled,
readonly: _vm.readonly,
autocomplete: _vm.autoComplete || _vm.autocomplete,
"aria-label": _vm.label
},
on: {
compositionstart: _vm.handleCompositionStart,
compositionupdate: _vm.handleCompositionUpdate,
compositionend: _vm.handleCompositionEnd,
input: _vm.handleInput,
focus: _vm.handleFocus,
blur: _vm.handleBlur,
change: _vm.handleChange
}
},
"textarea",
_vm.$attrs,
false
)
),
_vm.isWordLimitVisible && _vm.type === "textarea"
? _c("span", { staticClass: "el-input__count" }, [
_vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit))
])
: _vm._e()
],
2
)
}
var staticRenderFns = []
render._withStripped = true
// CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=343dd774&
// EXTERNAL MODULE: external "tis-ui/lib/mixins/emitter"
var emitter_ = __webpack_require__(13);
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
// EXTERNAL MODULE: external "tis-ui/lib/mixins/migrating"
var migrating_ = __webpack_require__(36);
var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_);
// CONCATENATED MODULE: ./packages/input/src/calcTextareaHeight.js
var hiddenTextarea = void 0;
var HIDDEN_STYLE = '\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n';
var CONTEXT_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];
function calculateNodeStyling(targetElement) {
var style = window.getComputedStyle(targetElement);
var boxSizing = style.getPropertyValue('box-sizing');
var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
var contextStyle = CONTEXT_STYLE.map(function (name) {
return name + ':' + style.getPropertyValue(name);
}).join(';');
return { contextStyle: contextStyle, paddingSize: paddingSize, borderSize: borderSize, boxSizing: boxSizing };
}
function calcTextareaHeight(targetElement) {
var minRows = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
var maxRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
if (!hiddenTextarea) {
hiddenTextarea = document.createElement('textarea');
document.body.appendChild(hiddenTextarea);
}
var _calculateNodeStyling = calculateNodeStyling(targetElement),
paddingSize = _calculateNodeStyling.paddingSize,
borderSize = _calculateNodeStyling.borderSize,
boxSizing = _calculateNodeStyling.boxSizing,
contextStyle = _calculateNodeStyling.contextStyle;
hiddenTextarea.setAttribute('style', contextStyle + ';' + HIDDEN_STYLE);
hiddenTextarea.value = targetElement.value || targetElement.placeholder || '';
var height = hiddenTextarea.scrollHeight;
var result = {};
if (boxSizing === 'border-box') {
height = height + borderSize;
} else if (boxSizing === 'content-box') {
height = height - paddingSize;
}
hiddenTextarea.value = '';
var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
if (minRows !== null) {
var minHeight = singleRowHeight * minRows;
if (boxSizing === 'border-box') {
minHeight = minHeight + paddingSize + borderSize;
}
height = Math.max(minHeight, height);
result.minHeight = minHeight + 'px';
}
if (maxRows !== null) {
var maxHeight = singleRowHeight * maxRows;
if (boxSizing === 'border-box') {
maxHeight = maxHeight + paddingSize + borderSize;
}
height = Math.min(maxHeight, height);
}
result.height = height + 'px';
hiddenTextarea.parentNode && hiddenTextarea.parentNode.removeChild(hiddenTextarea);
hiddenTextarea = null;
return result;
};
// EXTERNAL MODULE: external "tis-ui/lib/utils/merge"
var merge_ = __webpack_require__(33);
var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
// EXTERNAL MODULE: external "tis-ui/lib/utils/shared"
var shared_ = __webpack_require__(49);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var inputvue_type_script_lang_js_ = ({
name: 'TisInput',
componentName: 'TisInput',
mixins: [emitter_default.a, migrating_default.a],
inheritAttrs: false,
inject: {
elForm: {
default: ''
},
elFormItem: {
default: ''
}
},
data: function data() {
return {
textareaCalcStyle: {},
hovering: false,
focused: false,
isComposing: false,
passwordVisible: false
};
},
props: {
value: [String, Number],
size: String,
resize: String,
form: String,
disabled: Boolean,
readonly: Boolean,
type: {
type: String,
default: 'text'
},
autosize: {
type: [Boolean, Object],
default: false
},
autocomplete: {
type: String,
default: 'off'
},
/** @Deprecated in next major version */
autoComplete: {
type: String,
validator: function validator(val) {
false && false;
return true;
}
},
validateEvent: {
type: Boolean,
default: true
},
suffixIcon: String,
prefixIcon: String,
label: String,
clearable: {
type: Boolean,
default: false
},
showPassword: {
type: Boolean,
default: false
},
showWordLimit: {
type: Boolean,
default: false
},
tabindex: String
},
computed: {
_elFormItemSize: function _elFormItemSize() {
return (this.elFormItem || {}).elFormItemSize;
},
validateState: function validateState() {
return this.elFormItem ? this.elFormItem.validateState : '';
},
needStatusIcon: function needStatusIcon() {
return this.elForm ? this.elForm.statusIcon : false;
},
validateIcon: function validateIcon() {
return {
validating: 'el-icon-loading',
success: 'el-icon-circle-check',
error: 'el-icon-circle-close'
}[this.validateState];
},
textareaStyle: function textareaStyle() {
return merge_default()({}, this.textareaCalcStyle, { resize: this.resize });
},
inputSize: function inputSize() {
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
},
inputDisabled: function inputDisabled() {
return this.disabled || (this.elForm || {}).disabled;
},
nativeInputValue: function nativeInputValue() {
return this.value === null || this.value === undefined ? '' : String(this.value);
},
showClear: function showClear() {
return this.clearable && !this.inputDisabled && !this.readonly && this.nativeInputValue && (this.focused || this.hovering);
},
showPwdVisible: function showPwdVisible() {
return this.showPassword && !this.inputDisabled && !this.readonly && (!!this.nativeInputValue || this.focused);
},
isWordLimitVisible: function isWordLimitVisible() {
return this.showWordLimit && this.$attrs.maxlength && (this.type === 'text' || this.type === 'textarea') && !this.inputDisabled && !this.readonly && !this.showPassword;
},
upperLimit: function upperLimit() {
return this.$attrs.maxlength;
},
textLength: function textLength() {
if (typeof this.value === 'number') {
return String(this.value).length;
}
return (this.value || '').length;
},
inputExceed: function inputExceed() {
// show exceed style if length of initial value greater then maxlength
return this.isWordLimitVisible && this.textLength > this.upperLimit;
}
},
watch: {
value: function value(val) {
this.$nextTick(this.resizeTextarea);
if (this.validateEvent) {
this.dispatch('ElFormItem', 'el.form.change', [val]);
}
},
// native input value is set explicitly
// do not use v-model / :value in template
// see: https://github.com/ElemeFE/element/issues/14521
nativeInputValue: function nativeInputValue() {
this.setNativeInputValue();
},
// when change between <input> and <textarea>,
// update DOM dependent value and styles
// https://github.com/ElemeFE/element/issues/14857
type: function type() {
var _this = this;
this.$nextTick(function () {
_this.setNativeInputValue();
_this.resizeTextarea();
_this.updateIconOffset();
});
}
},
methods: {
focus: function focus() {
this.getInput().focus();
},
blur: function blur() {
this.getInput().blur();
},
getMigratingConfig: function getMigratingConfig() {
return {
props: {
'icon': 'icon is removed, use suffix-icon / prefix-icon instead.',
'on-icon-click': 'on-icon-click is removed.'
},
events: {
'click': 'click is removed.'
}
};
},
handleBlur: function handleBlur(event) {
this.focused = false;
this.$emit('blur', event);
if (this.validateEvent) {
this.dispatch('ElFormItem', 'el.form.blur', [this.value]);
}
},
select: function select() {
this.getInput().select();
},
resizeTextarea: function resizeTextarea() {
if (this.$isServer) return;
var autosize = this.autosize,
type = this.type;
if (type !== 'textarea') return;
if (!autosize) {
this.textareaCalcStyle = {
minHeight: calcTextareaHeight(this.$refs.textarea).minHeight
};
return;
}
var minRows = autosize.minRows;
var maxRows = autosize.maxRows;
this.textareaCalcStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
},
setNativeInputValue: function setNativeInputValue() {
var input = this.getInput();
if (!input) return;
if (input.value === this.nativeInputValue) return;
input.value = this.nativeInputValue;
},
handleFocus: function handleFocus(event) {
this.focused = true;
this.$emit('focus', event);
},
handleCompositionStart: function handleCompositionStart() {
this.isComposing = true;
},
handleCompositionUpdate: function handleCompositionUpdate(event) {
var text = event.target.value;
var lastCharacter = text[text.length - 1] || '';
this.isComposing = !Object(shared_["isKorean"])(lastCharacter);
},
handleCompositionEnd: function handleCompositionEnd(event) {
if (this.isComposing) {
this.isComposing = false;
this.handleInput(event);
}
},
handleInput: function handleInput(event) {
// should not emit input during composition
// see: https://github.com/ElemeFE/element/issues/10516
if (this.isComposing) return;
// hack for https://github.com/ElemeFE/element/issues/8548
// should remove the following line when we don't support IE
if (event.target.value === this.nativeInputValue) return;
this.$emit('input', event.target.value);
// ensure native input value is controlled
// see: https://github.com/ElemeFE/element/issues/12850
this.$nextTick(this.setNativeInputValue);
},
handleChange: function handleChange(event) {
this.$emit('change', event.target.value);
},
calcIconOffset: function calcIconOffset(place) {
var elList = [].slice.call(this.$el.querySelectorAll('.el-input__' + place) || []);
if (!elList.length) return;
var el = null;
for (var i = 0; i < elList.length; i++) {
if (elList[i].parentNode === this.$el) {
el = elList[i];
break;
}
}
if (!el) return;
var pendantMap = {
suffix: 'append',
prefix: 'prepend'
};
var pendant = pendantMap[place];
if (this.$slots[pendant]) {
el.style.transform = 'translateX(' + (place === 'suffix' ? '-' : '') + this.$el.querySelector('.el-input-group__' + pendant).offsetWidth + 'px)';
} else {
el.removeAttribute('style');
}
},
updateIconOffset: function updateIconOffset() {
this.calcIconOffset('prefix');
this.calcIconOffset('suffix');
},
clear: function clear() {
this.$emit('input', '');
this.$emit('change', '');
this.$emit('clear');
},
handlePasswordVisible: function handlePasswordVisible() {
this.passwordVisible = !this.passwordVisible;
this.focus();
},
getInput: function getInput() {
return this.$refs.input || this.$refs.textarea;
},
getSuffixVisible: function getSuffixVisible() {
return this.$slots.suffix || this.suffixIcon || this.showClear || this.showPassword || this.isWordLimitVisible || this.validateState && this.needStatusIcon;
}
},
created: function created() {
this.$on('inputSelect', this.select);
},
mounted: function mounted() {
this.setNativeInputValue();
this.resizeTextarea();
this.updateIconOffset();
},
updated: function updated() {
this.$nextTick(this.updateIconOffset);
}
});
// CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=script&lang=js&
/* harmony default export */ var src_inputvue_type_script_lang_js_ = (inputvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);
// CONCATENATED MODULE: ./packages/input/src/input.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
src_inputvue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "packages/input/src/input.vue"
/* harmony default export */ var input = (component.exports);
// CONCATENATED MODULE: ./packages/input/index.js
/* istanbul ignore next */
input.install = function (Vue) {
Vue.component(input.name, input);
};
/* harmony default export */ var packages_input = __webpack_exports__["default"] = (input);
/***/ }),
/***/ 531:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXTERNAL MODULE: ./packages/date-picker/src/picker.vue + 4 modules
var picker = __webpack_require__(113);
// EXTERNAL MODULE: ./packages/date-picker/src/panel/time.vue + 4 modules
var time = __webpack_require__(111);
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time-range.vue?vue&type=template&id=fb28660e&
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c(
"transition",
{
attrs: { name: "el-zoom-in-top" },
on: {
"after-leave": function($event) {
_vm.$emit("dodestroy")
}
}
},
[
_c(
"div",
{
directives: [
{
name: "show",
rawName: "v-show",
value: _vm.visible,
expression: "visible"
}
],
staticClass: "el-time-range-picker el-picker-panel el-popper",
class: _vm.popperClass
},
[
_c("div", { staticClass: "el-time-range-picker__content" }, [
_c("div", { staticClass: "el-time-range-picker__cell" }, [
_c("div", { staticClass: "el-time-range-picker__header" }, [
_vm._v(_vm._s(_vm.t("el.datepicker.startTime")))
]),
_c(
"div",
{
staticClass:
"el-time-range-picker__body el-time-panel__content",
class: {
"has-seconds": _vm.showSeconds,
"is-arrow": _vm.arrowControl
}
},
[
_c("time-spinner", {
ref: "minSpinner",
attrs: {
"show-seconds": _vm.showSeconds,
"am-pm-mode": _vm.amPmMode,
"arrow-control": _vm.arrowControl,
date: _vm.minDate
},
on: {
change: _vm.handleMinChange,
"select-range": _vm.setMinSelectionRange
}
})
],
1
)
]),
_c("div", { staticClass: "el-time-range-picker__cell" }, [
_c("div", { staticClass: "el-time-range-picker__header" }, [
_vm._v(_vm._s(_vm.t("el.datepicker.endTime")))
]),
_c(
"div",
{
staticClass:
"el-time-range-picker__body el-time-panel__content",
class: {
"has-seconds": _vm.showSeconds,
"is-arrow": _vm.arrowControl
}
},
[
_c("time-spinner", {
ref: "maxSpinner",
attrs: {
"show-seconds": _vm.showSeconds,
"am-pm-mode": _vm.amPmMode,
"arrow-control": _vm.arrowControl,
date: _vm.maxDate
},
on: {
change: _vm.handleMaxChange,
"select-range": _vm.setMaxSelectionRange
}
})
],
1
)
])
]),
_c("div", { staticClass: "el-time-panel__footer" }, [
_c(
"button",
{
staticClass: "el-time-panel__btn cancel",
attrs: { type: "button" },
on: {
click: function($event) {
_vm.handleCancel()
}
}
},
[_vm._v(_vm._s(_vm.t("el.datepicker.cancel")))]
),
_c(
"button",
{
staticClass: "el-time-panel__btn confirm",
attrs: { type: "button", disabled: _vm.btnDisabled },
on: {
click: function($event) {
_vm.handleConfirm()
}
}
},
[_vm._v(_vm._s(_vm.t("el.datepicker.confirm")))]
)
])
]
)
]
)
}
var staticRenderFns = []
render._withStripped = true
// CONCATENATED MODULE: ./packages/date-picker/src/panel/time-range.vue?vue&type=template&id=fb28660e&
// EXTERNAL MODULE: external "tis-ui/lib/utils/date-util"
var date_util_ = __webpack_require__(8);
// EXTERNAL MODULE: external "tis-ui/lib/mixins/locale"
var locale_ = __webpack_require__(38);
var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
// EXTERNAL MODULE: ./packages/date-picker/src/basic/time-spinner.vue + 4 modules
var time_spinner = __webpack_require__(123);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time-range.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var MIN_TIME = Object(date_util_["parseDate"])('00:00:00', 'HH:mm:ss');
var MAX_TIME = Object(date_util_["parseDate"])('23:59:59', 'HH:mm:ss');
var time_rangevue_type_script_lang_js_minTimeOfDay = function minTimeOfDay(date) {
return Object(date_util_["modifyDate"])(MIN_TIME, date.getFullYear(), date.getMonth(), date.getDate());
};
var time_rangevue_type_script_lang_js_maxTimeOfDay = function maxTimeOfDay(date) {
return Object(date_util_["modifyDate"])(MAX_TIME, date.getFullYear(), date.getMonth(), date.getDate());
};
// increase time by amount of milliseconds, but within the range of day
var advanceTime = function advanceTime(date, amount) {
return new Date(Math.min(date.getTime() + amount, time_rangevue_type_script_lang_js_maxTimeOfDay(date).getTime()));
};
/* harmony default export */ var time_rangevue_type_script_lang_js_ = ({
mixins: [locale_default.a],
components: { TimeSpinner: time_spinner["a" /* default */] },
computed: {
showSeconds: function showSeconds() {
return (this.format || '').indexOf('ss') !== -1;
},
offset: function offset() {
return this.showSeconds ? 11 : 8;
},
spinner: function spinner() {
return this.selectionRange[0] < this.offset ? this.$refs.minSpinner : this.$refs.maxSpinner;
},
btnDisabled: function btnDisabled() {
return this.minDate.getTime() > this.maxDate.getTime();
},
amPmMode: function amPmMode() {
if ((this.format || '').indexOf('A') !== -1) return 'A';
if ((this.format || '').indexOf('a') !== -1) return 'a';
return '';
}
},
data: function data() {
return {
popperClass: '',
minDate: new Date(),
maxDate: new Date(),
value: [],
oldValue: [new Date(), new Date()],
defaultValue: null,
format: 'HH:mm:ss',
visible: false,
selectionRange: [0, 2],
arrowControl: false
};
},
watch: {
value: function value(_value) {
if (Array.isArray(_value)) {
this.minDate = new Date(_value[0]);
this.maxDate = new Date(_value[1]);
} else {
if (Array.isArray(this.defaultValue)) {
this.minDate = new Date(this.defaultValue[0]);
this.maxDate = new Date(this.defaultValue[1]);
} else if (this.defaultValue) {
this.minDate = new Date(this.defaultValue);
this.maxDate = advanceTime(new Date(this.defaultValue), 60 * 60 * 1000);
} else {
this.minDate = new Date();
this.maxDate = advanceTime(new Date(), 60 * 60 * 1000);
}
}
},
visible: function visible(val) {
var _this = this;
if (val) {
this.oldValue = this.value;
this.$nextTick(function () {
return _this.$refs.minSpinner.emitSelectRange('hours');
});
}
}
},
methods: {
handleClear: function handleClear() {
this.$emit('pick', null);
},
handleCancel: function handleCancel() {
this.$emit('pick', this.oldValue);
},
handleMinChange: function handleMinChange(date) {
this.minDate = Object(date_util_["clearMilliseconds"])(date);
this.handleChange();
},
handleMaxChange: function handleMaxChange(date) {
this.maxDate = Object(date_util_["clearMilliseconds"])(date);
this.handleChange();
},
handleChange: function handleChange() {
if (this.isValidValue([this.minDate, this.maxDate])) {
this.$refs.minSpinner.selectableRange = [[time_rangevue_type_script_lang_js_minTimeOfDay(this.minDate), this.maxDate]];
this.$refs.maxSpinner.selectableRange = [[this.minDate, time_rangevue_type_script_lang_js_maxTimeOfDay(this.maxDate)]];
this.$emit('pick', [this.minDate, this.maxDate], true);
}
},
setMinSelectionRange: function setMinSelectionRange(start, end) {
this.$emit('select-range', start, end, 'min');
this.selectionRange = [start, end];
},
setMaxSelectionRange: function setMaxSelectionRange(start, end) {
this.$emit('select-range', start, end, 'max');
this.selectionRange = [start + this.offset, end + this.offset];
},
handleConfirm: function handleConfirm() {
var visible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
var minSelectableRange = this.$refs.minSpinner.selectableRange;
var maxSelectableRange = this.$refs.maxSpinner.selectableRange;
this.minDate = Object(date_util_["limitTimeRange"])(this.minDate, minSelectableRange, this.format);
this.maxDate = Object(date_util_["limitTimeRange"])(this.maxDate, maxSelectableRange, this.format);
this.$emit('pick', [this.minDate, this.maxDate], visible);
},
adjustSpinners: function adjustSpinners() {
this.$refs.minSpinner.adjustSpinners();
this.$refs.maxSpinner.adjustSpinners();
},
changeSelectionRange: function changeSelectionRange(step) {
var list = this.showSeconds ? [0, 3, 6, 11, 14, 17] : [0, 3, 8, 11];
var mapping = ['hours', 'minutes'].concat(this.showSeconds ? ['seconds'] : []);
var index = list.indexOf(this.selectionRange[0]);
var next = (index + step + list.length) % list.length;
var half = list.length / 2;
if (next < half) {
this.$refs.minSpinner.emitSelectRange(mapping[next]);
} else {
this.$refs.maxSpinner.emitSelectRange(mapping[next - half]);
}
},
isValidValue: function isValidValue(date) {
return Array.isArray(date) && Object(date_util_["timeWithinRange"])(this.minDate, this.$refs.minSpinner.selectableRange) && Object(date_util_["timeWithinRange"])(this.maxDate, this.$refs.maxSpinner.selectableRange);
},
handleKeydown: function handleKeydown(event) {
var keyCode = event.keyCode;
var mapping = { 38: -1, 40: 1, 37: -1, 39: 1 };
// Left or Right
if (keyCode === 37 || keyCode === 39) {
var step = mapping[keyCode];
this.changeSelectionRange(step);
event.preventDefault();
return;
}
// Up or Down
if (keyCode === 38 || keyCode === 40) {
var _step = mapping[keyCode];
this.spinner.scrollDown(_step);
event.preventDefault();
return;
}
}
}
});
// CONCATENATED MODULE: ./packages/date-picker/src/panel/time-range.vue?vue&type=script&lang=js&
/* harmony default export */ var panel_time_rangevue_type_script_lang_js_ = (time_rangevue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);
// CONCATENATED MODULE: ./packages/date-picker/src/panel/time-range.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
panel_time_rangevue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "packages/date-picker/src/panel/time-range.vue"
/* harmony default export */ var time_range = (component.exports);
// CONCATENATED MODULE: ./packages/date-picker/src/picker/time-picker.js
/* harmony default export */ var time_picker = ({
mixins: [picker["a" /* default */]],
name: 'TisTimePicker',
props: {
isRange: Boolean,
arrowControl: Boolean
},
data: function data() {
return {
type: ''
};
},
watch: {
isRange: function isRange(_isRange) {
if (this.picker) {
this.unmountPicker();
this.type = _isRange ? 'timerange' : 'time';
this.panel = _isRange ? time_range : time["a" /* default */];
this.mountPicker();
} else {
this.type = _isRange ? 'timerange' : 'time';
this.panel = _isRange ? time_range : time["a" /* default */];
}
}
},
created: function created() {
this.type = this.isRange ? 'timerange' : 'time';
this.panel = this.isRange ? time_range : time["a" /* default */];
}
});
// CONCATENATED MODULE: ./packages/time-picker/index.js
/* istanbul ignore next */
time_picker.install = function (Vue) {
Vue.component(time_picker.name, time_picker);
};
/* harmony default export */ var packages_time_picker = __webpack_exports__["default"] = (time_picker);
/***/ }),
/***/ 61:
/***/ (function(module, exports) {
module.exports = require("tis-ui/lib/utils/clickoutside");
/***/ }),
/***/ 65:
/***/ (function(module, exports) {
module.exports = require("tis-ui/lib/utils/scrollbar-width");
/***/ }),
/***/ 66:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXTERNAL MODULE: external "tis-ui/lib/utils/resize-event"
var resize_event_ = __webpack_require__(44);
// EXTERNAL MODULE: external "tis-ui/lib/utils/scrollbar-width"
var scrollbar_width_ = __webpack_require__(65);
var scrollbar_width_default = /*#__PURE__*/__webpack_require__.n(scrollbar_width_);
// EXTERNAL MODULE: external "tis-ui/lib/utils/util"
var util_ = __webpack_require__(10);
// EXTERNAL MODULE: external "tis-ui/lib/utils/dom"
var dom_ = __webpack_require__(7);
// CONCATENATED MODULE: ./packages/scrollbar/src/util.js
var BAR_MAP = {
vertical: {
offset: 'offsetHeight',
scroll: 'scrollTop',
scrollSize: 'scrollHeight',
size: 'height',
key: 'vertical',
axis: 'Y',
client: 'clientY',
direction: 'top'
},
horizontal: {
offset: 'offsetWidth',
scroll: 'scrollLeft',
scrollSize: 'scrollWidth',
size: 'width',
key: 'horizontal',
axis: 'X',
client: 'clientX',
direction: 'left'
}
};
function renderThumbStyle(_ref) {
var move = _ref.move,
size = _ref.size,
bar = _ref.bar;
var style = {};
var translate = 'translate' + bar.axis + '(' + move + '%)';
style[bar.size] = size;
style.transform = translate;
style.msTransform = translate;
style.webkitTransform = translate;
return style;
};
// CONCATENATED MODULE: ./packages/scrollbar/src/bar.js
/* istanbul ignore next */
/* harmony default export */ var src_bar = ({
name: 'Bar',
props: {
vertical: Boolean,
size: String,
move: Number
},
computed: {
bar: function bar() {
return BAR_MAP[this.vertical ? 'vertical' : 'horizontal'];
},
wrap: function wrap() {
return this.$parent.wrap;
}
},
render: function render(h) {
var size = this.size,
move = this.move,
bar = this.bar;
return h(
'div',
{
'class': ['el-scrollbar__bar', 'is-' + bar.key],
on: {
'mousedown': this.clickTrackHandler
}
},
[h('div', {
ref: 'thumb',
'class': 'el-scrollbar__thumb',
on: {
'mousedown': this.clickThumbHandler
},
style: renderThumbStyle({ size: size, move: move, bar: bar }) })]
);
},
methods: {
clickThumbHandler: function clickThumbHandler(e) {
// prevent click event of right button
if (e.ctrlKey || e.button === 2) {
return;
}
this.startDrag(e);
this[this.bar.axis] = e.currentTarget[this.bar.offset] - (e[this.bar.client] - e.currentTarget.getBoundingClientRect()[this.bar.direction]);
},
clickTrackHandler: function clickTrackHandler(e) {
var offset = Math.abs(e.target.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]);
var thumbHalf = this.$refs.thumb[this.bar.offset] / 2;
var thumbPositionPercentage = (offset - thumbHalf) * 100 / this.$el[this.bar.offset];
this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
},
startDrag: function startDrag(e) {
e.stopImmediatePropagation();
this.cursorDown = true;
Object(dom_["on"])(document, 'mousemove', this.mouseMoveDocumentHandler);
Object(dom_["on"])(document, 'mouseup', this.mouseUpDocumentHandler);
document.onselectstart = function () {
return false;
};
},
mouseMoveDocumentHandler: function mouseMoveDocumentHandler(e) {
if (this.cursorDown === false) return;
var prevPage = this[this.bar.axis];
if (!prevPage) return;
var offset = (this.$el.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]) * -1;
var thumbClickPosition = this.$refs.thumb[this.bar.offset] - prevPage;
var thumbPositionPercentage = (offset - thumbClickPosition) * 100 / this.$el[this.bar.offset];
this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
},
mouseUpDocumentHandler: function mouseUpDocumentHandler(e) {
this.cursorDown = false;
this[this.bar.axis] = 0;
Object(dom_["off"])(document, 'mousemove', this.mouseMoveDocumentHandler);
document.onselectstart = null;
}
},
destroyed: function destroyed() {
Object(dom_["off"])(document, 'mouseup', this.mouseUpDocumentHandler);
}
});
// CONCATENATED MODULE: ./packages/scrollbar/src/main.js
// reference https://github.com/noeldelgado/gemini-scrollbar/blob/master/index.js
/* istanbul ignore next */
/* harmony default export */ var main = ({
name: 'TisScrollbar',
components: { Bar: src_bar },
props: {
native: Boolean,
wrapStyle: {},
wrapClass: {},
viewClass: {},
viewStyle: {},
noresize: Boolean, // 如果 container 尺寸不会发生变化,最好设置它可以优化性能
tag: {
type: String,
default: 'div'
}
},
data: function data() {
return {
sizeWidth: '0',
sizeHeight: '0',
moveX: 0,
moveY: 0
};
},
computed: {
wrap: function wrap() {
return this.$refs.wrap;
}
},
render: function render(h) {
var gutter = scrollbar_width_default()();
var style = this.wrapStyle;
if (gutter) {
var gutterWith = '-' + gutter + 'px';
var gutterStyle = 'margin-bottom: ' + gutterWith + '; margin-right: ' + gutterWith + ';';
if (Array.isArray(this.wrapStyle)) {
style = Object(util_["toObject"])(this.wrapStyle);
style.marginRight = style.marginBottom = gutterWith;
} else if (typeof this.wrapStyle === 'string') {
style += gutterStyle;
} else {
style = gutterStyle;
}
}
var view = h(this.tag, {
class: ['el-scrollbar__view', this.viewClass],
style: this.viewStyle,
ref: 'resize'
}, this.$slots.default);
var wrap = h(
'div',
{
ref: 'wrap',
style: style,
on: {
'scroll': this.handleScroll
},
'class': [this.wrapClass, 'el-scrollbar__wrap', gutter ? '' : 'el-scrollbar__wrap--hidden-default'] },
[[view]]
);
var nodes = void 0;
if (!this.native) {
nodes = [wrap, h(src_bar, {
attrs: {
move: this.moveX,
size: this.sizeWidth }
}), h(src_bar, {
attrs: {
vertical: true,
move: this.moveY,
size: this.sizeHeight }
})];
} else {
nodes = [h(
'div',
{
ref: 'wrap',
'class': [this.wrapClass, 'el-scrollbar__wrap'],
style: style },
[[view]]
)];
}
return h('div', { class: 'el-scrollbar' }, nodes);
},
methods: {
handleScroll: function handleScroll() {
var wrap = this.wrap;
this.moveY = wrap.scrollTop * 100 / wrap.clientHeight;
this.moveX = wrap.scrollLeft * 100 / wrap.clientWidth;
},
update: function update() {
var heightPercentage = void 0,
widthPercentage = void 0;
var wrap = this.wrap;
if (!wrap) return;
heightPercentage = wrap.clientHeight * 100 / wrap.scrollHeight;
widthPercentage = wrap.clientWidth * 100 / wrap.scrollWidth;
this.sizeHeight = heightPercentage < 100 ? heightPercentage + '%' : '';
this.sizeWidth = widthPercentage < 100 ? widthPercentage + '%' : '';
}
},
mounted: function mounted() {
if (this.native) return;
this.$nextTick(this.update);
!this.noresize && Object(resize_event_["addResizeListener"])(this.$refs.resize, this.update);
},
beforeDestroy: function beforeDestroy() {
if (this.native) return;
!this.noresize && Object(resize_event_["removeResizeListener"])(this.$refs.resize, this.update);
}
});
// CONCATENATED MODULE: ./packages/scrollbar/index.js
/* istanbul ignore next */
main.install = function (Vue) {
Vue.component(main.name, main);
};
/* harmony default export */ var scrollbar = __webpack_exports__["default"] = (main);
/***/ }),
/***/ 7:
/***/ (function(module, exports) {
module.exports = require("tis-ui/lib/utils/dom");
/***/ }),
/***/ 8:
/***/ (function(module, exports) {
module.exports = require("tis-ui/lib/utils/date-util");
/***/ }),
/***/ 99:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var tis_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
/* harmony import */ var tis_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(tis_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__);
/* harmony default export */ __webpack_exports__["a"] = ({
bind: function bind(el, binding, vnode) {
var interval = null;
var startTime = void 0;
var handler = function handler() {
return vnode.context[binding.expression].apply();
};
var clear = function clear() {
if (Date.now() - startTime < 100) {
handler();
}
clearInterval(interval);
interval = null;
};
Object(tis_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__["on"])(el, 'mousedown', function (e) {
if (e.button !== 0) return;
startTime = Date.now();
Object(tis_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__["once"])(document, 'mouseup', clear);
clearInterval(interval);
interval = setInterval(handler, 100);
});
}
});
/***/ })
/******/ });