Commit 9dcc4eb0 authored by Leopoldthecoder's avatar Leopoldthecoder Committed by Black Wayne

Docs: add algolia search

parent f9379844
...@@ -13,3 +13,4 @@ fe.element/element-ui ...@@ -13,3 +13,4 @@ fe.element/element-ui
.npmrc .npmrc
coverage coverage
waiter.config.js waiter.config.js
build/bin/algolia-key.js
'use strict';
const fs = require('fs');
const path = require('path');
const algoliasearch = require('algoliasearch');
const slugify = require('transliteration').slugify;
const key = require('./algolia-key');
const client = algoliasearch('9NLTR1QH8B', key);
['zh-CN', 'en-US'].forEach(lang => {
const indexName = lang === 'zh-CN' ? 'element-zh' : 'element-en';
const index = client.initIndex(indexName);
index.clearIndex(err => {
if (err) return;
fs.readdir(path.resolve(__dirname, `../../examples/docs/${ lang }`), (err, files) => {
if (err) return;
let indices = [];
files.forEach(file => {
const component = file.replace('.md', '');
const content = fs.readFileSync(path.resolve(__dirname, `../../examples/docs/${ lang }/${ file }`), 'utf8');
const matches = content
.replace(/:::[\s\S]*?:::/g, '')
.replace(/```[\s\S]*?```/g, '')
.match(/#{2,4}[^#]*/g)
.map(match => match.replace(/\n+/g, '\n').split('\n').filter(part => !!part))
.map(match => {
const length = match.length;
if (length > 2) {
const desc = match.slice(1, length).join('');
return [match[0], desc];
}
return match;
});
indices = indices.concat(matches.map(match => {
const isComponent = match[0].indexOf('###') < 0;
const title = match[0].replace(/#{2,4}/, '').trim();
const index = { component, title };
index.ranking = isComponent ? 2 : 1;
index.anchor = slugify(title);
index.content = (match[1] || title).replace(/<[^>]+>/g, '');
return index;
}));
});
index.addObjects(indices, (err, res) => {
console.log(err, res);
});
});
});
});
<svg viewBox="0 0 130 18" xmlns="http://www.w3.org/2000/svg"><title>search-by-algolia</title><defs><linearGradient x1="-36.868%" y1="134.936%" x2="129.432%" y2="-27.7%" id="a"><stop stop-color="#00AEFF" offset="0%"/><stop stop-color="#3369E7" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M59.399.022h13.299a2.372 2.372 0 0 1 2.377 2.364V15.62a2.372 2.372 0 0 1-2.377 2.364H59.399a2.372 2.372 0 0 1-2.377-2.364V2.381A2.368 2.368 0 0 1 59.399.022z" fill="url(#a)"/><path d="M66.257 4.56c-2.815 0-5.1 2.272-5.1 5.078 0 2.806 2.284 5.072 5.1 5.072 2.815 0 5.1-2.272 5.1-5.078 0-2.806-2.279-5.072-5.1-5.072zm0 8.652c-1.983 0-3.593-1.602-3.593-3.574 0-1.972 1.61-3.574 3.593-3.574 1.983 0 3.593 1.602 3.593 3.574a3.582 3.582 0 0 1-3.593 3.574zm0-6.418v2.664c0 .076.082.131.153.093l2.377-1.226c.055-.027.071-.093.044-.147a2.96 2.96 0 0 0-2.465-1.487c-.055 0-.11.044-.11.104l.001-.001zm-3.33-1.956l-.312-.311a.783.783 0 0 0-1.106 0l-.372.37a.773.773 0 0 0 0 1.101l.307.305c.049.049.121.038.164-.011.181-.245.378-.479.597-.697.225-.223.455-.42.707-.599.055-.033.06-.109.016-.158h-.001zm5.001-.806v-.616a.781.781 0 0 0-.783-.779h-1.824a.78.78 0 0 0-.783.779v.632c0 .071.066.12.137.104a5.736 5.736 0 0 1 1.588-.223c.52 0 1.035.071 1.534.207a.106.106 0 0 0 .131-.104z" fill="#FFF"/><path d="M102.162 13.762c0 1.455-.372 2.517-1.123 3.193-.75.676-1.895 1.013-3.44 1.013-.564 0-1.736-.109-2.673-.316l.345-1.689c.783.163 1.819.207 2.361.207.86 0 1.473-.174 1.84-.523.367-.349.548-.866.548-1.553v-.349a6.374 6.374 0 0 1-.838.316 4.151 4.151 0 0 1-1.194.158 4.515 4.515 0 0 1-1.616-.278 3.385 3.385 0 0 1-1.254-.817 3.744 3.744 0 0 1-.811-1.351c-.192-.539-.29-1.504-.29-2.212 0-.665.104-1.498.307-2.054a3.925 3.925 0 0 1 .904-1.433 4.124 4.124 0 0 1 1.441-.926 5.31 5.31 0 0 1 1.945-.365c.696 0 1.337.087 1.961.191a15.86 15.86 0 0 1 1.588.332v8.456h-.001zm-5.954-4.206c0 .893.197 1.885.592 2.299.394.414.904.621 1.528.621.34 0 .663-.049.964-.142a2.75 2.75 0 0 0 .734-.332v-5.29a8.531 8.531 0 0 0-1.413-.18c-.778-.022-1.369.294-1.786.801-.411.507-.619 1.395-.619 2.223zm16.12 0c0 .719-.104 1.264-.318 1.858a4.389 4.389 0 0 1-.904 1.52c-.389.42-.854.746-1.402.975-.548.229-1.391.36-1.813.36-.422-.005-1.26-.125-1.802-.36a4.088 4.088 0 0 1-1.397-.975 4.486 4.486 0 0 1-.909-1.52 5.037 5.037 0 0 1-.329-1.858c0-.719.099-1.411.318-1.999.219-.588.526-1.09.92-1.509.394-.42.865-.741 1.402-.97a4.547 4.547 0 0 1 1.786-.338 4.69 4.69 0 0 1 1.791.338c.548.229 1.019.55 1.402.97.389.42.69.921.909 1.509.23.588.345 1.28.345 1.999h.001zm-2.191.005c0-.921-.203-1.689-.597-2.223-.394-.539-.948-.806-1.654-.806-.707 0-1.26.267-1.654.806-.394.539-.586 1.302-.586 2.223 0 .932.197 1.558.592 2.098.394.545.948.812 1.654.812.707 0 1.26-.272 1.654-.812.394-.545.592-1.166.592-2.098h-.001zm6.962 4.707c-3.511.016-3.511-2.822-3.511-3.274L113.583.926l2.142-.338v10.003c0 .256 0 1.88 1.375 1.885v1.792h-.001zm3.774 0h-2.153V5.072l2.153-.338v9.534zm-1.079-10.542c.718 0 1.304-.578 1.304-1.291 0-.714-.581-1.291-1.304-1.291-.723 0-1.304.578-1.304 1.291 0 .714.586 1.291 1.304 1.291zm6.431 1.013c.707 0 1.304.087 1.786.262.482.174.871.42 1.156.73.285.311.488.735.608 1.182.126.447.186.937.186 1.476v5.481a25.24 25.24 0 0 1-1.495.251c-.668.098-1.419.147-2.251.147a6.829 6.829 0 0 1-1.517-.158 3.213 3.213 0 0 1-1.178-.507 2.455 2.455 0 0 1-.761-.904c-.181-.37-.274-.893-.274-1.438 0-.523.104-.855.307-1.215.208-.36.487-.654.838-.883a3.609 3.609 0 0 1 1.227-.49 7.073 7.073 0 0 1 2.202-.103c.263.027.537.076.833.147v-.349c0-.245-.027-.479-.088-.697a1.486 1.486 0 0 0-.307-.583c-.148-.169-.34-.3-.581-.392a2.536 2.536 0 0 0-.915-.163c-.493 0-.942.06-1.353.131-.411.071-.75.153-1.008.245l-.257-1.749c.268-.093.668-.185 1.183-.278a9.335 9.335 0 0 1 1.66-.142l-.001-.001zm.181 7.731c.657 0 1.145-.038 1.484-.104v-2.168a5.097 5.097 0 0 0-1.978-.104c-.241.033-.46.098-.652.191a1.167 1.167 0 0 0-.466.392c-.121.169-.175.267-.175.523 0 .501.175.79.493.981.323.196.75.289 1.293.289h.001zM84.109 4.794c.707 0 1.304.087 1.786.262.482.174.871.42 1.156.73.29.316.487.735.608 1.182.126.447.186.937.186 1.476v5.481a25.24 25.24 0 0 1-1.495.251c-.668.098-1.419.147-2.251.147a6.829 6.829 0 0 1-1.517-.158 3.213 3.213 0 0 1-1.178-.507 2.455 2.455 0 0 1-.761-.904c-.181-.37-.274-.893-.274-1.438 0-.523.104-.855.307-1.215.208-.36.487-.654.838-.883a3.609 3.609 0 0 1 1.227-.49 7.073 7.073 0 0 1 2.202-.103c.257.027.537.076.833.147v-.349c0-.245-.027-.479-.088-.697a1.486 1.486 0 0 0-.307-.583c-.148-.169-.34-.3-.581-.392a2.536 2.536 0 0 0-.915-.163c-.493 0-.942.06-1.353.131-.411.071-.75.153-1.008.245l-.257-1.749c.268-.093.668-.185 1.183-.278a8.89 8.89 0 0 1 1.66-.142l-.001-.001zm.186 7.736c.657 0 1.145-.038 1.484-.104v-2.168a5.097 5.097 0 0 0-1.978-.104c-.241.033-.46.098-.652.191a1.167 1.167 0 0 0-.466.392c-.121.169-.175.267-.175.523 0 .501.175.79.493.981.318.191.75.289 1.293.289h.001zm8.682 1.738c-3.511.016-3.511-2.822-3.511-3.274L89.461.926l2.142-.338v10.003c0 .256 0 1.88 1.375 1.885v1.792h-.001z" fill="#182359"/><path d="M5.027 11.025c0 .698-.252 1.246-.757 1.644-.505.397-1.201.596-2.089.596-.888 0-1.615-.138-2.181-.414v-1.214c.358.168.739.301 1.141.397.403.097.778.145 1.125.145.508 0 .884-.097 1.125-.29a.945.945 0 0 0 .363-.779.978.978 0 0 0-.333-.747c-.222-.204-.68-.446-1.375-.725-.716-.29-1.221-.621-1.515-.994-.294-.372-.44-.82-.44-1.343 0-.655.233-1.171.698-1.547.466-.376 1.09-.564 1.875-.564.752 0 1.5.165 2.245.494l-.408 1.047c-.698-.294-1.321-.44-1.869-.44-.415 0-.73.09-.945.271a.89.89 0 0 0-.322.717c0 .204.043.379.129.524.086.145.227.282.424.411.197.129.551.299 1.063.51.577.24.999.464 1.268.671.269.208.466.442.591.704.125.261.188.569.188.924l-.001.002zm3.98 2.24c-.924 0-1.646-.269-2.167-.808-.521-.539-.782-1.281-.782-2.226 0-.97.242-1.733.725-2.288.483-.555 1.148-.833 1.993-.833.784 0 1.404.238 1.858.714.455.476.682 1.132.682 1.966v.682H7.357c.018.577.174 1.02.467 1.329.294.31.707.465 1.241.465.351 0 .678-.033.98-.099a5.1 5.1 0 0 0 .975-.33v1.026a3.865 3.865 0 0 1-.935.312 5.723 5.723 0 0 1-1.08.091l.002-.001zm-.231-5.199c-.401 0-.722.127-.964.381s-.386.625-.432 1.112h2.696c-.007-.491-.125-.862-.354-1.115-.229-.252-.544-.379-.945-.379l-.001.001zm7.692 5.092l-.252-.827h-.043c-.286.362-.575.608-.865.739-.29.131-.662.196-1.117.196-.584 0-1.039-.158-1.367-.473-.328-.315-.491-.761-.491-1.337 0-.612.227-1.074.682-1.386.455-.312 1.148-.482 2.079-.51l1.026-.032v-.317c0-.38-.089-.663-.266-.851-.177-.188-.452-.282-.824-.282-.304 0-.596.045-.876.134a6.68 6.68 0 0 0-.806.317l-.408-.902a4.414 4.414 0 0 1 1.058-.384 4.856 4.856 0 0 1 1.085-.132c.756 0 1.326.165 1.711.494.385.329.577.847.577 1.552v4.002h-.902l-.001-.001zm-1.88-.859c.458 0 .826-.128 1.104-.384.278-.256.416-.615.416-1.077v-.516l-.763.032c-.594.021-1.027.121-1.297.298s-.406.448-.406.814c0 .265.079.47.236.615.158.145.394.218.709.218h.001zm7.557-5.189c.254 0 .464.018.628.054l-.124 1.176a2.383 2.383 0 0 0-.559-.064c-.505 0-.914.165-1.227.494-.313.329-.47.757-.47 1.284v3.105h-1.262V7.218h.988l.167 1.047h.064c.197-.354.454-.636.771-.843a1.83 1.83 0 0 1 1.023-.312h.001zm4.125 6.155c-.899 0-1.582-.262-2.049-.787-.467-.525-.701-1.277-.701-2.259 0-.999.244-1.767.733-2.304.489-.537 1.195-.806 2.119-.806.627 0 1.191.116 1.692.349l-.381 1.015c-.534-.208-.974-.312-1.321-.312-1.028 0-1.542.682-1.542 2.046 0 .666.128 1.166.384 1.501.256.335.631.502 1.125.502a3.23 3.23 0 0 0 1.595-.419v1.101a2.53 2.53 0 0 1-.722.285 4.356 4.356 0 0 1-.932.086v.002zm8.277-.107h-1.268V9.506c0-.458-.092-.8-.277-1.026-.184-.226-.477-.338-.878-.338-.53 0-.919.158-1.168.475-.249.317-.373.848-.373 1.593v2.949h-1.262V4.801h1.262v2.122c0 .34-.021.704-.064 1.09h.081a1.76 1.76 0 0 1 .717-.666c.306-.158.663-.236 1.072-.236 1.439 0 2.159.725 2.159 2.175v3.873l-.001-.001zm7.649-6.048c.741 0 1.319.269 1.732.806.414.537.62 1.291.62 2.261 0 .974-.209 1.732-.628 2.275-.419.542-1.001.814-1.746.814-.752 0-1.336-.27-1.751-.811h-.086l-.231.704h-.945V4.801h1.262v1.987l-.021.655-.032.553h.054c.401-.591.992-.886 1.772-.886zm-.328 1.031c-.508 0-.875.149-1.098.448-.224.299-.339.799-.346 1.501v.086c0 .723.115 1.247.344 1.571.229.324.603.486 1.123.486.448 0 .787-.177 1.018-.532.231-.354.346-.867.346-1.536 0-1.35-.462-2.025-1.386-2.025l-.001.001zm3.244-.924h1.375l1.209 3.368c.183.48.304.931.365 1.354h.043c.032-.197.091-.436.177-.717.086-.281.541-1.616 1.364-4.004h1.364l-2.541 6.73c-.462 1.235-1.232 1.853-2.31 1.853-.279 0-.551-.03-.816-.091v-.999c.19.043.406.064.65.064.609 0 1.037-.353 1.284-1.058l.22-.559-2.385-5.941h.001z" fill="#1D3657"/></g></svg>
\ No newline at end of file
...@@ -314,6 +314,9 @@ ...@@ -314,6 +314,9 @@
<!-- nav --> <!-- nav -->
<ul class="nav"> <ul class="nav">
<li class="nav-item">
<algolia-search></algolia-search>
</li>
<li class="nav-item"> <li class="nav-item">
<router-link <router-link
active-class="active" active-class="active"
...@@ -391,6 +394,7 @@ ...@@ -391,6 +394,7 @@
</template> </template>
<script> <script>
import ThemePicker from './theme-picker.vue'; import ThemePicker from './theme-picker.vue';
import AlgoliaSearch from './search.vue';
import bus from '../bus'; import bus from '../bus';
import compoLang from '../i18n/component.json'; import compoLang from '../i18n/component.json';
import { version } from 'main/index.js'; import { version } from 'main/index.js';
...@@ -409,7 +413,10 @@ ...@@ -409,7 +413,10 @@
}; };
}, },
components: { ThemePicker }, components: {
ThemePicker,
AlgoliaSearch
},
watch: { watch: {
'$route.path': { '$route.path': {
......
<template>
<el-autocomplete
v-model="query"
size="small"
popper-class="algolia-search"
:fetch-suggestions="querySearch"
:placeholder="placeholder"
:trigger-on-focus="false"
@select="handleSelect">
<template scope="props">
<p class="algolia-search-title" v-if="props.item.title">
<span v-html="props.item.highlightedCompo"></span>
<span class="algolia-search-separator">></span>
<span v-html="props.item.title"></span>
</p>
<p
class="algolia-search-content"
v-if="props.item.content"
v-html="props.item.content"></p>
<img
class="algolia-search-logo"
src="../assets/images/search-by-algolia.svg"
alt="algolia-logo"
v-if="props.item.img">
</template>
</el-autocomplete>
</template>
<style>
.algolia-search {
width: 450px !important;
.el-autocomplete-suggestion__list {
position: static !important;
padding-bottom: 31px;
}
li {
border-bottom: solid 1px #ebebeb;
&:last-child {
border-bottom: none;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
background-color: #dfe4ed;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
box-sizing: border-box;
text-align: right;
img {
display: inline-block;
height: 17px;
margin-top: 10px;
}
}
}
.algolia-highlight {
color: #409EFF;
font-weight: bold;
}
.algolia-search-title {
font-size: 14px;
margin: 6px 0;
line-height: 1.8;
}
.algolia-search-separator {
padding: 0 6px;
}
.algolia-search-content {
font-size: 12px;
margin: 6px 0;
line-height: 2.4;
}
}
</style>
<script>
import algoliasearch from 'algoliasearch';
export default {
data() {
return {
index: null,
query: ''
};
},
computed: {
lang() {
return this.$route.meta.lang;
},
placeholder() {
return this.lang === 'zh-CN' ? '搜索文档' : 'Search';
}
},
watch: {
lang() {
this.initIndex();
}
},
methods: {
initIndex() {
const client = algoliasearch('9NLTR1QH8B', 'a75cbec97cda75ab7334fed9219ecc57');
this.index = client.initIndex(`element-${ this.lang === 'zh-CN' ? 'zh' : 'en' }`);
},
querySearch(query, cb) {
if (!query) return;
this.index.search({ query, hitsPerPage: 6 }, (err, res) => {
if (err) {
console.error(err);
return;
}
if (res.hits.length > 0) {
cb(res.hits.map(hit => {
let content = hit._highlightResult.content.value.replace(/\s+/g, ' ');
const highlightStart = content.indexOf('<span class="algolia-highlight">');
if (highlightStart > -1) {
const highlightEnd = content.lastIndexOf('</span>');
const startEllipsis = highlightStart - 15 > 0;
const endEllipsis = highlightEnd + 22 < content.length;
content = (startEllipsis ? '...' : '') +
content.slice(Math.max(0, highlightStart - 15), Math.min(highlightEnd + 22, content.length)) +
(endEllipsis ? '...' : '');
} else if (content.indexOf('|') > -1) {
content = '';
}
return {
anchor: hit.anchor,
component: hit.component,
highlightedCompo: hit._highlightResult.component.value,
title: hit._highlightResult.title.value,
content
};
}).concat({
img: true
}));
} else {
cb([]);
}
});
},
handleSelect(val) {
if (val.img) return;
const component = val.component || '';
const anchor = val.anchor;
this.$router.push(`/${ this.lang }/component/${ component }${ anchor ? `#${ anchor }` : '' }`);
}
},
mounted() {
this.initIndex();
}
};
</script>
\ No newline at end of file
...@@ -1676,7 +1676,7 @@ Search and select options with a keyword. ...@@ -1676,7 +1676,7 @@ Search and select options with a keyword.
| expand-trigger | trigger mode of expanding current item | string | click / hover | click | | expand-trigger | trigger mode of expanding current item | string | click / hover | click |
| show-all-levels | whether to display all levels of the selected value in the input | boolean | — | true | | show-all-levels | whether to display all levels of the selected value in the input | boolean | — | true |
| filterable | whether the options can be searched | boolean | — | — | | filterable | whether the options can be searched | boolean | — | — |
| debounce | debounce delay when typing filter keyword, in millisecond | number | — | 300 | | debounce | debounce delay when typing filter keyword, in milliseconds | number | — | 300 |
| change-on-select | whether selecting an option of any level is permitted | boolean | — | false | | change-on-select | whether selecting an option of any level is permitted | boolean | — | false |
| size | size of Input | string | large / small / mini | — | | size | size of Input | string | large / small / mini | — |
......
...@@ -381,13 +381,13 @@ This feature is at alpha stage. Feedback welcome. ...@@ -381,13 +381,13 @@ This feature is at alpha stage. Feedback welcome.
| start-placeholder | placeholder for the start date in range mode | string | — | — | | start-placeholder | placeholder for the start date in range mode | string | — | — |
| end-placeholder | placeholder for the end date in range mode | string | — | — | | end-placeholder | placeholder for the end date in range mode | string | — | — |
| type | type of the picker | string | year/month/date/datetime/ week/datetimerange/daterange | date | | type | type of the picker | string | year/month/date/datetime/ week/datetimerange/daterange | date |
| format | format of the input box | string | year `yyyy`, month `MM`, day `dd`, hour `HH`, minute `mm`, second `ss` | yyyy-MM-dd | | format | format of the displayed value in the input box | string | year `yyyy`, month `MM`, day `dd`, hour `HH`, minute `mm`, second `ss` | yyyy-MM-dd |
| align | alignment | left/center/right | left | | align | alignment | left/center/right | left |
| popper-class | custom class name for DatePicker's dropdown | string | — | — | | popper-class | custom class name for DatePicker's dropdown | string | — | — |
| picker-options | additional options, check the table below | object | — | {} | | picker-options | additional options, check the table below | object | — | {} |
| range-separator | range separator | string | — | '-' | | range-separator | range separator | string | — | '-' |
| default-value | optional, default date of the calendar | Date | anything accepted by `new Date()` | — | | default-value | optional, default date of the calendar | Date | anything accepted by `new Date()` | — |
| value-format | optional, format of bounded value | string | year `yyyy`, month `MM`, day `dd`, hour `HH`, minute `mm`, second `ss` | — | | value-format | optional, format of binding value. If not specified, the binding value will be a Date object | string | year `yyyy`, month `MM`, day `dd`, hour `HH`, minute `mm`, second `ss` | — |
| name | same as `name` in native input | string | — | — | | name | same as `name` in native input | string | — | — |
### Picker Options ### Picker Options
...@@ -396,7 +396,7 @@ This feature is at alpha stage. Feedback welcome. ...@@ -396,7 +396,7 @@ This feature is at alpha stage. Feedback welcome.
| shortcuts | a { text, onClick } object array to set shortcut options, check the table below | object[] | — | — | | shortcuts | a { text, onClick } object array to set shortcut options, check the table below | object[] | — | — |
| disabledDate | a function determining if a date is disabled with that date as its parameter. Should return a Boolean | function | — | — | | disabledDate | a function determining if a date is disabled with that date as its parameter. Should return a Boolean | function | — | — |
| firstDayOfWeek | first day of week | Number | 1 to 7 | 7 | | firstDayOfWeek | first day of week | Number | 1 to 7 | 7 |
| onPick | a callback that triggers when the seleted date is changed. Only for `daterange` and `datetimerange`. | Function({ maxDate, minDate }) | - | - | | onPick | a callback that triggers when the selected date is changed. Only for `daterange` and `datetimerange`. | Function({ maxDate, minDate }) | - | - |
### shortcuts ### shortcuts
| Attribute | Description | Type | Accepted Values | Default | | Attribute | Description | Type | Accepted Values | Default |
...@@ -408,11 +408,11 @@ This feature is at alpha stage. Feedback welcome. ...@@ -408,11 +408,11 @@ This feature is at alpha stage. Feedback welcome.
### Events ### Events
| Event Name | Description | Parameters | | Event Name | Description | Parameters |
|---------|--------|---------| |---------|--------|---------|
| change | triggers when user confirms the value | component's bounded value | | change | triggers when user confirms the value | component's binding value |
| blur | triggers when Input blurs | (event: Event) | | blur | triggers when Input blurs | (event: Event) |
| focus | triggers when Input focuses | (event: Event) | | focus | triggers when Input focuses | (event: Event) |
### Methods ### Methods
| Method | Description | Parameters | | Method | Description | Parameters |
|------|--------|-------| |------|--------|-------|
| focus | focus the Input component | - | | focus | focus the Input component | |
...@@ -246,13 +246,13 @@ DateTimePicker is derived from DatePicker and TimePicker. For a more detailed ex ...@@ -246,13 +246,13 @@ DateTimePicker is derived from DatePicker and TimePicker. For a more detailed ex
| start-placeholder | placeholder for the start date in range mode | string | — | — | | start-placeholder | placeholder for the start date in range mode | string | — | — |
| end-placeholder | placeholder for the end date in range mode | string | — | — | | end-placeholder | placeholder for the end date in range mode | string | — | — |
| type | type of the picker | string | year/month/date/datetime/ week/datetimerange/daterange | date | | type | type of the picker | string | year/month/date/datetime/ week/datetimerange/daterange | date |
| format | format of the picker | string | year `yyyy` month `MM` day `dd`, hour `HH`, minute `mm`, second `ss` | yyyy-MM-dd | | format | format of the displayed value in the input box | string | year `yyyy` month `MM` day `dd`, hour `HH`, minute `mm`, second `ss` | yyyy-MM-dd |
| align | alignment | left/center/right | left | | align | alignment | left/center/right | left |
| popper-class | custom class name for DateTimePicker's dropdown | string | — | — | | popper-class | custom class name for DateTimePicker's dropdown | string | — | — |
| picker-options | additional options, check the table below | object | — | {} | | picker-options | additional options, check the table below | object | — | {} |
| range-separator | range separator | string | - | '-' | | range-separator | range separator | string | - | '-' |
| default-value | optional, default date of the calendar | Date | anything accepted by `new Date()` | — | | default-value | optional, default date of the calendar | Date | anything accepted by `new Date()` | — |
| value-format | optional, format of bounded value | string | year `yyyy`, month `MM`, day `dd`, hour `HH`, minute `mm`, second `ss` | — | | value-format | optional, format of binding value. If not specified, the binding value will be a Date object | string | year `yyyy`, month `MM`, day `dd`, hour `HH`, minute `mm`, second `ss` | — |
| name | same as `name` in native input | string | — | — | | name | same as `name` in native input | string | — | — |
### Picker Options ### Picker Options
...@@ -271,11 +271,11 @@ DateTimePicker is derived from DatePicker and TimePicker. For a more detailed ex ...@@ -271,11 +271,11 @@ DateTimePicker is derived from DatePicker and TimePicker. For a more detailed ex
### Events ### Events
| Event Name | Description | Parameters | | Event Name | Description | Parameters |
|---------|--------|---------| |---------|--------|---------|
| change | triggers when user confirms the value | component's bounded value | | change | triggers when user confirms the value | component's binding value |
| blur | triggers when Input blurs | (event: Event) | | blur | triggers when Input blurs | (event: Event) |
| focus | triggers when Input focuses | (event: Event) | | focus | triggers when Input focuses | (event: Event) |
### Methods ### Methods
| Method | Description | Parameters | | Method | Description | Parameters |
|------|--------|-------| |------|--------|-------|
| focus | focus the Input component | - | | focus | focus the Input component | |
# Components Document
<script>
import { addClass } from 'examples/dom/class.js';
module.exports = {
ready() {
addClass(this.$el.parentNode, 'no-toc')
}
}
</script>
\ No newline at end of file
...@@ -160,7 +160,7 @@ Use attribute `size` to set additional sizes with `medium`, `small` or `mini`. ...@@ -160,7 +160,7 @@ Use attribute `size` to set additional sizes with `medium`, `small` or `mini`.
|size | size of the component | string | large/small| — | |size | size of the component | string | large/small| — |
|disabled| whether the component is disabled | boolean | — | false | |disabled| whether the component is disabled | boolean | — | false |
|controls| whether to enable the control buttons | boolean | — | true | |controls| whether to enable the control buttons | boolean | — | true |
|debounce| debounce delay when typing, in millisecond | number | — | 300 | |debounce| debounce delay when typing, in milliseconds | number | — | 300 |
|controls-position | position of the control buttons | string | right | - | |controls-position | position of the control buttons | string | right | - |
|name | same as `name` in native input | string | — | — | |name | same as `name` in native input | string | — | — |
|label | label text | string | — | — | |label | label text | string | — | — |
......
...@@ -657,6 +657,7 @@ Attribute | Description | Type | Options | Default ...@@ -657,6 +657,7 @@ Attribute | Description | Type | Options | Default
| props | configuration options, see the following table | object | — | — | | props | configuration options, see the following table | object | — | — |
|icon | icon name | string | — | — | |icon | icon name | string | — | — |
|value | binding value | string | — | — | |value | binding value | string | — | — |
| debounce | debounce delay when typing, in milliseconds | number | — | 300 |
|fetch-suggestions | a method to fetch input suggestions. When suggestions are ready, invoke `callback(data:[])` to return them to Autocomplete | Function(queryString, callback) | — | — | |fetch-suggestions | a method to fetch input suggestions. When suggestions are ready, invoke `callback(data:[])` to return them to Autocomplete | Function(queryString, callback) | — | — |
| popper-class | custom class name for autocomplete's dropdown | string | — | — | | popper-class | custom class name for autocomplete's dropdown | string | — | — |
| trigger-on-focus | whether show suggestions when input focus | boolean | — | true | | trigger-on-focus | whether show suggestions when input focus | boolean | — | true |
......
...@@ -214,7 +214,7 @@ Selecting a range of values is supported. ...@@ -214,7 +214,7 @@ Selecting a range of values is supported.
| vertical | vertical mode | boolean | — | false | | vertical | vertical mode | boolean | — | false |
| height | Slider height, required in vertical mode | String | — | — | | height | Slider height, required in vertical mode | String | — | — |
| label | label for screen reader | String | — | — | | label | label for screen reader | String | — | — |
|debounce| debounce delay when typing, in millisecond, works when `show-input` is true | number | — | 300 | |debounce| debounce delay when typing, in milliseconds, works when `show-input` is true | number | — | 300 |
## Events ## Events
| Event Name | Description | Parameters | | Event Name | Description | Parameters |
......
...@@ -391,13 +391,13 @@ ...@@ -391,13 +391,13 @@
| start-placeholder | 范围选择时开始日期的占位内容 | string | — | — | | start-placeholder | 范围选择时开始日期的占位内容 | string | — | — |
| end-placeholder | 范围选择时结束日期的占位内容 | string | — | — | | end-placeholder | 范围选择时结束日期的占位内容 | string | — | — |
| type | 显示类型 | string | year/month/date/week/ datetime/datetimerange/daterange | date | | type | 显示类型 | string | year/month/date/week/ datetime/datetimerange/daterange | date |
| format | 输入框的时间日期格式 | string | 年 `yyyy`,月 `MM`,日 `dd`,小时 `HH`,分 `mm`,秒 `ss` | yyyy-MM-dd | | format | 显示在输入框中的格式 | string | 年 `yyyy`,月 `MM`,日 `dd`,小时 `HH`,分 `mm`,秒 `ss` | yyyy-MM-dd |
| align | 对齐方式 | string | left, center, right | left | | align | 对齐方式 | string | left, center, right | left |
| popper-class | DatePicker 下拉框的类名 | string | — | — | | popper-class | DatePicker 下拉框的类名 | string | — | — |
| picker-options | 当前时间日期选择器特有的选项参考下表 | object | — | {} | | picker-options | 当前时间日期选择器特有的选项参考下表 | object | — | {} |
| range-separator | 选择范围时的分隔符 | string | — | '-' | | range-separator | 选择范围时的分隔符 | string | — | '-' |
| default-value | 可选,选择器打开时默认显示的时间 | Date | 可被`new Date()`解析 | — | | default-value | 可选,选择器打开时默认显示的时间 | Date | 可被`new Date()`解析 | — |
| value-format | 可选,绑定值的格式 | string | 年 `yyyy`,月 `MM`,日 `dd`,小时 `HH`,分 `mm`,秒 `ss` | — | | value-format | 可选,绑定值的格式。不指定则绑定值为 Date 对象 | string | 年 `yyyy`,月 `MM`,日 `dd`,小时 `HH`,分 `mm`,秒 `ss` | — |
| name | 原生属性 | string | — | — | | name | 原生属性 | string | — | — |
### Picker Options ### Picker Options
...@@ -406,7 +406,7 @@ ...@@ -406,7 +406,7 @@
| shortcuts | 设置快捷选项,需要传入 { text, onClick } 对象用法参考 demo 或下表 | Object[] | — | — | | shortcuts | 设置快捷选项,需要传入 { text, onClick } 对象用法参考 demo 或下表 | Object[] | — | — |
| disabledDate | 设置禁用状态,参数为当前日期,要求返回 Boolean | Function | — | — | | disabledDate | 设置禁用状态,参数为当前日期,要求返回 Boolean | Function | — | — |
| firstDayOfWeek | 周起始日 | Number | 1 到 7 | 7 | | firstDayOfWeek | 周起始日 | Number | 1 到 7 | 7 |
| onPick | 选中日期后会执行的回调,只有当 `daterange``datetimerange` 才生效 | Function({ maxDate, minDate }) | - | - | | onPick | 选中日期后会执行的回调,只有当 `daterange``datetimerange` 才生效 | Function({ maxDate, minDate }) | — | — |
### Shortcuts ### Shortcuts
| 参数 | 说明 | 类型 | 可选值 | 默认值 | | 参数 | 说明 | 类型 | 可选值 | 默认值 |
...@@ -417,11 +417,11 @@ ...@@ -417,11 +417,11 @@
### Events ### Events
| 事件名称 | 说明 | 回调参数 | | 事件名称 | 说明 | 回调参数 |
|---------|--------|---------| |---------|--------|---------|
| change | 用户确认选定的值时触发 | 组件绑定值 | | change | 用户确认选定的值时触发 | 组件绑定值。格式与绑定值一致,可受 `value-format` 控制 |
| blur | 当 input 失去焦点时触发 | (event: Event) | | blur | 当 input 失去焦点时触发 | (event: Event) |
| focus | 当 input 获得焦点时触发 | (event: Event) | | focus | 当 input 获得焦点时触发 | (event: Event) |
### Methods ### Methods
| 方法名 | 说明 | 参数 | | 方法名 | 说明 | 参数 |
| ---- | ---- | ---- | | ---- | ---- | ---- |
| focus | 使 input 获取焦点 | - | | focus | 使 input 获取焦点 | |
...@@ -245,13 +245,13 @@ DateTimePicker 由 DatePicker 和 TimePicker 派生,`Picker Options` 或者其 ...@@ -245,13 +245,13 @@ DateTimePicker 由 DatePicker 和 TimePicker 派生,`Picker Options` 或者其
| start-placeholder | 范围选择时开始日期的占位内容 | string | — | — | | start-placeholder | 范围选择时开始日期的占位内容 | string | — | — |
| end-placeholder | 范围选择时结束日期的占位内容 | string | — | — | | end-placeholder | 范围选择时结束日期的占位内容 | string | — | — |
| type | 显示类型 | string | year/month/date/week/ datetime/datetimerange/daterange | date | | type | 显示类型 | string | year/month/date/week/ datetime/datetimerange/daterange | date |
| format | 时间日期格式化 | string | 年 `yyyy`,月 `MM`,日 `dd`,小时 `HH`,分 `mm`,秒 `ss` | yyyy-MM-dd | | format | 显示在输入框中的格式 | string | 年 `yyyy`,月 `MM`,日 `dd`,小时 `HH`,分 `mm`,秒 `ss` | yyyy-MM-dd |
| align | 对齐方式 | string | left, center, right | left | | align | 对齐方式 | string | left, center, right | left |
| popper-class | DateTimePicker 下拉框的类名 | string | — | — | | popper-class | DateTimePicker 下拉框的类名 | string | — | — |
| picker-options | 当前时间日期选择器特有的选项参考下表 | object | — | {} | | picker-options | 当前时间日期选择器特有的选项参考下表 | object | — | {} |
| range-separator | 选择范围时的分隔符 | string | - | '-' | | range-separator | 选择范围时的分隔符 | string | - | '-' |
| default-value | 可选,选择器打开时默认显示的时间 | Date | 可被`new Date()`解析 | — | | default-value | 可选,选择器打开时默认显示的时间 | Date | 可被`new Date()`解析 | — |
| value-format | 可选,绑定值的格式 | string | 年 `yyyy`,月 `MM`,日 `dd`,小时 `HH`,分 `mm`,秒 `ss` | — | | value-format | 可选,绑定值的格式。不指定则绑定值为 Date 对象 | string | 年 `yyyy`,月 `MM`,日 `dd`,小时 `HH`,分 `mm`,秒 `ss` | — |
| name | 原生属性 | string | — | — | | name | 原生属性 | string | — | — |
### Picker Options ### Picker Options
...@@ -270,11 +270,11 @@ DateTimePicker 由 DatePicker 和 TimePicker 派生,`Picker Options` 或者其 ...@@ -270,11 +270,11 @@ DateTimePicker 由 DatePicker 和 TimePicker 派生,`Picker Options` 或者其
### Events ### Events
| Event Name | Description | Parameters | | Event Name | Description | Parameters |
|---------|--------|---------| |---------|--------|---------|
| change | 用户确认选定的值时触发 | 组件绑定值 | | change | 用户确认选定的值时触发 | 组件绑定值。格式与绑定值一致,可受 `value-format` 控制 |
| blur | 当 input 失去焦点时触发 | (event: Event) | | blur | 当 input 失去焦点时触发 | (event: Event) |
| focus | 当 input 获得焦点时触发 | (event: Event) | | focus | 当 input 获得焦点时触发 | (event: Event) |
### Methods ### Methods
| 方法名 | 说明 | 参数 | | 方法名 | 说明 | 参数 |
| ---- | ---- | ---- | | ---- | ---- | ---- |
| focus | 使 input 获取焦点 | - | | focus | 使 input 获取焦点 | |
# 组件说明文档
<script>
import { addClass } from 'examples/dom/class.js';
module.exports = {
ready() {
addClass(this.$el.parentNode, 'no-toc')
}
}
</script>
\ No newline at end of file
...@@ -813,7 +813,8 @@ export default { ...@@ -813,7 +813,8 @@ export default {
| placeholder | 输入框占位文本 | string | — | — | | placeholder | 输入框占位文本 | string | — | — |
| disabled | 禁用 | boolean | — | false | | disabled | 禁用 | boolean | — | false |
| props | 配置选项,具体见下表 | object | — | — | | props | 配置选项,具体见下表 | object | — | — |
| value | 必填值输入绑定值 | string | — | — | | value | 必填值,输入绑定值 | string | — | — |
| debounce | 获取输入建议的去抖延时 | number | — | 300 |
| fetch-suggestions | 返回输入建议的方法,仅当你的输入建议数据 resolve 时,通过调用 callback(data:[]) 来返回它 | Function(queryString, callback) | — | — | | fetch-suggestions | 返回输入建议的方法,仅当你的输入建议数据 resolve 时,通过调用 callback(data:[]) 来返回它 | Function(queryString, callback) | — | — |
| popper-class | Autocomplete 下拉列表的类名 | string | — | — | | popper-class | Autocomplete 下拉列表的类名 | string | — | — |
| trigger-on-focus | 是否在输入框 focus 时显示建议列表 | boolean | — | true | | trigger-on-focus | 是否在输入框 focus 时显示建议列表 | boolean | — | true |
...@@ -822,6 +823,7 @@ export default { ...@@ -822,6 +823,7 @@ export default {
| name | 原生属性 | string | — | — | | name | 原生属性 | string | — | — |
| select-when-unmatched | 在输入没有任何匹配建议的情况下,按下回车是否触发 `select` 事件 | boolean | — | false | | select-when-unmatched | 在输入没有任何匹配建议的情况下,按下回车是否触发 `select` 事件 | boolean | — | false |
| label | 输入框关联的label文字 | string | — | — | | label | 输入框关联的label文字 | string | — | — |
### props ### props
| 参数 | 说明 | 类型 | 可选值 | 默认值 | | 参数 | 说明 | 类型 | 可选值 | 默认值 |
| -------- | ----------------- | ------ | ------ | ------ | | -------- | ----------------- | ------ | ------ | ------ |
......
...@@ -28,6 +28,10 @@ ...@@ -28,6 +28,10 @@
"test": "npm run lint && npm run build:theme && cross-env CI_ENV=/dev/ karma start test/unit/karma.conf.js --single-run", "test": "npm run lint && npm run build:theme && cross-env CI_ENV=/dev/ karma start test/unit/karma.conf.js --single-run",
"test:watch": "npm run build:theme && karma start test/unit/karma.conf.js" "test:watch": "npm run build:theme && karma start test/unit/karma.conf.js"
}, },
"faas": {
"domain": "element",
"public": "examples/element-ui"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git@github.com:ElemeFE/element.git" "url": "git@github.com:ElemeFE/element.git"
...@@ -54,6 +58,7 @@ ...@@ -54,6 +58,7 @@
"vue": "^2.3.0" "vue": "^2.3.0"
}, },
"devDependencies": { "devDependencies": {
"algoliasearch": "^3.24.5",
"babel-cli": "^6.14.0", "babel-cli": "^6.14.0",
"babel-core": "^6.14.0", "babel-core": "^6.14.0",
"babel-loader": "^6.2.5", "babel-loader": "^6.2.5",
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
visible-arrow visible-arrow
:class="[popperClass ? popperClass : '']" :class="[popperClass ? popperClass : '']"
ref="suggestions" ref="suggestions"
placement="bottom-start"
:id="id"> :id="id">
<li <li
v-for="(item, index) in suggestions" v-for="(item, index) in suggestions"
...@@ -51,6 +52,7 @@ ...@@ -51,6 +52,7 @@
</div> </div>
</template> </template>
<script> <script>
import debounce from 'throttle-debounce/debounce';
import ElInput from 'element-ui/packages/input'; import ElInput from 'element-ui/packages/input';
import Clickoutside from 'element-ui/src/utils/clickoutside'; import Clickoutside from 'element-ui/src/utils/clickoutside';
import ElAutocompleteSuggestions from './autocomplete-suggestions.vue'; import ElAutocompleteSuggestions from './autocomplete-suggestions.vue';
...@@ -100,7 +102,11 @@ ...@@ -100,7 +102,11 @@
type: Boolean, type: Boolean,
default: false default: false
}, },
label: String label: String,
debounce: {
type: Number,
default: 300
}
}, },
data() { data() {
return { return {
...@@ -152,13 +158,13 @@ ...@@ -152,13 +158,13 @@
this.suggestions = []; this.suggestions = [];
return; return;
} }
this.getData(value); this.debouncedGetData(value);
}, },
handleFocus(event) { handleFocus(event) {
this.activated = true; this.activated = true;
this.$emit('focus', event); this.$emit('focus', event);
if (this.triggerOnFocus) { if (this.triggerOnFocus) {
this.getData(this.value); this.debouncedGetData(this.value);
} }
}, },
handleBlur(event) { handleBlur(event) {
...@@ -214,6 +220,9 @@ ...@@ -214,6 +220,9 @@
} }
}, },
mounted() { mounted() {
this.debouncedGetData = debounce(this.debounce, (val) => {
this.getData(val);
});
this.$on('item-click', item => { this.$on('item-click', item => {
this.select(item); this.select(item);
}); });
......
...@@ -129,14 +129,21 @@ ...@@ -129,14 +129,21 @@
</div> </div>
</div> </div>
<div class="el-picker-panel__footer" v-if="showTime"> <div class="el-picker-panel__footer" v-if="showTime">
<a <el-button
size="mini"
type="text"
class="el-picker-panel__link-btn" class="el-picker-panel__link-btn"
@click="handleClear">{{ t('el.datepicker.clear') }}</a> @click="handleClear">
<button {{ t('el.datepicker.clear') }}
type="button" </el-button>
class="el-picker-panel__btn" <el-button
@click="handleConfirm()" plain
:disabled="btnDisabled">{{ t('el.datepicker.confirm') }}</button> size="mini"
class="el-picker-panel__link-btn"
:disabled="btnDisabled"
@click="handleConfirm()">
{{ t('el.datepicker.confirm') }}
</el-button>
</div> </div>
</div> </div>
</transition> </transition>
......
...@@ -112,14 +112,20 @@ ...@@ -112,14 +112,20 @@
<div <div
class="el-picker-panel__footer" class="el-picker-panel__footer"
v-show="footerVisible && currentView === 'date'"> v-show="footerVisible && currentView === 'date'">
<a <el-button
href="JavaScript:" size="mini"
type="text"
class="el-picker-panel__link-btn" class="el-picker-panel__link-btn"
@click="changeToNow">{{ t('el.datepicker.now') }}</a> @click="changeToNow">
<button {{ t('el.datepicker.now') }}
type="button" </el-button>
class="el-picker-panel__btn" <el-button
@click="confirm">{{ t('el.datepicker.confirm') }}</button> plain
size="mini"
class="el-picker-panel__link-btn"
@click="confirm">
{{ t('el.datepicker.confirm') }}
</el-button>
</div> </div>
</div> </div>
</transition> </transition>
......
...@@ -95,6 +95,7 @@ export default function calcTextareaHeight( ...@@ -95,6 +95,7 @@ export default function calcTextareaHeight(
} }
height = Math.min(maxHeight, height); height = Math.min(maxHeight, height);
} }
hiddenTextarea.parentNode && hiddenTextarea.parentNode.removeChild(hiddenTextarea);
hiddenTextarea = null;
return { height: height + 'px'}; return { height: height + 'px'};
}; };
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
@include b(autocomplete-suggestion) { @include b(autocomplete-suggestion) {
margin: 5px 0; margin: 5px 0;
box-shadow: $--box-shadow-light; box-shadow: $--box-shadow-light;
border-radius: $--border-radius-base;
&.el-popper .popper__arrow { &.el-popper .popper__arrow {
left: 24px !important; left: 24px !important;
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
text-align: right; text-align: right;
background-color: $--color-white; background-color: $--color-white;
position: relative; position: relative;
font-size: 0;
} }
@include e(shortcut) { @include e(shortcut) {
...@@ -85,11 +86,7 @@ ...@@ -85,11 +86,7 @@
} }
@include e(link-btn) { @include e(link-btn) {
cursor: pointer; vertical-align: middle;
color: $--color-primary;
text-decoration: none;
padding: 15px;
font-size: 12px;
} }
.popper__arrow { .popper__arrow {
......
...@@ -70,6 +70,10 @@ after@0.8.1: ...@@ -70,6 +70,10 @@ after@0.8.1:
version "0.8.1" version "0.8.1"
resolved "https://registry.yarnpkg.com/after/-/after-0.8.1.tgz#ab5d4fb883f596816d3515f8f791c0af486dd627" resolved "https://registry.yarnpkg.com/after/-/after-0.8.1.tgz#ab5d4fb883f596816d3515f8f791c0af486dd627"
agentkeepalive@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-2.2.0.tgz#c5d1bd4b129008f1163f236f86e5faea2026e2ef"
ajv-keywords@^1.0.0: ajv-keywords@^1.0.0:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.2.0.tgz#676c4f087bfe1e8b12dca6fda2f3c74f417b099c" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.2.0.tgz#676c4f087bfe1e8b12dca6fda2f3c74f417b099c"
...@@ -81,6 +85,26 @@ ajv@^4.7.0: ...@@ -81,6 +85,26 @@ ajv@^4.7.0:
co "^4.6.0" co "^4.6.0"
json-stable-stringify "^1.0.1" json-stable-stringify "^1.0.1"
algoliasearch@^3.24.5:
version "3.24.5"
resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-3.24.5.tgz#15d1e6c6a059b8b357d7d40122d9841829acfd20"
dependencies:
agentkeepalive "^2.2.0"
debug "^2.6.8"
envify "^4.0.0"
es6-promise "^4.1.0"
events "^1.1.0"
foreach "^2.0.5"
global "^4.3.2"
inherits "^2.0.1"
isarray "^2.0.1"
load-script "^1.0.0"
object-keys "^1.0.11"
querystring-es3 "^0.2.1"
reduce "^1.0.1"
semver "^5.1.0"
tunnel-agent "^0.6.0"
align-text@^0.1.1, align-text@^0.1.3: align-text@^0.1.1, align-text@^0.1.3:
version "0.1.4" version "0.1.4"
resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
...@@ -1104,22 +1128,7 @@ cheerio@^0.20.0: ...@@ -1104,22 +1128,7 @@ cheerio@^0.20.0:
optionalDependencies: optionalDependencies:
jsdom "^7.0.2" jsdom "^7.0.2"
chokidar@^1.0.0, chokidar@^1.4.1: chokidar@^1.0.0, chokidar@^1.4.1, chokidar@^1.7.0:
version "1.6.1"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2"
dependencies:
anymatch "^1.3.0"
async-each "^1.0.0"
glob-parent "^2.0.0"
inherits "^2.0.1"
is-binary-path "^1.0.0"
is-glob "^2.0.0"
path-is-absolute "^1.0.0"
readdirp "^2.0.0"
optionalDependencies:
fsevents "^1.0.0"
chokidar@^1.7.0:
version "1.7.0" version "1.7.0"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468"
dependencies: dependencies:
...@@ -1703,6 +1712,12 @@ debug@^2.1.1, debug@^2.2.0: ...@@ -1703,6 +1712,12 @@ debug@^2.1.1, debug@^2.2.0:
dependencies: dependencies:
ms "0.7.2" ms "0.7.2"
debug@^2.6.8:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
dependencies:
ms "2.0.0"
decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
...@@ -1992,6 +2007,13 @@ entities@^1.1.1, entities@~1.1.1: ...@@ -1992,6 +2007,13 @@ entities@^1.1.1, entities@~1.1.1:
version "1.1.1" version "1.1.1"
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0"
envify@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/envify/-/envify-4.1.0.tgz#f39ad3db9d6801b4e6b478b61028d3f0b6819f7e"
dependencies:
esprima "^4.0.0"
through "~2.3.4"
errno@^0.1.3: errno@^0.1.3:
version "0.1.4" version "0.1.4"
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d"
...@@ -2042,6 +2064,10 @@ es6-promise@^4.0.5, es6-promise@~4.0.3: ...@@ -2042,6 +2064,10 @@ es6-promise@^4.0.5, es6-promise@~4.0.3:
version "4.0.5" version "4.0.5"
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.0.5.tgz#7882f30adde5b240ccfa7f7d78c548330951ae42" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.0.5.tgz#7882f30adde5b240ccfa7f7d78c548330951ae42"
es6-promise@^4.1.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.1.1.tgz#8811e90915d9a0dba36274f0b242dbda78f9c92a"
es6-set@~0.1.3: es6-set@~0.1.3:
version "0.1.4" version "0.1.4"
resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8" resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8"
...@@ -2199,6 +2225,10 @@ esprima@2.7.x, esprima@^2.1.0, esprima@^2.6.0, esprima@^2.7.1: ...@@ -2199,6 +2225,10 @@ esprima@2.7.x, esprima@^2.1.0, esprima@^2.6.0, esprima@^2.7.1:
version "2.7.3" version "2.7.3"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
esprima@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
esprima@~3.1.0: esprima@~3.1.0:
version "3.1.2" version "3.1.2"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.2.tgz#954b5d19321ca436092fa90f06d6798531fe8184" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.2.tgz#954b5d19321ca436092fa90f06d6798531fe8184"
...@@ -2251,7 +2281,7 @@ eventie@^1: ...@@ -2251,7 +2281,7 @@ eventie@^1:
version "1.0.6" version "1.0.6"
resolved "https://registry.yarnpkg.com/eventie/-/eventie-1.0.6.tgz#d4ffc8b0c2b5e493c2aa1b22cbe918d3aee74437" resolved "https://registry.yarnpkg.com/eventie/-/eventie-1.0.6.tgz#d4ffc8b0c2b5e493c2aa1b22cbe918d3aee74437"
events@^1.0.0: events@^1.0.0, events@^1.1.0:
version "1.1.1" version "1.1.1"
resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
...@@ -2854,6 +2884,13 @@ global@^4.3.0: ...@@ -2854,6 +2884,13 @@ global@^4.3.0:
min-document "^2.19.0" min-document "^2.19.0"
process "~0.5.1" process "~0.5.1"
global@^4.3.2:
version "4.3.2"
resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f"
dependencies:
min-document "^2.19.0"
process "~0.5.1"
globals@^9.0.0, globals@^9.14.0: globals@^9.0.0, globals@^9.14.0:
version "9.14.0" version "9.14.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034"
...@@ -3638,6 +3675,10 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: ...@@ -3638,6 +3675,10 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
isarray@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.2.tgz#5aa99638daf2248b10b9598b763a045688ece3ee"
isbinaryfile@^3.0.0: isbinaryfile@^3.0.0:
version "3.0.1" version "3.0.1"
resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.1.tgz#6e99573675372e841a0520c036b41513d783e79e" resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.1.tgz#6e99573675372e841a0520c036b41513d783e79e"
...@@ -4021,6 +4062,10 @@ load-json-file@^1.0.0: ...@@ -4021,6 +4062,10 @@ load-json-file@^1.0.0:
pinkie-promise "^2.0.0" pinkie-promise "^2.0.0"
strip-bom "^2.0.0" strip-bom "^2.0.0"
load-script@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/load-script/-/load-script-1.0.0.tgz#0491939e0bee5643ee494a7e3da3d2bac70c6ca4"
loader-utils@0.2.x, loader-utils@^0.2.11, loader-utils@^0.2.15, loader-utils@^0.2.16, loader-utils@^0.2.3, loader-utils@^0.2.5, loader-utils@^0.2.7, loader-utils@~0.2.2, loader-utils@~0.2.5: loader-utils@0.2.x, loader-utils@^0.2.11, loader-utils@^0.2.15, loader-utils@^0.2.16, loader-utils@^0.2.3, loader-utils@^0.2.5, loader-utils@^0.2.7, loader-utils@~0.2.2, loader-utils@~0.2.5:
version "0.2.16" version "0.2.16"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.16.tgz#f08632066ed8282835dff88dfb52704765adee6d" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.16.tgz#f08632066ed8282835dff88dfb52704765adee6d"
...@@ -4622,6 +4667,10 @@ ms@0.7.2: ...@@ -4622,6 +4667,10 @@ ms@0.7.2:
version "0.7.2" version "0.7.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765"
ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
multipipe@^0.1.0, multipipe@^0.1.2: multipipe@^0.1.0, multipipe@^0.1.2:
version "0.1.2" version "0.1.2"
resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b"
...@@ -4862,7 +4911,7 @@ object-hash@^1.1.4: ...@@ -4862,7 +4911,7 @@ object-hash@^1.1.4:
version "1.1.5" version "1.1.5"
resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.1.5.tgz#bdd844e030d0861b692ca175c6cab6868ec233d7" resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.1.5.tgz#bdd844e030d0861b692ca175c6cab6868ec233d7"
object-keys@^1.0.10, object-keys@^1.0.8: object-keys@^1.0.10, object-keys@^1.0.11, object-keys@^1.0.8, object-keys@~1.0.0:
version "1.0.11" version "1.0.11"
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
...@@ -5904,7 +5953,7 @@ query-string@^4.1.0: ...@@ -5904,7 +5953,7 @@ query-string@^4.1.0:
object-assign "^4.1.0" object-assign "^4.1.0"
strict-uri-encode "^1.0.0" strict-uri-encode "^1.0.0"
querystring-es3@^0.2.0: querystring-es3@^0.2.0, querystring-es3@^0.2.1:
version "0.2.1" version "0.2.1"
resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"
...@@ -6077,6 +6126,12 @@ reduce-function-call@^1.0.1: ...@@ -6077,6 +6126,12 @@ reduce-function-call@^1.0.1:
dependencies: dependencies:
balanced-match "^0.4.2" balanced-match "^0.4.2"
reduce@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/reduce/-/reduce-1.0.1.tgz#14fa2e5ff1fc560703a020cbb5fbaab691565804"
dependencies:
object-keys "~1.0.0"
regenerate@^1.2.1: regenerate@^1.2.1:
version "1.3.2" version "1.3.2"
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260"
...@@ -6304,6 +6359,10 @@ rx-lite@^3.1.2: ...@@ -6304,6 +6359,10 @@ rx-lite@^3.1.2:
version "3.1.2" version "3.1.2"
resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102"
safe-buffer@^5.0.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
saladcss-bem@^0.0.1: saladcss-bem@^0.0.1:
version "0.0.1" version "0.0.1"
resolved "https://registry.yarnpkg.com/saladcss-bem/-/saladcss-bem-0.0.1.tgz#72070014ff3f6a49a6872cfcb3946c7758f40fc2" resolved "https://registry.yarnpkg.com/saladcss-bem/-/saladcss-bem-0.0.1.tgz#72070014ff3f6a49a6872cfcb3946c7758f40fc2"
...@@ -6887,7 +6946,7 @@ through2@^2.0.0: ...@@ -6887,7 +6946,7 @@ through2@^2.0.0:
readable-stream "^2.1.5" readable-stream "^2.1.5"
xtend "~4.0.1" xtend "~4.0.1"
through@^2.3.6, through@~2.3.6: through@^2.3.6, through@~2.3.4, through@~2.3.6:
version "2.3.8" version "2.3.8"
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
...@@ -6975,6 +7034,12 @@ tty-browserify@0.0.0: ...@@ -6975,6 +7034,12 @@ tty-browserify@0.0.0:
version "0.0.0" version "0.0.0"
resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
tunnel-agent@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
dependencies:
safe-buffer "^5.0.1"
tunnel-agent@~0.4.1: tunnel-agent@~0.4.1:
version "0.4.3" version "0.4.3"
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment