kingdot
Version:
A UI Components Library For Vue
1,342 lines (1,191 loc) • 1.07 MB
JavaScript
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 = 186);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (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
}
}
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
!function (t, e) {
"object" == ( false ? undefined : _typeof(exports)) && "undefined" != typeof module ? module.exports = e() : true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (e),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
__WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
}(this, function () {
"use strict";
var t = "millisecond",
e = "second",
n = "minute",
r = "hour",
i = "day",
s = "week",
u = "month",
a = "quarter",
o = "year",
f = "date",
h = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d+)?$/,
c = /\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,
d = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_") },
$ = function $(t, e, n) {
var r = String(t);return !r || r.length >= e ? t : "" + Array(e + 1 - r.length).join(n) + t;
},
l = { s: $, z: function z(t) {
var e = -t.utcOffset(),
n = Math.abs(e),
r = Math.floor(n / 60),
i = n % 60;return (e <= 0 ? "+" : "-") + $(r, 2, "0") + ":" + $(i, 2, "0");
}, m: function t(e, n) {
if (e.date() < n.date()) return -t(n, e);var r = 12 * (n.year() - e.year()) + (n.month() - e.month()),
i = e.clone().add(r, u),
s = n - i < 0,
a = e.clone().add(r + (s ? -1 : 1), u);return +(-(r + (n - i) / (s ? i - a : a - i)) || 0);
}, a: function a(t) {
return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
}, p: function p(h) {
return { M: u, y: o, w: s, d: i, D: f, h: r, m: n, s: e, ms: t, Q: a }[h] || String(h || "").toLowerCase().replace(/s$/, "");
}, u: function u(t) {
return void 0 === t;
} },
y = "en",
M = {};M[y] = d;var m = function m(t) {
return t instanceof S;
},
D = function D(t, e, n) {
var r;if (!t) return y;if ("string" == typeof t) M[t] && (r = t), e && (M[t] = e, r = t);else {
var i = t.name;M[i] = t, r = i;
}return !n && r && (y = r), r || !n && y;
},
v = function v(t, e) {
if (m(t)) return t.clone();var n = "object" == (typeof e === "undefined" ? "undefined" : _typeof(e)) ? e : {};return n.date = t, n.args = arguments, new S(n);
},
g = l;g.l = D, g.i = m, g.w = function (t, e) {
return v(t, { locale: e.$L, utc: e.$u, x: e.$x, $offset: e.$offset });
};var S = function () {
function d(t) {
this.$L = this.$L || D(t.locale, null, !0), this.parse(t);
}var $ = d.prototype;return $.parse = function (t) {
this.$d = function (t) {
var e = t.date,
n = t.utc;if (null === e) return new Date(NaN);if (g.u(e)) return new Date();if (e instanceof Date) return new Date(e);if ("string" == typeof e && !/Z$/i.test(e)) {
var r = e.match(h);if (r) {
var i = r[2] - 1 || 0,
s = (r[7] || "0").substring(0, 3);return n ? new Date(Date.UTC(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s)) : new Date(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s);
}
}return new Date(e);
}(t), this.$x = t.x || {}, this.init();
}, $.init = function () {
var t = this.$d;this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
}, $.$utils = function () {
return g;
}, $.isValid = function () {
return !("Invalid Date" === this.$d.toString());
}, $.isSame = function (t, e) {
var n = v(t);return this.startOf(e) <= n && n <= this.endOf(e);
}, $.isAfter = function (t, e) {
return v(t) < this.startOf(e);
}, $.isBefore = function (t, e) {
return this.endOf(e) < v(t);
}, $.$g = function (t, e, n) {
return g.u(t) ? this[e] : this.set(n, t);
}, $.unix = function () {
return Math.floor(this.valueOf() / 1e3);
}, $.valueOf = function () {
return this.$d.getTime();
}, $.startOf = function (t, a) {
var h = this,
c = !!g.u(a) || a,
d = g.p(t),
$ = function $(t, e) {
var n = g.w(h.$u ? Date.UTC(h.$y, e, t) : new Date(h.$y, e, t), h);return c ? n : n.endOf(i);
},
l = function l(t, e) {
return g.w(h.toDate()[t].apply(h.toDate("s"), (c ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e)), h);
},
y = this.$W,
M = this.$M,
m = this.$D,
D = "set" + (this.$u ? "UTC" : "");switch (d) {case o:
return c ? $(1, 0) : $(31, 11);case u:
return c ? $(1, M) : $(0, M + 1);case s:
var v = this.$locale().weekStart || 0,
S = (y < v ? y + 7 : y) - v;return $(c ? m - S : m + (6 - S), M);case i:case f:
return l(D + "Hours", 0);case r:
return l(D + "Minutes", 1);case n:
return l(D + "Seconds", 2);case e:
return l(D + "Milliseconds", 3);default:
return this.clone();}
}, $.endOf = function (t) {
return this.startOf(t, !1);
}, $.$set = function (s, a) {
var h,
c = g.p(s),
d = "set" + (this.$u ? "UTC" : ""),
$ = (h = {}, h[i] = d + "Date", h[f] = d + "Date", h[u] = d + "Month", h[o] = d + "FullYear", h[r] = d + "Hours", h[n] = d + "Minutes", h[e] = d + "Seconds", h[t] = d + "Milliseconds", h)[c],
l = c === i ? this.$D + (a - this.$W) : a;if (c === u || c === o) {
var y = this.clone().set(f, 1);y.$d[$](l), y.init(), this.$d = y.set(f, Math.min(this.$D, y.daysInMonth())).$d;
} else $ && this.$d[$](l);return this.init(), this;
}, $.set = function (t, e) {
return this.clone().$set(t, e);
}, $.get = function (t) {
return this[g.p(t)]();
}, $.add = function (t, a) {
var f,
h = this;t = Number(t);var c = g.p(a),
d = function d(e) {
var n = v(h);return g.w(n.date(n.date() + Math.round(e * t)), h);
};if (c === u) return this.set(u, this.$M + t);if (c === o) return this.set(o, this.$y + t);if (c === i) return d(1);if (c === s) return d(7);var $ = (f = {}, f[n] = 6e4, f[r] = 36e5, f[e] = 1e3, f)[c] || 1,
l = this.$d.getTime() + t * $;return g.w(l, this);
}, $.subtract = function (t, e) {
return this.add(-1 * t, e);
}, $.format = function (t) {
var e = this;if (!this.isValid()) return "Invalid Date";var n = t || "YYYY-MM-DDTHH:mm:ssZ",
r = g.z(this),
i = this.$locale(),
s = this.$H,
u = this.$m,
a = this.$M,
o = i.weekdays,
f = i.months,
h = function h(t, r, i, s) {
return t && (t[r] || t(e, n)) || i[r].substr(0, s);
},
d = function d(t) {
return g.s(s % 12 || 12, t, "0");
},
$ = i.meridiem || function (t, e, n) {
var r = t < 12 ? "AM" : "PM";return n ? r.toLowerCase() : r;
},
l = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: a + 1, MM: g.s(a + 1, 2, "0"), MMM: h(i.monthsShort, a, f, 3), MMMM: h(f, a), D: this.$D, DD: g.s(this.$D, 2, "0"), d: String(this.$W), dd: h(i.weekdaysMin, this.$W, o, 2), ddd: h(i.weekdaysShort, this.$W, o, 3), dddd: o[this.$W], H: String(s), HH: g.s(s, 2, "0"), h: d(1), hh: d(2), a: $(s, u, !0), A: $(s, u, !1), m: String(u), mm: g.s(u, 2, "0"), s: String(this.$s), ss: g.s(this.$s, 2, "0"), SSS: g.s(this.$ms, 3, "0"), Z: r };return n.replace(c, function (t, e) {
return e || l[t] || r.replace(":", "");
});
}, $.utcOffset = function () {
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
}, $.diff = function (t, f, h) {
var c,
d = g.p(f),
$ = v(t),
l = 6e4 * ($.utcOffset() - this.utcOffset()),
y = this - $,
M = g.m(this, $);return M = (c = {}, c[o] = M / 12, c[u] = M, c[a] = M / 3, c[s] = (y - l) / 6048e5, c[i] = (y - l) / 864e5, c[r] = y / 36e5, c[n] = y / 6e4, c[e] = y / 1e3, c)[d] || y, h ? M : g.a(M);
}, $.daysInMonth = function () {
return this.endOf(u).$D;
}, $.$locale = function () {
return M[this.$L];
}, $.locale = function (t, e) {
if (!t) return this.$L;var n = this.clone(),
r = D(t, e, !0);return r && (n.$L = r), n;
}, $.clone = function () {
return g.w(this.$d, this);
}, $.toDate = function () {
return new Date(this.valueOf());
}, $.toJSON = function () {
return this.isValid() ? this.toISOString() : null;
}, $.toISOString = function () {
return this.$d.toISOString();
}, $.toString = function () {
return this.$d.toUTCString();
}, d;
}(),
p = S.prototype;return v.prototype = p, [["$ms", t], ["$s", e], ["$m", n], ["$H", r], ["$W", i], ["$M", u], ["$y", o], ["$D", f]].forEach(function (t) {
p[t[1]] = function (e) {
return this.$g(e, t[0], t[1]);
};
}), v.extend = function (t, e) {
return t(e, S, v), v;
}, v.locale = D, v.isDayjs = m, v.unix = function (t) {
return v(1e3 * t);
}, v.en = M[y], v.Ls = M, v;
});
/***/ }),
/* 2 */
/***/ (function(module, exports) {
module.exports = require("vue");
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var freeGlobal = __webpack_require__(51);
/** Detect free variable `self`. */
var freeSelf = (typeof self === 'undefined' ? 'undefined' : _typeof(self)) == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();
module.exports = root;
/***/ }),
/* 4 */
/***/ (function(module, exports) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self
// eslint-disable-next-line no-new-func
: Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
/***/ }),
/* 5 */
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/* 6 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _checkbox_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
_checkbox_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].install = function (Vue) {
Vue.component(_checkbox_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].name, _checkbox_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
};
/* harmony default export */ __webpack_exports__["a"] = (_checkbox_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
/***/ }),
/* 7 */
/***/ (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!./components/Checkbox/checkbox.vue?vue&type=template&id=85ec5012&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('label',{class:{
'kd-checkbox': true,
'kd-is-checked': _vm.isChecked,
'kd-is-disabled': _vm.disabled,
'kd-is-indeterminate': _vm.indeterminate
}},[_c('span',{staticClass:"kd-checkbox-wrap"},[_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.model),expression:"model"}],staticClass:"kd-checkbox-input",attrs:{"type":"checkbox","name":_vm.name,"indeterminate":_vm.indeterminate,"disabled":_vm.disabled,"true-value":_vm.trueValue,"false-value":_vm.falseValue},domProps:{"checked":Array.isArray(_vm.model)?_vm._i(_vm.model,null)>-1:_vm._q(_vm.model,_vm.trueValue)},on:{"change":[function($event){var $$a=_vm.model,$$el=$event.target,$$c=$$el.checked?(_vm.trueValue):(_vm.falseValue);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.model=$$a.concat([$$v]))}else{$$i>-1&&(_vm.model=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.model=$$c}},_vm.change]}})]),_c('span',{staticClass:"kd-checkbox-text"},[_vm._t("default",[_vm._v(_vm._s(_vm.label))])],2)])}
var staticRenderFns = []
// CONCATENATED MODULE: ./components/Checkbox/checkbox.vue?vue&type=template&id=85ec5012&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/Checkbox/checkbox.vue?vue&type=script&lang=js&
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var checkboxvue_type_script_lang_js_ = ({
name: 'KdCheckbox',
props: {
value: {
type: [String, Number, Boolean, Array]
},
name: {
type: String
},
trueValue: {
type: [String, Number, Boolean],
default: true
},
falseValue: {
type: [String, Number, Boolean],
default: false
},
disabled: {
type: Boolean,
default: false
},
indeterminate: {
type: Boolean,
default: false
},
label: {
type: String
}
},
data: function data() {
return {
model: true
};
},
computed: {
isChecked: function isChecked() {
return this.model === this.trueValue;
}
},
watch: {
value: {
immediate: true,
handler: function handler(v) {
var isChecked = false;
if (Array.isArray(v)) {
isChecked = v.includes(this.trueValue);
} else {
isChecked = v === this.trueValue;
}
this.model = isChecked ? this.trueValue : this.falseValue;
}
}
},
methods: {
change: function change() {
var _this = this;
var index = void 0,
value = void 0;
if (this.disabled) return;
value = Array.isArray(this.value) ? [].concat(_toConsumableArray(this.value)) : this.value;
if (this.isChecked) {
if (Array.isArray(value) && !value.includes(this.trueValue)) {
value.push(this.trueValue);
} else {
value = this.trueValue;
}
} else {
if (Array.isArray(value)) {
index = value.findIndex(function (i) {
return i === _this.trueValue;
});
if (~index) {
value.splice(index, 1);
}
} else {
value = this.falseValue;
}
}
this.$emit('input', value);
this.$emit('change', value);
}
}
});
// CONCATENATED MODULE: ./components/Checkbox/checkbox.vue?vue&type=script&lang=js&
/* harmony default export */ var Checkbox_checkboxvue_type_script_lang_js_ = (checkboxvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(0);
// CONCATENATED MODULE: ./components/Checkbox/checkbox.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
Checkbox_checkboxvue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var Checkbox_checkbox = __webpack_exports__["a"] = (component.exports);
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
var baseIsNative = __webpack_require__(92),
getValue = __webpack_require__(98);
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : undefined;
}
module.exports = getNative;
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(10);
var createDesc = __webpack_require__(27);
module.exports = __webpack_require__(11) ? function (object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(25);
var IE8_DOM_DEFINE = __webpack_require__(62);
var toPrimitive = __webpack_require__(39);
var dP = Object.defineProperty;
exports.f = __webpack_require__(11) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if (IE8_DOM_DEFINE) try {
return dP(O, P, Attributes);
} catch (e) {/* empty */}
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
if ('value' in Attributes) O[P] = Attributes.value;
return O;
};
/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(26)(function () {
return Object.defineProperty({}, 'a', { get: function get() {
return 7;
} }).a != 7;
});
/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__(157);
var defined = __webpack_require__(38);
module.exports = function (it) {
return IObject(defined(it));
};
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
var store = __webpack_require__(43)('wks');
var uid = __webpack_require__(28);
var _Symbol = __webpack_require__(4).Symbol;
var USE_SYMBOL = typeof _Symbol == 'function';
var $exports = module.exports = function (name) {
return store[name] || (store[name] = USE_SYMBOL && _Symbol[name] || (USE_SYMBOL ? _Symbol : uid)('Symbol.' + name));
};
$exports.store = store;
/***/ }),
/* 14 */
/***/ (function(module, exports) {
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
module.exports = function (it) {
return (typeof it === 'undefined' ? 'undefined' : _typeof(it)) === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/* 15 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/Transition/transition.vue?vue&type=script&lang=js&
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var oneOf = function oneOf(value, validList) {
return validList.indexOf(value) > -1;
};
var Normal = function Normal(_ref) {
var type = _ref.type,
motion = _ref.motion;
_classCallCheck(this, Normal);
var cls = motion ? type + '-' + motion : type;
this.props = {
'enter-active-class': cls + '-enter ' + cls + '-enter-active',
'leave-active-class': cls + '-leave ' + cls + '-leave-active'
};
};
var Collapse = function Collapse() {
_classCallCheck(this, Collapse);
this.on = {
beforeEnter: function beforeEnter(el) {
if (!el.dataset) el.dataset = {};
el.dataset.oldPaddingTop = window.getComputedStyle(el).paddingTop;
el.dataset.oldPaddingBottom = window.getComputedStyle(el).paddingBottom;
el.style.height = '0';
el.style.paddingTop = 0;
el.style.paddingBottom = 0;
el.classList.add('kd-collapse-transition');
},
enter: function enter(el) {
el.dataset.oldOverflow = el.style.overflow;
if (el.scrollHeight !== 0) {
el.style.height = el.scrollHeight + 'px';
el.style.paddingTop = el.dataset.oldPaddingTop;
el.style.paddingBottom = el.dataset.oldPaddingBottom;
} else {
el.style.height = '';
el.style.paddingTop = el.dataset.oldPaddingTop;
el.style.paddingBottom = el.dataset.oldPaddingBottom;
}
el.style.overflow = 'hidden';
},
afterEnter: function afterEnter(el) {
// for safari: remove class then reset height is necessary
el.classList.remove('kd-collapse-transition');
el.style.height = '';
el.style.overflow = el.dataset.oldOverflow;
},
beforeLeave: function beforeLeave(el) {
if (!el.dataset) el.dataset = {};
el.dataset.oldPaddingTop = window.getComputedStyle(el).paddingTop;
el.dataset.oldPaddingBottom = window.getComputedStyle(el).paddingBottom;
el.dataset.oldOverflow = el.style.overflow;
// el.style.height = el.scrollHeight + "px";
el.style.height = el.scrollHeight - parseFloat(el.dataset.oldPaddingTop) - parseFloat(el.dataset.oldPaddingBottom) + 'px';
el.style.overflow = 'hidden';
el.classList.add('kd-collapse-transition');
},
leave: function leave(el) {
if (el.scrollHeight !== 0) {
// for safari: add class after set height, or it will jump to zero height suddenly, weired
el.style.height = 0;
el.style.paddingTop = 0;
el.style.paddingBottom = 0;
el.classList.add('kd-collapse-transition');
}
},
afterLeave: function afterLeave(el) {
el.classList.remove('kd-collapse-transition');
el.style.height = '';
el.style.overflow = el.dataset.oldOverflow;
el.style.paddingTop = el.dataset.oldPaddingTop || 0;
el.style.paddingBottom = el.dataset.oldPaddingBottom || 0;
}
};
};
/* harmony default export */ var transitionvue_type_script_lang_js_ = ({
name: 'KdTransition',
functional: true,
render: function render(h, ctx) {
var attrs = ctx.props;
var type = attrs.type;
var motion = function motion(type) {
return oneOf(type, ['fade', 'move', 'slide', 'swing', 'zoom']) ? new Normal(attrs) : oneOf(type, ['collapse']) ? new Collapse() : {};
};
var data = Object.assign({}, ctx.data, motion(type));
return h('transition', data, ctx.children);
}
});
// CONCATENATED MODULE: ./components/Transition/transition.vue?vue&type=script&lang=js&
/* harmony default export */ var Transition_transitionvue_type_script_lang_js_ = (transitionvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(0);
// CONCATENATED MODULE: ./components/Transition/transition.vue
var render, staticRenderFns
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
Transition_transitionvue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var transition = (component.exports);
// CONCATENATED MODULE: ./components/Transition/index.js
transition.install = function (Vue) {
Vue.component(transition.name, transition);
};
/* harmony default export */ var Transition = __webpack_exports__["a"] = (transition);
/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {
var Sortable = __webpack_require__(148);
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
function _toConsumableArray(arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
arr2[i] = arr[i];
}
return arr2;
} else {
return Array.from(arr);
}
}
(function () {
if (!Array.from) {
Array.from = function (object) {
return [].slice.call(object);
};
}
// eslint-disable-next-line max-lines-per-function
function buildDraggable(Sortable) {
function removeNode(node) {
node.parentElement.removeChild(node);
}
function insertNodeAt(fatherNode, node, position) {
var refNode = position === 0 ? fatherNode.children[0] : fatherNode.children[position - 1].nextSibling;
fatherNode.insertBefore(node, refNode);
}
function computeVmIndex(vnodes, element) {
return vnodes.map(function (elt) {
return elt.elm;
}).indexOf(element);
}
function _computeIndexes(slots, children, isTransition) {
if (!slots) {
return [];
}
var elmFromNodes = slots.map(function (elt) {
return elt.elm;
});
var rawIndexes = [].concat(_toConsumableArray(children)).map(function (elt) {
return elmFromNodes.indexOf(elt);
});
return isTransition ? rawIndexes.filter(function (ind) {
return ind !== -1;
}) : rawIndexes;
}
function emit(evtName, evtData) {
var _this = this;
this.$nextTick(function () {
return _this.$emit(evtName.toLowerCase(), evtData);
});
}
function delegateAndEmit(evtName) {
var _this2 = this;
return function (evtData) {
if (_this2.realList !== null) {
_this2['onDrag' + evtName](evtData);
}
emit.call(_this2, evtName, evtData);
};
}
var eventsListened = ['Start', 'Add', 'Remove', 'Update', 'End'];
var eventsToEmit = ['Choose', 'Sort', 'Filter', 'Clone'];
var readonlyProperties = ['Move'].concat(eventsListened, eventsToEmit).map(function (evt) {
return 'on' + evt;
});
var draggingElement = null;
var props = {
options: Object,
list: {
type: Array,
required: false,
default: null
},
value: {
type: Array,
required: false,
default: null
},
noTransitionOnDrag: {
type: Boolean,
default: false
},
clone: {
type: Function,
default: function _default(original) {
return original;
}
},
element: {
type: String,
default: 'div'
},
move: {
type: Function,
default: null
}
};
var draggableComponent = {
name: 'KdDraggable',
props: props,
data: function data() {
return {
transitionMode: false,
noneFunctionalComponentMode: false,
init: false
};
},
render: function render(h) {
var slots = this.$slots.default;
if (slots && slots.length === 1) {
var child = slots[0];
if (child.componentOptions && child.componentOptions.tag === 'transition-group') {
this.transitionMode = true;
}
}
var children = slots;
var footer = this.$slots.footer;
if (footer) {
children = slots ? [].concat(_toConsumableArray(slots), _toConsumableArray(footer)) : [].concat(_toConsumableArray(footer));
}
return h(this.element, null, children);
},
mounted: function mounted() {
var _this3 = this;
this.noneFunctionalComponentMode = this.element.toLowerCase() !== this.$el.nodeName.toLowerCase();
if (this.noneFunctionalComponentMode && this.transitionMode) {
throw new Error('Transition-group inside component is not supported. Please alter element value or remove transition-group. Current element value: ' + this.element);
}
var optionsAdded = {};
eventsListened.forEach(function (elt) {
optionsAdded['on' + elt] = delegateAndEmit.call(_this3, elt);
});
eventsToEmit.forEach(function (elt) {
optionsAdded['on' + elt] = emit.bind(_this3, elt);
});
var options = _extends({}, this.options, optionsAdded, {
onMove: function onMove(evt, originalEvent) {
return _this3.onDragMove(evt, originalEvent);
}
});
!('draggable' in options) && (options.draggable = '>*');
this._sortable = new Sortable(this.rootContainer, options);
this.computeIndexes();
},
beforeDestroy: function beforeDestroy() {
this._sortable.destroy();
},
computed: {
rootContainer: function rootContainer() {
return this.transitionMode ? this.$el.children[0] : this.$el;
},
isCloning: function isCloning() {
return !!this.options && !!this.options.group && this.options.group.pull === 'clone';
},
realList: function realList() {
return this.list ? this.list : this.value;
}
},
watch: {
options: {
handler: function handler(newOptionValue) {
for (var property in newOptionValue) {
if (readonlyProperties.indexOf(property) == -1) {
this._sortable.option(property, newOptionValue[property]);
}
}
},
deep: true
},
realList: function realList() {
this.computeIndexes();
}
},
methods: {
getChildrenNodes: function getChildrenNodes() {
if (!this.init) {
this.noneFunctionalComponentMode = this.noneFunctionalComponentMode && this.$children.length == 1;
this.init = true;
}
if (this.noneFunctionalComponentMode) {
return this.$children[0].$slots.default;
}
var rawNodes = this.$slots.default;
return this.transitionMode ? rawNodes[0].child.$slots.default : rawNodes;
},
computeIndexes: function computeIndexes() {
var _this4 = this;
this.$nextTick(function () {
_this4.visibleIndexes = _computeIndexes(_this4.getChildrenNodes(), _this4.rootContainer.children, _this4.transitionMode);
});
},
getUnderlyingVm: function getUnderlyingVm(htmlElt) {
var index = computeVmIndex(this.getChildrenNodes() || [], htmlElt);
if (index === -1) {
// Edge case during move callback: related element might be
// an element different from collection
return null;
}
var element = this.realList[index];
return { index: index, element: element };
},
getUnderlyingPotencialDraggableComponent: function getUnderlyingPotencialDraggableComponent(_ref) {
var __vue__ = _ref.__vue__;
if (!__vue__ || !__vue__.$options || __vue__.$options._componentTag !== 'transition-group') {
return __vue__;
}
return __vue__.$parent;
},
emitChanges: function emitChanges(evt) {
var _this5 = this;
this.$nextTick(function () {
_this5.$emit('change', evt);
});
},
alterList: function alterList(onList) {
if (this.list) {
onList(this.list);
} else {
var newList = [].concat(_toConsumableArray(this.value));
onList(newList);
this.$emit('input', newList);
}
},
spliceList: function spliceList() {
var _arguments = arguments;
var spliceList = function spliceList(list) {
return list.splice.apply(list, _arguments);
};
this.alterList(spliceList);
},
updatePosition: function updatePosition(oldIndex, newIndex) {
var updatePosition = function updatePosition(list) {
return list.splice(newIndex, 0, list.splice(oldIndex, 1)[0]);
};
this.alterList(updatePosition);
},
getRelatedContextFromMoveEvent: function getRelatedContextFromMoveEvent(_ref2) {
var to = _ref2.to;
var related = _ref2.related;
var component = this.getUnderlyingPotencialDraggableComponent(to);
if (!component) {
return { component: component };
}
var list = component.realList;
var context = { list: list, component: component };
if (to !== related && list && component.getUnderlyingVm) {
var destination = component.getUnderlyingVm(related);
if (destination) {
return _extends(destination, context);
}
}
return context;
},
getVmIndex: function getVmIndex(domIndex) {
var indexes = this.visibleIndexes;
var numberIndexes = indexes.length;
return domIndex > numberIndexes - 1 ? numberIndexes : indexes[domIndex];
},
getComponent: function getComponent() {
return this.$slots.default[0].componentInstance;
},
resetTransitionData: function resetTransitionData(index) {
if (!this.noTransitionOnDrag || !this.transitionMode) {
return;
}
var nodes = this.getChildrenNodes();
nodes[index].data = null;
var transitionContainer = this.getComponent();
transitionContainer.children = [];
transitionContainer.kept = undefined;
},
onDragStart: function onDragStart(evt) {
// console.log(1)
this.context = this.getUnderlyingVm(evt.item);
// console.log(this.clone(this.context.element))
evt.item._underlying_vm_ = this.clone(this.context.element);
draggingElement = evt.item;
},
onDragAdd: function onDragAdd(evt) {
var element = evt.item._underlying_vm_;
if (element === undefined) {
return;
}
removeNode(evt.item);
var newIndex = this.getVmIndex(evt.newIndex);
this.spliceList(newIndex, 0, element);
this.computeIndexes();
var added = { element: element, newIndex: newIndex };
this.emitChanges({ added: added });
},
onDragRemove: function onDragRemove(evt) {
insertNodeAt(this.rootContainer, evt.item, evt.oldIndex);
if (this.isCloning) {
removeNode(evt.clone);
return;
}
var oldIndex = this.context.index;
this.spliceList(oldIndex, 1);
var removed = { element: this.context.element, oldIndex: oldIndex };
this.resetTransitionData(oldIndex);
this.emitChanges({ removed: removed });
},
onDragUpdate: function onDragUpdate(evt) {
removeNode(evt.item);
insertNodeAt(evt.from, evt.item, evt.oldIndex);
var oldIndex = this.context.index;
var newIndex = this.getVmIndex(evt.newIndex);
this.updatePosition(oldIndex, newIndex);
var moved = { element: this.context.element, oldIndex: oldIndex, newIndex: newIndex };
this.emitChanges({ moved: moved });
},
computeFutureIndex: function computeFutureIndex(relatedContext, evt) {
if (!relatedContext.element) {
return 0;
}
var domChildren = [].concat(_toConsumableArray(evt.to.children)).filter(function (el) {
return el.style.display !== 'none';
});
var currentDOMIndex = domChildren.indexOf(evt.related);
var currentIndex = relatedContext.component.getVmIndex(currentDOMIndex);
var draggedInList = domChildren.indexOf(draggingElement) != -1;
return draggedInList || !evt.willInsertAfter ? currentIndex : currentIndex + 1;
},
onDragMove: function onDragMove(evt, originalEvent) {
var onMove = this.move;
if (!onMove || !this.realList) {
return true;
}
var relatedContext = this.getRelatedContextFromMoveEvent(evt);
var draggedContext = this.context;
var futureIndex = this.computeFutureIndex(relatedContext, evt);
_extends(draggedContext, { futureIndex: futureIndex });
_extends(evt, { relatedContext: relatedContext, draggedContext: draggedContext });
return onMove(evt, originalEvent);
},
onDragEnd: function onDragEnd(evt) {
this.computeIndexes();
draggingElement = null;
}
}
};
return draggableComponent;
}
var vuildComponent = buildDraggable(Sortable);
module.exports = vuildComponent;
})();
/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {
var listCacheClear = __webpack_require__(82),
listCacheDelete = __webpack_require__(83),
listCacheGet = __webpack_require__(84),
listCacheHas = __webpack_require__(85),
listCacheSet = __webpack_require__(86);
/**
* Creates an list cache object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function ListCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
module.exports = ListCache;
/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {
var eq = __webpack_require__(49);
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
module.exports = assocIndexOf;
/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {
var _Symbol = __webpack_require__(35),
getRawTag = __webpack_require__(94),
objectToString = __webpack_require__(95);
/** `Object#toString` result references. */
var nullTag = '[object Null]',
undefinedTag = '[object Undefined]';
/** Built-in value references. */
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
/**
* The base implementation of `getTag` without fallbacks for buggy environments.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
function baseGetTag(value) {
if (value == null) {
retur