UNPKG

admin-ui

Version:

An elegant admin-system-like vue ui components library

1,691 lines (1,415 loc) 71 kB
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 = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 396); /******/ }) /************************************************************************/ /******/ ({ /***/ 0: /***/ (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 /***/ }), /***/ 1: /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(7)(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /***/ 10: /***/ (function(module, exports) { var core = module.exports = { version: '2.6.11' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ }), /***/ 101: /***/ (function(module, exports, __webpack_require__) { "use strict"; var at = __webpack_require__(98)(true); // `AdvanceStringIndex` abstract operation // https://tc39.github.io/ecma262/#sec-advancestringindex module.exports = function (S, index, unicode) { return index + (unicode ? at(S, index).length : 1); }; /***/ }), /***/ 102: /***/ (function(module, exports, __webpack_require__) { "use strict"; var classof = __webpack_require__(108); var builtinExec = RegExp.prototype.exec; // `RegExpExec` abstract operation // https://tc39.github.io/ecma262/#sec-regexpexec module.exports = function (R, S) { var exec = R.exec; if (typeof exec === 'function') { var result = exec.call(R, S); if (typeof result !== 'object') { throw new TypeError('RegExp exec method returned something other than an Object or null'); } return result; } if (classof(R) !== 'RegExp') { throw new TypeError('RegExp#exec called on incompatible receiver'); } return builtinExec.call(R, S); }; /***/ }), /***/ 103: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(110); var redefine = __webpack_require__(11); var hide = __webpack_require__(3); var fails = __webpack_require__(7); var defined = __webpack_require__(14); var wks = __webpack_require__(2); var regexpExec = __webpack_require__(64); var SPECIES = wks('species'); var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { // #replace needs built-in support for named groups. // #match works fine because it just return the exec results, even if it has // a "grops" property. var re = /./; re.exec = function () { var result = []; result.groups = { a: '7' }; return result; }; return ''.replace(re, '$<a>') !== '7'; }); var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec var re = /(?:)/; var originalExec = re.exec; re.exec = function () { return originalExec.apply(this, arguments); }; var result = 'ab'.split(re); return result.length === 2 && result[0] === 'a' && result[1] === 'b'; })(); module.exports = function (KEY, length, exec) { var SYMBOL = wks(KEY); var DELEGATES_TO_SYMBOL = !fails(function () { // String methods call symbol-named RegEp methods var O = {}; O[SYMBOL] = function () { return 7; }; return ''[KEY](O) != 7; }); var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { // Symbol-named RegExp methods call .exec var execCalled = false; var re = /a/; re.exec = function () { execCalled = true; return null; }; if (KEY === 'split') { // RegExp[@@split] doesn't call the regex's exec method, but first creates // a new one. We need to return the patched regex when creating the new one. re.constructor = {}; re.constructor[SPECIES] = function () { return re; }; } re[SYMBOL](''); return !execCalled; }) : undefined; if ( !DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) ) { var nativeRegExpMethod = /./[SYMBOL]; var fns = exec( defined, SYMBOL, ''[KEY], function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { if (regexp.exec === regexpExec) { if (DELEGATES_TO_SYMBOL && !forceStringMethod) { // The native String method already delegates to @@method (this // polyfilled function), leasing to infinite recursion. // We avoid it by directly calling the native @@method method. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; } return { done: true, value: nativeMethod.call(str, regexp, arg2) }; } return { done: false }; } ); var strfn = fns[0]; var rxfn = fns[1]; redefine(String.prototype, KEY, strfn); hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) // 21.2.5.11 RegExp.prototype[@@split](string, limit) ? function (string, arg) { return rxfn.call(string, this, arg); } // 21.2.5.6 RegExp.prototype[@@match](string) // 21.2.5.9 RegExp.prototype[@@search](string) : function (string) { return rxfn.call(string, this); } ); } }; /***/ }), /***/ 106: /***/ (function(module, exports, __webpack_require__) { // 7.2.8 IsRegExp(argument) var isObject = __webpack_require__(4); var cof = __webpack_require__(17); var MATCH = __webpack_require__(2)('match'); module.exports = function (it) { var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); }; /***/ }), /***/ 108: /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __webpack_require__(17); var TAG = __webpack_require__(2)('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (e) { /* empty */ } }; module.exports = function (it) { var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }), /***/ 11: /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(0); var hide = __webpack_require__(3); var has = __webpack_require__(6); var SRC = __webpack_require__(13)('src'); var $toString = __webpack_require__(44); var TO_STRING = 'toString'; var TPL = ('' + $toString).split(TO_STRING); __webpack_require__(10).inspectSource = function (it) { return $toString.call(it); }; (module.exports = function (O, key, val, safe) { var isFunction = typeof val == 'function'; if (isFunction) has(val, 'name') || hide(val, 'name', key); if (O[key] === val) return; if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); if (O === global) { O[key] = val; } else if (!safe) { delete O[key]; hide(O, key, val); } else if (O[key]) { O[key] = val; } else { hide(O, key, val); } // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype, TO_STRING, function toString() { return typeof this == 'function' && this[SRC] || $toString.call(this); }); /***/ }), /***/ 110: /***/ (function(module, exports, __webpack_require__) { "use strict"; var regexpExec = __webpack_require__(64); __webpack_require__(16)({ target: 'RegExp', proto: true, forced: regexpExec !== /./.exec }, { exec: regexpExec }); /***/ }), /***/ 12: /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(47); var defined = __webpack_require__(14); module.exports = function (it) { return IObject(defined(it)); }; /***/ }), /***/ 13: /***/ (function(module, exports) { var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }), /***/ 137: /***/ (function(module, exports, __webpack_require__) { "use strict"; var isRegExp = __webpack_require__(106); var anObject = __webpack_require__(5); var speciesConstructor = __webpack_require__(138); var advanceStringIndex = __webpack_require__(101); var toLength = __webpack_require__(33); var callRegExpExec = __webpack_require__(102); var regexpExec = __webpack_require__(64); var fails = __webpack_require__(7); var $min = Math.min; var $push = [].push; var $SPLIT = 'split'; var LENGTH = 'length'; var LAST_INDEX = 'lastIndex'; var MAX_UINT32 = 0xffffffff; // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); }); // @@split logic __webpack_require__(103)('split', 2, function (defined, SPLIT, $split, maybeCallNative) { var internalSplit; if ( 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || '.'[$SPLIT](/()()/)[LENGTH] > 1 || ''[$SPLIT](/.?/)[LENGTH] ) { // based on es5-shim implementation, need to rework it internalSplit = function (separator, limit) { var string = String(this); if (separator === undefined && limit === 0) return []; // If `separator` is not a regex, use native split if (!isRegExp(separator)) return $split.call(string, separator, limit); var output = []; var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : ''); var lastLastIndex = 0; var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; // Make `global` and avoid `lastIndex` issues by working with a copy var separatorCopy = new RegExp(separator.source, flags + 'g'); var match, lastIndex, lastLength; while (match = regexpExec.call(separatorCopy, string)) { lastIndex = separatorCopy[LAST_INDEX]; if (lastIndex > lastLastIndex) { output.push(string.slice(lastLastIndex, match.index)); if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); lastLength = match[0][LENGTH]; lastLastIndex = lastIndex; if (output[LENGTH] >= splitLimit) break; } if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop } if (lastLastIndex === string[LENGTH]) { if (lastLength || !separatorCopy.test('')) output.push(''); } else output.push(string.slice(lastLastIndex)); return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; }; // Chakra, V8 } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { internalSplit = function (separator, limit) { return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); }; } else { internalSplit = $split; } return [ // `String.prototype.split` method // https://tc39.github.io/ecma262/#sec-string.prototype.split function split(separator, limit) { var O = defined(this); var splitter = separator == undefined ? undefined : separator[SPLIT]; return splitter !== undefined ? splitter.call(separator, O, limit) : internalSplit.call(String(O), separator, limit); }, // `RegExp.prototype[@@split]` method // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split // // NOTE: This cannot be properly polyfilled in engines that don't support // the 'y' flag. function (regexp, limit) { var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); if (res.done) return res.value; var rx = anObject(regexp); var S = String(this); var C = speciesConstructor(rx, RegExp); var unicodeMatching = rx.unicode; var flags = (rx.ignoreCase ? 'i' : '') + (rx.multiline ? 'm' : '') + (rx.unicode ? 'u' : '') + (SUPPORTS_Y ? 'y' : 'g'); // ^(? + rx + ) is needed, in combination with some S slicing, to // simulate the 'y' flag. var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; if (lim === 0) return []; if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; var p = 0; var q = 0; var A = []; while (q < S.length) { splitter.lastIndex = SUPPORTS_Y ? q : 0; var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); var e; if ( z === null || (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p ) { q = advanceStringIndex(S, q, unicodeMatching); } else { A.push(S.slice(p, q)); if (A.length === lim) return A; for (var i = 1; i <= z.length - 1; i++) { A.push(z[i]); if (A.length === lim) return A; } q = p = e; } } A.push(S.slice(p)); return A; } ]; }); /***/ }), /***/ 138: /***/ (function(module, exports, __webpack_require__) { // 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject = __webpack_require__(5); var aFunction = __webpack_require__(38); var SPECIES = __webpack_require__(2)('species'); module.exports = function (O, D) { var C = anObject(O).constructor; var S; return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); }; /***/ }), /***/ 14: /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /***/ 15: /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__(10); var global = __webpack_require__(0); var SHARED = '__core-js_shared__'; var store = global[SHARED] || (global[SHARED] = {}); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: core.version, mode: __webpack_require__(26) ? 'pure' : 'global', copyright: '© 2019 Denis Pushkarev (zloirock.ru)' }); /***/ }), /***/ 16: /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(0); var core = __webpack_require__(10); var hide = __webpack_require__(3); var redefine = __webpack_require__(11); var ctx = __webpack_require__(30); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { var IS_FORCED = type & $export.F; var IS_GLOBAL = type & $export.G; var IS_STATIC = type & $export.S; var IS_PROTO = type & $export.P; var IS_BIND = type & $export.B; var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); var key, own, out, exp; if (IS_GLOBAL) source = name; for (key in source) { // contains in native own = !IS_FORCED && target && target[key] !== undefined; // export native or passed out = (own ? target : source)[key]; // bind timers to global for call from export context exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // extend global if (target) redefine(target, key, out, type & $export.U); // export if (exports[key] != out) hide(exports, key, exp); if (IS_PROTO && expProto[key] != out) expProto[key] = out; } }; global.core = core; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }), /***/ 17: /***/ (function(module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; /***/ }), /***/ 18: /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /***/ 19: /***/ (function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }), /***/ 2: /***/ (function(module, exports, __webpack_require__) { var store = __webpack_require__(15)('wks'); var uid = __webpack_require__(13); var Symbol = __webpack_require__(0).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; /***/ }), /***/ 20: /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(4); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { if (!isObject(it)) return it; var fn, val; if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /***/ 22: /***/ (function(module, exports, __webpack_require__) { "use strict"; /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ // css base code, injected by the css-loader module.exports = function (useSourceMap) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = cssWithMappingToString(item, useSourceMap); if (item[2]) { return '@media ' + item[2] + '{' + content + '}'; } else { return content; } }).join(''); }; // import a list of modules into the list list.i = function (modules, mediaQuery) { if (typeof modules === 'string') { modules = [[null, modules, '']]; } var alreadyImportedModules = {}; for (var i = 0; i < this.length; i++) { var id = this[i][0]; if (id != null) { alreadyImportedModules[id] = true; } } for (i = 0; i < modules.length; i++) { var item = modules[i]; // skip already imported module // this implementation is not 100% perfect for weird media query combinations // when a module is imported multiple times with different media queries. // I hope this will never occur (Hey this way we have smaller bundles) if (item[0] == null || !alreadyImportedModules[item[0]]) { if (mediaQuery && !item[2]) { item[2] = mediaQuery; } else if (mediaQuery) { item[2] = '(' + item[2] + ') and (' + mediaQuery + ')'; } list.push(item); } } }; return list; }; function cssWithMappingToString(item, useSourceMap) { var content = item[1] || ''; var cssMapping = item[3]; if (!cssMapping) { return content; } if (useSourceMap && typeof btoa === 'function') { var sourceMapping = toComment(cssMapping); var sourceURLs = cssMapping.sources.map(function (source) { return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'; }); return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); } return [content].join('\n'); } // Adapted from convert-source-map (MIT) function toComment(sourceMap) { // eslint-disable-next-line no-undef var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; return '/*# ' + data + ' */'; } /***/ }), /***/ 228: /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a <style> tag // load the styles var content = __webpack_require__(345); if(typeof content === 'string') content = [[module.i, content, '']]; if(content.locals) module.exports = content.locals; // add the styles to the DOM var add = __webpack_require__(25).default var update = add("909bd75a", content, false, {}); // Hot Module Replacement if(false) {} /***/ }), /***/ 23: /***/ (function(module, exports, __webpack_require__) { var shared = __webpack_require__(15)('keys'); var uid = __webpack_require__(13); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; /***/ }), /***/ 24: /***/ (function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }), /***/ 25: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/listToStyles.js /** * Translates the list format produced by css-loader into something * easier to manipulate. */ function listToStyles (parentId, list) { var styles = [] var newStyles = {} for (var i = 0; i < list.length; i++) { var item = list[i] var id = item[0] var css = item[1] var media = item[2] var sourceMap = item[3] var part = { id: parentId + ':' + i, css: css, media: media, sourceMap: sourceMap } if (!newStyles[id]) { styles.push(newStyles[id] = { id: id, parts: [part] }) } else { newStyles[id].parts.push(part) } } return styles } // CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/addStylesClient.js /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addStylesClient; }); /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra Modified by Evan You @yyx990803 */ var hasDocument = typeof document !== 'undefined' if (typeof DEBUG !== 'undefined' && DEBUG) { if (!hasDocument) { throw new Error( 'vue-style-loader cannot be used in a non-browser environment. ' + "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment." ) } } /* type StyleObject = { id: number; parts: Array<StyleObjectPart> } type StyleObjectPart = { css: string; media: string; sourceMap: ?string } */ var stylesInDom = {/* [id: number]: { id: number, refs: number, parts: Array<(obj?: StyleObjectPart) => void> } */} var head = hasDocument && (document.head || document.getElementsByTagName('head')[0]) var singletonElement = null var singletonCounter = 0 var isProduction = false var noop = function () {} var options = null var ssrIdKey = 'data-vue-ssr-id' // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> // tags it will allow on a page var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase()) function addStylesClient (parentId, list, _isProduction, _options) { isProduction = _isProduction options = _options || {} var styles = listToStyles(parentId, list) addStylesToDom(styles) return function update (newList) { var mayRemove = [] for (var i = 0; i < styles.length; i++) { var item = styles[i] var domStyle = stylesInDom[item.id] domStyle.refs-- mayRemove.push(domStyle) } if (newList) { styles = listToStyles(parentId, newList) addStylesToDom(styles) } else { styles = [] } for (var i = 0; i < mayRemove.length; i++) { var domStyle = mayRemove[i] if (domStyle.refs === 0) { for (var j = 0; j < domStyle.parts.length; j++) { domStyle.parts[j]() } delete stylesInDom[domStyle.id] } } } } function addStylesToDom (styles /* Array<StyleObject> */) { for (var i = 0; i < styles.length; i++) { var item = styles[i] var domStyle = stylesInDom[item.id] if (domStyle) { domStyle.refs++ for (var j = 0; j < domStyle.parts.length; j++) { domStyle.parts[j](item.parts[j]) } for (; j < item.parts.length; j++) { domStyle.parts.push(addStyle(item.parts[j])) } if (domStyle.parts.length > item.parts.length) { domStyle.parts.length = item.parts.length } } else { var parts = [] for (var j = 0; j < item.parts.length; j++) { parts.push(addStyle(item.parts[j])) } stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts } } } } function createStyleElement () { var styleElement = document.createElement('style') styleElement.type = 'text/css' head.appendChild(styleElement) return styleElement } function addStyle (obj /* StyleObjectPart */) { var update, remove var styleElement = document.querySelector('style[' + ssrIdKey + '~="' + obj.id + '"]') if (styleElement) { if (isProduction) { // has SSR styles and in production mode. // simply do nothing. return noop } else { // has SSR styles but in dev mode. // for some reason Chrome can't handle source map in server-rendered // style tags - source maps in <style> only works if the style tag is // created and inserted dynamically. So we remove the server rendered // styles and inject new ones. styleElement.parentNode.removeChild(styleElement) } } if (isOldIE) { // use singleton mode for IE9. var styleIndex = singletonCounter++ styleElement = singletonElement || (singletonElement = createStyleElement()) update = applyToSingletonTag.bind(null, styleElement, styleIndex, false) remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true) } else { // use multi-style-tag mode in all other cases styleElement = createStyleElement() update = applyToTag.bind(null, styleElement) remove = function () { styleElement.parentNode.removeChild(styleElement) } } update(obj) return function updateStyle (newObj /* StyleObjectPart */) { if (newObj) { if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { return } update(obj = newObj) } else { remove() } } } var replaceText = (function () { var textStore = [] return function (index, replacement) { textStore[index] = replacement return textStore.filter(Boolean).join('\n') } })() function applyToSingletonTag (styleElement, index, remove, obj) { var css = remove ? '' : obj.css if (styleElement.styleSheet) { styleElement.styleSheet.cssText = replaceText(index, css) } else { var cssNode = document.createTextNode(css) var childNodes = styleElement.childNodes if (childNodes[index]) styleElement.removeChild(childNodes[index]) if (childNodes.length) { styleElement.insertBefore(cssNode, childNodes[index]) } else { styleElement.appendChild(cssNode) } } } function applyToTag (styleElement, obj) { var css = obj.css var media = obj.media var sourceMap = obj.sourceMap if (media) { styleElement.setAttribute('media', media) } if (options.ssrId) { styleElement.setAttribute(ssrIdKey, obj.id) } if (sourceMap) { // https://developer.chrome.com/devtools/docs/javascript-debugging // this makes source maps inside style tags work properly in Chrome css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */' // http://stackoverflow.com/a/26603875 css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */' } if (styleElement.styleSheet) { styleElement.styleSheet.cssText = css } else { while (styleElement.firstChild) { styleElement.removeChild(styleElement.firstChild) } styleElement.appendChild(document.createTextNode(css)) } } /***/ }), /***/ 26: /***/ (function(module, exports) { module.exports = false; /***/ }), /***/ 27: /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(4); var document = __webpack_require__(0).document; // typeof document.createElement is 'object' in old IE var is = isObject(document) && isObject(document.createElement); module.exports = function (it) { return is ? document.createElement(it) : {}; }; /***/ }), /***/ 29: /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(39); var enumBugKeys = __webpack_require__(24); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; /***/ }), /***/ 3: /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(9); var createDesc = __webpack_require__(18); module.exports = __webpack_require__(1) ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /***/ 30: /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(38); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function (/* ...args */) { return fn.apply(that, arguments); }; }; /***/ }), /***/ 31: /***/ (function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(1) && !__webpack_require__(7)(function () { return Object.defineProperty(__webpack_require__(27)('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /***/ 33: /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(19); var min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }), /***/ 34: /***/ (function(module, exports) { module.exports = {}; /***/ }), /***/ 344: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_tree_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(228); /* harmony import */ var _node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_tree_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_tree_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_sass_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_tree_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ 345: /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(22)(false); // Module exports.push([module.i, ".admin-tree-warp li{line-height:26px;position:relative}.admin-tree-warp .sub-toggle{display:none}.admin-tree-warp .tree-menu-open{font-size:10px;margin-right:10px;cursor:pointer;position:absolute;top:7px;left:10px}.admin-tree-warp .checkbox-warp-div{position:relative;z-index:99;padding:2px 0 3px 30px;cursor:pointer}.admin-tree-warp .checkbox-warp-div.close-tree+.admin-tree-sub-warp{display:none}.admin-tree-warp .no-checkedbox-label{position:relative;z-index:10;padding-left:30px;display:block;line-height:21px;margin-bottom:5px;cursor:pointer}.admin-tree-warp .no-checkedbox-label.close-tree+.admin-tree-sub-warp{display:none}.admin-tree-sub-warp{padding-left:25px;position:relative}.admin-tree-checkbox{margin-right:5px}\n", ""]); /***/ }), /***/ 35: /***/ (function(module, exports) { module.exports = require("admin-ui/dist/helpers/utils"); /***/ }), /***/ 38: /***/ (function(module, exports) { module.exports = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; /***/ }), /***/ 39: /***/ (function(module, exports, __webpack_require__) { var has = __webpack_require__(6); var toIObject = __webpack_require__(12); var arrayIndexOf = __webpack_require__(51)(false); var IE_PROTO = __webpack_require__(23)('IE_PROTO'); module.exports = function (object, names) { var O = toIObject(object); var i = 0; var result = []; var key; for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); // Don't enum bug & hidden keys while (names.length > i) if (has(O, key = names[i++])) { ~arrayIndexOf(result, key) || result.push(key); } return result; }; /***/ }), /***/ 396: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.split.js var es6_regexp_split = __webpack_require__(137); // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom.iterable.js var web_dom_iterable = __webpack_require__(74); // EXTERNAL MODULE: external "admin-ui/dist/helpers/utils" var utils_ = __webpack_require__(35); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/admin-ui/src/components/tree/src/tree.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // Author: yuhaijun // email: yuhaijun@rongcapital.cn /* harmony default export */ var treevue_type_script_lang_js_ = ({ name: 'au-tree', created: function created() { this.copyData = Object(utils_["deepClone"])(this.treeData); this.setPos(this.copyData); this.showCheckbox && this.setCheckedType(this.copyData); this.computedTreeData = Object(utils_["deepClone"])(this.copyData); }, render: function render(creatDom) { return this.createTree(creatDom, this.computedTreeData, true); }, data: function data() { return { computedTreeData: [], copyData: [] }; }, watch: { treeData: { deep: true, handler: function handler(v) { this.copyData = Object(utils_["deepClone"])(this.treeData); this.setPos(this.copyData); this.showCheckbox && this.setCheckedType(this.copyData); this.computedTreeData = Object(utils_["deepClone"])(this.copyData); } } }, props: { treeData: { type: Array, default: function _default() { return []; } }, showCheckbox: { type: Boolean, default: true }, showChildren: { type: Boolean, default: true } }, methods: { createTree: function createTree(c, data, isTop) { return c('ul', { class: { 'admin-tree-warp': isTop, 'au-theme-color--base-3': true, 'admin-tree-sub-warp': !isTop, 'sub-toggle': !isTop && !data.showChildren // 'list-inline': !isTop && this.displayInline(data) } }, this.createTreeDom(c, isTop ? data : data.children)); }, createTreeDom: function createTreeDom(c, data) { var _this = this; return data.map(function (item) { return c('li', {}, [_this.createChildren(c, item), item.children && item.children.length ? _this.createTree(c, item, false) : null]); }, this); }, createChildren: function createChildren(c, item) { var _this2 = this; if (this.showCheckbox) { return c('div', { class: { 'checkbox-warp-div': true, 'au-theme-hover-background-color--base-11': true }, on: { click: function click(e) { _this2.toggleClass(item.index, e); } } }, [item.children && item.children.length ? c('i', { class: { 'tree-menu-open': true, 'au-theme-color--base-8': true, 'fa': true, 'fa-chevron-down': item.showChildren, 'fa-chevron-right': !item.showChildren } }) : null, c('au-checkbox', { props: { text: item.label, value: item.checked, indeterminate: item.checkedType === 'part' }, ref: 'box-' + item.index.join('-'), nativeOn: { 'click': function click(e) { // console.log(this.$refs['box-' + item.index.join('-')]) if (item.checkedType === 'part') _this2.$refs['box-' + item.index.join('-')].localValue = true; _this2.treeCheckedChange(!item.checked, item.index.join('-'), item.checkedType, e); e.stopPropagation(); } } })]); } else { return c('span', { class: { 'no-checkedbox-label': true, 'au-theme-hover-background-color--base-11': true }, on: { click: function click(e) { _this2.toggleClass(item.index, e); } } }, [item.children && item.children.length ? c('i', { class: { 'tree-menu-open': true, 'au-theme-color--base-8': true, 'fa': true, 'fa-chevron-down': item.showChildren, 'fa-chevron-right': !item.showChildren } }) : null, item.label]); } }, displayInline: function displayInline(children) { var b = children.some(function (item) { return item.children && item.children.length > 0; }); return !b; }, toggleClass: function toggleClass(index, e) { var obj = this.getNodesByIndex(index, this.computedTreeData); this.$set(obj, 'showChildren', !obj.showChildren); this.$emit('node-click', this.parseData(this.getNodesByIndex(index, this.computedTreeData)), this.parseData(this.computedTreeData), e); if (obj.showChildren) { this.$emit('node-expand', this.parseData(this.getNodesByIndex(index, this.computedTreeData)), this.parseData(this.computedTreeData), e); } else { this.$emit('node-collapse', this.parseData(this.getNodesByIndex(index, this.computedTreeData)), this.parseData(this.computedTreeData), e); } }, parseData: function parseData(data) { var newData = Object(utils_["deepClone"])(data); if (Object(utils_["getDataType"])(newData) === 'array') { this.deletePropery(newData); } else { delete newData.index; delete newData.checkedType; delete newData.showChildren; if (newData.children && newData.children.length) { this.deletePropery(newData.children); } } return newData; }, deletePropery: function deletePropery(data) { var _this3 = this; data.forEach(function (item) { delete item.index; delete item.checkedType; delete item.showChildren; if (item.children && item.children.length) { _this3.deletePropery(item.children); } }, this); }, treeCheckedChange: function treeCheckedChange(v, value, type, e) { // console.log(v, value, type) var checked = !v && type === 'part' ? true : v; this.setCheckedTypeByNodes(value.split('-'), checked, this.computedTreeData); this.$emit('check-change', this.parseData(this.getNodesByIndex(value.split('-'), this.computedTreeData)), this.parseData(this.computedTreeData), e); }, setPos: function setPos(arr, pIndex) { var _this4 = this; arr.forEach(function (item, i) { if (pIndex) { _this4.$set(item, 'index', pIndex.concat([i])); } else { _this4.$set(item, 'index', [i]); } if (item.children && item.children.length) { _this4.$set(item, 'showChildren', _this4.showChildren); item.children.forEach(function (itemD, j) { if (!pIndex) { _this4.$set(itemD, 'index', [i, j]); } else { _this4.$set(itemD, 'index', item.index.concat([j])); } if (itemD.children && itemD.children.length) { _this4.$set(itemD, 'showChildren', _this4.showChildren); _this4.setPos(itemD.children, itemD.index); } }, _this4); } }, this); }, // 设置全选半选状态 setCheckedType: function setCheckedType(arr) { var _this5 = this; arr.forEach(function (item) { !item.hasOwnProperty('checked') && _this5.$set(item, 'checked', true); if (item.checked) { if (item.children && item.children.length) { _this5.setCheckedType(item.children); } else { _this5.setAllCheckedType(item); } } else { _this5.setAllCheckedType(item); } }); }, // 根据节点设置checked setCheckedTypeByNodes: function setCheckedTypeByNodes(indexArr, checked, treeData) { var node = this.getNodesByIndex(indexArr, treeData); node.checked = checked; checked ? node.checkedType = 'all' : node.checkedType = null; if (node.children && node.children.length) { this.setChildrenChecked(node, checked); } this.setParentChecked(node, treeData); }, // 递归设置所有节点选中类型 setAllCheckedType: function setAllCheckedType(node) { var treeData = this.copyData; var obj; if (node.index && node.index.length > 1) { var indexArr = node.index.slice(0, -1); var parent = this.getNodesByIndex(indexArr, treeData); obj = this.getNodeCheckedType(parent); parent.checkedType = obj.checkedType; this.setParentChecked(parent, treeData); } else { obj = this.getNodeCheckedType(node); node.checkedType = obj.checkedType; } }, // 根据index获取节点 getNodesByIndex: function getNodesByIndex(indexArr, treeData) { var node; indexArr.forEach(function (item, i) { if (i === 0) { node = treeData[item]; } else { node = node.children[item]; } }); return node; }, // 递归设置子节点选中状态 setChildrenChecked: function setChildrenChecked(node, checked) { var _this6 = this; node.checked = checked; checked && (node.checkedType = 'all'); node.children.forEach(function (item, i) { item.checked = checked; checked ? item.checkedType = 'all' : item.checkedType = null; if (item.children && item.children.length) { _this6.setChildrenChecked(item, checked); } }); }, // 递归设置父亲节点选中状态 setParentChecked: function setParentChecked(node, treeData) { var obj; if (node.index.length > 1) { var indexArr = node.index.slice(0, -1); var parent = this.getNodesByIndex(indexArr, treeData); obj = this.getNodeCheckedType(parent); parent.checked = obj.checked; parent.checkedType = obj.checkedType; this.setParentChecked(parent, treeData); } else { obj = this.getNodeCheckedType(node); node.checked = obj.checked; node.checkedType = obj.checkedType; } }, // 获取节点的选中状态 getNodeCheckedType: function getNodeCheckedType(node) { if (!node.children || !node.children.length) { return { checked: node.checked, checkedType: 'all' }; } var typeObj; var f = 0; var type; var t = 0; var len = node.children.length; node.children.forEach(function (item) { if (item.checked && item.checkedType === 'part') { type = 0; // return } else if (!item.checked) { f++; type = 1; } else if (item.checked) { t++; type = 2; } }); if (type === 0) { typeObj = { checked: true, checkedType: 'part' }; } else if (type === 1 && f === len) { typeObj = { checked: false, checkedType: null }; } else if (type === 2 && t === len) { typeObj = { checked: true, checkedType: 'all' }; } else { typeObj = { checked: true, checkedType