[build] use babel to compile typescript (#657)

This commit is contained in:
neverland 2018-09-27 17:34:19 +08:00 committed by GitHub
parent 27ed2e5657
commit 4714333cd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
55 changed files with 2290 additions and 2235 deletions

View File

@ -4,11 +4,10 @@ module.exports = {
'@babel/preset-env', '@babel/preset-env',
{ {
loose: true, loose: true,
modules: 'commonjs' modules: false
} }
]
], ],
plugins: [ '@babel/preset-typescript'
'@babel/plugin-syntax-dynamic-import' ],
] plugins: ['@babel/plugin-syntax-dynamic-import']
}; };

View File

@ -1,6 +1,6 @@
const gulp = require('gulp'); const gulp = require('gulp');
const path = require('path'); const path = require('path');
const ts = require('gulp-typescript'); const babel = require('gulp-babel');
const postcss = require('gulp-postcss'); const postcss = require('gulp-postcss');
const cssmin = require('gulp-clean-css'); const cssmin = require('gulp-clean-css');
const rename = require('gulp-rename'); const rename = require('gulp-rename');
@ -9,7 +9,6 @@ const isProduction = process.env.NODE_ENV === 'production';
const src = path.join(__dirname, '../packages'); const src = path.join(__dirname, '../packages');
const dist = path.join(__dirname, isProduction ? '../dist' : '../example/dist'); const dist = path.join(__dirname, isProduction ? '../dist' : '../example/dist');
const ext = ['js', 'ts', 'pcss', 'json', 'wxml']; const ext = ['js', 'ts', 'pcss', 'json', 'wxml'];
const tsProject = ts.createProject('tsconfig.json');
function copy(ext) { function copy(ext) {
return gulp.src([src + '/**/*.' + ext]).pipe(gulp.dest(dist)); return gulp.src([src + '/**/*.' + ext]).pipe(gulp.dest(dist));
@ -32,7 +31,7 @@ gulp.task('compile-js', () => copy('js'));
gulp.task('compile-ts', () => gulp.task('compile-ts', () =>
gulp gulp
.src([src + '/**/*.ts']) .src([src + '/**/*.ts'])
.pipe(tsProject()) .pipe(babel())
.on('error', (err) => { .on('error', (err) => {
console.log(err); console.log(err);
}) })

View File

@ -22,17 +22,18 @@ VantComponent({
} }
}, },
methods: { methods: {
onSelect(event) { onSelect: function onSelect(event) {
const { index } = event.currentTarget.dataset; var index = event.currentTarget.dataset.index;
const item = this.data.actions[index]; var item = this.data.actions[index];
if (item && !item.disabled && !item.loading) { if (item && !item.disabled && !item.loading) {
this.$emit('select', item); this.$emit('select', item);
} }
}, },
onCancel() { onCancel: function onCancel() {
this.$emit('cancel'); this.$emit('cancel');
}, },
onClose() { onClose: function onClose() {
this.$emit('close'); this.$emit('close');
} }
} }

102
dist/area/index.js vendored
View File

@ -26,103 +26,127 @@ VantComponent({
columns: [] columns: []
}, },
computed: { computed: {
displayColumns() { displayColumns: function displayColumns() {
const { columns = [], columnsNum } = this.data; var _this$data = this.data,
_this$data$columns = _this$data.columns,
columns = _this$data$columns === void 0 ? [] : _this$data$columns,
columnsNum = _this$data.columnsNum;
return columns.slice(0, +columnsNum); return columns.slice(0, +columnsNum);
} }
}, },
watch: { watch: {
value(value) { value: function value(_value) {
this.code = value; this.code = _value;
this.setValues(); this.setValues();
}, },
areaList: 'setValues' areaList: 'setValues'
}, },
methods: { methods: {
onCancel() { onCancel: function onCancel() {
this.$emit('cancel', { this.$emit('cancel', {
values: this.getValues(), values: this.getValues(),
indexs: this.getIndexs() indexs: this.getIndexs()
}); });
}, },
onConfirm() { onConfirm: function onConfirm() {
this.$emit('confirm', { this.$emit('confirm', {
values: this.getValues(), values: this.getValues(),
indexs: this.getIndexs() indexs: this.getIndexs()
}); });
}, },
onChange(event) { onChange: function onChange(event) {
const { value } = event.detail; var value = event.detail.value;
const { pickerValue, displayColumns } = this.data; var _this$data2 = this.data,
const index = pickerValue.findIndex((item, index) => item !== value[index]); pickerValue = _this$data2.pickerValue,
// 没有变更 或 选中项序号小于0 不处理 displayColumns = _this$data2.displayColumns;
var index = pickerValue.findIndex(function (item, index) {
return item !== value[index];
}); // 没有变更 或 选中项序号小于0 不处理
if (index < 0 || value[index] < 0) { if (index < 0 || value[index] < 0) {
return; return;
} }
const values = displayColumns[index];
var values = displayColumns[index];
this.code = values[value[index]].code; this.code = values[value[index]].code;
this.setValues(); this.setValues();
this.$emit('change', { this.$emit('change', {
picker: this, picker: this,
values: this.getValues(), values: this.getValues(),
index index: index
}); });
}, },
getList(type, code) { getList: function getList(type, code) {
let result = []; var result = [];
if (type !== 'province' && !code) { if (type !== 'province' && !code) {
return result; return result;
} }
const list = this.data.areaList[`${type}_list`] || {};
result = Object.keys(list).map(code => ({ var list = this.data.areaList[type + "_list"] || {};
code, result = Object.keys(list).map(function (code) {
return {
code: code,
name: list[code] name: list[code]
})); };
});
if (code) { if (code) {
result = result.filter(item => item.code.indexOf(code) === 0); result = result.filter(function (item) {
return item.code.indexOf(code) === 0;
});
} }
return result; return result;
}, },
getIndex(type, code) { getIndex: function getIndex(type, code) {
const compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6; var compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6;
const list = this.getList(type, code.slice(0, compareNum - 2)); var list = this.getList(type, code.slice(0, compareNum - 2));
code = code.slice(0, compareNum); code = code.slice(0, compareNum);
for (let i = 0; i < list.length; i++) {
for (var i = 0; i < list.length; i++) {
if (list[i].code.slice(0, compareNum) === code) { if (list[i].code.slice(0, compareNum) === code) {
return i; return i;
} }
} }
return 0; return 0;
}, },
setValues() { setValues: function setValues() {
let code = this.code || Object.keys(this.data.areaList.county_list)[0] || ''; var code = this.code || Object.keys(this.data.areaList.county_list)[0] || '';
const province = this.getList('province'); var province = this.getList('province');
const city = this.getList('city', code.slice(0, 2)); var city = this.getList('city', code.slice(0, 2));
this.setData({ this.setData({
'columns[0]': province, 'columns[0]': province,
'columns[1]': city 'columns[1]': city
}); });
if (city.length && code.slice(2, 4) === '00') { if (city.length && code.slice(2, 4) === '00') {
code = city[0].code; code = city[0].code;
} }
this.setData({ this.setData({
'columns[2]': this.getList('county', code.slice(0, 4)), 'columns[2]': this.getList('county', code.slice(0, 4)),
pickerValue: [ pickerValue: [this.getIndex('province', code), this.getIndex('city', code), this.getIndex('county', code)]
this.getIndex('province', code),
this.getIndex('city', code),
this.getIndex('county', code)
]
}); });
}, },
getValues() { getValues: function getValues() {
const { displayColumns = [], pickerValue = [] } = this.data; var _this$data3 = this.data,
return displayColumns.map((option, index) => option[pickerValue[index]]); _this$data3$displayCo = _this$data3.displayColumns,
displayColumns = _this$data3$displayCo === void 0 ? [] : _this$data3$displayCo,
_this$data3$pickerVal = _this$data3.pickerValue,
pickerValue = _this$data3$pickerVal === void 0 ? [] : _this$data3$pickerVal;
return displayColumns.map(function (option, index) {
return option[pickerValue[index]];
});
}, },
getIndexs() { getIndexs: function getIndexs() {
const { pickerValue, columnsNum } = this.data; var _this$data4 = this.data,
pickerValue = _this$data4.pickerValue,
columnsNum = _this$data4.columnsNum;
return pickerValue.slice(0, columnsNum); return pickerValue.slice(0, columnsNum);
}, },
reset() { reset: function reset() {
this.code = ''; this.code = '';
this.setValues(); this.setValues();
} }

View File

@ -3,12 +3,14 @@ VantComponent({
relation: { relation: {
name: 'badge', name: 'badge',
type: 'descendant', type: 'descendant',
linked(target) { linked: function linked(target) {
this.badges.push(target); this.badges.push(target);
this.setActive(); this.setActive();
}, },
unlinked(target) { unlinked: function unlinked(target) {
this.badges = this.badges.filter(item => item !== target); this.badges = this.badges.filter(function (item) {
return item !== target;
});
this.setActive(); this.setActive();
} }
}, },
@ -21,24 +23,28 @@ VantComponent({
watch: { watch: {
active: 'setActive' active: 'setActive'
}, },
beforeCreate() { beforeCreate: function beforeCreate() {
this.badges = []; this.badges = [];
this.currentActive = -1; this.currentActive = -1;
}, },
methods: { methods: {
setActive(badge) { setActive: function setActive(badge) {
let { active } = this.data; var active = this.data.active;
const { badges } = this; var badges = this.badges;
if (badge) { if (badge) {
active = badges.indexOf(badge); active = badges.indexOf(badge);
} }
if (active === this.currentActive) { if (active === this.currentActive) {
return; return;
} }
if (this.currentActive !== -1 && badges[this.currentActive]) { if (this.currentActive !== -1 && badges[this.currentActive]) {
this.$emit('change', active); this.$emit('change', active);
badges[this.currentActive].setActive(false); badges[this.currentActive].setActive(false);
} }
if (badges[active]) { if (badges[active]) {
badges[active].setActive(true); badges[active].setActive(true);
this.currentActive = active; this.currentActive = active;

11
dist/badge/index.js vendored
View File

@ -9,14 +9,17 @@ VantComponent({
title: String title: String
}, },
methods: { methods: {
onClick() { onClick: function onClick() {
const group = this.getRelationNodes('../badge-group/index')[0]; var group = this.getRelationNodes('../badge-group/index')[0];
if (group) { if (group) {
group.setActive(this); group.setActive(this);
} }
}, },
setActive(active) { setActive: function setActive(active) {
this.setData({ active }); this.setData({
active: active
});
} }
} }
}); });

15
dist/button/index.js vendored
View File

@ -19,9 +19,16 @@ VantComponent({
} }
}, },
computed: { computed: {
classes() { classes: function classes() {
const { type, size, plain, disabled, loading, square, block } = this.data; var _this$data = this.data,
return this.classNames(`van-button--${type}`, `van-button--${size}`, { type = _this$data.type,
size = _this$data.size,
plain = _this$data.plain,
disabled = _this$data.disabled,
loading = _this$data.loading,
square = _this$data.square,
block = _this$data.block;
return this.classNames("van-button--" + type, "van-button--" + size, {
'van-button--block': block, 'van-button--block': block,
'van-button--plain': plain, 'van-button--plain': plain,
'van-button--square': square, 'van-button--square': square,
@ -32,7 +39,7 @@ VantComponent({
} }
}, },
methods: { methods: {
onClick() { onClick: function onClick() {
if (!this.data.disabled && !this.data.loading) { if (!this.data.disabled && !this.data.loading) {
this.$emit('click'); this.$emit('click');
} }

8
dist/card/index.js vendored
View File

@ -1,12 +1,6 @@
import { VantComponent } from '../common/component'; import { VantComponent } from '../common/component';
VantComponent({ VantComponent({
classes: [ classes: ['thumb-class', 'title-class', 'price-class', 'desc-class', 'num-class'],
'thumb-class',
'title-class',
'price-class',
'desc-class',
'num-class'
],
props: { props: {
num: String, num: String,
desc: String, desc: String,

26
dist/cell/index.js vendored
View File

@ -1,10 +1,6 @@
import { VantComponent } from '../common/component'; import { VantComponent } from '../common/component';
VantComponent({ VantComponent({
classes: [ classes: ['title-class', 'label-class', 'value-class'],
'title-class',
'label-class',
'value-class'
],
props: { props: {
title: null, title: null,
value: null, value: null,
@ -27,8 +23,8 @@ VantComponent({
} }
}, },
computed: { computed: {
cellClass() { cellClass: function cellClass() {
const { data } = this; var data = this.data;
return this.classNames('custom-class', 'van-cell', { return this.classNames('custom-class', 'van-cell', {
'van-hairline': data.border, 'van-hairline': data.border,
'van-cell--center': data.center, 'van-cell--center': data.center,
@ -36,17 +32,21 @@ VantComponent({
'van-cell--clickable': data.isLink || data.clickable 'van-cell--clickable': data.isLink || data.clickable
}); });
}, },
titleStyle() { titleStyle: function titleStyle() {
const { titleWidth } = this.data; var titleWidth = this.data.titleWidth;
return titleWidth ? `max-width: ${titleWidth};min-width: ${titleWidth}` : ''; return titleWidth ? "max-width: " + titleWidth + ";min-width: " + titleWidth : '';
} }
}, },
methods: { methods: {
onClick() { onClick: function onClick() {
const { url } = this.data; var url = this.data.url;
if (url) { if (url) {
wx[this.data.linkType]({ url }); wx[this.data.linkType]({
url: url
});
} }
this.$emit('click'); this.$emit('click');
} }
} }

24
dist/col/index.js vendored
View File

@ -12,20 +12,24 @@ VantComponent({
style: '' style: ''
}, },
computed: { computed: {
classes() { classes: function classes() {
const { span, offset } = this.data; var _this$classNames;
return this.classNames('custom-class', 'van-col', {
[`van-col--${span}`]: span, var _this$data = this.data,
[`van-col--offset-${offset}`]: offset span = _this$data.span,
}); offset = _this$data.offset;
return this.classNames('custom-class', 'van-col', (_this$classNames = {}, _this$classNames["van-col--" + span] = span, _this$classNames["van-col--offset-" + offset] = offset, _this$classNames));
} }
}, },
methods: { methods: {
setGutter(gutter) { setGutter: function setGutter(gutter) {
const padding = `${gutter / 2}px`; var padding = gutter / 2 + "px";
const style = gutter ? `padding-left: ${padding}; padding-right: ${padding};` : ''; var style = gutter ? "padding-left: " + padding + "; padding-right: " + padding + ";" : '';
if (style !== this.data.style) { if (style !== this.data.style) {
this.setData({ style }); this.setData({
style: style
});
} }
} }
} }

View File

@ -1,28 +1,29 @@
const hasOwn = {}.hasOwnProperty; var hasOwn = {}.hasOwnProperty;
export function classNames() { export function classNames() {
const classes = []; var classes = [];
for (let i = 0; i < arguments.length; i++) {
const arg = arguments[i]; for (var i = 0; i < arguments.length; i++) {
if (!arg) var arg = arguments[i];
continue; if (!arg) continue;
const argType = typeof arg; var argType = typeof arg;
if (argType === 'string' || argType === 'number') { if (argType === 'string' || argType === 'number') {
classes.push(arg); classes.push(arg);
} } else if (Array.isArray(arg) && arg.length) {
else if (Array.isArray(arg) && arg.length) { var inner = classNames.apply(null, arg);
const inner = classNames.apply(null, arg);
if (inner) { if (inner) {
classes.push(inner); classes.push(inner);
} }
} } else if (argType === 'object') {
else if (argType === 'object') { for (var key in arg) {
for (const key in arg) {
if (hasOwn.call(arg, key) && arg[key]) { if (hasOwn.call(arg, key) && arg[key]) {
classes.push(key); classes.push(key);
} }
} }
} }
} }
return classes.join(' '); return classes.join(' ');
} }
; ;

View File

@ -1,14 +1,16 @@
import { basic } from '../mixins/basic'; import { basic } from '../mixins/basic';
import { observe } from '../mixins/observer/index'; import { observe } from '../mixins/observer/index';
function mapKeys(source, target, map) { function mapKeys(source, target, map) {
Object.keys(map).forEach(key => { Object.keys(map).forEach(function (key) {
if (source[key]) { if (source[key]) {
target[map[key]] = source[key]; target[map[key]] = source[key];
} }
}); });
} }
function VantComponent(vantOptions) { function VantComponent(vantOptions) {
const options = {}; var options = {};
mapKeys(vantOptions, options, { mapKeys(vantOptions, options, {
data: 'data', data: 'data',
props: 'properties', props: 'properties',
@ -21,23 +23,26 @@ function VantComponent(vantOptions) {
destroyed: 'detached', destroyed: 'detached',
classes: 'externalClasses' classes: 'externalClasses'
}); });
const { relation } = vantOptions; var relation = vantOptions.relation;
if (relation) { if (relation) {
options.relations = Object.assign(options.relations || {}, { var _Object$assign;
[`../${relation.name}/index`]: relation
}); options.relations = Object.assign(options.relations || {}, (_Object$assign = {}, _Object$assign["../" + relation.name + "/index"] = relation, _Object$assign));
} } // add default externalClasses
// add default externalClasses
options.externalClasses = options.externalClasses || []; options.externalClasses = options.externalClasses || [];
options.externalClasses.push('custom-class'); options.externalClasses.push('custom-class'); // add default behaviors
// add default behaviors
options.behaviors = options.behaviors || []; options.behaviors = options.behaviors || [];
options.behaviors.push(basic); options.behaviors.push(basic); // map field to form-field behavior
// map field to form-field behavior
if (vantOptions.field) { if (vantOptions.field) {
options.behaviors.push('wx://form-field'); options.behaviors.push('wx://form-field');
} } // add default options
// add default options
options.options = { options.options = {
multipleSlots: true, multipleSlots: true,
addGlobalClass: true addGlobalClass: true
@ -45,4 +50,5 @@ function VantComponent(vantOptions) {
observe(vantOptions, options); observe(vantOptions, options);
Component(options); Component(options);
} }
export { VantComponent }; export { VantComponent };

48
dist/dialog/dialog.js vendored
View File

@ -1,16 +1,24 @@
let queue = []; function _extends() { _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; }; return _extends.apply(this, arguments); }
const Dialog = options => {
return new Promise((resolve, reject) => { var queue = [];
const pages = getCurrentPages();
const ctx = pages[pages.length - 1]; var Dialog = function Dialog(options) {
const dialog = ctx.selectComponent(options.selector); return new Promise(function (resolve, reject) {
var pages = getCurrentPages();
var ctx = pages[pages.length - 1];
var dialog = ctx.selectComponent(options.selector);
delete options.selector; delete options.selector;
if (dialog) { if (dialog) {
dialog.setData(Object.assign({ onCancel: reject, onConfirm: resolve }, options)); dialog.setData(_extends({
onCancel: reject,
onConfirm: resolve
}, options));
queue.push(dialog); queue.push(dialog);
} }
}); });
}; };
Dialog.defaultOptions = { Dialog.defaultOptions = {
show: true, show: true,
title: '', title: '',
@ -26,19 +34,31 @@ Dialog.defaultOptions = {
closeOnClickOverlay: false, closeOnClickOverlay: false,
confirmButtonOpenType: '' confirmButtonOpenType: ''
}; };
Dialog.alert = options => Dialog(Object.assign({}, Dialog.currentOptions, options));
Dialog.confirm = options => Dialog(Object.assign({}, Dialog.currentOptions, { showCancelButton: true }, options)); Dialog.alert = function (options) {
Dialog.close = () => { return Dialog(_extends({}, Dialog.currentOptions, options));
queue.forEach(dialog => { };
Dialog.confirm = function (options) {
return Dialog(_extends({}, Dialog.currentOptions, {
showCancelButton: true
}, options));
};
Dialog.close = function () {
queue.forEach(function (dialog) {
dialog.close(); dialog.close();
}); });
queue = []; queue = [];
}; };
Dialog.setDefaultOptions = options => {
Dialog.setDefaultOptions = function (options) {
Object.assign(Dialog.currentOptions, options); Object.assign(Dialog.currentOptions, options);
}; };
Dialog.resetDefaultOptions = () => {
Dialog.currentOptions = Object.assign({}, Dialog.defaultOptions); Dialog.resetDefaultOptions = function () {
Dialog.currentOptions = _extends({}, Dialog.defaultOptions);
}; };
Dialog.resetDefaultOptions(); Dialog.resetDefaultOptions();
export default Dialog; export default Dialog;

27
dist/dialog/index.js vendored
View File

@ -42,8 +42,8 @@ VantComponent({
} }
}, },
watch: { watch: {
show(show) { show: function show(_show) {
if (!show) { if (!_show) {
this.setData({ this.setData({
loading: { loading: {
confirm: false, confirm: false,
@ -54,35 +54,38 @@ VantComponent({
} }
}, },
methods: { methods: {
onConfirm() { onConfirm: function onConfirm() {
this.handleAction('confirm'); this.handleAction('confirm');
}, },
onCancel() { onCancel: function onCancel() {
this.handleAction('cancel'); this.handleAction('cancel');
}, },
onClickOverlay() { onClickOverlay: function onClickOverlay() {
this.onClose('overlay'); this.onClose('overlay');
}, },
handleAction(action) { handleAction: function handleAction(action) {
if (this.data.asyncClose) { if (this.data.asyncClose) {
this.setData({ var _this$setData;
[`loading.${action}`]: true
}); this.setData((_this$setData = {}, _this$setData["loading." + action] = true, _this$setData));
} }
this.onClose(action); this.onClose(action);
}, },
close() { close: function close() {
this.setData({ this.setData({
show: false show: false
}); });
}, },
onClose(action) { onClose: function onClose(action) {
if (!this.data.asyncClose) { if (!this.data.asyncClose) {
this.close(); this.close();
} }
this.$emit('close', action); this.$emit('close', action);
this.$emit(action); this.$emit(action);
const callback = this.data[action === 'confirm' ? 'onConfirm' : 'onCancel']; var callback = this.data[action === 'confirm' ? 'onConfirm' : 'onCancel'];
if (callback) { if (callback) {
callback(this); callback(this);
} }

38
dist/field/index.js vendored
View File

@ -50,51 +50,55 @@ VantComponent({
showClear: false showClear: false
}, },
computed: { computed: {
inputClass() { inputClass: function inputClass() {
const { data } = this; var _this$classNames;
return this.classNames('input-class', 'van-field__input', {
var data = this.data;
return this.classNames('input-class', 'van-field__input', (_this$classNames = {
'van-field--error': data.error, 'van-field--error': data.error,
'van-field__textarea': data.type === 'textarea', 'van-field__textarea': data.type === 'textarea',
'van-field__input--disabled': data.disabled, 'van-field__input--disabled': data.disabled
[`van-field--${data.inputAlign}`]: data.inputAlign }, _this$classNames["van-field--" + data.inputAlign] = data.inputAlign, _this$classNames));
});
} }
}, },
beforeCreate() { beforeCreate: function beforeCreate() {
this.focused = false; this.focused = false;
}, },
methods: { methods: {
onInput(event) { onInput: function onInput(event) {
const { value = '' } = event.detail || {}; var _ref = event.detail || {},
_ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value;
this.$emit('input', value); this.$emit('input', value);
this.$emit('change', value); this.$emit('change', value);
this.setData({ this.setData({
value, value: value,
showClear: this.getShowClear(value) showClear: this.getShowClear(value)
}); });
}, },
onFocus() { onFocus: function onFocus() {
this.$emit('focus'); this.$emit('focus');
this.focused = true; this.focused = true;
this.setData({ this.setData({
showClear: this.getShowClear() showClear: this.getShowClear()
}); });
}, },
onBlur() { onBlur: function onBlur() {
this.focused = false; this.focused = false;
this.$emit('blur'); this.$emit('blur');
this.setData({ this.setData({
showClear: this.getShowClear() showClear: this.getShowClear()
}); });
}, },
onClickIcon() { onClickIcon: function onClickIcon() {
this.$emit('click-icon'); this.$emit('click-icon');
}, },
getShowClear(value) { getShowClear: function getShowClear(value) {
value = value === undefined ? this.data.value : value; value = value === undefined ? this.data.value : value;
return (this.data.clearable && this.focused && value && !this.data.readonly); return this.data.clearable && this.focused && value && !this.data.readonly;
}, },
onClear() { onClear: function onClear() {
this.setData({ this.setData({
value: '', value: '',
showClear: this.getShowClear('') showClear: this.getShowClear('')
@ -102,7 +106,7 @@ VantComponent({
this.$emit('input', ''); this.$emit('input', '');
this.$emit('change', ''); this.$emit('change', '');
}, },
onConfirm() { onConfirm: function onConfirm() {
this.$emit('confirm', this.data.value); this.$emit('confirm', this.data.value);
} }
} }

2
dist/icon/index.js vendored
View File

@ -11,7 +11,7 @@ VantComponent({
} }
}, },
methods: { methods: {
onClick() { onClick: function onClick() {
this.$emit('click'); this.$emit('click');
} }
} }

20
dist/mixins/basic.js vendored
View File

@ -1,23 +1,23 @@
import { classNames } from '../common/class-names'; import { classNames } from '../common/class-names';
export const basic = Behavior({ export var basic = Behavior({
methods: { methods: {
classNames, classNames: classNames,
$emit() { $emit: function $emit() {
this.triggerEvent.apply(this, arguments); this.triggerEvent.apply(this, arguments);
}, },
getRect(selector, all) { getRect: function getRect(selector, all) {
return new Promise(resolve => { var _this = this;
wx.createSelectorQuery()
.in(this)[all ? 'selectAll' : 'select'](selector) return new Promise(function (resolve) {
.boundingClientRect(rect => { wx.createSelectorQuery().in(_this)[all ? 'selectAll' : 'select'](selector).boundingClientRect(function (rect) {
if (all && Array.isArray(rect) && rect.length) { if (all && Array.isArray(rect) && rect.length) {
resolve(rect); resolve(rect);
} }
if (!all && rect) { if (!all && rect) {
resolve(rect); resolve(rect);
} }
}) }).exec();
.exec();
}); });
} }
} }

View File

@ -1,4 +1,4 @@
export const button = Behavior({ export var button = Behavior({
properties: { properties: {
id: String, id: String,
appParameter: String, appParameter: String,

View File

@ -1,29 +1,41 @@
export const behavior = Behavior({ export var behavior = Behavior({
created() { created: function created() {
var _this = this;
if (!this.$options) { if (!this.$options) {
return; return;
} }
const cache = {};
const { setData } = this; var cache = {};
const { computed } = this.$options(); var setData = this.setData;
const keys = Object.keys(computed);
const calcComputed = () => { var _this$$options = this.$options(),
const needUpdate = {}; computed = _this$$options.computed;
keys.forEach(key => {
const value = computed[key].call(this); var keys = Object.keys(computed);
var calcComputed = function calcComputed() {
var needUpdate = {};
keys.forEach(function (key) {
var value = computed[key].call(_this);
if (cache[key] !== value) { if (cache[key] !== value) {
cache[key] = needUpdate[key] = value; cache[key] = needUpdate[key] = value;
} }
}); });
return needUpdate; return needUpdate;
}; };
Object.defineProperty(this, 'setData', { writable: true });
this.setData = (data, callback) => { Object.defineProperty(this, 'setData', {
data && setData.call(this, data, callback); writable: true
setData.call(this, calcComputed()); });
this.setData = function (data, callback) {
data && setData.call(_this, data, callback);
setData.call(_this, calcComputed());
}; };
}, },
attached() { attached: function attached() {
this.setData(); this.setData();
} }
}); });

View File

@ -1,25 +1,36 @@
import { behavior } from './behavior'; import { behavior } from './behavior';
import { observeProps } from './props'; import { observeProps } from './props';
export function observe(vantOptions, options) { export function observe(vantOptions, options) {
const { watch, computed } = vantOptions; var watch = vantOptions.watch,
computed = vantOptions.computed;
if (watch) { if (watch) {
const props = options.properties || {}; var props = options.properties || {};
Object.keys(watch).forEach(key => { Object.keys(watch).forEach(function (key) {
if (key in props) { if (key in props) {
let prop = props[key]; var prop = props[key];
if (prop === null || !prop.type) { if (prop === null || !prop.type) {
prop = { type: prop }; prop = {
type: prop
};
} }
prop.observer = watch[key]; prop.observer = watch[key];
props[key] = prop; props[key] = prop;
} }
}); });
options.properties = props; options.properties = props;
} }
if (computed) { if (computed) {
options.behaviors.push(behavior); options.behaviors.push(behavior);
options.methods = options.methods || {}; options.methods = options.methods || {};
options.methods.$options = () => vantOptions;
options.methods.$options = function () {
return vantOptions;
};
if (options.properties) { if (options.properties) {
observeProps(options.properties); observeProps(options.properties);
} }

View File

@ -2,21 +2,31 @@ export function observeProps(props) {
if (!props) { if (!props) {
return; return;
} }
Object.keys(props).forEach(key => {
let prop = props[key]; Object.keys(props).forEach(function (key) {
var prop = props[key];
if (prop === null || !prop.type) { if (prop === null || !prop.type) {
prop = { type: prop }; prop = {
type: prop
};
} }
let { observer } = prop;
var _prop = prop,
observer = _prop.observer;
prop.observer = function () { prop.observer = function () {
if (observer) { if (observer) {
if (typeof observer === 'string') { if (typeof observer === 'string') {
observer = this[observer]; observer = this[observer];
} }
observer.apply(this, arguments); observer.apply(this, arguments);
} }
this.setData(); this.setData();
}; };
props[key] = prop; props[key] = prop;
}); });
} }

View File

@ -1,21 +1,21 @@
export const openType = Behavior({ export var openType = Behavior({
properties: { properties: {
openType: String openType: String
}, },
methods: { methods: {
bindGetUserInfo(event) { bindGetUserInfo: function bindGetUserInfo(event) {
this.$emit('getuserinfo', event.detail); this.$emit('getuserinfo', event.detail);
}, },
bindContact(event) { bindContact: function bindContact(event) {
this.$emit('contact', event.detail); this.$emit('contact', event.detail);
}, },
bindGetPhoneNumber(event) { bindGetPhoneNumber: function bindGetPhoneNumber(event) {
this.$emit('getphonenumber', event.detail); this.$emit('getphonenumber', event.detail);
}, },
bindOpenSetting(event) { bindOpenSetting: function bindOpenSetting(event) {
this.$emit('opensetting', event.detail); this.$emit('opensetting', event.detail);
}, },
bindError(event) { bindError: function bindError(event) {
this.$emit('error', event.detail); this.$emit('error', event.detail);
} }
} }

View File

@ -1,6 +1,6 @@
export const touch = Behavior({ export var touch = Behavior({
methods: { methods: {
touchStart(event) { touchStart: function touchStart(event) {
this.direction = ''; this.direction = '';
this.deltaX = 0; this.deltaX = 0;
this.deltaY = 0; this.deltaY = 0;
@ -9,8 +9,8 @@ export const touch = Behavior({
this.startX = event.touches[0].clientX; this.startX = event.touches[0].clientX;
this.startY = event.touches[0].clientY; this.startY = event.touches[0].clientY;
}, },
touchMove(event) { touchMove: function touchMove(event) {
const touch = event.touches[0]; var touch = event.touches[0];
this.deltaX = touch.clientX - this.startX; this.deltaX = touch.clientX - this.startX;
this.deltaY = touch.clientY - this.startY; this.deltaY = touch.clientY - this.startY;
this.offsetX = Math.abs(this.deltaX); this.offsetX = Math.abs(this.deltaX);

View File

@ -1,4 +1,4 @@
export const transition = function (showDefaultValue) { export var transition = function transition(showDefaultValue) {
return Behavior({ return Behavior({
properties: { properties: {
customStyle: String, customStyle: String,
@ -17,30 +17,29 @@ export const transition = function (showDefaultValue) {
inited: false, inited: false,
display: false display: false
}, },
attached() { attached: function attached() {
if (this.data.show) { if (this.data.show) {
this.show(); this.show();
} }
}, },
methods: { methods: {
observeShow(value) { observeShow: function observeShow(value) {
if (value) { if (value) {
this.show(); this.show();
} } else {
else {
this.setData({ this.setData({
type: 'leave' type: 'leave'
}); });
} }
}, },
show() { show: function show() {
this.setData({ this.setData({
inited: true, inited: true,
display: true, display: true,
type: 'enter' type: 'enter'
}); });
}, },
onAnimationEnd() { onAnimationEnd: function onAnimationEnd() {
if (!this.data.show) { if (!this.data.show) {
this.setData({ this.setData({
display: false display: false

View File

@ -13,10 +13,10 @@ VantComponent({
} }
}, },
methods: { methods: {
onClickLeft() { onClickLeft: function onClickLeft() {
this.$emit('click-left'); this.$emit('click-left');
}, },
onClickRight() { onClickRight: function onClickRight() {
this.$emit('click-right'); this.$emit('click-right');
} }
} }

View File

@ -1,6 +1,6 @@
import { VantComponent } from '../common/component'; import { VantComponent } from '../common/component';
const FONT_COLOR = '#f60'; var FONT_COLOR = '#f60';
const BG_COLOR = '#fff7cc'; var BG_COLOR = '#fff7cc';
VantComponent({ VantComponent({
props: { props: {
text: { text: {
@ -55,87 +55,105 @@ VantComponent({
timer: null timer: null
}, },
watch: { watch: {
text() { text: function text() {
this.setData({}, this.init); this.setData({}, this.init);
} }
}, },
created() { created: function created() {
if (this.data.mode) { if (this.data.mode) {
this.setData({ this.setData({
hasRightIcon: true hasRightIcon: true
}); });
} }
}, },
destroyed() { destroyed: function destroyed() {
const { timer } = this.data; var timer = this.data.timer;
timer && clearTimeout(timer); timer && clearTimeout(timer);
}, },
methods: { methods: {
init() { init: function init() {
this.getRect('.van-notice-bar__content').then(rect => { var _this = this;
this.getRect('.van-notice-bar__content').then(function (rect) {
if (!rect || !rect.width) { if (!rect || !rect.width) {
return; return;
} }
this.setData({
_this.setData({
width: rect.width width: rect.width
}); });
this.getRect('.van-notice-bar__content-wrap').then(rect => {
_this.getRect('.van-notice-bar__content-wrap').then(function (rect) {
if (!rect || !rect.width) { if (!rect || !rect.width) {
return; return;
} }
const wrapWidth = rect.width;
const { width, speed, scrollable, delay } = this.data; var wrapWidth = rect.width;
var _this$data = _this.data,
width = _this$data.width,
speed = _this$data.speed,
scrollable = _this$data.scrollable,
delay = _this$data.delay;
if (scrollable && wrapWidth < width) { if (scrollable && wrapWidth < width) {
const elapse = width / speed * 1000; var elapse = width / speed * 1000;
const animation = wx.createAnimation({ var animation = wx.createAnimation({
duration: elapse, duration: elapse,
timeingFunction: 'linear', timeingFunction: 'linear',
delay delay: delay
}); });
const resetAnimation = wx.createAnimation({ var resetAnimation = wx.createAnimation({
duration: 0, duration: 0,
timeingFunction: 'linear' timeingFunction: 'linear'
}); });
this.setData({
elapse, _this.setData({
wrapWidth, elapse: elapse,
animation, wrapWidth: wrapWidth,
resetAnimation animation: animation,
}, () => { resetAnimation: resetAnimation
this.scroll(); }, function () {
_this.scroll();
}); });
} }
}); });
}); });
}, },
scroll() { scroll: function scroll() {
const { animation, resetAnimation, wrapWidth, elapse, speed } = this.data; var _this2 = this;
var _this$data2 = this.data,
animation = _this$data2.animation,
resetAnimation = _this$data2.resetAnimation,
wrapWidth = _this$data2.wrapWidth,
elapse = _this$data2.elapse,
speed = _this$data2.speed;
resetAnimation.translateX(wrapWidth).step(); resetAnimation.translateX(wrapWidth).step();
const animationData = animation.translateX(-(elapse * speed) / 1000).step(); var animationData = animation.translateX(-(elapse * speed) / 1000).step();
this.setData({ this.setData({
animationData: resetAnimation.export() animationData: resetAnimation.export()
}); });
setTimeout(() => { setTimeout(function () {
this.setData({ _this2.setData({
animationData: animationData.export() animationData: animationData.export()
}); });
}, 100); }, 100);
const timer = setTimeout(() => { var timer = setTimeout(function () {
this.scroll(); _this2.scroll();
}, elapse); }, elapse);
this.setData({ this.setData({
timer timer: timer
}); });
}, },
onClickIcon() { onClickIcon: function onClickIcon() {
const { timer } = this.data; var timer = this.data.timer;
timer && clearTimeout(timer); timer && clearTimeout(timer);
this.setData({ this.setData({
show: false, show: false,
timer: null timer: null
}); });
}, },
onClick(event) { onClick: function onClick(event) {
this.$emit('click', event); this.$emit('click', event);
} }
} }

13
dist/notify/index.js vendored
View File

@ -16,19 +16,22 @@ VantComponent({
} }
}, },
methods: { methods: {
show() { show: function show() {
const { duration } = this.data; var _this = this;
var duration = this.data.duration;
clearTimeout(this.timer); clearTimeout(this.timer);
this.setData({ this.setData({
show: true show: true
}); });
if (duration > 0 && duration !== Infinity) { if (duration > 0 && duration !== Infinity) {
this.timer = setTimeout(() => { this.timer = setTimeout(function () {
this.hide(); _this.hide();
}, duration); }, duration);
} }
}, },
hide() { hide: function hide() {
clearTimeout(this.timer); clearTimeout(this.timer);
this.setData({ this.setData({
show: false show: false

21
dist/notify/notify.js vendored
View File

@ -1,17 +1,26 @@
import { isObj } from '../common/utils'; import { isObj } from '../common/utils';
const defaultOptions = { var defaultOptions = {
selector: '#van-notify', selector: '#van-notify',
duration: 3000 duration: 3000
}; };
function parseOptions(text) { function parseOptions(text) {
return isObj(text) ? text : { text }; return isObj(text) ? text : {
text: text
};
} }
export default function Notify(options = {}) {
const pages = getCurrentPages(); export default function Notify(options) {
const ctx = pages[pages.length - 1]; if (options === void 0) {
options = {};
}
var pages = getCurrentPages();
var ctx = pages[pages.length - 1];
options = Object.assign({}, defaultOptions, parseOptions(options)); options = Object.assign({}, defaultOptions, parseOptions(options));
const el = ctx.selectComponent(options.selector); var el = ctx.selectComponent(options.selector);
delete options.selector; delete options.selector;
if (el) { if (el) {
el.setData(options); el.setData(options);
el.show(); el.show();

View File

@ -10,10 +10,10 @@ VantComponent({
} }
}, },
methods: { methods: {
onClick() { onClick: function onClick() {
this.$emit('click'); this.$emit('click');
}, },
// for prevent touchmove // for prevent touchmove
noop() { } noop: function noop() {}
} }
}); });

3
dist/popup/index.js vendored
View File

@ -24,8 +24,9 @@ VantComponent({
} }
}, },
methods: { methods: {
onClickOverlay() { onClickOverlay: function onClickOverlay() {
this.$emit('click-overlay'); this.$emit('click-overlay');
if (this.data.closeOnClickOverlay) { if (this.data.closeOnClickOverlay) {
this.$emit('close'); this.$emit('close');
} }

View File

@ -27,35 +27,37 @@ VantComponent({
showPivot: 'getWidth' showPivot: 'getWidth'
}, },
computed: { computed: {
portionStyle() { portionStyle: function portionStyle() {
const width = (this.data.progressWidth - this.data.pivotWidth) * this.data.percentage / 100 + 'px'; var width = (this.data.progressWidth - this.data.pivotWidth) * this.data.percentage / 100 + 'px';
const background = this.getCurrentColor(); var background = this.getCurrentColor();
return `width: ${width}; background: ${background}; `; return "width: " + width + "; background: " + background + "; ";
}, },
pivotStyle() { pivotStyle: function pivotStyle() {
const color = this.data.textColor; var color = this.data.textColor;
const background = this.data.pivotColor || this.getCurrentColor(); var background = this.data.pivotColor || this.getCurrentColor();
return `color: ${color}; background: ${background}`; return "color: " + color + "; background: " + background;
}, },
text() { text: function text() {
return this.data.pivotText || this.data.percentage + '%'; return this.data.pivotText || this.data.percentage + '%';
} }
}, },
mounted() { mounted: function mounted() {
this.getWidth(); this.getWidth();
}, },
methods: { methods: {
getCurrentColor() { getCurrentColor: function getCurrentColor() {
return this.data.inactive ? '#cacaca' : this.data.color; return this.data.inactive ? '#cacaca' : this.data.color;
}, },
getWidth() { getWidth: function getWidth() {
this.getRect('.van-progress').then(rect => { var _this = this;
this.setData({
this.getRect('.van-progress').then(function (rect) {
_this.setData({
progressWidth: rect.width progressWidth: rect.width
}); });
}); });
this.getRect('.van-progress__pivot').then(rect => { this.getRect('.van-progress__pivot').then(function (rect) {
this.setData({ _this.setData({
pivotWidth: rect.width || 0 pivotWidth: rect.width || 0
}); });
}); });

View File

@ -3,8 +3,10 @@ VantComponent({
relation: { relation: {
name: 'radio', name: 'radio',
type: 'descendant', type: 'descendant',
linked(target) { linked: function linked(target) {
const { value, disabled } = this.data; var _this$data = this.data,
value = _this$data.value,
disabled = _this$data.disabled;
target.setData({ target.setData({
value: value, value: value,
disabled: disabled || target.data.disabled disabled: disabled || target.data.disabled
@ -16,16 +18,20 @@ VantComponent({
disabled: Boolean disabled: Boolean
}, },
watch: { watch: {
value(value) { value: function value(_value) {
const children = this.getRelationNodes('../radio/index'); var children = this.getRelationNodes('../radio/index');
children.forEach(child => { children.forEach(function (child) {
child.setData({ value }); child.setData({
value: _value
});
}); });
}, },
disabled(disabled) { disabled: function disabled(_disabled) {
const children = this.getRelationNodes('../radio/index'); var children = this.getRelationNodes('../radio/index');
children.forEach(child => { children.forEach(function (child) {
child.setData({ disabled: disabled || child.data.disabled }); child.setData({
disabled: _disabled || child.data.disabled
});
}); });
} }
} }

15
dist/radio/index.js vendored
View File

@ -13,8 +13,11 @@ VantComponent({
labelPosition: String labelPosition: String
}, },
computed: { computed: {
iconClass() { iconClass: function iconClass() {
const { disabled, name, value } = this.data; var _this$data = this.data,
disabled = _this$data.disabled,
name = _this$data.name,
value = _this$data.value;
return this.classNames('van-radio__icon', { return this.classNames('van-radio__icon', {
'van-radio__icon--disabled': disabled, 'van-radio__icon--disabled': disabled,
'van-radio__icon--checked': !disabled && name === value, 'van-radio__icon--checked': !disabled && name === value,
@ -23,15 +26,15 @@ VantComponent({
} }
}, },
methods: { methods: {
emitChange(value) { emitChange: function emitChange(value) {
const instance = this.getRelationNodes('../radio-group/index')[0] || this; var instance = this.getRelationNodes('../radio-group/index')[0] || this;
instance.$emit('input', value); instance.$emit('input', value);
instance.$emit('change', value); instance.$emit('change', value);
}, },
onChange(event) { onChange: function onChange(event) {
this.emitChange(event.detail.value); this.emitChange(event.detail.value);
}, },
onClickLabel() { onClickLabel: function onClickLabel() {
if (!this.data.disabled && !this.data.labelDisabled) { if (!this.data.disabled && !this.data.labelDisabled) {
this.emitChange(this.data.name); this.emitChange(this.data.name);
} }

24
dist/row/index.js vendored
View File

@ -3,7 +3,7 @@ VantComponent({
relation: { relation: {
name: 'col', name: 'col',
type: 'descendant', type: 'descendant',
linked(target) { linked: function linked(target) {
if (this.data.gutter) { if (this.data.gutter) {
target.setGutter(this.data.gutter); target.setGutter(this.data.gutter);
} }
@ -15,21 +15,23 @@ VantComponent({
watch: { watch: {
gutter: 'setGutter' gutter: 'setGutter'
}, },
mounted() { mounted: function mounted() {
if (this.data.gutter) { if (this.data.gutter) {
this.setGutter(); this.setGutter();
} }
}, },
methods: { methods: {
setGutter() { setGutter: function setGutter() {
const { gutter } = this.data; var _this = this;
const margin = `-${Number(gutter) / 2}px`;
const style = gutter var gutter = this.data.gutter;
? `margin-right: ${margin}; margin-left: ${margin};` var margin = "-" + Number(gutter) / 2 + "px";
: ''; var style = gutter ? "margin-right: " + margin + "; margin-left: " + margin + ";" : '';
this.setData({ style }); this.setData({
this.getRelationNodes('../col/index').forEach(col => { style: style
col.setGutter(this.data.gutter); });
this.getRelationNodes('../col/index').forEach(function (col) {
col.setGutter(_this.data.gutter);
}); });
} }
} }

18
dist/search/index.js vendored
View File

@ -19,22 +19,26 @@ VantComponent({
} }
}, },
methods: { methods: {
onChange(event) { onChange: function onChange(event) {
this.setData({ value: event.detail }); this.setData({
value: event.detail
});
this.$emit('change', event.detail); this.$emit('change', event.detail);
}, },
onCancel() { onCancel: function onCancel() {
this.setData({ value: '' }); this.setData({
value: ''
});
this.$emit('cancel'); this.$emit('cancel');
this.$emit('change', ''); this.$emit('change', '');
}, },
onSearch() { onSearch: function onSearch() {
this.$emit('search', this.data.value); this.$emit('search', this.data.value);
}, },
onFocus() { onFocus: function onFocus() {
this.$emit('focus'); this.$emit('focus');
}, },
onBlur() { onBlur: function onBlur() {
this.$emit('blur'); this.$emit('blur');
} }
} }

54
dist/slider/index.js vendored
View File

@ -25,50 +25,56 @@ VantComponent({
value: '2px' value: '2px'
} }
}, },
created() { created: function created() {
this.updateValue(this.data.value); this.updateValue(this.data.value);
}, },
methods: { methods: {
onTouchStart(event) { onTouchStart: function onTouchStart(event) {
if (this.data.disabled) if (this.data.disabled) return;
return;
this.touchStart(event); this.touchStart(event);
this.startValue = this.format(this.data.value); this.startValue = this.format(this.data.value);
}, },
onTouchMove(event) { onTouchMove: function onTouchMove(event) {
if (this.data.disabled) var _this = this;
return;
if (this.data.disabled) return;
this.touchMove(event); this.touchMove(event);
this.getRect('.van-slider').then(rect => { this.getRect('.van-slider').then(function (rect) {
const diff = this.deltaX / rect.width * 100; var diff = _this.deltaX / rect.width * 100;
this.updateValue(this.startValue + diff);
_this.updateValue(_this.startValue + diff);
}); });
}, },
onTouchEnd() { onTouchEnd: function onTouchEnd() {
if (this.data.disabled) if (this.data.disabled) return;
return;
this.updateValue(this.data.value, true); this.updateValue(this.data.value, true);
}, },
onClick(event) { onClick: function onClick(event) {
if (this.data.disabled) var _this2 = this;
return;
this.getRect(rect => { if (this.data.disabled) return;
const value = (event.detail.x - rect.left) / rect.width * 100; this.getRect(function (rect) {
this.updateValue(value, true); var value = (event.detail.x - rect.left) / rect.width * 100;
_this2.updateValue(value, true);
}); });
}, },
updateValue(value, end) { updateValue: function updateValue(value, end) {
value = this.format(value); value = this.format(value);
this.setData({ this.setData({
value, value: value,
barStyle: `width: ${value}%; height: ${this.data.barHeight};` barStyle: "width: " + value + "%; height: " + this.data.barHeight + ";"
}); });
if (end) { if (end) {
this.$emit('change', value); this.$emit('change', value);
} }
}, },
format(value) { format: function format(value) {
const { max, min, step } = this.data; var _this$data = this.data,
max = _this$data.max,
min = _this$data.min,
step = _this$data.step;
return Math.round(Math.max(min, Math.min(value, max)) / step) * step; return Math.round(Math.max(min, Math.min(value, max)) / step) * step;
} }
} }

46
dist/stepper/index.js vendored
View File

@ -1,14 +1,10 @@
import { VantComponent } from '../common/component'; import { VantComponent } from '../common/component'; // Note that the bitwise operators and shift operators operate on 32-bit ints
// Note that the bitwise operators and shift operators operate on 32-bit ints
// so in that case, the max safe integer is 2^31-1, or 2147483647 // so in that case, the max safe integer is 2^31-1, or 2147483647
const MAX = 2147483647;
var MAX = 2147483647;
VantComponent({ VantComponent({
field: true, field: true,
classes: [ classes: ['input-class', 'plus-class', 'minus-class'],
'input-class',
'plus-class',
'minus-class'
],
props: { props: {
integer: Boolean, integer: Boolean,
disabled: Boolean, disabled: Boolean,
@ -26,43 +22,49 @@ VantComponent({
value: 1 value: 1
} }
}, },
created() { created: function created() {
this.setData({ this.setData({
value: this.range(this.data.value) value: this.range(this.data.value)
}); });
}, },
methods: { methods: {
// limit value range // limit value range
range(value) { range: function range(value) {
return Math.max(Math.min(this.data.max, value), this.data.min); return Math.max(Math.min(this.data.max, value), this.data.min);
}, },
onInput(event) { onInput: function onInput(event) {
const { value = '' } = event.detail || {}; var _ref = event.detail || {},
_ref$value = _ref.value,
value = _ref$value === void 0 ? '' : _ref$value;
this.triggerInput(value); this.triggerInput(value);
}, },
onChange(type) { onChange: function onChange(type) {
if (this[`${type}Disabled`]) { if (this[type + "Disabled"]) {
this.$emit('overlimit', type); this.$emit('overlimit', type);
return; return;
} }
const diff = type === 'minus' ? -this.data.step : +this.data.step;
const value = Math.round((this.data.value + diff) * 100) / 100; var diff = type === 'minus' ? -this.data.step : +this.data.step;
var value = Math.round((this.data.value + diff) * 100) / 100;
this.triggerInput(this.range(value)); this.triggerInput(this.range(value));
this.$emit(type); this.$emit(type);
}, },
onBlur(event) { onBlur: function onBlur(event) {
const value = this.range(this.data.value); var value = this.range(this.data.value);
this.triggerInput(value); this.triggerInput(value);
this.$emit('blur', event); this.$emit('blur', event);
}, },
onMinus() { onMinus: function onMinus() {
this.onChange('minus'); this.onChange('minus');
}, },
onPlus() { onPlus: function onPlus() {
this.onChange('plus'); this.onChange('plus');
}, },
triggerInput(value) { triggerInput: function triggerInput(value) {
this.setData({ value }); this.setData({
value: value
});
this.$emit('change', value); this.$emit('change', value);
} }
} }

25
dist/steps/index.js vendored
View File

@ -17,25 +17,30 @@ VantComponent({
steps: 'formatSteps', steps: 'formatSteps',
active: 'formatSteps' active: 'formatSteps'
}, },
created() { created: function created() {
this.formatSteps(); this.formatSteps();
}, },
methods: { methods: {
formatSteps() { formatSteps: function formatSteps() {
const { steps } = this.data; var _this = this;
steps.forEach((step, index) => {
step.status = this.getStatus(index); var steps = this.data.steps;
steps.forEach(function (step, index) {
step.status = _this.getStatus(index);
});
this.setData({
steps: steps
}); });
this.setData({ steps });
}, },
getStatus(index) { getStatus: function getStatus(index) {
const { active } = this.data; var active = this.data.active;
if (index < active) { if (index < active) {
return 'finish'; return 'finish';
} } else if (index === active) {
else if (index === active) {
return 'process'; return 'process';
} }
return ''; return '';
} }
} }

View File

@ -1,10 +1,6 @@
import { VantComponent } from '../common/component'; import { VantComponent } from '../common/component';
VantComponent({ VantComponent({
classes: [ classes: ['bar-class', 'price-class', 'button-class'],
'bar-class',
'price-class',
'button-class'
],
props: { props: {
tip: [String, Boolean], tip: [String, Boolean],
type: Number, type: Number,
@ -23,19 +19,19 @@ VantComponent({
} }
}, },
computed: { computed: {
hasPrice() { hasPrice: function hasPrice() {
return typeof this.data.price === 'number'; return typeof this.data.price === 'number';
}, },
priceStr() { priceStr: function priceStr() {
return (this.data.price / 100).toFixed(2); return (this.data.price / 100).toFixed(2);
}, },
tipStr() { tipStr: function tipStr() {
const { tip } = this.data; var tip = this.data.tip;
return typeof tip === 'string' ? tip : ''; return typeof tip === 'string' ? tip : '';
} }
}, },
methods: { methods: {
onSubmit(event) { onSubmit: function onSubmit(event) {
this.$emit('submit', event.detail); this.$emit('submit', event.detail);
} }
} }

View File

@ -13,15 +13,19 @@ VantComponent({
} }
}, },
watch: { watch: {
checked(value) { checked: function checked(value) {
this.setData({ value }); this.setData({
value: value
});
} }
}, },
created() { created: function created() {
this.setData({ value: this.data.checked }); this.setData({
value: this.data.checked
});
}, },
methods: { methods: {
onChange(event) { onChange: function onChange(event) {
this.$emit('change', event.detail); this.$emit('change', event.detail);
} }
} }

16
dist/switch/index.js vendored
View File

@ -12,17 +12,21 @@ VantComponent({
} }
}, },
watch: { watch: {
checked(value) { checked: function checked(value) {
this.setData({ value }); this.setData({
value: value
});
} }
}, },
created() { created: function created() {
this.setData({ value: this.data.checked }); this.setData({
value: this.data.checked
});
}, },
methods: { methods: {
onClick() { onClick: function onClick() {
if (!this.data.disabled && !this.data.loading) { if (!this.data.disabled && !this.data.loading) {
const checked = !this.data.checked; var checked = !this.data.checked;
this.$emit('input', checked); this.$emit('input', checked);
this.$emit('change', checked); this.$emit('change', checked);
} }

10
dist/tab/index.js vendored
View File

@ -13,14 +13,16 @@ VantComponent({
active: false active: false
}, },
watch: { watch: {
disabled() { disabled: function disabled() {
const parent = this.getRelationNodes('../tabs/index')[0]; var parent = this.getRelationNodes('../tabs/index')[0];
if (parent) { if (parent) {
parent.updateTabs(); parent.updateTabs();
} }
}, },
title() { title: function title() {
const parent = this.getRelationNodes('../tabs/index')[0]; var parent = this.getRelationNodes('../tabs/index')[0];
if (parent) { if (parent) {
parent.setLine(); parent.setLine();
parent.updateTabs(); parent.updateTabs();

View File

@ -14,15 +14,20 @@ VantComponent({
count: 0 count: 0
}, },
methods: { methods: {
onClick() { onClick: function onClick() {
const parent = this.getRelationNodes('../tabbar/index')[0]; var parent = this.getRelationNodes('../tabbar/index')[0];
if (parent) { if (parent) {
parent.onChange(this); parent.onChange(this);
} }
this.$emit('click'); this.$emit('click');
}, },
setActive(data) { setActive: function setActive(data) {
const { active, count } = this.data; var _this$data = this.data,
active = _this$data.active,
count = _this$data.count;
if (active !== data.active || count !== data.count) { if (active !== data.active || count !== data.count) {
this.setData(data); this.setData(data);
} }

51
dist/tabbar/index.js vendored
View File

@ -3,16 +3,22 @@ VantComponent({
relation: { relation: {
name: 'tabbar-item', name: 'tabbar-item',
type: 'descendant', type: 'descendant',
linked(target) { linked: function linked(target) {
var _this = this;
this.data.items.push(target); this.data.items.push(target);
setTimeout(() => { setTimeout(function () {
this.setActiveItem(); _this.setActiveItem();
}); });
}, },
unlinked(target) { unlinked: function unlinked(target) {
this.data.items = this.data.items.filter(item => item !== target); var _this2 = this;
setTimeout(() => {
this.setActiveItem(); this.data.items = this.data.items.filter(function (item) {
return item !== target;
});
setTimeout(function () {
_this2.setActiveItem();
}); });
} }
}, },
@ -32,28 +38,37 @@ VantComponent({
currentActive: -1 currentActive: -1
}, },
watch: { watch: {
active(active) { active: function active(_active) {
this.setData({ currentActive: active }); this.setData({
currentActive: _active
});
this.setActiveItem(); this.setActiveItem();
} }
}, },
created() { created: function created() {
this.setData({ currentActive: this.data.active }); this.setData({
currentActive: this.data.active
});
}, },
methods: { methods: {
setActiveItem() { setActiveItem: function setActiveItem() {
this.data.items.forEach((item, index) => { var _this3 = this;
this.data.items.forEach(function (item, index) {
item.setActive({ item.setActive({
active: index === this.data.currentActive, active: index === _this3.data.currentActive,
count: this.data.items.length count: _this3.data.items.length
}); });
}); });
}, },
onChange(child) { onChange: function onChange(child) {
const active = this.data.items.indexOf(child); var active = this.data.items.indexOf(child);
if (active !== this.data.currentActive && active !== -1) { if (active !== this.data.currentActive && active !== -1) {
this.$emit('change', active); this.$emit('change', active);
this.setData({ currentActive: active }); this.setData({
currentActive: active
});
this.setActiveItem(); this.setActiveItem();
} }
} }

102
dist/tabs/index.js vendored
View File

@ -3,17 +3,19 @@ VantComponent({
relation: { relation: {
name: 'tab', name: 'tab',
type: 'descendant', type: 'descendant',
linked(child) { linked: function linked(child) {
this.data.tabs.push({ this.data.tabs.push({
instance: child, instance: child,
data: child.data data: child.data
}); });
this.updateTabs(); this.updateTabs();
}, },
unlinked(child) { unlinked: function unlinked(child) {
const tabs = this.data.tabs.filter(item => item.instance !== child); var tabs = this.data.tabs.filter(function (item) {
return item.instance !== child;
});
this.setData({ this.setData({
tabs, tabs: tabs,
scrollable: tabs.length > this.data.swipeThreshold scrollable: tabs.length > this.data.swipeThreshold
}); });
this.setActiveTab(); this.setActiveTab();
@ -50,7 +52,7 @@ VantComponent({
scrollable: false scrollable: false
}, },
watch: { watch: {
swipeThreshold() { swipeThreshold: function swipeThreshold() {
this.setData({ this.setData({
scrollable: this.data.tabs.length > this.data.swipeThreshold scrollable: this.data.tabs.length > this.data.swipeThreshold
}); });
@ -59,71 +61,76 @@ VantComponent({
lineWidth: 'setLine', lineWidth: 'setLine',
active: 'setActiveTab' active: 'setActiveTab'
}, },
mounted() { mounted: function mounted() {
this.setLine(); this.setLine();
this.scrollIntoView(); this.scrollIntoView();
}, },
methods: { methods: {
updateTabs() { updateTabs: function updateTabs() {
const { tabs } = this.data; var tabs = this.data.tabs;
this.setData({ this.setData({
tabs, tabs: tabs,
scrollable: tabs.length > this.data.swipeThreshold scrollable: tabs.length > this.data.swipeThreshold
}); });
this.setActiveTab(); this.setActiveTab();
}, },
trigger(eventName, index) { trigger: function trigger(eventName, index) {
this.$emit(eventName, { this.$emit(eventName, {
index, index: index,
title: this.data.tabs[index].data.title title: this.data.tabs[index].data.title
}); });
}, },
onTap(event) { onTap: function onTap(event) {
const { index } = event.currentTarget.dataset; var index = event.currentTarget.dataset.index;
if (this.data.tabs[index].data.disabled) { if (this.data.tabs[index].data.disabled) {
this.trigger('disabled', index); this.trigger('disabled', index);
} } else {
else {
this.trigger('click', index); this.trigger('click', index);
this.setActive(index); this.setActive(index);
} }
}, },
setActive(active) { setActive: function setActive(active) {
if (active !== this.data.active) { if (active !== this.data.active) {
this.trigger('change', active); this.trigger('change', active);
this.setData({ active }); this.setData({
active: active
});
this.setActiveTab(); this.setActiveTab();
} }
}, },
setLine() { setLine: function setLine() {
var _this = this;
if (this.data.type !== 'line') { if (this.data.type !== 'line') {
return; return;
} }
this.getRect('.van-tab', true).then(rects => {
const rect = rects[this.data.active]; this.getRect('.van-tab', true).then(function (rects) {
const width = this.data.lineWidth || rect.width; var rect = rects[_this.data.active];
let left = rects var width = _this.data.lineWidth || rect.width;
.slice(0, this.data.active) var left = rects.slice(0, _this.data.active).reduce(function (prev, curr) {
.reduce((prev, curr) => prev + curr.width, 0); return prev + curr.width;
}, 0);
left += (rect.width - width) / 2; left += (rect.width - width) / 2;
this.setData({
lineStyle: ` _this.setData({
width: ${width}px; lineStyle: "\n width: " + width + "px;\n background-color: " + _this.data.color + ";\n transform: translateX(" + left + "px);\n transition-duration: " + _this.data.duration + "s;\n "
background-color: ${this.data.color};
transform: translateX(${left}px);
transition-duration: ${this.data.duration}s;
`
}); });
}); });
}, },
setActiveTab() { setActiveTab: function setActiveTab() {
this.data.tabs.forEach((item, index) => { var _this2 = this;
const data = {
active: index === this.data.active this.data.tabs.forEach(function (item, index) {
var data = {
active: index === _this2.data.active
}; };
if (data.active) { if (data.active) {
data.inited = true; data.inited = true;
} }
if (data.active !== item.instance.data.active) { if (data.active !== item.instance.data.active) {
item.instance.setData(data); item.instance.setData(data);
} }
@ -132,19 +139,24 @@ VantComponent({
this.scrollIntoView(); this.scrollIntoView();
}, },
// scroll active tab into view // scroll active tab into view
scrollIntoView(immediate) { scrollIntoView: function scrollIntoView(immediate) {
var _this3 = this;
if (!this.data.scrollable) { if (!this.data.scrollable) {
return; return;
} }
this.getRect('.van-tab', true).then(tabRects => {
const tabRect = tabRects[this.data.active]; this.getRect('.van-tab', true).then(function (tabRects) {
const offsetLeft = tabRects var tabRect = tabRects[_this3.data.active];
.slice(0, this.data.active) var offsetLeft = tabRects.slice(0, _this3.data.active).reduce(function (prev, curr) {
.reduce((prev, curr) => prev + curr.width, 0); return prev + curr.width;
const tabWidth = tabRect.width; }, 0);
this.getRect('.van-tabs__nav').then(navRect => { var tabWidth = tabRect.width;
const navWidth = navRect.width;
this.setData({ _this3.getRect('.van-tabs__nav').then(function (navRect) {
var navWidth = navRect.width;
_this3.setData({
scrollLeft: offsetLeft - (navWidth - tabWidth) / 2 scrollLeft: offsetLeft - (navWidth - tabWidth) / 2
}); });
}); });

4
dist/toast/index.js vendored
View File

@ -23,12 +23,12 @@ VantComponent({
} }
}, },
methods: { methods: {
clear() { clear: function clear() {
this.setData({ this.setData({
show: false show: false
}); });
}, },
// for prevent touchmove // for prevent touchmove
noop() { } noop: function noop() {}
} }
}); });

63
dist/toast/toast.js vendored
View File

@ -1,5 +1,7 @@
function _extends() { _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; }; return _extends.apply(this, arguments); }
import { isObj } from '../common/utils'; import { isObj } from '../common/utils';
const defaultOptions = { var defaultOptions = {
type: 'text', type: 'text',
mask: false, mask: false,
message: '', message: '',
@ -11,42 +13,67 @@ const defaultOptions = {
loadingType: 'circular', loadingType: 'circular',
selector: '#van-toast' selector: '#van-toast'
}; };
let queue = []; var queue = [];
let currentOptions = Object.assign({}, defaultOptions);
var currentOptions = _extends({}, defaultOptions);
function parseOptions(message) { function parseOptions(message) {
return isObj(message) ? message : { message }; return isObj(message) ? message : {
message: message
};
} }
const Toast = (options = {}) => {
options = Object.assign({}, currentOptions, parseOptions(options)); var Toast = function Toast(options) {
const pages = getCurrentPages(); if (options === void 0) {
const ctx = pages[pages.length - 1]; options = {};
const toast = ctx.selectComponent(options.selector); }
options = _extends({}, currentOptions, parseOptions(options));
var pages = getCurrentPages();
var ctx = pages[pages.length - 1];
var toast = ctx.selectComponent(options.selector);
delete options.selector; delete options.selector;
queue.push(toast); queue.push(toast);
toast.setData(options); toast.setData(options);
clearTimeout(toast.timer); clearTimeout(toast.timer);
if (options.duration > 0) { if (options.duration > 0) {
toast.timer = setTimeout(() => { toast.timer = setTimeout(function () {
toast.clear(); toast.clear();
queue = queue.filter(item => item !== toast); queue = queue.filter(function (item) {
return item !== toast;
});
}, options.duration); }, options.duration);
} }
return toast; return toast;
}; };
const createMethod = type => options => Toast(Object.assign({ type }, parseOptions(options)));
['loading', 'success', 'fail'].forEach(method => { var createMethod = function createMethod(type) {
return function (options) {
return Toast(_extends({
type: type
}, parseOptions(options)));
};
};
['loading', 'success', 'fail'].forEach(function (method) {
Toast[method] = createMethod(method); Toast[method] = createMethod(method);
}); });
Toast.clear = () => {
queue.forEach(toast => { Toast.clear = function () {
queue.forEach(function (toast) {
toast.clear(); toast.clear();
}); });
queue = []; queue = [];
}; };
Toast.setDefaultOptions = options => {
Toast.setDefaultOptions = function (options) {
Object.assign(currentOptions, options); Object.assign(currentOptions, options);
}; };
Toast.resetDefaultOptions = () => {
currentOptions = Object.assign({}, defaultOptions); Toast.resetDefaultOptions = function () {
currentOptions = _extends({}, defaultOptions);
}; };
export default Toast; export default Toast;

View File

@ -1,5 +1,5 @@
import { VantComponent } from '../common/component'; import { VantComponent } from '../common/component';
const ITEM_HEIGHT = 44; var ITEM_HEIGHT = 44;
VantComponent({ VantComponent({
props: { props: {
items: Array, items: Array,
@ -22,11 +22,11 @@ VantComponent({
itemHeight: 0 itemHeight: 0
}, },
watch: { watch: {
items() { items: function items() {
this.updateSubItems(); this.updateSubItems();
this.updateMainHeight(); this.updateMainHeight();
}, },
maxHeight() { maxHeight: function maxHeight() {
this.updateItemHeight(); this.updateItemHeight();
this.updateMainHeight(); this.updateMainHeight();
}, },
@ -34,27 +34,33 @@ VantComponent({
}, },
methods: { methods: {
// 当一个子项被选择时 // 当一个子项被选择时
onSelectItem(event) { onSelectItem: function onSelectItem(event) {
this.$emit('click-item', event.currentTarget.dataset.item); this.$emit('click-item', event.currentTarget.dataset.item);
}, },
// 当一个导航被点击时 // 当一个导航被点击时
onClickNav(event) { onClickNav: function onClickNav(event) {
const { index } = event.currentTarget.dataset; var index = event.currentTarget.dataset.index;
this.$emit('click-nav', { index }); this.$emit('click-nav', {
index: index
});
}, },
// 更新子项列表 // 更新子项列表
updateSubItems() { updateSubItems: function updateSubItems() {
const selectedItem = this.data.items[this.data.mainActiveIndex] || {}; var selectedItem = this.data.items[this.data.mainActiveIndex] || {};
this.setData({ subItems: selectedItem.children || [] }); this.setData({
subItems: selectedItem.children || []
});
this.updateItemHeight(); this.updateItemHeight();
}, },
// 更新组件整体高度,根据最大高度和当前组件需要展示的高度来决定 // 更新组件整体高度,根据最大高度和当前组件需要展示的高度来决定
updateMainHeight() { updateMainHeight: function updateMainHeight() {
const maxHeight = Math.max(this.data.items.length * ITEM_HEIGHT, this.data.subItems.length * ITEM_HEIGHT); var maxHeight = Math.max(this.data.items.length * ITEM_HEIGHT, this.data.subItems.length * ITEM_HEIGHT);
this.setData({ mainHeight: Math.min(maxHeight, this.data.maxHeight) }); this.setData({
mainHeight: Math.min(maxHeight, this.data.maxHeight)
});
}, },
// 更新子项列表高度,根据可展示的最大高度和当前子项列表的高度决定 // 更新子项列表高度,根据可展示的最大高度和当前子项列表的高度决定
updateItemHeight() { updateItemHeight: function updateItemHeight() {
this.setData({ this.setData({
itemHeight: Math.min(this.data.subItems.length * ITEM_HEIGHT, this.data.maxHeight) itemHeight: Math.min(this.data.subItems.length * ITEM_HEIGHT, this.data.maxHeight)
}); });

View File

@ -25,6 +25,7 @@
"@babel/core": "^7.1.0", "@babel/core": "^7.1.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0", "@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/preset-env": "^7.1.0", "@babel/preset-env": "^7.1.0",
"@babel/preset-typescript": "^7.1.0",
"autoprefixer": "^9.1.5", "autoprefixer": "^9.1.5",
"babel-loader": "8.0.2", "babel-loader": "8.0.2",
"cross-env": "^5.1.4", "cross-env": "^5.1.4",
@ -34,10 +35,10 @@
"fast-vue-md-loader": "^1.0.3", "fast-vue-md-loader": "^1.0.3",
"gh-pages": "^2.0.0", "gh-pages": "^2.0.0",
"gulp": "^3.9.1", "gulp": "^3.9.1",
"gulp-babel": "^8.0.0",
"gulp-clean-css": "^3.9.0", "gulp-clean-css": "^3.9.0",
"gulp-postcss": "^8.0.0", "gulp-postcss": "^8.0.0",
"gulp-rename": "^1.2.2", "gulp-rename": "^1.2.2",
"gulp-typescript": "^5.0.0-alpha.3",
"html-webpack-plugin": "^3.2.0", "html-webpack-plugin": "^3.2.0",
"postcss-calc": "^6.0.2", "postcss-calc": "^6.0.2",
"postcss-easy-import": "^3.0.0", "postcss-easy-import": "^3.0.0",

265
yarn.lock
View File

@ -304,6 +304,12 @@
dependencies: dependencies:
"@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-typescript@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.0.0.tgz#90f4fe0a741ae9c0dcdc3017717c05a0cbbd5158"
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-arrow-functions@^7.0.0": "@babel/plugin-transform-arrow-functions@^7.0.0":
version "7.0.0" version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749"
@ -484,6 +490,13 @@
dependencies: dependencies:
"@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-typescript@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.1.0.tgz#81e7b4be90e7317cbd04bf1163ebf06b2adee60b"
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-typescript" "^7.0.0"
"@babel/plugin-transform-unicode-regex@^7.0.0": "@babel/plugin-transform-unicode-regex@^7.0.0":
version "7.0.0" version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0.tgz#c6780e5b1863a76fe792d90eded9fcd5b51d68fc" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0.tgz#c6780e5b1863a76fe792d90eded9fcd5b51d68fc"
@ -538,6 +551,13 @@
js-levenshtein "^1.1.3" js-levenshtein "^1.1.3"
semver "^5.3.0" semver "^5.3.0"
"@babel/preset-typescript@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.1.0.tgz#49ad6e2084ff0bfb5f1f7fb3b5e76c434d442c7f"
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-typescript" "^7.1.0"
"@babel/template@7.0.0-beta.44": "@babel/template@7.0.0-beta.44":
version "7.0.0-beta.44" version "7.0.0-beta.44"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.44.tgz#f8832f4fdcee5d59bf515e595fc5106c529b394f" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.44.tgz#f8832f4fdcee5d59bf515e595fc5106c529b394f"
@ -896,10 +916,6 @@ ansi-colors@^1.0.1:
dependencies: dependencies:
ansi-wrap "^0.1.0" ansi-wrap "^0.1.0"
ansi-colors@^2.0.2:
version "2.0.5"
resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-2.0.5.tgz#5da37825fef3e75f3bda47f760d64bfd10e15e10"
ansi-escapes@^3.0.0: ansi-escapes@^3.0.0:
version "3.1.0" version "3.1.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30"
@ -947,12 +963,6 @@ app-root-path@^2.0.1:
version "2.1.0" version "2.1.0"
resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.1.0.tgz#98bf6599327ecea199309866e8140368fd2e646a" resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.1.0.tgz#98bf6599327ecea199309866e8140368fd2e646a"
append-buffer@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/append-buffer/-/append-buffer-1.0.2.tgz#d8220cf466081525efea50614f3de6514dfa58f1"
dependencies:
buffer-equal "^1.0.0"
aproba@^1.0.3, aproba@^1.1.1: aproba@^1.0.3, aproba@^1.1.1:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
@ -1264,10 +1274,6 @@ browserslist@^4.1.0:
electron-to-chromium "^1.3.62" electron-to-chromium "^1.3.62"
node-releases "^1.0.0-alpha.11" node-releases "^1.0.0-alpha.11"
buffer-equal@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.0.tgz#59616b498304d556abd466966b22eeda3eca5fbe"
buffer-from@^1.0.0: buffer-from@^1.0.0:
version "1.1.1" version "1.1.1"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
@ -1517,18 +1523,10 @@ cliui@^4.0.0:
strip-ansi "^4.0.0" strip-ansi "^4.0.0"
wrap-ansi "^2.0.0" wrap-ansi "^2.0.0"
clone-buffer@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58"
clone-stats@^0.0.1: clone-stats@^0.0.1:
version "0.0.1" version "0.0.1"
resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1"
clone-stats@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680"
clone@^0.2.0: clone@^0.2.0:
version "0.2.0" version "0.2.0"
resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f" resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f"
@ -1537,18 +1535,6 @@ clone@^1.0.0, clone@^1.0.2:
version "1.0.4" version "1.0.4"
resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"
clone@^2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f"
cloneable-readable@^1.0.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.2.tgz#d591dee4a8f8bc15da43ce97dceeba13d43e2a65"
dependencies:
inherits "^2.0.1"
process-nextick-args "^2.0.0"
readable-stream "^2.3.5"
co@^4.6.0: co@^4.6.0:
version "4.6.0" version "4.6.0"
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
@ -1678,7 +1664,7 @@ content-type@^1.0.4:
version "1.0.4" version "1.0.4"
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
convert-source-map@^1.1.0, convert-source-map@^1.5.0: convert-source-map@^1.1.0:
version "1.6.0" version "1.6.0"
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20"
dependencies: dependencies:
@ -2587,7 +2573,7 @@ flatten@^1.0.2:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
flush-write-stream@^1.0.0, flush-write-stream@^1.0.2: flush-write-stream@^1.0.0:
version "1.0.3" version "1.0.3"
resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd"
dependencies: dependencies:
@ -2647,13 +2633,6 @@ fs-minipass@^1.2.5:
dependencies: dependencies:
minipass "^2.2.1" minipass "^2.2.1"
fs-mkdirp-stream@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz#0b7815fc3201c6a69e14db98ce098c16935259eb"
dependencies:
graceful-fs "^4.1.11"
through2 "^2.0.3"
fs-write-stream-atomic@^1.0.8: fs-write-stream-atomic@^1.0.8:
version "1.0.10" version "1.0.10"
resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9"
@ -2748,21 +2727,6 @@ glob-stream@^3.1.5:
through2 "^0.6.1" through2 "^0.6.1"
unique-stream "^1.0.0" unique-stream "^1.0.0"
glob-stream@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-6.1.0.tgz#7045c99413b3eb94888d83ab46d0b404cc7bdde4"
dependencies:
extend "^3.0.0"
glob "^7.1.1"
glob-parent "^3.1.0"
is-negated-glob "^1.0.0"
ordered-read-streams "^1.0.0"
pumpify "^1.3.5"
readable-stream "^2.1.5"
remove-trailing-separator "^1.0.1"
to-absolute-glob "^2.0.0"
unique-stream "^2.0.2"
glob-watcher@^0.0.6: glob-watcher@^0.0.6:
version "0.0.6" version "0.0.6"
resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-0.0.6.tgz#b95b4a8df74b39c83298b0c05c978b4d9a3b710b" resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-0.0.6.tgz#b95b4a8df74b39c83298b0c05c978b4d9a3b710b"
@ -2795,7 +2759,7 @@ glob@^7.0.0:
once "^1.3.0" once "^1.3.0"
path-is-absolute "^1.0.0" path-is-absolute "^1.0.0"
glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: glob@^7.0.3, glob@^7.0.5, glob@^7.1.2:
version "7.1.2" version "7.1.2"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
dependencies: dependencies:
@ -2903,7 +2867,7 @@ graceful-fs@^3.0.0:
dependencies: dependencies:
natives "^1.1.0" natives "^1.1.0"
graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6:
version "4.1.11" version "4.1.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
@ -2911,6 +2875,15 @@ graceful-fs@~1.2.0:
version "1.2.3" version "1.2.3"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364"
gulp-babel@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/gulp-babel/-/gulp-babel-8.0.0.tgz#e0da96f4f2ec4a88dd3a3030f476e38ab2126d87"
dependencies:
plugin-error "^1.0.1"
replace-ext "^1.0.0"
through2 "^2.0.0"
vinyl-sourcemaps-apply "^0.2.0"
gulp-clean-css@^3.9.0: gulp-clean-css@^3.9.0:
version "3.10.0" version "3.10.0"
resolved "https://registry.yarnpkg.com/gulp-clean-css/-/gulp-clean-css-3.10.0.tgz#bccd4605eff104bfa4980014cc4b3c24c571736d" resolved "https://registry.yarnpkg.com/gulp-clean-css/-/gulp-clean-css-3.10.0.tgz#bccd4605eff104bfa4980014cc4b3c24c571736d"
@ -2934,17 +2907,6 @@ gulp-rename@^1.2.2:
version "1.4.0" version "1.4.0"
resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-1.4.0.tgz#de1c718e7c4095ae861f7296ef4f3248648240bd" resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-1.4.0.tgz#de1c718e7c4095ae861f7296ef4f3248648240bd"
gulp-typescript@^5.0.0-alpha.3:
version "5.0.0-alpha.3"
resolved "https://registry.yarnpkg.com/gulp-typescript/-/gulp-typescript-5.0.0-alpha.3.tgz#c49a306cbbb8c97f5fe8a79208671b6642ef9861"
dependencies:
ansi-colors "^2.0.2"
plugin-error "^1.0.1"
source-map "^0.7.3"
through2 "^2.0.3"
vinyl "^2.1.0"
vinyl-fs "^3.0.3"
gulp-util@^3.0.0: gulp-util@^3.0.0:
version "3.0.8" version "3.0.8"
resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f"
@ -3455,10 +3417,6 @@ is-installed-globally@^0.1.0:
global-dirs "^0.1.0" global-dirs "^0.1.0"
is-path-inside "^1.0.0" is-path-inside "^1.0.0"
is-negated-glob@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-negated-glob/-/is-negated-glob-1.0.0.tgz#6910bca5da8c95e784b5751b976cf5a10fee36d2"
is-npm@^1.0.0: is-npm@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4" resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4"
@ -3541,14 +3499,10 @@ is-unc-path@^1.0.0:
dependencies: dependencies:
unc-path-regex "^0.1.2" unc-path-regex "^0.1.2"
is-utf8@^0.2.0, is-utf8@^0.2.1: is-utf8@^0.2.0:
version "0.2.1" version "0.2.1"
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
is-valid-glob@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa"
is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2: is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
@ -3622,12 +3576,6 @@ json-stable-stringify-without-jsonify@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
json-stable-stringify@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af"
dependencies:
jsonify "~0.0.0"
json-stringify-safe@^5.0.1: json-stringify-safe@^5.0.1:
version "5.0.1" version "5.0.1"
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
@ -3642,10 +3590,6 @@ jsonfile@^4.0.0:
optionalDependencies: optionalDependencies:
graceful-fs "^4.1.6" graceful-fs "^4.1.6"
jsonify@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
keygrip@~1.0.2: keygrip@~1.0.2:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/keygrip/-/keygrip-1.0.2.tgz#ad3297c557069dea8bcfe7a4fa491b75c5ddeb91" resolved "https://registry.yarnpkg.com/keygrip/-/keygrip-1.0.2.tgz#ad3297c557069dea8bcfe7a4fa491b75c5ddeb91"
@ -3742,24 +3686,12 @@ latest-version@^3.0.0:
dependencies: dependencies:
package-json "^4.0.0" package-json "^4.0.0"
lazystream@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4"
dependencies:
readable-stream "^2.0.5"
lcid@^2.0.0: lcid@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf"
dependencies: dependencies:
invert-kv "^2.0.0" invert-kv "^2.0.0"
lead@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/lead/-/lead-1.0.0.tgz#6f14f99a37be3a9dd784f5495690e5903466ee42"
dependencies:
flush-write-stream "^1.0.2"
levn@^0.3.0, levn@~0.3.0: levn@^0.3.0, levn@~0.3.0:
version "0.3.0" version "0.3.0"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
@ -4477,12 +4409,6 @@ normalize-url@^1.0.0:
query-string "^4.1.0" query-string "^4.1.0"
sort-keys "^1.0.0" sort-keys "^1.0.0"
now-and-later@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/now-and-later/-/now-and-later-2.0.0.tgz#bc61cbb456d79cb32207ce47ca05136ff2e7d6ee"
dependencies:
once "^1.3.2"
npm-bundled@^1.0.1: npm-bundled@^1.0.1:
version "1.0.3" version "1.0.3"
resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308" resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308"
@ -4553,7 +4479,7 @@ object-visit@^1.0.0:
dependencies: dependencies:
isobject "^3.0.0" isobject "^3.0.0"
object.assign@^4.0.1, object.assign@^4.0.4, object.assign@^4.1.0: object.assign@^4.0.1, object.assign@^4.1.0:
version "4.1.0" version "4.1.0"
resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da"
dependencies: dependencies:
@ -4597,7 +4523,7 @@ on-finished@^2.3.0:
dependencies: dependencies:
ee-first "1.1.1" ee-first "1.1.1"
once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.4.0: once@^1.3.0, once@^1.3.1, once@^1.4.0:
version "1.4.0" version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
dependencies: dependencies:
@ -4648,12 +4574,6 @@ ordered-read-streams@^0.1.0:
version "0.1.0" version "0.1.0"
resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126" resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126"
ordered-read-streams@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz#77c0cb37c41525d64166d990ffad7ec6a0e1363e"
dependencies:
readable-stream "^2.0.1"
os-browserify@^0.3.0: os-browserify@^0.3.0:
version "0.3.0" version "0.3.0"
resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27"
@ -5287,7 +5207,7 @@ private@^0.1.6:
version "0.1.8" version "0.1.8"
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: process-nextick-args@~2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
@ -5340,7 +5260,7 @@ pump@^2.0.0, pump@^2.0.1:
end-of-stream "^1.1.0" end-of-stream "^1.1.0"
once "^1.3.1" once "^1.3.1"
pumpify@^1.3.3, pumpify@^1.3.5: pumpify@^1.3.3:
version "1.5.1" version "1.5.1"
resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce"
dependencies: dependencies:
@ -5426,7 +5346,7 @@ read-pkg@^3.0.0:
normalize-package-data "^2.3.2" normalize-package-data "^2.3.2"
path-type "^3.0.0" path-type "^3.0.0"
"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6: "readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6:
version "2.3.6" version "2.3.6"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
dependencies: dependencies:
@ -5576,21 +5496,6 @@ remove-array-items@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/remove-array-items/-/remove-array-items-1.0.0.tgz#07bf42cb332f4cf6e85ead83b5e4e896d2326b21" resolved "https://registry.yarnpkg.com/remove-array-items/-/remove-array-items-1.0.0.tgz#07bf42cb332f4cf6e85ead83b5e4e896d2326b21"
remove-bom-buffer@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz#c2bf1e377520d324f623892e33c10cac2c252b53"
dependencies:
is-buffer "^1.1.5"
is-utf8 "^0.2.1"
remove-bom-stream@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz#05f1a593f16e42e1fb90ebf59de8e569525f9523"
dependencies:
remove-bom-buffer "^3.0.0"
safe-buffer "^5.1.0"
through2 "^2.0.3"
remove-trailing-separator@^1.0.1: remove-trailing-separator@^1.0.1:
version "1.1.0" version "1.1.0"
resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
@ -5661,12 +5566,6 @@ resolve-from@^3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748"
resolve-options@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/resolve-options/-/resolve-options-1.1.0.tgz#32bb9e39c06d67338dc9378c0d6d6074566ad131"
dependencies:
value-or-function "^3.0.0"
resolve-path@^1.3.3: resolve-path@^1.3.3:
version "1.4.0" version "1.4.0"
resolved "https://registry.yarnpkg.com/resolve-path/-/resolve-path-1.4.0.tgz#c4bda9f5efb2fce65247873ab36bb4d834fe16f7" resolved "https://registry.yarnpkg.com/resolve-path/-/resolve-path-1.4.0.tgz#c4bda9f5efb2fce65247873ab36bb4d834fe16f7"
@ -5923,10 +5822,6 @@ source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
version "0.6.1" version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
source-map@^0.7.3:
version "0.7.3"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
sparkles@^1.0.0: sparkles@^1.0.0:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.1.tgz#008db65edce6c50eec0c5e228e1945061dd0437c" resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.1.tgz#008db65edce6c50eec0c5e228e1945061dd0437c"
@ -6172,14 +6067,7 @@ thenify-all@^1.0.0:
dependencies: dependencies:
any-promise "^1.0.0" any-promise "^1.0.0"
through2-filter@^2.0.0: through2@2.0.3, through2@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec"
dependencies:
through2 "~2.0.0"
xtend "~4.0.0"
through2@2.0.3, through2@^2.0.0, through2@^2.0.3, through2@~2.0.0:
version "2.0.3" version "2.0.3"
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
dependencies: dependencies:
@ -6227,13 +6115,6 @@ tmp@^0.0.33:
dependencies: dependencies:
os-tmpdir "~1.0.2" os-tmpdir "~1.0.2"
to-absolute-glob@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1865f43d9e74b0822db9f145b78cff7d0f7c849b"
dependencies:
is-absolute "^1.0.0"
is-negated-glob "^1.0.0"
to-arraybuffer@^1.0.0: to-arraybuffer@^1.0.0:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43"
@ -6264,12 +6145,6 @@ to-regex@^3.0.1, to-regex@^3.0.2:
regex-not "^1.0.2" regex-not "^1.0.2"
safe-regex "^1.1.0" safe-regex "^1.1.0"
to-through@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/to-through/-/to-through-2.0.0.tgz#fc92adaba072647bc0b67d6b03664aa195093af6"
dependencies:
through2 "^2.0.3"
toidentifier@1.0.0: toidentifier@1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
@ -6404,13 +6279,6 @@ unique-stream@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b" resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b"
unique-stream@^2.0.2:
version "2.2.1"
resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.2.1.tgz#5aa003cfbe94c5ff866c4e7d668bb1c4dbadb369"
dependencies:
json-stable-stringify "^1.0.0"
through2-filter "^2.0.0"
unique-string@^1.0.0: unique-string@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a"
@ -6542,10 +6410,6 @@ validate-npm-package-license@^3.0.1:
spdx-correct "^3.0.0" spdx-correct "^3.0.0"
spdx-expression-parse "^3.0.0" spdx-expression-parse "^3.0.0"
value-or-function@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813"
vant-doc@^1.0.17: vant-doc@^1.0.17:
version "1.0.17" version "1.0.17"
resolved "https://registry.yarnpkg.com/vant-doc/-/vant-doc-1.0.17.tgz#2897598260b6e670f6b1214adcbceccc3f4a919b" resolved "https://registry.yarnpkg.com/vant-doc/-/vant-doc-1.0.17.tgz#2897598260b6e670f6b1214adcbceccc3f4a919b"
@ -6574,41 +6438,7 @@ vinyl-fs@^0.3.0:
through2 "^0.6.1" through2 "^0.6.1"
vinyl "^0.4.0" vinyl "^0.4.0"
vinyl-fs@^3.0.3: vinyl-sourcemaps-apply@0.2.1, vinyl-sourcemaps-apply@^0.2.0, vinyl-sourcemaps-apply@^0.2.1:
version "3.0.3"
resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-3.0.3.tgz#c85849405f67428feabbbd5c5dbdd64f47d31bc7"
dependencies:
fs-mkdirp-stream "^1.0.0"
glob-stream "^6.1.0"
graceful-fs "^4.0.0"
is-valid-glob "^1.0.0"
lazystream "^1.0.0"
lead "^1.0.0"
object.assign "^4.0.4"
pumpify "^1.3.5"
readable-stream "^2.3.3"
remove-bom-buffer "^3.0.0"
remove-bom-stream "^1.2.0"
resolve-options "^1.1.0"
through2 "^2.0.0"
to-through "^2.0.0"
value-or-function "^3.0.0"
vinyl "^2.0.0"
vinyl-sourcemap "^1.1.0"
vinyl-sourcemap@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz#92a800593a38703a8cdb11d8b300ad4be63b3e16"
dependencies:
append-buffer "^1.0.2"
convert-source-map "^1.5.0"
graceful-fs "^4.1.6"
normalize-path "^2.1.1"
now-and-later "^2.0.0"
remove-bom-buffer "^3.0.0"
vinyl "^2.0.0"
vinyl-sourcemaps-apply@0.2.1, vinyl-sourcemaps-apply@^0.2.1:
version "0.2.1" version "0.2.1"
resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705" resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705"
dependencies: dependencies:
@ -6629,17 +6459,6 @@ vinyl@^0.5.0:
clone-stats "^0.0.1" clone-stats "^0.0.1"
replace-ext "0.0.1" replace-ext "0.0.1"
vinyl@^2.0.0, vinyl@^2.1.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.0.tgz#d85b07da96e458d25b2ffe19fece9f2caa13ed86"
dependencies:
clone "^2.1.1"
clone-buffer "^1.0.0"
clone-stats "^1.0.0"
cloneable-readable "^1.0.0"
remove-trailing-separator "^1.0.1"
replace-ext "^1.0.0"
vm-browserify@0.0.4: vm-browserify@0.0.4:
version "0.0.4" version "0.0.4"
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"
@ -6905,7 +6724,7 @@ xregexp@4.0.0:
version "4.0.0" version "4.0.0"
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.0.0.tgz#e698189de49dd2a18cc5687b05e17c8e43943020" resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.0.0.tgz#e698189de49dd2a18cc5687b05e17c8e43943020"
"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1: "xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.1:
version "4.0.1" version "4.0.1"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"