UNPKG

@ncform/ncform-theme-elementui

Version:

ncform theme element-ui

1,795 lines (1,528 loc) 439 kB
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("@ncform/ncform-common")); else if(typeof define === 'function' && define.amd) define("ncformStdComps", ["ncformCommon"], factory); else if(typeof exports === 'object') exports["ncformStdComps"] = factory(require("@ncform/ncform-common")); else root["ncformStdComps"] = factory(root["ncformCommon"]); })(window, function(__WEBPACK_EXTERNAL_MODULE__1__) { return /******/ (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 = 130); /******/ }) /************************************************************************/ /******/ ([ /* 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, 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 functioal 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) { module.exports = __WEBPACK_EXTERNAL_MODULE__1__; /***/ }), /* 2 */ /***/ (function(module, exports) { /* 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() { var list = []; // return the list of modules as css string list.toString = function toString() { var result = []; for(var i = 0; i < this.length; i++) { var item = this[i]; if(item[2]) { result.push("@media " + item[2] + "{" + item[1] + "}"); } else { result.push(item[1]); } } return result.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(typeof id === "number") 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(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { if(mediaQuery && !item[2]) { item[2] = mediaQuery; } else if(mediaQuery) { item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; } list.push(item); } } }; return list; }; /***/ }), /* 3 */ /***/ (function(module, exports) { /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ var stylesInDom = {}, memoize = function(fn) { var memo; return function () { if (typeof memo === "undefined") memo = fn.apply(this, arguments); return memo; }; }, isOldIE = memoize(function() { return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase()); }), getHeadElement = memoize(function () { return document.head || document.getElementsByTagName("head")[0]; }), singletonElement = null, singletonCounter = 0, styleElementsInsertedAtTop = []; module.exports = function(list, options) { if(typeof DEBUG !== "undefined" && DEBUG) { if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); } options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> // tags it will allow on a page if (typeof options.singleton === "undefined") options.singleton = isOldIE(); // By default, add <style> tags to the bottom of <head>. if (typeof options.insertAt === "undefined") options.insertAt = "bottom"; var styles = listToStyles(list); addStylesToDom(styles, options); 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) { var newStyles = listToStyles(newList); addStylesToDom(newStyles, options); } 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, options) { 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], options)); } } else { var parts = []; for(var j = 0; j < item.parts.length; j++) { parts.push(addStyle(item.parts[j], options)); } stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts}; } } } function listToStyles(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 = {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; } function insertStyleElement(options, styleElement) { var head = getHeadElement(); var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1]; if (options.insertAt === "top") { if(!lastStyleElementInsertedAtTop) { head.insertBefore(styleElement, head.firstChild); } else if(lastStyleElementInsertedAtTop.nextSibling) { head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling); } else { head.appendChild(styleElement); } styleElementsInsertedAtTop.push(styleElement); } else if (options.insertAt === "bottom") { head.appendChild(styleElement); } else { throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'."); } } function removeStyleElement(styleElement) { styleElement.parentNode.removeChild(styleElement); var idx = styleElementsInsertedAtTop.indexOf(styleElement); if(idx >= 0) { styleElementsInsertedAtTop.splice(idx, 1); } } function createStyleElement(options) { var styleElement = document.createElement("style"); styleElement.type = "text/css"; insertStyleElement(options, styleElement); return styleElement; } function addStyle(obj, options) { var styleElement, update, remove; if (options.singleton) { var styleIndex = singletonCounter++; styleElement = singletonElement || (singletonElement = createStyleElement(options)); update = applyToSingletonTag.bind(null, styleElement, styleIndex, false); remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true); } else { styleElement = createStyleElement(options); update = applyToTag.bind(null, styleElement); remove = function() { removeStyleElement(styleElement); }; } update(obj); return function updateStyle(newObj) { 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 (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)); } } /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; exports.default = isArray; /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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__(102); var _freeGlobal2 = _interopRequireDefault(_freeGlobal); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** 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 = _freeGlobal2.default || freeSelf || Function('return this')(); exports.default = root; /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _baseIsNative = __webpack_require__(141); var _baseIsNative2 = _interopRequireDefault(_baseIsNative); var _getValue = __webpack_require__(144); var _getValue2 = _interopRequireDefault(_getValue); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * 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 = (0, _getValue2.default)(object, key); return (0, _baseIsNative2.default)(value) ? value : undefined; } exports.default = getNative; /***/ }), /* 7 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _baseGet = __webpack_require__(100); var _baseGet2 = _interopRequireDefault(_baseGet); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : (0, _baseGet2.default)(object, path); return result === undefined ? defaultValue : result; } exports.default = get; /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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; }; /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value === 'undefined' ? 'undefined' : _typeof(value); return value != null && (type == 'object' || type == 'function'); } exports.default = isObject; /***/ }), /* 9 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _Symbol2 = __webpack_require__(10); var _Symbol3 = _interopRequireDefault(_Symbol2); var _getRawTag = __webpack_require__(133); var _getRawTag2 = _interopRequireDefault(_getRawTag); var _objectToString = __webpack_require__(134); var _objectToString2 = _interopRequireDefault(_objectToString); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = _Symbol3.default ? _Symbol3.default.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) { return value === undefined ? undefinedTag : nullTag; } return symToStringTag && symToStringTag in Object(value) ? (0, _getRawTag2.default)(value) : (0, _objectToString2.default)(value); } exports.default = baseGetTag; /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _root = __webpack_require__(5); var _root2 = _interopRequireDefault(_root); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** Built-in value references. */ var _Symbol = _root2.default.Symbol; exports.default = _Symbol; /***/ }), /* 11 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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; }; /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) == 'object'; } exports.default = isObjectLike; /***/ }), /* 12 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _arrayLikeKeys = __webpack_require__(109); var _arrayLikeKeys2 = _interopRequireDefault(_arrayLikeKeys); var _baseKeys = __webpack_require__(176); var _baseKeys2 = _interopRequireDefault(_baseKeys); var _isArrayLike = __webpack_require__(19); var _isArrayLike2 = _interopRequireDefault(_isArrayLike); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return (0, _isArrayLike2.default)(object) ? (0, _arrayLikeKeys2.default)(object) : (0, _baseKeys2.default)(object); } exports.default = keys; /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _getNative = __webpack_require__(6); var _getNative2 = _interopRequireDefault(_getNative); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /* Built-in method references that are verified to be native. */ var nativeCreate = (0, _getNative2.default)(Object, 'create'); exports.default = nativeCreate; /***/ }), /* 14 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _listCacheClear = __webpack_require__(149); var _listCacheClear2 = _interopRequireDefault(_listCacheClear); var _listCacheDelete = __webpack_require__(150); var _listCacheDelete2 = _interopRequireDefault(_listCacheDelete); var _listCacheGet = __webpack_require__(151); var _listCacheGet2 = _interopRequireDefault(_listCacheGet); var _listCacheHas = __webpack_require__(152); var _listCacheHas2 = _interopRequireDefault(_listCacheHas); var _listCacheSet = __webpack_require__(153); var _listCacheSet2 = _interopRequireDefault(_listCacheSet); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * 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 = _listCacheClear2.default; ListCache.prototype['delete'] = _listCacheDelete2.default; ListCache.prototype.get = _listCacheGet2.default; ListCache.prototype.has = _listCacheHas2.default; ListCache.prototype.set = _listCacheSet2.default; exports.default = ListCache; /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _eq = __webpack_require__(74); var _eq2 = _interopRequireDefault(_eq); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * 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 ((0, _eq2.default)(array[length][0], key)) { return length; } } return -1; } exports.default = assocIndexOf; /***/ }), /* 16 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isKeyable = __webpack_require__(155); var _isKeyable2 = _interopRequireDefault(_isKeyable); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return (0, _isKeyable2.default)(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } exports.default = getMapData; /***/ }), /* 17 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isSymbol = __webpack_require__(72); var _isSymbol2 = _interopRequireDefault(_isSymbol); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || (0, _isSymbol2.default)(value)) { return value; } var result = value + ''; return result == '0' && 1 / value == -INFINITY ? '-0' : result; } exports.default = toKey; /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _assignValue = __webpack_require__(107); var _assignValue2 = _interopRequireDefault(_assignValue); var _baseAssignValue = __webpack_require__(108); var _baseAssignValue2 = _interopRequireDefault(_baseAssignValue); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { (0, _baseAssignValue2.default)(object, key, newValue); } else { (0, _assignValue2.default)(object, key, newValue); } } return object; } exports.default = copyObject; /***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isFunction = __webpack_require__(103); var _isFunction2 = _interopRequireDefault(_isFunction); var _isLength = __webpack_require__(79); var _isLength2 = _interopRequireDefault(_isLength); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && (0, _isLength2.default)(value.length) && !(0, _isFunction2.default)(value); } exports.default = isArrayLike; /***/ }), /* 20 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_input_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21); /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_input_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_input_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__); /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_input_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_input_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__)); /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_input_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /* 21 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); 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 _ncformCommon = __webpack_require__(1); var _ncformCommon2 = _interopRequireDefault(_ncformCommon); var _get2 = __webpack_require__(7); var _get3 = _interopRequireDefault(_get2); var _cloneDeep2 = __webpack_require__(106); var _cloneDeep3 = _interopRequireDefault(_cloneDeep2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var controlMixin = _ncformCommon2.default.mixins.vue.controlMixin; exports.default = { mixins: [controlMixin], i18nData: { en: { selectPls: "Select Please", uploading: "Uploading...", upload: "Upload", uploadFail: "Upload failed, please try again later!", resolutionTip1: "Please upload an image of <%= right %>, your image is <%= wrong %>", resolutionTip2: "Please upload an image with an aspect ratio of <%= right %>. Your image aspect ratio is <%= wrong %>", sizeTips1: "Please upload a file smaller than <%= right %>KB, your file is <%= wrong %>KB", sizeTips2: "Please upload a file larger than <%= right %>KB, your file is <%= wrong %>KB" }, zh_cn: { selectPls: "请选择", uploading: "上传中...", upload: "点击上传", uploadFail: "上传失败,请稍后再试!", resolutionTip1: "请上传<%= right %>的图片,你的图片为<%= wrong %>", resolutionTip2: "请上传宽高比为<%= right %>的图片,你的图片宽高比为<%= wrong %>", sizeTips1: "请上传小于<%= right %>KB的文件,您的文件为<%= wrong %>KB", sizeTips2: "请上传大于<%= right %>KB的文件,您的文件为<%= wrong %>KB" } }, props: { value: { type: [String, Number, Object] } }, created: function created() { var _this = this; this.$watch("inputVal", function (newVal, oldVal) { if (!newVal && !oldVal || _this.mergeConfig.updateOn === 'blur') return; var val = _this._processModelVal(); _this.$emit("input", val); }); if (this.$data.modelVal !== undefined) { this.$data.inputVal = ["string", "number"].indexOf(_typeof(this.$data.modelVal)) >= 0 ? this.$data.modelVal : this.$data.modelVal[this.mergeConfig.modelField]; } if ((0, _get3.default)(this.mergeConfig, "autocomplete.itemTemplate")) { this.$data.itemTemplate.template = (0, _get3.default)(this.mergeConfig, "autocomplete.itemTemplate"); } if ((0, _get3.default)(this.mergeConfig, "compound.prependSelect")) { if ((0, _get3.default)(this.mergeConfig, "compound.prependSelect.enumSource")) { this.$data.prependSelectOptions = (0, _get3.default)(this.mergeConfig, "compound.prependSelect.enumSource"); } else { this.$http({ url: (0, _get3.default)(this.mergeConfig, "compound.prependSelect.enumSourceRemote.remoteUrl") }).then(function (res) { _this.$data.prependSelectOptions = _this.mergeConfig.compound.prependSelect.enumSourceRemote.resField ? (0, _get3.default)(res.data, _this.mergeConfig.compound.prependSelect.enumSourceRemote.resField) : res.data; }); } this.$data.prependSelectVal = (0, _get3.default)(this.value, (0, _get3.default)(this.mergeConfig, "compound.prependSelect.modelField")); this.$watch("prependSelectVal", function () { var val = this._processModelVal(); this.$emit("input", val); }); } if ((0, _get3.default)(this.mergeConfig, "compound.appendSelect")) { if ((0, _get3.default)(this.mergeConfig, "compound.appendSelect.enumSource")) { this.$data.appendSelectOptions = (0, _get3.default)(this.mergeConfig, "compound.appendSelect.enumSource"); } else { this.$http({ url: (0, _get3.default)(this.mergeConfig, "compound.appendSelect.enumSourceRemote.remoteUrl") }).then(function (res) { _this.$data.appendSelectOptions = _this.mergeConfig.compound.appendSelect.enumSourceRemote.resField ? (0, _get3.default)(res.data, _this.mergeConfig.compound.appendSelect.enumSourceRemote.resField) : res.data; }); } this.$data.appendSelectVal = (0, _get3.default)(this.value, (0, _get3.default)(this.mergeConfig, "compound.appendSelect.modelField")); this.$watch("appendSelectVal", function () { var val = this._processModelVal(); this.$emit("input", val); }); } }, data: function data() { return { prependSelectOptions: [], prependSelectVal: "", appendSelectOptions: [], appendSelectVal: "", itemTemplate: { props: ["item"], template: "" }, isUploading: false, inputVal: "", defaultConfig: { type: "text", trim: false, clearable: false, prefixIcon: "", suffixIcon: "", modelField: "", updateOn: 'change', // change or blur size: '', // autocomplete: { // 自动补全 // itemLabelField: 'label', // 项数据表示label的字段 // itemValueField: 'value', // 项数据表示value的字段 // itemTemplate: '<span>{{item.label}} : {{item.value}}</span>', // 显示项的模板 // immediateShow: false, // 是否立即显示,如果为false则当输入关键字才显示 // enumSource: [{value: [String | Number | Boolean], label: ''}], // 当提示数据是本地而非远程时提供 // enumSourceRemote: { // remoteUrl: '', // 如果是远程访问,则填写该url // paramName: 'keyword', // 请求参数名,默认是keyword // otherParams: {}, // 其它请求参数,值支持 dx表达式 // resField: '', // 响应结果的字段 // } // }, // compound: { // 组合 // prependLabel: '', // 前置标签 // appendLabel: '', // 后置标签 // prependIcon: '', // 后置图标样式 // appendIcon: '', // 前置图标样式 // prependSelect: { // 前置下拉框,使用该种的数据必须是对象 // itemLabelField: 'label', // 项数据表示label的字段 // itemValueField: 'value', // 项数据表示value的字段 // enumSource: [{value: [String | Number | Boolean], label: ''}], // 本地数据源 // enumSourceRemote: { // 远程数据源 // remoteUrl: '', // 如果是远程访问,则填写该url // resField: '', // 响应结果的字段 // }, // modelField: '' // 用于绑定input value值的某个属性 // }, // appendSelect: { // 后置下拉框,使用该种的数据必须是对象 // itemLabelField: 'label', // 项数据表示label的字段 // itemValueField: 'value', // 项数据表示value的字段 // enumSource: [{value: [String | Number | Boolean], label: ''}], // 本地数据源 // enumSourceRemote: { // 远程数据源 // remoteUrl: '', // 如果是远程访问,则填写该url // resField: '', // 响应结果的字段 // }, // modelField: '' // 用于绑定input value值的某个属性 // } // } upload: { // 上传的参数配置(当type="file"时,只认这个参数) uploadUrl: "", // 上传的地址 data: {}, // 上传时附带的额外参数 fileField: "file", // 表示文件的字段,默认是file accept: "", // 接受上传的文件类型 constraint: { // 约束 width: 0, // 图片宽度 height: 0, // 图片高度 sizeFixed: true, // 图片尺寸约束的大小是否按固定值,当为false时按比例 maxSize: 0, // 最大图片大小,单位KB,0代表不限 minSize: 0 // 最小图片大小,单位KB,0代表不限 }, resField: "", // 获取返回结果的字段, uploadText: "", // 上传按钮的名称 headers: {} } } }; }, methods: { querySearch: function querySearch(queryString, cb) { var autoCpl = this.mergeConfig.autocomplete; // 本地数据源的处理 if (autoCpl.enumSource) { cb(autoCpl.enumSource.filter(function (item) { var itemVal = item[autoCpl.itemValueField || "value"].toString().toLowerCase(); return itemVal.indexOf(queryString.toLowerCase()) !== -1; })); return; } // 下面是远程数据源的处理 var options = { url: autoCpl.enumSourceRemote.remoteUrl, params: (0, _cloneDeep3.default)((0, _get3.default)(this.mergeConfig, "autocomplete.enumSourceRemote.otherParams", {})) }; if (autoCpl.enumSourceRemote.paramName) options.params[autoCpl.enumSourceRemote.paramName] = queryString; this.$http(options).then(function (res) { cb(autoCpl.enumSourceRemote.resField ? (0, _get3.default)(res.data, autoCpl.enumSourceRemote.resField) : res.data); }); }, handleClickUpload: function handleClickUpload() { // 处理选中的input[type="file"] var vm = this; if (!vm.disabled) { vm.$refs.upload.value = null; vm.$refs.upload.click(); } }, handleFileChange: function handleFileChange() { var _this2 = this; var vm = this; var fd = new FormData(); var _vm$mergeConfig$uploa = vm.mergeConfig.upload, uploadUrl = _vm$mergeConfig$uploa.uploadUrl, data = _vm$mergeConfig$uploa.data, resField = _vm$mergeConfig$uploa.resField, fileField = _vm$mergeConfig$uploa.fileField, _vm$mergeConfig$uploa2 = _vm$mergeConfig$uploa.headers, headers = _vm$mergeConfig$uploa2 === undefined ? {} : _vm$mergeConfig$uploa2; var sendObj = Object.assign({}, data); sendObj[fileField] = this.$refs.upload.files[0]; // 判断是否符合大小约束 var fileSize = sendObj[fileField].size / 1024; if (vm.mergeConfig.upload.constraint.maxSize && fileSize > vm.mergeConfig.upload.constraint.maxSize) { vm.$message({ message: vm.$nclang("sizeTips1", { right: vm.mergeConfig.upload.constraint.maxSize, wrong: fileSize.toFixed(0) }), type: "error" }); return; } if (vm.mergeConfig.upload.constraint.minSize && fileSize < vm.mergeConfig.upload.constraint.minSize) { vm.$message({ message: vm.$nclang("sizeTips2", { right: vm.mergeConfig.upload.constraint.minSize, wrong: fileSize.toFixed(0) }), type: "error" }); return; } // 图片类型判断是否符合宽高要求 var jurgeImgPromise = new Promise(function (resolve) { if (sendObj[fileField].type.indexOf("image") >= 0 && vm.mergeConfig.upload.constraint.width && vm.mergeConfig.upload.constraint.height) { var reader = new FileReader(); reader.onload = function (theFile) { var image = new Image(); image.onload = function () { var pass = false; if (vm.mergeConfig.upload.constraint.sizeFixed) { pass = this.width === vm.mergeConfig.upload.constraint.width && this.height === vm.mergeConfig.upload.constraint.height; } else { pass = (this.width / this.height).toFixed(1) === (vm.mergeConfig.upload.constraint.width / vm.mergeConfig.upload.constraint.height).toFixed(1); } if (!pass) { if (vm.mergeConfig.upload.constraint.sizeFixed) { vm.$message({ message: vm.$nclang("resolutionTip1", { right: vm.mergeConfig.upload.constraint.width + "x" + vm.mergeConfig.upload.constraint.height, wrong: this.width + "x" + this.height }), type: "error" }); } else { vm.$message({ message: vm.$nclang("resolutionTip2", { right: vm._getFractionalExpression(vm.mergeConfig.upload.constraint.width / vm.mergeConfig.upload.constraint.height, 0.01), wrong: vm._getFractionalExpression(this.width / this.height, 0.01) }), type: "error" }); } } else { resolve(); } }; image.src = theFile.target.result; }; reader.readAsDataURL(sendObj[fileField]); } else { resolve(); } }); jurgeImgPromise.then(function () { var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = Object.entries(sendObj)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var _step$value = _slicedToArray(_step.value, 2), key = _step$value[0], value = _step$value[1]; fd.append(key, value); } } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { if (!_iteratorNormalCompletion && _iterator.return) { _iterator.return(); } } finally { if (_didIteratorError) { throw _iteratorError; } } } _this2.$data.isUploading = true; _this2.$http({ method: "POST", url: uploadUrl, data: fd, headers: headers }).then(function (res) { _this2.$data.inputVal = (0, _get3.default)(res, resField || ""); _this2.$data.isUploading = false; }).catch(function () { vm.$message.error(_this2.$nclang("uploadFail")); _this2.$data.isUploading = false; }); }); }, onBlur: function onBlur() { if (this.mergeConfig.updateOn === 'blur') { var val = this._processModelVal(); this.$emit("input", val); } }, onSelectSuggectionItem: function onSelectSuggectionItem() { if (this.mergeConfig.updateOn === 'blur') { var val = this._processModelVal(); this.$emit("input", val); } }, _getFractionalExpression: function _getFractionalExpression(value, threshold) { var i = 1, j = 1; while (Math.abs(i / j - value) > threshold) { if (i / j > value) { j++; } else if (i / j < value) { i++; } } return i + ":" + j; }, // 你可以通过该方法在modelVal传出去之前进行加工处理,即在this.$emit('input')之前 _processModelVal: function _processModelVal(newVal) { var val = void 0; if (newVal !== undefined) { // mixin调用的 if (_typeof(this.value) === "object") { val = newVal[this.mergeConfig.modelField]; } else { val = newVal; } } else { val = this.$data.inputVal; } if (this.mergeConfig.trim) { val = val ? val.toString().trim() : val; } switch (this.mergeConfig.type) { case "number": val = parseFloat(val); val = isNaN(val) ? "" : val; break; case "integer": val = parseInt(val); val = isNaN(val) ? "" : val; break; default: break; } if (_typeof(this.value) === "object") { var obj = {}; obj[this.mergeConfig.modelField] = val; if ((0, _get3.default)(this.mergeConfig, "compound.prependSelect")) { obj[this.mergeConfig.compound.prependSelect.modelField] = this.$data.prependSelectVal; } if ((0, _get3.default)(this.mergeConfig, "compound.appendSelect")) { obj[this.mergeConfig.compound.appendSelect.modelField] = this.$data.appendSelectVal; } return obj; } else { this.$data.inputVal = val; return val; } } } }; /***/ }), /* 22 */ /***/ (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__(204); if(typeof content === 'string') content = [[module.i, content, '']]; // add the styles to the DOM var update = __webpack_require__(3)(content, {}); if(content.locals) module.exports = content.locals; // Hot Module Replacement if(false) {} /***/ }), /* 23 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use stric