UNPKG

weex-ui

Version:

A rich interaction, lightweight, high performance UI library based on Weex

1,853 lines (1,538 loc) 315 kB
// { "framework": "Vue" } (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["npm/weex-ui/index"] = factory(); else root["npm/weex-ui/index"] = factory(); })(this, function() { 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, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // 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 = 10); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof2 = 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; }; /** * CopyRight (C) 2017-2022 Alibaba Group Holding Limited. * Created by Tw93 on 17/11/01 */ var _urlParse = __webpack_require__(11); var _urlParse2 = _interopRequireDefault(_urlParse); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var Utils = { UrlParser: _urlParse2.default, _typeof: function _typeof(obj) { return Object.prototype.toString.call(obj).slice(8, -1).toLowerCase(); }, isPlainObject: function isPlainObject(obj) { return Utils._typeof(obj) === 'object'; }, isString: function isString(obj) { return typeof obj === 'string'; }, isNonEmptyArray: function isNonEmptyArray() { var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; return obj && obj.length > 0 && Array.isArray(obj) && typeof obj !== 'undefined'; }, isObject: function isObject(item) { return item && (typeof item === 'undefined' ? 'undefined' : _typeof2(item)) === 'object' && !Array.isArray(item); }, isEmptyObject: function isEmptyObject(obj) { return Object.keys(obj).length === 0 && obj.constructor === Object; }, mergeDeep: function mergeDeep(target) { for (var _len = arguments.length, sources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { sources[_key - 1] = arguments[_key]; } if (!sources.length) return target; var source = sources.shift(); if (Utils.isObject(target) && Utils.isObject(source)) { for (var key in source) { if (Utils.isObject(source[key])) { if (!target[key]) { Object.assign(target, _defineProperty({}, key, {})); } Utils.mergeDeep(target[key], source[key]); } else { Object.assign(target, _defineProperty({}, key, source[key])); } } } return Utils.mergeDeep.apply(Utils, [target].concat(sources)); }, appendProtocol: function appendProtocol(url) { if (/^\/\//.test(url)) { var bundleUrl = weex.config.bundleUrl; return 'http' + (/^https:/.test(bundleUrl) ? 's' : '') + ':' + url; } return url; }, encodeURLParams: function encodeURLParams(url) { var parsedUrl = new _urlParse2.default(url, true); return parsedUrl.toString(); }, goToH5Page: function goToH5Page(jumpUrl) { var animated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var callback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; var Navigator = weex.requireModule('navigator'); var jumpUrlObj = new Utils.UrlParser(jumpUrl, true); var url = Utils.appendProtocol(jumpUrlObj.toString()); Navigator.push({ url: Utils.encodeURLParams(url), animated: animated }, callback); }, env: { isTaobao: function isTaobao() { var appName = weex.config.env.appName; return (/(tb|taobao|淘宝)/i.test(appName) ); }, isTrip: function isTrip() { var appName = weex.config.env.appName; return appName === 'LX'; }, isWeb: function isWeb() { var platform = weex.config.env.platform; return (typeof window === 'undefined' ? 'undefined' : _typeof2(window)) === 'object' && platform.toLowerCase() === 'web'; }, isIOS: function isIOS() { var platform = weex.config.env.platform; return platform.toLowerCase() === 'ios'; }, isAndroid: function isAndroid() { var platform = weex.config.env.platform; return platform.toLowerCase() === 'android'; }, isAlipay: function isAlipay() { var appName = weex.config.env.appName; return appName === 'AP'; }, isAlipayWeb: function isAlipayWeb() { return Utils.env.isAlipay() && Utils.env.isWeb(); }, supportsEB: function supportsEB() { var weexVersion = weex.config.env.weexVersion || '0'; var isHighWeex = Utils.compareVersion(weexVersion, '0.10.1.4') && (Utils.env.isIOS() || Utils.env.isAndroid()); var expressionBinding = weex.requireModule('expressionBinding'); return expressionBinding && expressionBinding.enableBinding && isHighWeex; }, /** * 判断Android容器是否支持是否支持expressionBinding(处理方式很不一致) * @returns {boolean} */ supportsEBForAndroid: function supportsEBForAndroid() { return Utils.env.isAndroid() && Utils.env.supportsEB(); }, /** * 判断IOS容器是否支持是否支持expressionBinding * @returns {boolean} */ supportsEBForIos: function supportsEBForIos() { return Utils.env.isIOS() && Utils.env.supportsEB(); }, /** * 获取weex屏幕真实的设置高度,需要减去导航栏高度 * @returns {Number} */ getPageHeight: function getPageHeight() { var env = weex.config.env; var navHeight = Utils.env.isWeb() ? 0 : 130; return env.deviceHeight / env.deviceWidth * 750 - navHeight; } }, /** * 版本号比较 * @memberOf Utils * @param currVer {string} * @param promoteVer {string} * @returns {boolean} * @example * * const { Utils } = require('@ali/wx-bridge'); * const { compareVersion } = Utils; * console.log(compareVersion('0.1.100', '0.1.11')); // 'true' */ compareVersion: function compareVersion() { var currVer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "0.0.0"; var promoteVer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "0.0.0"; if (currVer === promoteVer) return true; var currVerArr = currVer.split("."); var promoteVerArr = promoteVer.split("."); var len = Math.max(currVerArr.length, promoteVerArr.length); for (var i = 0; i < len; i++) { var proVal = ~~promoteVerArr[i]; var curVal = ~~currVerArr[i]; if (proVal < curVal) { return true; } else if (proVal > curVal) { return false; } } return false; }, /** * 分割数组 * @param arr 被分割数组 * @param size 分割数组的长度 * @returns {Array} */ arrayChunk: function arrayChunk() { var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4; var groups = []; if (arr && arr.length > 0) { groups = arr.map(function (e, i) { return i % size === 0 ? arr.slice(i, i + size) : null; }).filter(function (e) { return e; }); } return groups; }, truncateString: function truncateString(str, len) { var hasDot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; var newLength = 0; var newStr = ""; var singleChar = ''; var chineseRegex = /[^\x00-\xff]/g; var strLength = str.replace(chineseRegex, '**').length; for (var i = 0; i < strLength; i++) { singleChar = str.charAt(i).toString(); if (singleChar.match(chineseRegex) !== null) { newLength += 2; } else { newLength++; } if (newLength > len) { break; } newStr += singleChar; } if (hasDot && strLength > len) { newStr += '...'; } return newStr; } }; exports.default = Utils; /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _index = __webpack_require__(20); Object.defineProperty(exports, 'default', { enumerable: true, get: function get() { return _interopRequireDefault(_index).default; } }); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), /* 2 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _index = __webpack_require__(76); Object.defineProperty(exports, 'default', { enumerable: true, get: function get() { return _interopRequireDefault(_index).default; } }); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { var __vue_exports__, __vue_options__ var __vue_styles__ = [] /* styles */ __vue_styles__.push(__webpack_require__(149) ) /* script */ __vue_exports__ = __webpack_require__(150) /* template */ var __vue_template__ = __webpack_require__(151) __vue_options__ = __vue_exports__ = __vue_exports__ || {} if ( typeof __vue_exports__.default === "object" || typeof __vue_exports__.default === "function" ) { if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} __vue_options__ = __vue_exports__ = __vue_exports__.default } if (typeof __vue_options__ === "function") { __vue_options__ = __vue_options__.options } __vue_options__.__file = "/Users/Tw93/www/github/weex-ui/packages/wxc-rich-text/wxc-rich-text-text.vue" __vue_options__.render = __vue_template__.render __vue_options__.staticRenderFns = __vue_template__.staticRenderFns __vue_options__._scopeId = "data-v-7a7c04cc" __vue_options__.style = __vue_options__.style || {} __vue_styles__.forEach(function (module) { for (var name in module) { __vue_options__.style[name] = module[name] } }) if (typeof __register_static_styles__ === "function") { __register_static_styles__(__vue_options__._scopeId, __vue_styles__) } module.exports = __vue_exports__ /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { var __vue_exports__, __vue_options__ var __vue_styles__ = [] /* styles */ __vue_styles__.push(__webpack_require__(25) ) /* script */ __vue_exports__ = __webpack_require__(26) /* template */ var __vue_template__ = __webpack_require__(28) __vue_options__ = __vue_exports__ = __vue_exports__ || {} if ( typeof __vue_exports__.default === "object" || typeof __vue_exports__.default === "function" ) { if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} __vue_options__ = __vue_exports__ = __vue_exports__.default } if (typeof __vue_options__ === "function") { __vue_options__ = __vue_options__.options } __vue_options__.__file = "/Users/Tw93/www/github/weex-ui/packages/wxc-checkbox/index.vue" __vue_options__.render = __vue_template__.render __vue_options__.staticRenderFns = __vue_template__.staticRenderFns __vue_options__._scopeId = "data-v-5f56b30c" __vue_options__.style = __vue_options__.style || {} __vue_styles__.forEach(function (module) { for (var name in module) { __vue_options__.style[name] = module[name] } }) if (typeof __register_static_styles__ === "function") { __register_static_styles__(__vue_options__._scopeId, __vue_styles__) } module.exports = __vue_exports__ /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _index = __webpack_require__(73); Object.defineProperty(exports, 'default', { enumerable: true, get: function get() { return _interopRequireDefault(_index).default; } }); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Created by Tw93 on 2016/10/29. */ var GIF = exports.GIF = "//img.alicdn.com/tfs/TB1aks3PpXXXXcXXFXXXXXXXXXX-150-150.gif"; var BLACK_GIF = exports.BLACK_GIF = "//img.alicdn.com/tfs/TB1Ep_9NVXXXXb8XVXXXXXXXXXX-74-74.gif"; var PNG = exports.PNG = "//gw.alicdn.com/tfs/TB1HwGTpwoQMeJjy0FpXXcTxpXa-75-75.png"; var PART = exports.PART = '//gtms02.alicdn.com/tfs/TB1y4QbSXXXXXbgapXXXXXXXXXX-50-50.gif'; /***/ }), /* 7 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _index = __webpack_require__(91); Object.defineProperty(exports, 'default', { enumerable: true, get: function get() { return _interopRequireDefault(_index).default; } }); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { var __vue_exports__, __vue_options__ var __vue_styles__ = [] /* styles */ __vue_styles__.push(__webpack_require__(155) ) /* script */ __vue_exports__ = __webpack_require__(156) /* template */ var __vue_template__ = __webpack_require__(157) __vue_options__ = __vue_exports__ = __vue_exports__ || {} if ( typeof __vue_exports__.default === "object" || typeof __vue_exports__.default === "function" ) { if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} __vue_options__ = __vue_exports__ = __vue_exports__.default } if (typeof __vue_options__ === "function") { __vue_options__ = __vue_options__.options } __vue_options__.__file = "/Users/Tw93/www/github/weex-ui/packages/wxc-rich-text/wxc-rich-text-icon.vue" __vue_options__.render = __vue_template__.render __vue_options__.staticRenderFns = __vue_template__.staticRenderFns __vue_options__._scopeId = "data-v-eb5b13d0" __vue_options__.style = __vue_options__.style || {} __vue_styles__.forEach(function (module) { for (var name in module) { __vue_options__.style[name] = module[name] } }) if (typeof __register_static_styles__ === "function") { __register_static_styles__(__vue_options__._scopeId, __vue_styles__) } module.exports = __vue_exports__ /***/ }), /* 9 */ /***/ (function(module, exports, __webpack_require__) { var __vue_exports__, __vue_options__ var __vue_styles__ = [] /* styles */ __vue_styles__.push(__webpack_require__(158) ) /* script */ __vue_exports__ = __webpack_require__(159) /* template */ var __vue_template__ = __webpack_require__(160) __vue_options__ = __vue_exports__ = __vue_exports__ || {} if ( typeof __vue_exports__.default === "object" || typeof __vue_exports__.default === "function" ) { if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} __vue_options__ = __vue_exports__ = __vue_exports__.default } if (typeof __vue_options__ === "function") { __vue_options__ = __vue_options__.options } __vue_options__.__file = "/Users/Tw93/www/github/weex-ui/packages/wxc-rich-text/wxc-rich-text-tag.vue" __vue_options__.render = __vue_template__.render __vue_options__.staticRenderFns = __vue_template__.staticRenderFns __vue_options__._scopeId = "data-v-676c9ccb" __vue_options__.style = __vue_options__.style || {} __vue_styles__.forEach(function (module) { for (var name in module) { __vue_options__.style[name] = module[name] } }) if (typeof __register_static_styles__ === "function") { __register_static_styles__(__vue_options__._scopeId, __vue_styles__) } module.exports = __vue_exports__ /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WxcTag = exports.WxcTabPage = exports.WxcStepper = exports.WxcSliderBar = exports.WxcSlideNav = exports.WxcSimpleFlow = exports.WxcSearchbar = exports.WxcSpecialRichText = exports.WxcRichText = exports.WxcResult = exports.WxcRadio = exports.WxcProgress = exports.WxcPopup = exports.WxcPageCalendar = exports.WxcOverlay = exports.WxcNoticebar = exports.WxcLotteryRain = exports.WxcMinibar = exports.WxcMask = exports.WxcPartLoading = exports.WxcLoading = exports.WxcLightbox = exports.WxcIndexlist = exports.WxcGridSelect = exports.WxcPanItem = exports.WxcEpSlider = exports.WxcDialog = exports.WxcCountdown = exports.WxcCheckboxList = exports.WxcCheckbox = exports.WxcCell = exports.WxcButton = exports.Utils = undefined; var _utils = __webpack_require__(0); var _utils2 = _interopRequireDefault(_utils); var _wxcButton = __webpack_require__(14); var _wxcButton2 = _interopRequireDefault(_wxcButton); var _wxcCell = __webpack_require__(1); var _wxcCell2 = _interopRequireDefault(_wxcCell); var _wxcCheckbox = __webpack_require__(24); var _wxcCheckbox2 = _interopRequireDefault(_wxcCheckbox); var _wxcCheckboxList = __webpack_require__(29); var _wxcCheckboxList2 = _interopRequireDefault(_wxcCheckboxList); var _wxcCountdown = __webpack_require__(34); var _wxcCountdown2 = _interopRequireDefault(_wxcCountdown); var _wxcDialog = __webpack_require__(39); var _wxcDialog2 = _interopRequireDefault(_wxcDialog); var _wxcEpSlider = __webpack_require__(45); var _wxcEpSlider2 = _interopRequireDefault(_wxcEpSlider); var _wxcPanItem = __webpack_require__(50); var _wxcPanItem2 = _interopRequireDefault(_wxcPanItem); var _wxcGridSelect = __webpack_require__(54); var _wxcGridSelect2 = _interopRequireDefault(_wxcGridSelect); var _wxcIndexlist = __webpack_require__(63); var _wxcIndexlist2 = _interopRequireDefault(_wxcIndexlist); var _wxcLightbox = __webpack_require__(69); var _wxcLightbox2 = _interopRequireDefault(_wxcLightbox); var _wxcLoading = __webpack_require__(82); var _wxcLoading2 = _interopRequireDefault(_wxcLoading); var _wxcPartLoading = __webpack_require__(87); var _wxcPartLoading2 = _interopRequireDefault(_wxcPartLoading); var _wxcMask = __webpack_require__(5); var _wxcMask2 = _interopRequireDefault(_wxcMask); var _wxcMinibar = __webpack_require__(7); var _wxcMinibar2 = _interopRequireDefault(_wxcMinibar); var _wxcLotteryRain = __webpack_require__(95); var _wxcLotteryRain2 = _interopRequireDefault(_wxcLotteryRain); var _wxcNoticebar = __webpack_require__(107); var _wxcNoticebar2 = _interopRequireDefault(_wxcNoticebar); var _wxcOverlay = __webpack_require__(2); var _wxcOverlay2 = _interopRequireDefault(_wxcOverlay); var _wxcPageCalendar = __webpack_require__(113); var _wxcPageCalendar2 = _interopRequireDefault(_wxcPageCalendar); var _wxcPopup = __webpack_require__(119); var _wxcPopup2 = _interopRequireDefault(_wxcPopup); var _wxcProgress = __webpack_require__(124); var _wxcProgress2 = _interopRequireDefault(_wxcProgress); var _wxcRadio = __webpack_require__(129); var _wxcRadio2 = _interopRequireDefault(_wxcRadio); var _wxcResult = __webpack_require__(139); var _wxcResult2 = _interopRequireDefault(_wxcResult); var _wxcRichText = __webpack_require__(145); var _wxcRichText2 = _interopRequireDefault(_wxcRichText); var _wxcSpecialRichText = __webpack_require__(162); var _wxcSpecialRichText2 = _interopRequireDefault(_wxcSpecialRichText); var _wxcSearchbar = __webpack_require__(167); var _wxcSearchbar2 = _interopRequireDefault(_wxcSearchbar); var _wxcSimpleFlow = __webpack_require__(173); var _wxcSimpleFlow2 = _interopRequireDefault(_wxcSimpleFlow); var _wxcSlideNav = __webpack_require__(178); var _wxcSlideNav2 = _interopRequireDefault(_wxcSlideNav); var _wxcSliderBar = __webpack_require__(183); var _wxcSliderBar2 = _interopRequireDefault(_wxcSliderBar); var _wxcStepper = __webpack_require__(188); var _wxcStepper2 = _interopRequireDefault(_wxcStepper); var _wxcTabPage = __webpack_require__(193); var _wxcTabPage2 = _interopRequireDefault(_wxcTabPage); var _wxcTag = __webpack_require__(198); var _wxcTag2 = _interopRequireDefault(_wxcTag); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.Utils = _utils2.default; exports.WxcButton = _wxcButton2.default; exports.WxcCell = _wxcCell2.default; exports.WxcCheckbox = _wxcCheckbox2.default; exports.WxcCheckboxList = _wxcCheckboxList2.default; exports.WxcCountdown = _wxcCountdown2.default; exports.WxcDialog = _wxcDialog2.default; exports.WxcEpSlider = _wxcEpSlider2.default; exports.WxcPanItem = _wxcPanItem2.default; exports.WxcGridSelect = _wxcGridSelect2.default; exports.WxcIndexlist = _wxcIndexlist2.default; exports.WxcLightbox = _wxcLightbox2.default; exports.WxcLoading = _wxcLoading2.default; exports.WxcPartLoading = _wxcPartLoading2.default; exports.WxcMask = _wxcMask2.default; exports.WxcMinibar = _wxcMinibar2.default; exports.WxcLotteryRain = _wxcLotteryRain2.default; exports.WxcNoticebar = _wxcNoticebar2.default; exports.WxcOverlay = _wxcOverlay2.default; exports.WxcPageCalendar = _wxcPageCalendar2.default; exports.WxcPopup = _wxcPopup2.default; exports.WxcProgress = _wxcProgress2.default; exports.WxcRadio = _wxcRadio2.default; exports.WxcResult = _wxcResult2.default; exports.WxcRichText = _wxcRichText2.default; exports.WxcSpecialRichText = _wxcSpecialRichText2.default; exports.WxcSearchbar = _wxcSearchbar2.default; exports.WxcSimpleFlow = _wxcSimpleFlow2.default; exports.WxcSlideNav = _wxcSlideNav2.default; exports.WxcSliderBar = _wxcSliderBar2.default; exports.WxcStepper = _wxcStepper2.default; exports.WxcTabPage = _wxcTabPage2.default; exports.WxcTag = _wxcTag2.default; /** * CopyRight (C) 2017-2022 Alibaba Group Holding Limited. * Created by Tw93 on 17/09/25 */ /***/ }), /* 11 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; 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 required = __webpack_require__(12), qs = __webpack_require__(13), protocolre = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i, slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//; /** * These are the parse rules for the URL parser, it informs the parser * about: * * 0. The char it Needs to parse, if it's a string it should be done using * indexOf, RegExp using exec and NaN means set as current value. * 1. The property we should set when parsing this value. * 2. Indication if it's backwards or forward parsing, when set as number it's * the value of extra chars that should be split off. * 3. Inherit from location if non existing in the parser. * 4. `toLowerCase` the resulting value. */ var rules = [['#', 'hash'], // Extract from the back. ['?', 'query'], // Extract from the back. ['/', 'pathname'], // Extract from the back. ['@', 'auth', 1], // Extract from the front. [NaN, 'host', undefined, 1, 1], // Set left over value. [/:(\d+)$/, 'port', undefined, 1], // RegExp the back. [NaN, 'hostname', undefined, 1, 1] // Set left over. ]; /** * These properties should not be copied or inherited from. This is only needed * for all non blob URL's as a blob URL does not include a hash, only the * origin. * * @type {Object} * @private */ var ignore = { hash: 1, query: 1 }; /** * The location object differs when your code is loaded through a normal page, * Worker or through a worker using a blob. And with the blobble begins the * trouble as the location object will contain the URL of the blob, not the * location of the page where our code is loaded in. The actual origin is * encoded in the `pathname` so we can thankfully generate a good "default" * location from it so we can generate proper relative URL's again. * * @param {Object|String} loc Optional default location object. * @returns {Object} lolcation object. * @api public */ function lolcation(loc) { loc = loc || {}.location || {}; var finaldestination = {}, type = typeof loc === 'undefined' ? 'undefined' : _typeof(loc), key; if ('blob:' === loc.protocol) { finaldestination = new URL(unescape(loc.pathname), {}); } else if ('string' === type) { finaldestination = new URL(loc, {}); for (key in ignore) { delete finaldestination[key]; } } else if ('object' === type) { for (key in loc) { if (key in ignore) continue; finaldestination[key] = loc[key]; } if (finaldestination.slashes === undefined) { finaldestination.slashes = slashes.test(loc.href); } } return finaldestination; } /** * @typedef ProtocolExtract * @type Object * @property {String} protocol Protocol matched in the URL, in lowercase. * @property {Boolean} slashes `true` if protocol is followed by "//", else `false`. * @property {String} rest Rest of the URL that is not part of the protocol. */ /** * Extract protocol information from a URL with/without double slash ("//"). * * @param {String} address URL we want to extract from. * @return {ProtocolExtract} Extracted information. * @api private */ function extractProtocol(address) { var match = protocolre.exec(address); return { protocol: match[1] ? match[1].toLowerCase() : '', slashes: !!match[2], rest: match[3] }; } /** * Resolve a relative URL pathname against a base URL pathname. * * @param {String} relative Pathname of the relative URL. * @param {String} base Pathname of the base URL. * @return {String} Resolved pathname. * @api private */ function resolve(relative, base) { var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/')), i = path.length, last = path[i - 1], unshift = false, up = 0; while (i--) { if (path[i] === '.') { path.splice(i, 1); } else if (path[i] === '..') { path.splice(i, 1); up++; } else if (up) { if (i === 0) unshift = true; path.splice(i, 1); up--; } } if (unshift) path.unshift(''); if (last === '.' || last === '..') path.push(''); return path.join('/'); } /** * The actual URL instance. Instead of returning an object we've opted-in to * create an actual constructor as it's much more memory efficient and * faster and it pleases my OCD. * * @constructor * @param {String} address URL we want to parse. * @param {Object|String} location Location defaults for relative paths. * @param {Boolean|Function} parser Parser for the query string. * @api public */ function URL(address, location, parser) { if (!(this instanceof URL)) { return new URL(address, location, parser); } var relative, extracted, parse, instruction, index, key, instructions = rules.slice(), type = typeof location === 'undefined' ? 'undefined' : _typeof(location), url = this, i = 0; // // The following if statements allows this module two have compatibility with // 2 different API: // // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments // where the boolean indicates that the query string should also be parsed. // // 2. The `URL` interface of the browser which accepts a URL, object as // arguments. The supplied object will be used as default values / fall-back // for relative paths. // if ('object' !== type && 'string' !== type) { parser = location; location = null; } if (parser && 'function' !== typeof parser) parser = qs.parse; location = lolcation(location); // // Extract protocol information before running the instructions. // extracted = extractProtocol(address || ''); relative = !extracted.protocol && !extracted.slashes; url.slashes = extracted.slashes || relative && location.slashes; url.protocol = extracted.protocol || location.protocol || ''; address = extracted.rest; // // When the authority component is absent the URL starts with a path // component. // if (!extracted.slashes) instructions[2] = [/(.*)/, 'pathname']; for (; i < instructions.length; i++) { instruction = instructions[i]; parse = instruction[0]; key = instruction[1]; if (parse !== parse) { url[key] = address; } else if ('string' === typeof parse) { if (~(index = address.indexOf(parse))) { if ('number' === typeof instruction[2]) { url[key] = address.slice(0, index); address = address.slice(index + instruction[2]); } else { url[key] = address.slice(index); address = address.slice(0, index); } } } else if (index = parse.exec(address)) { url[key] = index[1]; address = address.slice(0, index.index); } url[key] = url[key] || (relative && instruction[3] ? location[key] || '' : ''); // // Hostname, host and protocol should be lowercased so they can be used to // create a proper `origin`. // if (instruction[4]) url[key] = url[key].toLowerCase(); } // // Also parse the supplied query string in to an object. If we're supplied // with a custom parser as function use that instead of the default build-in // parser. // if (parser) url.query = parser(url.query); // // If the URL is relative, resolve the pathname against the base URL. // if (relative && location.slashes && url.pathname.charAt(0) !== '/' && (url.pathname !== '' || location.pathname !== '')) { url.pathname = resolve(url.pathname, location.pathname); } // // We should not add port numbers if they are already the default port number // for a given protocol. As the host also contains the port number we're going // override it with the hostname which contains no port number. // if (!required(url.port, url.protocol)) { url.host = url.hostname; url.port = ''; } // // Parse down the `auth` for the username and password. // url.username = url.password = ''; if (url.auth) { instruction = url.auth.split(':'); url.username = instruction[0] || ''; url.password = instruction[1] || ''; } url.origin = url.protocol && url.host && url.protocol !== 'file:' ? url.protocol + '//' + url.host : 'null'; // // The href is just the compiled result. // url.href = url.toString(); } /** * This is convenience method for changing properties in the URL instance to * insure that they all propagate correctly. * * @param {String} part Property we need to adjust. * @param {Mixed} value The newly assigned value. * @param {Boolean|Function} fn When setting the query, it will be the function * used to parse the query. * When setting the protocol, double slash will be * removed from the final url if it is true. * @returns {URL} * @api public */ function set(part, value, fn) { var url = this; switch (part) { case 'query': if ('string' === typeof value && value.length) { value = (fn || qs.parse)(value); } url[part] = value; break; case 'port': url[part] = value; if (!required(value, url.protocol)) { url.host = url.hostname; url[part] = ''; } else if (value) { url.host = url.hostname + ':' + value; } break; case 'hostname': url[part] = value; if (url.port) value += ':' + url.port; url.host = value; break; case 'host': url[part] = value; if (/:\d+$/.test(value)) { value = value.split(':'); url.port = value.pop(); url.hostname = value.join(':'); } else { url.hostname = value; url.port = ''; } break; case 'protocol': url.protocol = value.toLowerCase(); url.slashes = !fn; break; case 'pathname': url.pathname = value.length && value.charAt(0) !== '/' ? '/' + value : value; break; default: url[part] = value; } for (var i = 0; i < rules.length; i++) { var ins = rules[i]; if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase(); } url.origin = url.protocol && url.host && url.protocol !== 'file:' ? url.protocol + '//' + url.host : 'null'; url.href = url.toString(); return url; } /** * Transform the properties back in to a valid and full URL string. * * @param {Function} stringify Optional query stringify function. * @returns {String} * @api public */ function toString(stringify) { if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify; var query, url = this, protocol = url.protocol; if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':'; var result = protocol + (url.slashes ? '//' : ''); if (url.username) { result += url.username; if (url.password) result += ':' + url.password; result += '@'; } result += url.host + url.pathname; query = 'object' === _typeof(url.query) ? stringify(url.query) : url.query; if (query) result += '?' !== query.charAt(0) ? '?' + query : query; if (url.hash) result += url.hash; return result; } URL.prototype = { set: set, toString: toString }; // // Expose the URL parser and some additional properties that might be useful for // others or testing. // URL.extractProtocol = extractProtocol; URL.location = lolcation; URL.qs = qs; module.exports = URL; /***/ }), /* 12 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Check if we're required to add a port number. * * @see https://url.spec.whatwg.org/#default-port * @param {Number|String} port Port number we need to check * @param {String} protocol Protocol we need to check against. * @returns {Boolean} Is it a default port for the given protocol * @api private */ module.exports = function required(port, protocol) { protocol = protocol.split(':')[0]; port = +port; if (!port) return false; switch (protocol) { case 'http': case 'ws': return port !== 80; case 'https': case 'wss': return port !== 443; case 'ftp': return port !== 21; case 'gopher': return port !== 70; case 'file': return false; } return port !== 0; }; /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var has = Object.prototype.hasOwnProperty; /** * Decode a URI encoded string. * * @param {String} input The URI encoded string. * @returns {String} The decoded string. * @api private */ function decode(input) { return decodeURIComponent(input.replace(/\+/g, ' ')); } /** * Simple query string parser. * * @param {String} query The query string that needs to be parsed. * @returns {Object} * @api public */ function querystring(query) { var parser = /([^=?&]+)=?([^&]*)/g, result = {}, part; // // Little nifty parsing hack, leverage the fact that RegExp.exec increments // the lastIndex property so we can continue executing this loop until we've // parsed all results. // for (; part = parser.exec(query); result[decode(part[1])] = decode(part[2])) {} return result; } /** * Transform a query string to an object. * * @param {Object} obj Object that should be transformed. * @param {String} prefix Optional prefix. * @returns {String} * @api public */ function querystringify(obj, prefix) { prefix = prefix || ''; var pairs = []; // // Optionally prefix with a '?' if needed // if ('string' !== typeof prefix) prefix = '?'; for (var key in obj) { if (has.call(obj, key)) { pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(obj[key])); } } return pairs.length ? prefix + pairs.join('&') : ''; } // // Expose the module. // exports.stringify = querystringify; exports.parse = querystring; /***/ }), /* 14 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _index = __webpack_require__(15); Object.defineProperty(exports, 'default', { enumerable: true, get: function get() { return _interopRequireDefault(_index).default; } }); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { var __vue_exports__, __vue_options__ var __vue_styles__ = [] /* styles */ __vue_styles__.push(__webpack_require__(16) ) /* script */ __vue_exports__ = __webpack_require__(17) /* template */ var __vue_template__ = __webpack_require__(19) __vue_options__ = __vue_exports__ = __vue_exports__ || {} if ( typeof __vue_exports__.default === "object" || typeof __vue_exports__.default === "function" ) { if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} __vue_options__ = __vue_exports__ = __vue_exports__.default } if (typeof __vue_options__ === "function") { __vue_options__ = __vue_options__.options } __vue_options__.__file = "/Users/Tw93/www/github/weex-ui/packages/wxc-button/index.vue" __vue_options__.render = __vue_template__.render __vue_options__.staticRenderFns = __vue_template__.staticRenderFns __vue_options__._scopeId = "data-v-e0facbae" __vue_options__.style = __vue_options__.style || {} __vue_styles__.forEach(function (module) { for (var name in module) { __vue_options__.style[name] = module[name] } }) if (typeof __register_static_styles__ === "function") { __register_static_styles__(__vue_options__._scopeId, __vue_styles__) } module.exports = __vue_exports__ /***/ }), /* 16 */ /***/ (function(module, exports) { module.exports = { "wxc-btn": { "width": 702, "height": 88, "alignItems": "center", "justifyContent": "center", "borderRadius": 12 }, "btn-text": { "textOverflow": "ellipsis", "lines": 1, "fontSize": 36, "color": "#FFFFFF" } } /***/ }), /* 17 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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; }; // // // // // // // // // // // var _type = __webpack_require__(18); exports.default = { props: { text: { type: String, default: '确认' }, type: { type: String, default: 'taobao' }, disabled: { type: Boolean, default: false }, btnStyle: Object, textStyle: Object }, computed: { mrBtnStyle: function mrBtnStyle() { var type = this.type, disabled = this.disabled, btnStyle = this.btnStyle; var mrBtnStyle = _extends({}, _type.STYLE_MAP[type], btnStyle); return disabled ? _extends({}, mrBtnStyle, { backgroundColor: 'rgba(0, 0, 0, 0.1)', borderWidth: 0 }) : mrBtnStyle; }, mrTextStyle: function mrTextStyle() { var type = this.type, disabled = this.disabled, textStyle = this.textStyle; var mrTextStyle = _extends({}, _type.TEXT_STYLE_MAP[type], textStyle); return disabled ? _extends({}, mrTextStyle, { color: '#FFFFFF' }) : mrTextStyle; } }, methods: { onClicked: function onClicked(e) { var type = this.type, disabled = this.disabled; this.$emit('wxcButtonClicked', { e: e, type: type, disabled: disabled }); } } }; /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var STYLE_MAP = exports.STYLE_MAP = { taobao: { backgroundColor: '#FF5000' }, fliggy: { backgroundColor: '#FFC900' }, normal: { backgroundColor: '#FFFFFF', borderColor: '#A5A5A5', borderWidth: '1px' }, highlight: { backgroundColor: '#FFFFFF', borderColor: '#EE9900', borderWidth: '1px' } }; var TEXT_STYLE_MAP = exports.TEXT_STYLE_MAP = { taobao: { color: '#FFFFFF' }, fliggy: { color: '#3D3D3D' }, normal: { color: '#3D3D3D' }, highlight: { color: '#EE9900' } }; /***/ }), /* 19 */ /***/ (function(module, exports) { module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; return _c('div', { staticClass: ["wxc-btn"], style: _vm.mrBtnStyle, on: { "click": _vm.onClicked } }, [_c('text', { staticClass: ["btn-text"], style: _vm.mrTextStyle }, [_vm._v(_vm._s(_vm.text))])]) },staticRenderFns: []} module.exports.render._withStripped = true /***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) { var __vue_exports__, __vue_options__ var __vue_styles__ = [] /* styles */ __vue_styles__.push(__webpack_require__(21) ) /* script */ __vue_exports__ = __webpack_require__(22) /* template */ var __vue_template__ = __webpack_require__(23) __vue_options__ = __vue_exports__ = __vue_exports__ || {} if ( typeof __vue_exports__.default === "object" || typeof __vue_exports__.default === "function" ) { if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} __vue_options__ = __vue_exports__ = __vue_exports__.default } if (typeof __vue_options__ === "function") { __vue_options__ = __vue_options__.options } __vue_options__.__file = "/Users/Tw93/www/github/weex-ui/packages/wxc-cell/index.vue" __vue_options__.render = __vue_template__.render __vue_options__.staticRenderFns = __vue_template__.staticRenderFns __vue_options__._scopeId = "data-v-6eea314e" __vue_options__.style = __vue_options__.style || {} __vue_styles__.forEach(function (module) { for (var name in module) { __vue_options__.style[name] = module[name] } }) if (typeof __register_static_styles__ === "function") { __register_static_styles__(__vue_options__._scopeId, __vue_styles__) } module.exports = __vue_exports__ /***/ }), /* 21 */ /***/ (function(module, exports) { module.exports = { "wxc-cell": { "height": 100, "position": "relative", "flexDirection": "row", "alignItems": "center", "paddingLeft": 24, "paddingRight": 24, "backgroundColor": "#ffffff" }, "cell-margin": { "marginBottom": 24 }, "cell-title": { "flex": 1 }, "cell-indent": { "paddingBottom": 30, "paddingTop": 30 }, "has-desc": { "paddingBottom": 18, "paddingTop": 18 }, "cell-top-border": { "borderTopColor": "#e2e2e2", "borderTopWidth": 1 }, "cell-bottom-border": { "borderBottomColor": "#e2e2e2", "borderBottomWidth": 1 }, "cell-label-text": { "fontSize": 30, "color": "#666666", "width": 188, "marginRight": 10 }, "cell-arrow-icon": { "width": 22, "height": 22, "position": "absolute", "top": 41, "right": 24 }, "cell-content": { "color": "#333333", "fontSize": 30, "lineHeight": 40 }, "cell-desc-text": { "color": "#999999", "fontSize": 24, "lineHeight": 30, "marginTop": 4 } } /***/ }), /* 22 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __webpack_require__(0); var _utils2 = _interopRequireDefault(_utils); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = { props: { label: { type: String, default: '' }, title: { type: String, default: '' }, desc: { type: String, default: '' }, link: { type: String, default: '' }, hasTopBorder: { type: Boolean, default: false }, hasMargin: { type: Boolean, default: false }, hasBottomBorder: { type: Boolean, default: true }, hasArrow: { type: Boolean, default: false }, arrowIcon: { type: String, default: '//gw.alicdn.com/tfs/TB11zBUpwMPMeJjy1XbXXcwxVXa-22-22.png' }, hasVerticalIndent: { type: Boolean, default: true }, cellStyle: { type: Object, default: function _default() { return {}; } } }, methods: { cellClicked: function cellClicked(e) { var link = this.link; this.$emit('wxcCellClicked', { e: e }); link && _utils2.default.goToH5Page(link, true); } } }; // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /***/ }), /* 23 */ /***/ (function(module, exports) { module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; return _c('div', { class: ['wxc-cell', _vm.hasTopBorder && 'cell-top-border', _vm.hasBottomBorder && 'cell-bottom-border', _vm.hasMargin && 'cell-margin', _vm.hasVerticalIndent && 'cell-indent', _vm.desc && 'has-desc'], style: _vm.cellStyle, attrs: { "link": _vm.link }, on: { "click": _vm.cellClicked } }, [_vm._t("label", [(_vm.label) ? _c('div', [_c('text', { staticClass: ["cell-label-text"] }, [_vm._v(_vm._s(_vm.label))])]) : _vm._e()]), _c('div', { staticClass: ["cell-title"] }, [_vm._t("title", [_c('text', { staticClass: ["cell-content"] }, [_vm._v(_vm._s(_vm.title))]), (_vm.desc) ? _c('text', { staticClass: ["cell-desc-text"] }, [_vm._v(_vm._s(_vm.desc))]) : _vm._e()])], 2), _vm._t("value"), _vm._t("default"), (_vm.hasArrow) ? _c('image', { staticClass: ["cell-arrow-icon"], attrs: { "src": _vm.arrowIcon } }) : _vm._e()], 2) },staticRenderFns: []} module.exports.render._withStripped = true /***/ }), /* 24 */ /***/ (function(module, exports, __webpack_requir