├── .babelrc ├── .gitignore ├── .npmignore ├── README.md ├── dist ├── tree-table.common.js ├── tree-table.es.js └── tree-table.js ├── example ├── data.js ├── dev.html ├── index.js └── test.html ├── jsx.d.ts ├── package.json ├── rollup.config.js ├── src ├── dependence.ts ├── expand.ts ├── index.tsx ├── inject.ts ├── props.ts └── utils.tsx ├── tsconfig.json ├── types ├── dependence.d.ts ├── expand.d.ts ├── index.d.ts ├── inject.d.ts ├── props.d.ts └── utils.d.ts └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["es2015", { "modules": false }] 4 | ], 5 | "plugins": [ 6 | "transform-vue-jsx" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | types/*.jsx 4 | types/*.js 5 | src1 -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .node_modules 2 | bin 3 | yarn.lock 4 | gulpfile.js 5 | .babelrc 6 | example 7 | .git 8 | .gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # element-tree-grid 2 |

3 | 4 | Version 5 | 6 | 7 | Downloads 8 | 9 |

10 | 11 | tree grid extends `element` ui with `vue` 12 | 13 | #### releases v1.0.4 14 | - try to expand row expanded after data reload 15 | 16 | 17 | **having problems** with `` 18 | 19 | if you have any idea , **welcome !!!** 20 | 21 | 22 | > [demos](http://htmlpreview.github.io/?https://github.com/foolishchow/element-tree-grid/blob/master/example/test.html) 23 | 24 | > start 25 | 26 | - clone to your project 27 | ```shell 28 | git clone https://github.com/foolishchow/element-tree-grid.git 29 | cd element-tree-grid 30 | npm install #or yarn 31 | npm run dev 32 | ``` 33 | 34 | - use with node 35 | - install 36 | ```shell 37 | npm install element-tree-grid --save 38 | ``` 39 | - in you project 40 | 41 | ```javascript 42 | //common 43 | var ElTreeGrid = require('element-tree-grid'); 44 | Vue.component(ElTreeGrid.name,ElTreeGrid); 45 | ``` 46 | 47 | 48 | > useage 49 | 50 | - common useage 51 | ```html 52 | 53 | 57 | 58 | 59 | ``` 60 | - get children from remote 61 | - html 62 | ```html 63 |
64 | 65 | 70 | 71 | 72 | 73 |
74 | ``` 75 | - javascript 76 | ```javascript 77 | new Vue({ 78 | el: "#app", 79 | data: { 80 | model: { 81 | menus: trees 82 | } 83 | }, 84 | methods:{ 85 | remote(row,callback){ 86 | // async or sync are both supported 87 | setTimeout(function() { 88 | callback(row.children) 89 | },500) 90 | } 91 | } 92 | }) 93 | ``` 94 | - attributes 95 | > all props of `el-table-column` are supported; 96 | 97 | | name | description | values | 98 | | ----------- | :--------------------------------------------------------------------------------------------- | :-------------------------------------------: | 99 | | prop | same as `el-table-column` | | 100 | | label | same as `el-table-column` | | 101 | | width | same as `el-table-column` | | 102 | | fixed | same as `el-table-column` | | 103 | | resizable | same as `el-table-column` | | 104 | | formatter | same as `el-table-column` | | 105 | | className | same as `el-table-column` | | 106 | | treeKey | the key for neasted parse | type:`String`,
default:`'id'` | 107 | | childNumKey | the key of childNum | type:`String`,
default:`'child_num'` | 108 | | parentKey | the key of parent_id | type:`String`,
default:`'parent_id'` | 109 | | levelKey | the key of node's depth | type:`String`,
default:`'depth'` | 110 | | childKey | the key of node's children been placed | type:`String`,
default:`'children'` | 111 | | fileIcon | file icon className | type:`String`,
default:`'el-icon-file'` | 112 | | folderIcon | folder icon className ,when opend use: `folderIcon-open` | type:`String`,
default:`'el-icon-folder'` | 113 | | remote | remote method to get children | type:`Function`,
default:`null` | 114 | | allRemote | request all data from remote ,you have to config prop `remote` first,default use request cache | type:`Boolean`,
default:`false` | 115 | | expandAll | expand all nodes when loaded | type:`Boolean`,
default:`false` | 116 | | expandKey | key tells if the line is opened at inited ( just expended once ) | type:`String`,
default:`expanded` | 117 | | indentSize | indent number ,united in `px` | type:`Number`,
default:`14` | 118 | 119 | > examples 120 | 121 | - common 122 | ```html 123 | 129 | ``` 130 | 131 | - with formatter 132 | ```html 133 | 140 | ``` 141 | 142 | - with scopedSolts 143 | ```html 144 | 150 | 155 | 156 | ``` 157 | 158 | 159 | 160 | -------------------------------------------------------------------------------- /dist/tree-table.common.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/; 4 | 5 | var index = function mergeJSXProps(objs) { 6 | return objs.reduce(function (a, b) { 7 | var aa, bb, key, nestedKey, temp; 8 | for (key in b) { 9 | aa = a[key]; 10 | bb = b[key]; 11 | if (aa && nestRE.test(key)) { 12 | // normalize class 13 | if (key === 'class') { 14 | if (typeof aa === 'string') { 15 | temp = aa; 16 | a[key] = aa = {}; 17 | aa[temp] = true; 18 | } 19 | if (typeof bb === 'string') { 20 | temp = bb; 21 | b[key] = bb = {}; 22 | bb[temp] = true; 23 | } 24 | } 25 | if (key === 'on' || key === 'nativeOn' || key === 'hook') { 26 | // merge functions 27 | for (nestedKey in bb) { 28 | aa[nestedKey] = mergeFn(aa[nestedKey], bb[nestedKey]); 29 | } 30 | } else if (Array.isArray(aa)) { 31 | a[key] = aa.concat(bb); 32 | } else if (Array.isArray(bb)) { 33 | a[key] = [aa].concat(bb); 34 | } else { 35 | for (nestedKey in bb) { 36 | aa[nestedKey] = bb[nestedKey]; 37 | } 38 | } 39 | } else { 40 | a[key] = b[key]; 41 | } 42 | } 43 | return a; 44 | }, {}); 45 | }; 46 | 47 | function mergeFn(a, b) { 48 | return function () { 49 | a.apply(this, arguments); 50 | b.apply(this, arguments); 51 | }; 52 | } 53 | 54 | function hasChild(context, scope) { 55 | var _a = context.props, 56 | childNumKey = _a.childNumKey, 57 | childKey = _a.childKey, 58 | row = scope.row; 59 | if (row[childNumKey] != undefined) { 60 | return row[childNumKey] > 0 ? true : false; 61 | } 62 | if (row[childKey] != undefined) { 63 | return row[childKey].length > 0 ? true : false; 64 | } else { 65 | return false; 66 | } 67 | } 68 | function hasChildInData(context, scope) { 69 | var _a = context.props, 70 | childNumKey = _a.childNumKey, 71 | childKey = _a.childKey, 72 | treeKey = _a.treeKey, 73 | parentKey = _a.parentKey, 74 | data = scope.store.states._data, 75 | row = scope.row; 76 | return data.filter(function (d) { 77 | return d[parentKey] == row[treeKey]; 78 | }).length > 0; 79 | } 80 | function paddingLeft(context, scope) { 81 | return parseInt(scope.row[context.props.levelKey]) * parseInt(context.props.indentSize.toString()) + 'px'; 82 | } 83 | function removeCachedExpanedRow(context, scope) { 84 | var _treeCachedExpanded = scope.store.states._treeCachedExpanded, 85 | treeKey = context.props.treeKey, 86 | row = scope.row; 87 | scope.store.states._treeCachedExpanded = _treeCachedExpanded.filter(function (crow) { 88 | return crow[treeKey] != row[treeKey]; 89 | }); 90 | } 91 | function isCachedExpanedRow(context, scope) { 92 | var _treeCachedExpanded = scope.store.states._treeCachedExpanded, 93 | treeKey = context.props.treeKey, 94 | row = scope.row; 95 | return _treeCachedExpanded.map(function (row) { 96 | return row[treeKey]; 97 | }).filter(function (_treeKey) { 98 | return _treeKey == row[treeKey]; 99 | }).length > 0; 100 | } 101 | var isUnExpanded = function isUnExpanded(context, scope) { 102 | var row = scope.row, 103 | data = scope.store.states._data, 104 | _treeRowExpanded = scope.store.states._treeRowExpanded, 105 | key = context.props.treeKey, 106 | parentKey = context.props.parentKey; 107 | var _hasChild = hasChild(context, scope); 108 | if (!_hasChild) return false; 109 | var IsRowShowed = data.some(function (item) { 110 | return item[key] == row[key]; 111 | }); 112 | if (!IsRowShowed) return false; 113 | var isInexpanded = scope.store.states._treeRowExpanded.some(function (treeKey) { 114 | return treeKey[context.props.treeKey] == scope.row[context.props.treeKey]; 115 | }); 116 | if (!isInexpanded) return false; 117 | return !hasChildInData(context, scope); 118 | }; 119 | function isNeedExpanedRow(context, scope) { 120 | if (context.props.expandAll && !scope.store.states._treeInitedExpanded.some(function (treeKey) { 121 | return treeKey == scope.row[context.props.treeKey]; 122 | })) { 123 | scope.store.states._treeInitedExpanded.push(scope.row[context.props.treeKey]); 124 | return true; 125 | } 126 | if (isLoadingRow(context, scope)) return false; 127 | if (isUnExpanded(context, scope)) { 128 | scope.store.states._treeRowExpanded = scope.store.states._treeRowExpanded.filter(function (ex) { 129 | return ex[context.props.treeKey] != scope.row[context.props.treeKey]; 130 | }); 131 | return true; 132 | } 133 | var expandKey = context.props.expandKey, 134 | row = scope.row; 135 | if (expandKey && row[expandKey] && !scope.store.states._treeInitedExpanded.some(function (treeKey) { 136 | return treeKey == row[context.props.treeKey]; 137 | })) { 138 | scope.store.states._treeInitedExpanded.push(scope.row[context.props.treeKey]); 139 | return true; 140 | } 141 | var result = isCachedExpanedRow(context, scope); 142 | if (result) removeCachedExpanedRow(context, scope); 143 | return result; 144 | } 145 | function isLoadingRow(context, scope) { 146 | var _treeRowLoading = scope.store.states._treeRowLoading, 147 | treeKey = context.props.treeKey, 148 | row = scope.row; 149 | return _treeRowLoading.map(function (row) { 150 | return row[treeKey]; 151 | }).filter(function (_treeKey) { 152 | return _treeKey == row[treeKey]; 153 | }).length > 0; 154 | } 155 | function isExpandedRow(context, scope) { 156 | var _treeRowExpanded = scope.store.states._treeRowExpanded, 157 | treeKey = context.props.treeKey, 158 | row = scope.row; 159 | return _treeRowExpanded.map(function (row) { 160 | return row[treeKey]; 161 | }).filter(function (_treeKey) { 162 | return _treeKey == row[treeKey]; 163 | }).length > 0; 164 | } 165 | function icon(scope, context) { 166 | if (isLoadingRow(context, scope)) return 'el-icon-loading'; 167 | if (isExpandedRow(context, scope)) return 'el-icon-caret-bottom'; 168 | return 'el-icon-caret-right'; 169 | } 170 | function folderIcon(context, scope) { 171 | var floder = context.props.folderIcon, 172 | floder_open = context.props.folderIcon + '-open'; 173 | return isExpandedRow(context, scope) ? floder_open : floder; 174 | } 175 | function renderDetail(h, context, scope) { 176 | if (context.data.scopedSlots && context.data.scopedSlots.default) { 177 | return context.data.scopedSlots.default(scope); 178 | } 179 | if (context.props.formatter) { 180 | return h( 181 | 'span', 182 | null, 183 | [context.props.formatter(scope.row, scope.column)] 184 | ); 185 | } 186 | return h( 187 | 'span', 188 | null, 189 | [" ", scope.row[context.props.prop]] 190 | ); 191 | } 192 | 193 | var clone = function clone(data) { 194 | return JSON.parse(JSON.stringify(data)); 195 | }; 196 | var indexOf = function indexOf(val, arr) { 197 | var has = -1; 198 | for (var i = 0; i < arr.length; i++) { 199 | if (arr[i] == val) { 200 | has = i; 201 | break; 202 | } 203 | } 204 | return has; 205 | }; 206 | var descendantsIds = function descendantsIds(id, data, parentKey, treeKey) { 207 | var result = [], 208 | compare = [id], 209 | length = -1; 210 | while (length != compare.length) { 211 | length = compare.length; 212 | data.forEach(function (item) { 213 | if (indexOf(item[parentKey], compare) > -1 && indexOf(item[treeKey], compare) == -1) { 214 | result.push(item[treeKey]); 215 | compare.push(item[treeKey]); 216 | } 217 | }); 218 | } 219 | return result; 220 | }; 221 | var toggleExpanded = function toggleExpanded(context, scope, isExpended) { 222 | var treeKey = context.props.treeKey, 223 | states = scope.store.states; 224 | states._treeCachedExpanded = states._treeCachedExpanded.filter(function (r) { 225 | return r[treeKey] != scope.row[treeKey]; 226 | }); 227 | if (isExpended) { 228 | states._treeRowExpanded = states._treeRowExpanded.filter(function (r) { 229 | return r[treeKey] != scope.row[treeKey]; 230 | }); 231 | } else { 232 | states._treeRowExpanded.push(scope.row); 233 | } 234 | }; 235 | var toggleLoading = function toggleLoading(context, scope, isloading) { 236 | var treeKey = context.props.treeKey; 237 | if (isloading) { 238 | scope.store.states._treeRowLoading = scope.store.states._treeRowLoading.filter(function (r) { 239 | return r[treeKey] != scope.row[treeKey]; 240 | }); 241 | } else { 242 | scope.store.states._treeRowLoading.push(scope.row); 243 | } 244 | }; 245 | var commit = function commit(context, scope, list) { 246 | var owner = scope.store.table; //methods.owner(context.parent); 247 | var states = scope.store.states; 248 | // let selection = states.selection; 249 | owner.store.commit('setData', list); 250 | /* owner.clearSelection(); 251 | let data = owner.store.states._data; 252 | data.forEach(row => { 253 | if (has(context, row, selection)) { 254 | owner.toggleRowSelection(row) 255 | } 256 | }); */ 257 | }; 258 | var getIndex = function getIndex(context, scope, data) { 259 | var index = -1, 260 | treeKey = context.props.treeKey; 261 | data.forEach(function (r, i) { 262 | if (r[treeKey] == scope.row[treeKey]) { 263 | index = i; 264 | } 265 | }); 266 | return index; 267 | }; 268 | var Colspand = function Colspand(context, scope, data) { 269 | var _a = context.props, 270 | parentKey = _a.parentKey, 271 | treeKey = _a.treeKey, 272 | childKey = _a.childKey, 273 | states = scope.store.states, 274 | row = scope.row, 275 | result = []; 276 | var removeIds = []; 277 | removeIds = descendantsIds(row[treeKey], data, parentKey, treeKey); 278 | data = data.filter(function (item) { 279 | return !removeIds.some(function (id) { 280 | return id == item[treeKey]; 281 | }); 282 | }); 283 | var NeedToCached = states._treeRowExpanded.filter(function (item) { 284 | return removeIds.some(function (id) { 285 | return id == item[treeKey]; 286 | }); 287 | }); 288 | var _treeCachedExpanded = states._treeCachedExpanded; 289 | NeedToCached.forEach(function (item) { 290 | if (!_treeCachedExpanded.some(function (i) { 291 | return i[treeKey] == item[treeKey]; 292 | })) { 293 | states._treeCachedExpanded.push(item); 294 | } 295 | }); 296 | states._treeRowExpanded = states._treeRowExpanded.filter(function (item) { 297 | return !removeIds.some(function (id) { 298 | return id == item[treeKey]; 299 | }); 300 | }); 301 | commit(context, scope, data); 302 | }; 303 | var insertRows = function insertRows(context, scope, children, updateChild) { 304 | if (updateChild === void 0) { 305 | updateChild = false; 306 | } 307 | var _data = clone(scope.store.states._data); 308 | var _index = getIndex(context, scope, _data); 309 | var prefix = _data.slice(0, _index + 1); 310 | var i = 0; 311 | while (i < _index + 1) { 312 | _data.shift(); 313 | i++; 314 | } 315 | if (updateChild) prefix[_index][context.props.childKey] = children; 316 | _data = prefix.concat(children).concat(_data); 317 | return _data; 318 | }; 319 | var ExpandRemote = function ExpandRemote(context, scope, data) { 320 | var _a = context.props, 321 | treeKey = _a.treeKey, 322 | remote = _a.remote; 323 | toggleLoading(context, scope, false); 324 | var CallBack = function CallBack(children) { 325 | var childNumKey = context.props.childNumKey; 326 | toggleLoading(context, scope, true); 327 | var _data; 328 | if (children && children.length > 0) { 329 | var updateChild = !context.props.allRemote; 330 | _data = insertRows(context, scope, children, updateChild); 331 | } else { 332 | _data = clone(scope.store.states._data); 333 | var _index = getIndex(context, scope, _data); 334 | _data[_index][childNumKey] = 0; 335 | } 336 | commit(context, scope, _data); 337 | }; 338 | commit(context, scope, data); 339 | remote(scope.row, CallBack); 340 | // console.info(scope.store.states._treeCachedExpanded) 341 | }; 342 | var Expand = function Expand(context, scope, data) { 343 | var childKey = context.props.childKey; 344 | data = insertRows(context, scope, scope.row[childKey]); 345 | commit(context, scope, data); 346 | }; 347 | function doExpand(context, scope) { 348 | var data = clone(scope.store.states._data), 349 | childKey = context.props.childKey; 350 | // line is loading 351 | if (isLoadingRow(context, scope)) return; 352 | var isExpended = isExpandedRow(context, scope); 353 | toggleExpanded(context, scope, isExpended); 354 | if (isExpended) { 355 | return Colspand(context, scope, data); 356 | } 357 | var _a = context.props, 358 | remote = _a.remote, 359 | allRemote = _a.allRemote; 360 | if (remote && allRemote) { 361 | return ExpandRemote(context, scope, data); 362 | } 363 | if (scope.row[childKey]) { 364 | return Expand(context, scope, data); 365 | } else if (remote) { 366 | return ExpandRemote(context, scope, data); 367 | } 368 | Expand(context, scope, data); 369 | } 370 | 371 | var ElTableInject = /** @class */function () { 372 | function ElTableInject() { 373 | this.Injected = {}; 374 | this.InjectedTable = {}; 375 | } 376 | ElTableInject.prototype.isInjected = function (scope) { 377 | return this.Injected[scope.store.table.tableId]; 378 | }; 379 | ElTableInject.prototype.Inject = function (context, scope) { 380 | if (this.isInjected(scope)) return; 381 | this.InjectedTable[scope.store.table.tableId] = scope.store.table; 382 | this.Injected[scope.store.table.tableId] = true; 383 | var key = context.props.treeKey, 384 | parentKey = context.props.parentKey; 385 | var table = scope.store.table; 386 | scope.store.table.$on("current-change", function () { 387 | validateAllExpanded(table, key); 388 | }); 389 | scope.store.states._treeRowExpanded = []; 390 | scope.store.states._treeRowLoading = []; 391 | scope.store.states._treeCachedExpanded = []; 392 | scope.store.states._treeInitedExpanded = []; 393 | // scope.store.mutations 394 | }; 395 | return ElTableInject; 396 | }(); 397 | var validateAllExpanded = function validateAllExpanded(table, key) { 398 | var data = table.store.states._data, 399 | _treeRowExpanded = table.store.states._treeRowExpanded; 400 | var IsDataListChanged = _treeRowExpanded.every(function (expanded) { 401 | return data.every(function (row) { 402 | return row[key] != expanded[key]; 403 | }); 404 | }); 405 | if (IsDataListChanged) { 406 | table.store.states._treeRowExpanded = []; 407 | } 408 | }; 409 | var ElTableInjecter = new ElTableInject(); 410 | 411 | var ElTableTreeColumnPropDefine = { 412 | prop: { 413 | type: String 414 | }, 415 | label: String, 416 | className: String, 417 | labelClassName: String, 418 | property: String, 419 | width: {}, 420 | minWidth: {}, 421 | renderHeader: Function, 422 | sortable: { 423 | type: [String, Boolean], 424 | default: false 425 | }, 426 | sortMethod: Function, 427 | resizable: { 428 | type: Boolean, 429 | default: true 430 | }, 431 | context: {}, 432 | columnKey: String, 433 | align: String, 434 | headerAlign: String, 435 | showTooltipWhenOverflow: Boolean, 436 | showOverflowTooltip: Boolean, 437 | fixed: [Boolean, String], 438 | formatter: Function, 439 | selectable: Function, 440 | reserveSelection: Boolean, 441 | filterMethod: Function, 442 | filteredValue: Array, 443 | filters: Array, 444 | filterMultiple: { 445 | type: Boolean, 446 | default: true 447 | }, 448 | treeKey: { 449 | type: String, 450 | default: 'id' 451 | }, 452 | childNumKey: { 453 | type: String, 454 | default: 'child_num' 455 | }, 456 | parentKey: { 457 | type: String, 458 | default: 'parent_id' 459 | }, 460 | levelKey: { 461 | type: String, 462 | default: 'depth' 463 | }, 464 | childKey: { 465 | type: String, 466 | default: 'children' 467 | }, 468 | fileIcon: { 469 | type: String, 470 | default: 'el-icon-file' 471 | }, 472 | folderIcon: { 473 | type: String, 474 | default: 'el-icon-folder' 475 | }, 476 | remote: { 477 | type: Function, 478 | default: null 479 | }, 480 | allRemote: { 481 | type: Boolean, 482 | default: false 483 | }, 484 | indentSize: { 485 | type: Number, 486 | default: 14 487 | }, 488 | expandAll: { 489 | type: Boolean, 490 | default: false 491 | }, 492 | expandKey: { 493 | type: String, 494 | default: 'expanded' 495 | } 496 | }; 497 | 498 | var RenderFolder = function RenderFolder(h, context, scope) { 499 | if (isNeedExpanedRow(context, scope)) { 500 | setTimeout(function () { 501 | doExpand(context, scope); 502 | }, 15); 503 | } 504 | return h( 505 | 'span', 506 | { 507 | on: { 508 | 'click': function click(e) { 509 | e.preventDefault(); 510 | doExpand(context, scope); 511 | } 512 | } 513 | }, 514 | [h( 515 | 'span', 516 | { style: { paddingLeft: paddingLeft(context, scope) } }, 517 | [h( 518 | 'i', 519 | { 'class': icon(scope, context) }, 520 | [] 521 | ), " ", h( 522 | 'i', 523 | { 'class': folderIcon(context, scope) }, 524 | [] 525 | )] 526 | ), renderDetail(h, context, scope)] 527 | ); 528 | }; 529 | var RenderLeaf = function RenderLeaf(h, context, scope) { 530 | return h( 531 | 'span', 532 | { style: { paddingLeft: paddingLeft(context, scope) } }, 533 | [h( 534 | 'i', 535 | { 'class': context.props.fileIcon }, 536 | [] 537 | ), renderDetail(h, context, scope)] 538 | ); 539 | }; 540 | var RenderContext = function RenderContext(h, context, scope) { 541 | ElTableInjecter.Inject(context, scope); 542 | var hasChild$$1 = hasChild(context, scope); 543 | if (hasChild$$1) return RenderFolder(h, context, scope); 544 | return RenderLeaf(h, context, scope); 545 | }; 546 | var ElTableTreeColumn = { 547 | name: 'el-table-tree-column', 548 | functional: true, 549 | props: ElTableTreeColumnPropDefine, 550 | render: function render(h, context) { 551 | // props will be lost when `scopedSlots` is rendering 552 | var attr = {}; 553 | Object.keys(context.props).map(function (k) { 554 | attr[k] = context.props[k]; 555 | }); 556 | var attrs = { attrs: attr }; 557 | return h( 558 | 'el-table-column', 559 | index([attrs, { scopedSlots: { default: function _default(scope) { 560 | return RenderContext(h, context, scope); 561 | } } }]), 562 | [] 563 | ); 564 | } 565 | }; 566 | if (typeof window !== 'undefined' && window.Vue) { 567 | window.Vue.component('el-table-tree-column', ElTableTreeColumn); 568 | } 569 | 570 | module.exports = ElTableTreeColumn; 571 | -------------------------------------------------------------------------------- /dist/tree-table.es.js: -------------------------------------------------------------------------------- 1 | var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/; 2 | 3 | var index = function mergeJSXProps(objs) { 4 | return objs.reduce(function (a, b) { 5 | var aa, bb, key, nestedKey, temp; 6 | for (key in b) { 7 | aa = a[key]; 8 | bb = b[key]; 9 | if (aa && nestRE.test(key)) { 10 | // normalize class 11 | if (key === 'class') { 12 | if (typeof aa === 'string') { 13 | temp = aa; 14 | a[key] = aa = {}; 15 | aa[temp] = true; 16 | } 17 | if (typeof bb === 'string') { 18 | temp = bb; 19 | b[key] = bb = {}; 20 | bb[temp] = true; 21 | } 22 | } 23 | if (key === 'on' || key === 'nativeOn' || key === 'hook') { 24 | // merge functions 25 | for (nestedKey in bb) { 26 | aa[nestedKey] = mergeFn(aa[nestedKey], bb[nestedKey]); 27 | } 28 | } else if (Array.isArray(aa)) { 29 | a[key] = aa.concat(bb); 30 | } else if (Array.isArray(bb)) { 31 | a[key] = [aa].concat(bb); 32 | } else { 33 | for (nestedKey in bb) { 34 | aa[nestedKey] = bb[nestedKey]; 35 | } 36 | } 37 | } else { 38 | a[key] = b[key]; 39 | } 40 | } 41 | return a; 42 | }, {}); 43 | }; 44 | 45 | function mergeFn(a, b) { 46 | return function () { 47 | a.apply(this, arguments); 48 | b.apply(this, arguments); 49 | }; 50 | } 51 | 52 | function hasChild(context, scope) { 53 | var _a = context.props, 54 | childNumKey = _a.childNumKey, 55 | childKey = _a.childKey, 56 | row = scope.row; 57 | if (row[childNumKey] != undefined) { 58 | return row[childNumKey] > 0 ? true : false; 59 | } 60 | if (row[childKey] != undefined) { 61 | return row[childKey].length > 0 ? true : false; 62 | } else { 63 | return false; 64 | } 65 | } 66 | function hasChildInData(context, scope) { 67 | var _a = context.props, 68 | childNumKey = _a.childNumKey, 69 | childKey = _a.childKey, 70 | treeKey = _a.treeKey, 71 | parentKey = _a.parentKey, 72 | data = scope.store.states._data, 73 | row = scope.row; 74 | return data.filter(function (d) { 75 | return d[parentKey] == row[treeKey]; 76 | }).length > 0; 77 | } 78 | function paddingLeft(context, scope) { 79 | return parseInt(scope.row[context.props.levelKey]) * parseInt(context.props.indentSize.toString()) + 'px'; 80 | } 81 | function removeCachedExpanedRow(context, scope) { 82 | var _treeCachedExpanded = scope.store.states._treeCachedExpanded, 83 | treeKey = context.props.treeKey, 84 | row = scope.row; 85 | scope.store.states._treeCachedExpanded = _treeCachedExpanded.filter(function (crow) { 86 | return crow[treeKey] != row[treeKey]; 87 | }); 88 | } 89 | function isCachedExpanedRow(context, scope) { 90 | var _treeCachedExpanded = scope.store.states._treeCachedExpanded, 91 | treeKey = context.props.treeKey, 92 | row = scope.row; 93 | return _treeCachedExpanded.map(function (row) { 94 | return row[treeKey]; 95 | }).filter(function (_treeKey) { 96 | return _treeKey == row[treeKey]; 97 | }).length > 0; 98 | } 99 | var isUnExpanded = function isUnExpanded(context, scope) { 100 | var row = scope.row, 101 | data = scope.store.states._data, 102 | _treeRowExpanded = scope.store.states._treeRowExpanded, 103 | key = context.props.treeKey, 104 | parentKey = context.props.parentKey; 105 | var _hasChild = hasChild(context, scope); 106 | if (!_hasChild) return false; 107 | var IsRowShowed = data.some(function (item) { 108 | return item[key] == row[key]; 109 | }); 110 | if (!IsRowShowed) return false; 111 | var isInexpanded = scope.store.states._treeRowExpanded.some(function (treeKey) { 112 | return treeKey[context.props.treeKey] == scope.row[context.props.treeKey]; 113 | }); 114 | if (!isInexpanded) return false; 115 | return !hasChildInData(context, scope); 116 | }; 117 | function isNeedExpanedRow(context, scope) { 118 | if (context.props.expandAll && !scope.store.states._treeInitedExpanded.some(function (treeKey) { 119 | return treeKey == scope.row[context.props.treeKey]; 120 | })) { 121 | scope.store.states._treeInitedExpanded.push(scope.row[context.props.treeKey]); 122 | return true; 123 | } 124 | if (isLoadingRow(context, scope)) return false; 125 | if (isUnExpanded(context, scope)) { 126 | scope.store.states._treeRowExpanded = scope.store.states._treeRowExpanded.filter(function (ex) { 127 | return ex[context.props.treeKey] != scope.row[context.props.treeKey]; 128 | }); 129 | return true; 130 | } 131 | var expandKey = context.props.expandKey, 132 | row = scope.row; 133 | if (expandKey && row[expandKey] && !scope.store.states._treeInitedExpanded.some(function (treeKey) { 134 | return treeKey == row[context.props.treeKey]; 135 | })) { 136 | scope.store.states._treeInitedExpanded.push(scope.row[context.props.treeKey]); 137 | return true; 138 | } 139 | var result = isCachedExpanedRow(context, scope); 140 | if (result) removeCachedExpanedRow(context, scope); 141 | return result; 142 | } 143 | function isLoadingRow(context, scope) { 144 | var _treeRowLoading = scope.store.states._treeRowLoading, 145 | treeKey = context.props.treeKey, 146 | row = scope.row; 147 | return _treeRowLoading.map(function (row) { 148 | return row[treeKey]; 149 | }).filter(function (_treeKey) { 150 | return _treeKey == row[treeKey]; 151 | }).length > 0; 152 | } 153 | function isExpandedRow(context, scope) { 154 | var _treeRowExpanded = scope.store.states._treeRowExpanded, 155 | treeKey = context.props.treeKey, 156 | row = scope.row; 157 | return _treeRowExpanded.map(function (row) { 158 | return row[treeKey]; 159 | }).filter(function (_treeKey) { 160 | return _treeKey == row[treeKey]; 161 | }).length > 0; 162 | } 163 | function icon(scope, context) { 164 | if (isLoadingRow(context, scope)) return 'el-icon-loading'; 165 | if (isExpandedRow(context, scope)) return 'el-icon-caret-bottom'; 166 | return 'el-icon-caret-right'; 167 | } 168 | function folderIcon(context, scope) { 169 | var floder = context.props.folderIcon, 170 | floder_open = context.props.folderIcon + '-open'; 171 | return isExpandedRow(context, scope) ? floder_open : floder; 172 | } 173 | function renderDetail(h, context, scope) { 174 | if (context.data.scopedSlots && context.data.scopedSlots.default) { 175 | return context.data.scopedSlots.default(scope); 176 | } 177 | if (context.props.formatter) { 178 | return h( 179 | 'span', 180 | null, 181 | [context.props.formatter(scope.row, scope.column)] 182 | ); 183 | } 184 | return h( 185 | 'span', 186 | null, 187 | [" ", scope.row[context.props.prop]] 188 | ); 189 | } 190 | 191 | var clone = function clone(data) { 192 | return JSON.parse(JSON.stringify(data)); 193 | }; 194 | var indexOf = function indexOf(val, arr) { 195 | var has = -1; 196 | for (var i = 0; i < arr.length; i++) { 197 | if (arr[i] == val) { 198 | has = i; 199 | break; 200 | } 201 | } 202 | return has; 203 | }; 204 | var descendantsIds = function descendantsIds(id, data, parentKey, treeKey) { 205 | var result = [], 206 | compare = [id], 207 | length = -1; 208 | while (length != compare.length) { 209 | length = compare.length; 210 | data.forEach(function (item) { 211 | if (indexOf(item[parentKey], compare) > -1 && indexOf(item[treeKey], compare) == -1) { 212 | result.push(item[treeKey]); 213 | compare.push(item[treeKey]); 214 | } 215 | }); 216 | } 217 | return result; 218 | }; 219 | var toggleExpanded = function toggleExpanded(context, scope, isExpended) { 220 | var treeKey = context.props.treeKey, 221 | states = scope.store.states; 222 | states._treeCachedExpanded = states._treeCachedExpanded.filter(function (r) { 223 | return r[treeKey] != scope.row[treeKey]; 224 | }); 225 | if (isExpended) { 226 | states._treeRowExpanded = states._treeRowExpanded.filter(function (r) { 227 | return r[treeKey] != scope.row[treeKey]; 228 | }); 229 | } else { 230 | states._treeRowExpanded.push(scope.row); 231 | } 232 | }; 233 | var toggleLoading = function toggleLoading(context, scope, isloading) { 234 | var treeKey = context.props.treeKey; 235 | if (isloading) { 236 | scope.store.states._treeRowLoading = scope.store.states._treeRowLoading.filter(function (r) { 237 | return r[treeKey] != scope.row[treeKey]; 238 | }); 239 | } else { 240 | scope.store.states._treeRowLoading.push(scope.row); 241 | } 242 | }; 243 | var commit = function commit(context, scope, list) { 244 | var owner = scope.store.table; //methods.owner(context.parent); 245 | var states = scope.store.states; 246 | // let selection = states.selection; 247 | owner.store.commit('setData', list); 248 | /* owner.clearSelection(); 249 | let data = owner.store.states._data; 250 | data.forEach(row => { 251 | if (has(context, row, selection)) { 252 | owner.toggleRowSelection(row) 253 | } 254 | }); */ 255 | }; 256 | var getIndex = function getIndex(context, scope, data) { 257 | var index = -1, 258 | treeKey = context.props.treeKey; 259 | data.forEach(function (r, i) { 260 | if (r[treeKey] == scope.row[treeKey]) { 261 | index = i; 262 | } 263 | }); 264 | return index; 265 | }; 266 | var Colspand = function Colspand(context, scope, data) { 267 | var _a = context.props, 268 | parentKey = _a.parentKey, 269 | treeKey = _a.treeKey, 270 | childKey = _a.childKey, 271 | states = scope.store.states, 272 | row = scope.row, 273 | result = []; 274 | var removeIds = []; 275 | removeIds = descendantsIds(row[treeKey], data, parentKey, treeKey); 276 | data = data.filter(function (item) { 277 | return !removeIds.some(function (id) { 278 | return id == item[treeKey]; 279 | }); 280 | }); 281 | var NeedToCached = states._treeRowExpanded.filter(function (item) { 282 | return removeIds.some(function (id) { 283 | return id == item[treeKey]; 284 | }); 285 | }); 286 | var _treeCachedExpanded = states._treeCachedExpanded; 287 | NeedToCached.forEach(function (item) { 288 | if (!_treeCachedExpanded.some(function (i) { 289 | return i[treeKey] == item[treeKey]; 290 | })) { 291 | states._treeCachedExpanded.push(item); 292 | } 293 | }); 294 | states._treeRowExpanded = states._treeRowExpanded.filter(function (item) { 295 | return !removeIds.some(function (id) { 296 | return id == item[treeKey]; 297 | }); 298 | }); 299 | commit(context, scope, data); 300 | }; 301 | var insertRows = function insertRows(context, scope, children, updateChild) { 302 | if (updateChild === void 0) { 303 | updateChild = false; 304 | } 305 | var _data = clone(scope.store.states._data); 306 | var _index = getIndex(context, scope, _data); 307 | var prefix = _data.slice(0, _index + 1); 308 | var i = 0; 309 | while (i < _index + 1) { 310 | _data.shift(); 311 | i++; 312 | } 313 | if (updateChild) prefix[_index][context.props.childKey] = children; 314 | _data = prefix.concat(children).concat(_data); 315 | return _data; 316 | }; 317 | var ExpandRemote = function ExpandRemote(context, scope, data) { 318 | var _a = context.props, 319 | treeKey = _a.treeKey, 320 | remote = _a.remote; 321 | toggleLoading(context, scope, false); 322 | var CallBack = function CallBack(children) { 323 | var childNumKey = context.props.childNumKey; 324 | toggleLoading(context, scope, true); 325 | var _data; 326 | if (children && children.length > 0) { 327 | var updateChild = !context.props.allRemote; 328 | _data = insertRows(context, scope, children, updateChild); 329 | } else { 330 | _data = clone(scope.store.states._data); 331 | var _index = getIndex(context, scope, _data); 332 | _data[_index][childNumKey] = 0; 333 | } 334 | commit(context, scope, _data); 335 | }; 336 | commit(context, scope, data); 337 | remote(scope.row, CallBack); 338 | // console.info(scope.store.states._treeCachedExpanded) 339 | }; 340 | var Expand = function Expand(context, scope, data) { 341 | var childKey = context.props.childKey; 342 | data = insertRows(context, scope, scope.row[childKey]); 343 | commit(context, scope, data); 344 | }; 345 | function doExpand(context, scope) { 346 | var data = clone(scope.store.states._data), 347 | childKey = context.props.childKey; 348 | // line is loading 349 | if (isLoadingRow(context, scope)) return; 350 | var isExpended = isExpandedRow(context, scope); 351 | toggleExpanded(context, scope, isExpended); 352 | if (isExpended) { 353 | return Colspand(context, scope, data); 354 | } 355 | var _a = context.props, 356 | remote = _a.remote, 357 | allRemote = _a.allRemote; 358 | if (remote && allRemote) { 359 | return ExpandRemote(context, scope, data); 360 | } 361 | if (scope.row[childKey]) { 362 | return Expand(context, scope, data); 363 | } else if (remote) { 364 | return ExpandRemote(context, scope, data); 365 | } 366 | Expand(context, scope, data); 367 | } 368 | 369 | var ElTableInject = /** @class */function () { 370 | function ElTableInject() { 371 | this.Injected = {}; 372 | this.InjectedTable = {}; 373 | } 374 | ElTableInject.prototype.isInjected = function (scope) { 375 | return this.Injected[scope.store.table.tableId]; 376 | }; 377 | ElTableInject.prototype.Inject = function (context, scope) { 378 | if (this.isInjected(scope)) return; 379 | this.InjectedTable[scope.store.table.tableId] = scope.store.table; 380 | this.Injected[scope.store.table.tableId] = true; 381 | var key = context.props.treeKey, 382 | parentKey = context.props.parentKey; 383 | var table = scope.store.table; 384 | scope.store.table.$on("current-change", function () { 385 | validateAllExpanded(table, key); 386 | }); 387 | scope.store.states._treeRowExpanded = []; 388 | scope.store.states._treeRowLoading = []; 389 | scope.store.states._treeCachedExpanded = []; 390 | scope.store.states._treeInitedExpanded = []; 391 | // scope.store.mutations 392 | }; 393 | return ElTableInject; 394 | }(); 395 | var validateAllExpanded = function validateAllExpanded(table, key) { 396 | var data = table.store.states._data, 397 | _treeRowExpanded = table.store.states._treeRowExpanded; 398 | var IsDataListChanged = _treeRowExpanded.every(function (expanded) { 399 | return data.every(function (row) { 400 | return row[key] != expanded[key]; 401 | }); 402 | }); 403 | if (IsDataListChanged) { 404 | table.store.states._treeRowExpanded = []; 405 | } 406 | }; 407 | var ElTableInjecter = new ElTableInject(); 408 | 409 | var ElTableTreeColumnPropDefine = { 410 | prop: { 411 | type: String 412 | }, 413 | label: String, 414 | className: String, 415 | labelClassName: String, 416 | property: String, 417 | width: {}, 418 | minWidth: {}, 419 | renderHeader: Function, 420 | sortable: { 421 | type: [String, Boolean], 422 | default: false 423 | }, 424 | sortMethod: Function, 425 | resizable: { 426 | type: Boolean, 427 | default: true 428 | }, 429 | context: {}, 430 | columnKey: String, 431 | align: String, 432 | headerAlign: String, 433 | showTooltipWhenOverflow: Boolean, 434 | showOverflowTooltip: Boolean, 435 | fixed: [Boolean, String], 436 | formatter: Function, 437 | selectable: Function, 438 | reserveSelection: Boolean, 439 | filterMethod: Function, 440 | filteredValue: Array, 441 | filters: Array, 442 | filterMultiple: { 443 | type: Boolean, 444 | default: true 445 | }, 446 | treeKey: { 447 | type: String, 448 | default: 'id' 449 | }, 450 | childNumKey: { 451 | type: String, 452 | default: 'child_num' 453 | }, 454 | parentKey: { 455 | type: String, 456 | default: 'parent_id' 457 | }, 458 | levelKey: { 459 | type: String, 460 | default: 'depth' 461 | }, 462 | childKey: { 463 | type: String, 464 | default: 'children' 465 | }, 466 | fileIcon: { 467 | type: String, 468 | default: 'el-icon-file' 469 | }, 470 | folderIcon: { 471 | type: String, 472 | default: 'el-icon-folder' 473 | }, 474 | remote: { 475 | type: Function, 476 | default: null 477 | }, 478 | allRemote: { 479 | type: Boolean, 480 | default: false 481 | }, 482 | indentSize: { 483 | type: Number, 484 | default: 14 485 | }, 486 | expandAll: { 487 | type: Boolean, 488 | default: false 489 | }, 490 | expandKey: { 491 | type: String, 492 | default: 'expanded' 493 | } 494 | }; 495 | 496 | var RenderFolder = function RenderFolder(h, context, scope) { 497 | if (isNeedExpanedRow(context, scope)) { 498 | setTimeout(function () { 499 | doExpand(context, scope); 500 | }, 15); 501 | } 502 | return h( 503 | 'span', 504 | { 505 | on: { 506 | 'click': function click(e) { 507 | e.preventDefault(); 508 | doExpand(context, scope); 509 | } 510 | } 511 | }, 512 | [h( 513 | 'span', 514 | { style: { paddingLeft: paddingLeft(context, scope) } }, 515 | [h( 516 | 'i', 517 | { 'class': icon(scope, context) }, 518 | [] 519 | ), " ", h( 520 | 'i', 521 | { 'class': folderIcon(context, scope) }, 522 | [] 523 | )] 524 | ), renderDetail(h, context, scope)] 525 | ); 526 | }; 527 | var RenderLeaf = function RenderLeaf(h, context, scope) { 528 | return h( 529 | 'span', 530 | { style: { paddingLeft: paddingLeft(context, scope) } }, 531 | [h( 532 | 'i', 533 | { 'class': context.props.fileIcon }, 534 | [] 535 | ), renderDetail(h, context, scope)] 536 | ); 537 | }; 538 | var RenderContext = function RenderContext(h, context, scope) { 539 | ElTableInjecter.Inject(context, scope); 540 | var hasChild$$1 = hasChild(context, scope); 541 | if (hasChild$$1) return RenderFolder(h, context, scope); 542 | return RenderLeaf(h, context, scope); 543 | }; 544 | var ElTableTreeColumn = { 545 | name: 'el-table-tree-column', 546 | functional: true, 547 | props: ElTableTreeColumnPropDefine, 548 | render: function render(h, context) { 549 | // props will be lost when `scopedSlots` is rendering 550 | var attr = {}; 551 | Object.keys(context.props).map(function (k) { 552 | attr[k] = context.props[k]; 553 | }); 554 | var attrs = { attrs: attr }; 555 | return h( 556 | 'el-table-column', 557 | index([attrs, { scopedSlots: { default: function _default(scope) { 558 | return RenderContext(h, context, scope); 559 | } } }]), 560 | [] 561 | ); 562 | } 563 | }; 564 | if (typeof window !== 'undefined' && window.Vue) { 565 | window.Vue.component('el-table-tree-column', ElTableTreeColumn); 566 | } 567 | 568 | export default ElTableTreeColumn; 569 | -------------------------------------------------------------------------------- /dist/tree-table.js: -------------------------------------------------------------------------------- 1 | (function (global, factory) { 2 | typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : 3 | typeof define === 'function' && define.amd ? define(factory) : 4 | (global.ElTableTreeColumn = factory()); 5 | }(this, (function () { 'use strict'; 6 | 7 | var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/; 8 | 9 | var index = function mergeJSXProps(objs) { 10 | return objs.reduce(function (a, b) { 11 | var aa, bb, key, nestedKey, temp; 12 | for (key in b) { 13 | aa = a[key]; 14 | bb = b[key]; 15 | if (aa && nestRE.test(key)) { 16 | // normalize class 17 | if (key === 'class') { 18 | if (typeof aa === 'string') { 19 | temp = aa; 20 | a[key] = aa = {}; 21 | aa[temp] = true; 22 | } 23 | if (typeof bb === 'string') { 24 | temp = bb; 25 | b[key] = bb = {}; 26 | bb[temp] = true; 27 | } 28 | } 29 | if (key === 'on' || key === 'nativeOn' || key === 'hook') { 30 | // merge functions 31 | for (nestedKey in bb) { 32 | aa[nestedKey] = mergeFn(aa[nestedKey], bb[nestedKey]); 33 | } 34 | } else if (Array.isArray(aa)) { 35 | a[key] = aa.concat(bb); 36 | } else if (Array.isArray(bb)) { 37 | a[key] = [aa].concat(bb); 38 | } else { 39 | for (nestedKey in bb) { 40 | aa[nestedKey] = bb[nestedKey]; 41 | } 42 | } 43 | } else { 44 | a[key] = b[key]; 45 | } 46 | } 47 | return a; 48 | }, {}); 49 | }; 50 | 51 | function mergeFn(a, b) { 52 | return function () { 53 | a.apply(this, arguments); 54 | b.apply(this, arguments); 55 | }; 56 | } 57 | 58 | function hasChild(context, scope) { 59 | var _a = context.props, 60 | childNumKey = _a.childNumKey, 61 | childKey = _a.childKey, 62 | row = scope.row; 63 | if (row[childNumKey] != undefined) { 64 | return row[childNumKey] > 0 ? true : false; 65 | } 66 | if (row[childKey] != undefined) { 67 | return row[childKey].length > 0 ? true : false; 68 | } else { 69 | return false; 70 | } 71 | } 72 | function hasChildInData(context, scope) { 73 | var _a = context.props, 74 | childNumKey = _a.childNumKey, 75 | childKey = _a.childKey, 76 | treeKey = _a.treeKey, 77 | parentKey = _a.parentKey, 78 | data = scope.store.states._data, 79 | row = scope.row; 80 | return data.filter(function (d) { 81 | return d[parentKey] == row[treeKey]; 82 | }).length > 0; 83 | } 84 | function paddingLeft(context, scope) { 85 | return parseInt(scope.row[context.props.levelKey]) * parseInt(context.props.indentSize.toString()) + 'px'; 86 | } 87 | function removeCachedExpanedRow(context, scope) { 88 | var _treeCachedExpanded = scope.store.states._treeCachedExpanded, 89 | treeKey = context.props.treeKey, 90 | row = scope.row; 91 | scope.store.states._treeCachedExpanded = _treeCachedExpanded.filter(function (crow) { 92 | return crow[treeKey] != row[treeKey]; 93 | }); 94 | } 95 | function isCachedExpanedRow(context, scope) { 96 | var _treeCachedExpanded = scope.store.states._treeCachedExpanded, 97 | treeKey = context.props.treeKey, 98 | row = scope.row; 99 | return _treeCachedExpanded.map(function (row) { 100 | return row[treeKey]; 101 | }).filter(function (_treeKey) { 102 | return _treeKey == row[treeKey]; 103 | }).length > 0; 104 | } 105 | var isUnExpanded = function isUnExpanded(context, scope) { 106 | var row = scope.row, 107 | data = scope.store.states._data, 108 | _treeRowExpanded = scope.store.states._treeRowExpanded, 109 | key = context.props.treeKey, 110 | parentKey = context.props.parentKey; 111 | var _hasChild = hasChild(context, scope); 112 | if (!_hasChild) return false; 113 | var IsRowShowed = data.some(function (item) { 114 | return item[key] == row[key]; 115 | }); 116 | if (!IsRowShowed) return false; 117 | var isInexpanded = scope.store.states._treeRowExpanded.some(function (treeKey) { 118 | return treeKey[context.props.treeKey] == scope.row[context.props.treeKey]; 119 | }); 120 | if (!isInexpanded) return false; 121 | return !hasChildInData(context, scope); 122 | }; 123 | function isNeedExpanedRow(context, scope) { 124 | if (context.props.expandAll && !scope.store.states._treeInitedExpanded.some(function (treeKey) { 125 | return treeKey == scope.row[context.props.treeKey]; 126 | })) { 127 | scope.store.states._treeInitedExpanded.push(scope.row[context.props.treeKey]); 128 | return true; 129 | } 130 | if (isLoadingRow(context, scope)) return false; 131 | if (isUnExpanded(context, scope)) { 132 | scope.store.states._treeRowExpanded = scope.store.states._treeRowExpanded.filter(function (ex) { 133 | return ex[context.props.treeKey] != scope.row[context.props.treeKey]; 134 | }); 135 | return true; 136 | } 137 | var expandKey = context.props.expandKey, 138 | row = scope.row; 139 | if (expandKey && row[expandKey] && !scope.store.states._treeInitedExpanded.some(function (treeKey) { 140 | return treeKey == row[context.props.treeKey]; 141 | })) { 142 | scope.store.states._treeInitedExpanded.push(scope.row[context.props.treeKey]); 143 | return true; 144 | } 145 | var result = isCachedExpanedRow(context, scope); 146 | if (result) removeCachedExpanedRow(context, scope); 147 | return result; 148 | } 149 | function isLoadingRow(context, scope) { 150 | var _treeRowLoading = scope.store.states._treeRowLoading, 151 | treeKey = context.props.treeKey, 152 | row = scope.row; 153 | return _treeRowLoading.map(function (row) { 154 | return row[treeKey]; 155 | }).filter(function (_treeKey) { 156 | return _treeKey == row[treeKey]; 157 | }).length > 0; 158 | } 159 | function isExpandedRow(context, scope) { 160 | var _treeRowExpanded = scope.store.states._treeRowExpanded, 161 | treeKey = context.props.treeKey, 162 | row = scope.row; 163 | return _treeRowExpanded.map(function (row) { 164 | return row[treeKey]; 165 | }).filter(function (_treeKey) { 166 | return _treeKey == row[treeKey]; 167 | }).length > 0; 168 | } 169 | function icon(scope, context) { 170 | if (isLoadingRow(context, scope)) return 'el-icon-loading'; 171 | if (isExpandedRow(context, scope)) return 'el-icon-caret-bottom'; 172 | return 'el-icon-caret-right'; 173 | } 174 | function folderIcon(context, scope) { 175 | var floder = context.props.folderIcon, 176 | floder_open = context.props.folderIcon + '-open'; 177 | return isExpandedRow(context, scope) ? floder_open : floder; 178 | } 179 | function renderDetail(h, context, scope) { 180 | if (context.data.scopedSlots && context.data.scopedSlots.default) { 181 | return context.data.scopedSlots.default(scope); 182 | } 183 | if (context.props.formatter) { 184 | return h( 185 | 'span', 186 | null, 187 | [context.props.formatter(scope.row, scope.column)] 188 | ); 189 | } 190 | return h( 191 | 'span', 192 | null, 193 | [" ", scope.row[context.props.prop]] 194 | ); 195 | } 196 | 197 | var clone = function clone(data) { 198 | return JSON.parse(JSON.stringify(data)); 199 | }; 200 | var indexOf = function indexOf(val, arr) { 201 | var has = -1; 202 | for (var i = 0; i < arr.length; i++) { 203 | if (arr[i] == val) { 204 | has = i; 205 | break; 206 | } 207 | } 208 | return has; 209 | }; 210 | var descendantsIds = function descendantsIds(id, data, parentKey, treeKey) { 211 | var result = [], 212 | compare = [id], 213 | length = -1; 214 | while (length != compare.length) { 215 | length = compare.length; 216 | data.forEach(function (item) { 217 | if (indexOf(item[parentKey], compare) > -1 && indexOf(item[treeKey], compare) == -1) { 218 | result.push(item[treeKey]); 219 | compare.push(item[treeKey]); 220 | } 221 | }); 222 | } 223 | return result; 224 | }; 225 | var toggleExpanded = function toggleExpanded(context, scope, isExpended) { 226 | var treeKey = context.props.treeKey, 227 | states = scope.store.states; 228 | states._treeCachedExpanded = states._treeCachedExpanded.filter(function (r) { 229 | return r[treeKey] != scope.row[treeKey]; 230 | }); 231 | if (isExpended) { 232 | states._treeRowExpanded = states._treeRowExpanded.filter(function (r) { 233 | return r[treeKey] != scope.row[treeKey]; 234 | }); 235 | } else { 236 | states._treeRowExpanded.push(scope.row); 237 | } 238 | }; 239 | var toggleLoading = function toggleLoading(context, scope, isloading) { 240 | var treeKey = context.props.treeKey; 241 | if (isloading) { 242 | scope.store.states._treeRowLoading = scope.store.states._treeRowLoading.filter(function (r) { 243 | return r[treeKey] != scope.row[treeKey]; 244 | }); 245 | } else { 246 | scope.store.states._treeRowLoading.push(scope.row); 247 | } 248 | }; 249 | var commit = function commit(context, scope, list) { 250 | var owner = scope.store.table; //methods.owner(context.parent); 251 | var states = scope.store.states; 252 | // let selection = states.selection; 253 | owner.store.commit('setData', list); 254 | /* owner.clearSelection(); 255 | let data = owner.store.states._data; 256 | data.forEach(row => { 257 | if (has(context, row, selection)) { 258 | owner.toggleRowSelection(row) 259 | } 260 | }); */ 261 | }; 262 | var getIndex = function getIndex(context, scope, data) { 263 | var index = -1, 264 | treeKey = context.props.treeKey; 265 | data.forEach(function (r, i) { 266 | if (r[treeKey] == scope.row[treeKey]) { 267 | index = i; 268 | } 269 | }); 270 | return index; 271 | }; 272 | var Colspand = function Colspand(context, scope, data) { 273 | var _a = context.props, 274 | parentKey = _a.parentKey, 275 | treeKey = _a.treeKey, 276 | childKey = _a.childKey, 277 | states = scope.store.states, 278 | row = scope.row, 279 | result = []; 280 | var removeIds = []; 281 | removeIds = descendantsIds(row[treeKey], data, parentKey, treeKey); 282 | data = data.filter(function (item) { 283 | return !removeIds.some(function (id) { 284 | return id == item[treeKey]; 285 | }); 286 | }); 287 | var NeedToCached = states._treeRowExpanded.filter(function (item) { 288 | return removeIds.some(function (id) { 289 | return id == item[treeKey]; 290 | }); 291 | }); 292 | var _treeCachedExpanded = states._treeCachedExpanded; 293 | NeedToCached.forEach(function (item) { 294 | if (!_treeCachedExpanded.some(function (i) { 295 | return i[treeKey] == item[treeKey]; 296 | })) { 297 | states._treeCachedExpanded.push(item); 298 | } 299 | }); 300 | states._treeRowExpanded = states._treeRowExpanded.filter(function (item) { 301 | return !removeIds.some(function (id) { 302 | return id == item[treeKey]; 303 | }); 304 | }); 305 | commit(context, scope, data); 306 | }; 307 | var insertRows = function insertRows(context, scope, children, updateChild) { 308 | if (updateChild === void 0) { 309 | updateChild = false; 310 | } 311 | var _data = clone(scope.store.states._data); 312 | var _index = getIndex(context, scope, _data); 313 | var prefix = _data.slice(0, _index + 1); 314 | var i = 0; 315 | while (i < _index + 1) { 316 | _data.shift(); 317 | i++; 318 | } 319 | if (updateChild) prefix[_index][context.props.childKey] = children; 320 | _data = prefix.concat(children).concat(_data); 321 | return _data; 322 | }; 323 | var ExpandRemote = function ExpandRemote(context, scope, data) { 324 | var _a = context.props, 325 | treeKey = _a.treeKey, 326 | remote = _a.remote; 327 | toggleLoading(context, scope, false); 328 | var CallBack = function CallBack(children) { 329 | var childNumKey = context.props.childNumKey; 330 | toggleLoading(context, scope, true); 331 | var _data; 332 | if (children && children.length > 0) { 333 | var updateChild = !context.props.allRemote; 334 | _data = insertRows(context, scope, children, updateChild); 335 | } else { 336 | _data = clone(scope.store.states._data); 337 | var _index = getIndex(context, scope, _data); 338 | _data[_index][childNumKey] = 0; 339 | } 340 | commit(context, scope, _data); 341 | }; 342 | commit(context, scope, data); 343 | remote(scope.row, CallBack); 344 | // console.info(scope.store.states._treeCachedExpanded) 345 | }; 346 | var Expand = function Expand(context, scope, data) { 347 | var childKey = context.props.childKey; 348 | data = insertRows(context, scope, scope.row[childKey]); 349 | commit(context, scope, data); 350 | }; 351 | function doExpand(context, scope) { 352 | var data = clone(scope.store.states._data), 353 | childKey = context.props.childKey; 354 | // line is loading 355 | if (isLoadingRow(context, scope)) return; 356 | var isExpended = isExpandedRow(context, scope); 357 | toggleExpanded(context, scope, isExpended); 358 | if (isExpended) { 359 | return Colspand(context, scope, data); 360 | } 361 | var _a = context.props, 362 | remote = _a.remote, 363 | allRemote = _a.allRemote; 364 | if (remote && allRemote) { 365 | return ExpandRemote(context, scope, data); 366 | } 367 | if (scope.row[childKey]) { 368 | return Expand(context, scope, data); 369 | } else if (remote) { 370 | return ExpandRemote(context, scope, data); 371 | } 372 | Expand(context, scope, data); 373 | } 374 | 375 | var ElTableInject = /** @class */function () { 376 | function ElTableInject() { 377 | this.Injected = {}; 378 | this.InjectedTable = {}; 379 | } 380 | ElTableInject.prototype.isInjected = function (scope) { 381 | return this.Injected[scope.store.table.tableId]; 382 | }; 383 | ElTableInject.prototype.Inject = function (context, scope) { 384 | if (this.isInjected(scope)) return; 385 | this.InjectedTable[scope.store.table.tableId] = scope.store.table; 386 | this.Injected[scope.store.table.tableId] = true; 387 | var key = context.props.treeKey, 388 | parentKey = context.props.parentKey; 389 | var table = scope.store.table; 390 | scope.store.table.$on("current-change", function () { 391 | validateAllExpanded(table, key); 392 | }); 393 | scope.store.states._treeRowExpanded = []; 394 | scope.store.states._treeRowLoading = []; 395 | scope.store.states._treeCachedExpanded = []; 396 | scope.store.states._treeInitedExpanded = []; 397 | // scope.store.mutations 398 | }; 399 | return ElTableInject; 400 | }(); 401 | var validateAllExpanded = function validateAllExpanded(table, key) { 402 | var data = table.store.states._data, 403 | _treeRowExpanded = table.store.states._treeRowExpanded; 404 | var IsDataListChanged = _treeRowExpanded.every(function (expanded) { 405 | return data.every(function (row) { 406 | return row[key] != expanded[key]; 407 | }); 408 | }); 409 | if (IsDataListChanged) { 410 | table.store.states._treeRowExpanded = []; 411 | } 412 | }; 413 | var ElTableInjecter = new ElTableInject(); 414 | 415 | var ElTableTreeColumnPropDefine = { 416 | prop: { 417 | type: String 418 | }, 419 | label: String, 420 | className: String, 421 | labelClassName: String, 422 | property: String, 423 | width: {}, 424 | minWidth: {}, 425 | renderHeader: Function, 426 | sortable: { 427 | type: [String, Boolean], 428 | default: false 429 | }, 430 | sortMethod: Function, 431 | resizable: { 432 | type: Boolean, 433 | default: true 434 | }, 435 | context: {}, 436 | columnKey: String, 437 | align: String, 438 | headerAlign: String, 439 | showTooltipWhenOverflow: Boolean, 440 | showOverflowTooltip: Boolean, 441 | fixed: [Boolean, String], 442 | formatter: Function, 443 | selectable: Function, 444 | reserveSelection: Boolean, 445 | filterMethod: Function, 446 | filteredValue: Array, 447 | filters: Array, 448 | filterMultiple: { 449 | type: Boolean, 450 | default: true 451 | }, 452 | treeKey: { 453 | type: String, 454 | default: 'id' 455 | }, 456 | childNumKey: { 457 | type: String, 458 | default: 'child_num' 459 | }, 460 | parentKey: { 461 | type: String, 462 | default: 'parent_id' 463 | }, 464 | levelKey: { 465 | type: String, 466 | default: 'depth' 467 | }, 468 | childKey: { 469 | type: String, 470 | default: 'children' 471 | }, 472 | fileIcon: { 473 | type: String, 474 | default: 'el-icon-file' 475 | }, 476 | folderIcon: { 477 | type: String, 478 | default: 'el-icon-folder' 479 | }, 480 | remote: { 481 | type: Function, 482 | default: null 483 | }, 484 | allRemote: { 485 | type: Boolean, 486 | default: false 487 | }, 488 | indentSize: { 489 | type: Number, 490 | default: 14 491 | }, 492 | expandAll: { 493 | type: Boolean, 494 | default: false 495 | }, 496 | expandKey: { 497 | type: String, 498 | default: 'expanded' 499 | } 500 | }; 501 | 502 | var RenderFolder = function RenderFolder(h, context, scope) { 503 | if (isNeedExpanedRow(context, scope)) { 504 | setTimeout(function () { 505 | doExpand(context, scope); 506 | }, 15); 507 | } 508 | return h( 509 | 'span', 510 | { 511 | on: { 512 | 'click': function click(e) { 513 | e.preventDefault(); 514 | doExpand(context, scope); 515 | } 516 | } 517 | }, 518 | [h( 519 | 'span', 520 | { style: { paddingLeft: paddingLeft(context, scope) } }, 521 | [h( 522 | 'i', 523 | { 'class': icon(scope, context) }, 524 | [] 525 | ), " ", h( 526 | 'i', 527 | { 'class': folderIcon(context, scope) }, 528 | [] 529 | )] 530 | ), renderDetail(h, context, scope)] 531 | ); 532 | }; 533 | var RenderLeaf = function RenderLeaf(h, context, scope) { 534 | return h( 535 | 'span', 536 | { style: { paddingLeft: paddingLeft(context, scope) } }, 537 | [h( 538 | 'i', 539 | { 'class': context.props.fileIcon }, 540 | [] 541 | ), renderDetail(h, context, scope)] 542 | ); 543 | }; 544 | var RenderContext = function RenderContext(h, context, scope) { 545 | ElTableInjecter.Inject(context, scope); 546 | var hasChild$$1 = hasChild(context, scope); 547 | if (hasChild$$1) return RenderFolder(h, context, scope); 548 | return RenderLeaf(h, context, scope); 549 | }; 550 | var ElTableTreeColumn = { 551 | name: 'el-table-tree-column', 552 | functional: true, 553 | props: ElTableTreeColumnPropDefine, 554 | render: function render(h, context) { 555 | // props will be lost when `scopedSlots` is rendering 556 | var attr = {}; 557 | Object.keys(context.props).map(function (k) { 558 | attr[k] = context.props[k]; 559 | }); 560 | var attrs = { attrs: attr }; 561 | return h( 562 | 'el-table-column', 563 | index([attrs, { scopedSlots: { default: function _default(scope) { 564 | return RenderContext(h, context, scope); 565 | } } }]), 566 | [] 567 | ); 568 | } 569 | }; 570 | if (typeof window !== 'undefined' && window.Vue) { 571 | window.Vue.component('el-table-tree-column', ElTableTreeColumn); 572 | } 573 | 574 | return ElTableTreeColumn; 575 | 576 | }))); 577 | -------------------------------------------------------------------------------- /example/data.js: -------------------------------------------------------------------------------- 1 | window.flatTree = [{ 2 | "id": 1, 3 | "label": "System", 4 | "parent_id": null, 5 | "url": null, 6 | "depth": 0, 7 | "child_num": 3, 8 | "description": "System Manager" 9 | }, { 10 | "id": 2, 11 | "label": "base", 12 | "parent_id": 1, 13 | "depth": 1, 14 | "child_num": 5, 15 | "description": "Base Manager", 16 | }, { 17 | "id": 3, 18 | "label": "Menus", 19 | "parent_id": 2, 20 | "depth": 2, 21 | "child_num": 0, 22 | "description": "menu manager", 23 | }, { 24 | "id": 4, 25 | "label": "Roles", 26 | "parent_id": 2, 27 | "depth": 2, 28 | "child_num": 0, 29 | "description": "Role Manager", 30 | }, { 31 | "id": 5, 32 | "label": "Users", 33 | "parent_id": 2, 34 | "depth": 2, 35 | "child_num": 0, 36 | "description": "User Manager", 37 | }, { 38 | "id": 6, 39 | "label": "Customs", 40 | "parent_id": null, 41 | "url": null, 42 | "depth": 0, 43 | "child_num": 2, 44 | "description": "Custom Manager", 45 | }, { 46 | "id": 7, 47 | "label": "CustomList", 48 | "parent_id": 6, 49 | "depth": 1, 50 | "child_num": 0, 51 | "description": "CustomList", 52 | }, { 53 | "id": 8, 54 | "label": "Templates", 55 | "parent_id": null, 56 | "url": null, 57 | "depth": 0, 58 | "child_num": 1, 59 | "description": "Template Manager", 60 | }, { 61 | "id": 9, 62 | "label": "TemplateList", 63 | "parent_id": 8, 64 | "depth": 1, 65 | "child_num": 0, 66 | "description": "Template Manager", 67 | }, { 68 | "id": 10, 69 | "label": "Bussiness", 70 | "parent_id": null, 71 | "url": null, 72 | "depth": 0, 73 | "child_num": 2, 74 | "description": "Bussiness Manager", 75 | }, 76 | { 77 | "id": 11, 78 | "label": "BussinessList", 79 | "parent_id": 10, 80 | "url": null, 81 | "depth": 1, 82 | "child_num": 2, 83 | "description": "BussinessList", 84 | "children": [] 85 | }, { 86 | "id": 12, 87 | "label": "Currencies", 88 | "parent_id": 11, 89 | "depth": 2, 90 | "child_num": 0, 91 | "description": "Currencies", 92 | }, { 93 | "id": 13, 94 | "label": "Dealtypes", 95 | "parent_id": 11, 96 | "depth": 2, 97 | "child_num": 0, 98 | "description": "Dealtypes", 99 | }, { 100 | "id": 14, 101 | "label": "Products", 102 | "parent_id": 10, 103 | "url": null, 104 | "depth": 1, 105 | "child_num": 2, 106 | "description": "Products" 107 | }, { 108 | "id": 15, 109 | "label": "ProductTypes", 110 | "parent_id": 14, 111 | "depth": 2, 112 | "child_num": 0, 113 | "description": "ProductTypes", 114 | }, { 115 | "id": 16, 116 | "label": "ProductList", 117 | "parent_id": 14, 118 | "depth": 2, 119 | "child_num": 0, 120 | "description": "ProductList", 121 | }] 122 | var trees = [{ 123 | "id": 1, 124 | "label": "System", 125 | "parent_id": null, 126 | "depth": 0, 127 | "child_num": 3, 128 | "description": "System Manager", 129 | "children": [{ 130 | "id": 2, 131 | "label": "base", 132 | "parent_id": 1, 133 | "depth": 1, 134 | "child_num": 5, 135 | "description": "Base Manager", 136 | "children": [{ 137 | "id": 3, 138 | "label": "Menus", 139 | "parent_id": 2, 140 | "depth": 2, 141 | "child_num": 0, 142 | "description": "menu manager", 143 | }, { 144 | "id": 4, 145 | "label": "Roles", 146 | "parent_id": 2, 147 | "depth": 2, 148 | "child_num": 0, 149 | "description": "Role Manager", 150 | }, { 151 | "id": 5, 152 | "label": "Users", 153 | "parent_id": 2, 154 | "depth": 2, 155 | "child_num": 0, 156 | "description": "User Manager", 157 | }] 158 | }] 159 | }, { 160 | "id": 6, 161 | "label": "Customs", 162 | "parent_id": null, 163 | "url": null, 164 | "depth": 0, 165 | "child_num": 2, 166 | "description": "Custom Manager", 167 | "children": [{ 168 | "id": 7, 169 | "label": "CustomList", 170 | "parent_id": 6, 171 | "depth": 1, 172 | "child_num": 0, 173 | "description": "CustomList", 174 | }] 175 | }, { 176 | "id": 8, 177 | "label": "Templates", 178 | "parent_id": null, 179 | "url": null, 180 | "depth": 0, 181 | "child_num": 1, 182 | "description": "Template Manager", 183 | "children": [{ 184 | "id": 9, 185 | "label": "TemplateList", 186 | "parent_id": 8, 187 | "depth": 1, 188 | "child_num": 0, 189 | "description": "Template Manager", 190 | }] 191 | }, { 192 | "id": 10, 193 | "label": "Bussiness", 194 | "parent_id": null, 195 | "url": null, 196 | "depth": 0, 197 | "child_num": 2, 198 | "description": "Bussiness Manager", 199 | "children": [{ 200 | "id": 11, 201 | "label": "BussinessList", 202 | "parent_id": 10, 203 | "url": null, 204 | "depth": 1, 205 | "child_num": 2, 206 | "description": "BussinessList", 207 | "children": [{ 208 | "id": 12, 209 | "label": "Currencies", 210 | "parent_id": 11, 211 | "depth": 2, 212 | "child_num": 0, 213 | "description": "Currencies", 214 | }, { 215 | "id": 13, 216 | "label": "Dealtypes", 217 | "parent_id": 11, 218 | "depth": 2, 219 | "child_num": 0, 220 | "description": "Dealtypes", 221 | }] 222 | }, { 223 | "id": 14, 224 | "label": "Products", 225 | "parent_id": 10, 226 | "url": null, 227 | "depth": 1, 228 | "child_num": 2, 229 | "description": "Products", 230 | "children": [{ 231 | "id": 15, 232 | "label": "ProductTypes", 233 | "parent_id": 14, 234 | "depth": 2, 235 | "child_num": 0, 236 | "description": "ProductTypes", 237 | }, { 238 | "id": 16, 239 | "label": "ProductList", 240 | "parent_id": 14, 241 | "depth": 2, 242 | "child_num": 0, 243 | "description": "ProductList", 244 | }] 245 | }] 246 | }] 247 | -------------------------------------------------------------------------------- /example/dev.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | tree-grid 6 | 7 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 35 | 36 | 37 | 38 |
39 |
40 |

load data by props remote

41 | 42 | 43 | 46 | 47 | 48 | 49 | 50 |
51 | 52 | 78 |
79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /example/index.js: -------------------------------------------------------------------------------- 1 | new Vue({ 2 | el: "#demo", 3 | }) -------------------------------------------------------------------------------- /example/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | tree-grid 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 34 | 35 | 36 | 37 | 38 |
39 | 40 | 60 |
61 |

currently can't use width selection column

62 |

basic usage

63 | 64 | 65 | 67 | 73 | 74 | 75 | 76 |

click to see code

77 |

 78 |             
 79 |                 new Vue({
 80 |                     el: "#app1",
 81 |                     data: {
 82 |                         model: {
 83 |                             menus: trees
 84 |                         }
 85 |                     },
 86 |                     methods: {
 87 |                         remote(row, callback) {
 88 |                             setTimeout(function () {
 89 |                                 callback(row.children)
 90 |                             }, 500)
 91 |                         },
 92 |                         testClick(scope) {
 93 |                             console.info(scope)
 94 |                         }
 95 |                     }
 96 |                 }) 
 97 |                     
98 |
99 | 100 | 126 |
127 |
128 | 143 |
144 |

load data by props remote

145 | 146 | 147 | 149 | 150 | 151 | 152 | 153 |

click to see code

154 |

155 |             
156 |     window.app = new Vue({
157 |         el: "#app",
158 |         data: {
159 |             model: {
160 |                 menus: flatTree.filter(f => f['parent_id'] == null)
161 |             }
162 |         },
163 |         methods: {
164 |             remote(row, callback) {
165 |                 callback(flatTree.filter(f => f['parent_id'] == row['id']))
166 |             }
167 |         }
168 |     })
169 |             
170 |
171 | 172 | 201 |
202 | 203 | 204 | 205 | 206 | -------------------------------------------------------------------------------- /jsx.d.ts: -------------------------------------------------------------------------------- 1 | import Vue, { VNode, ComponentOptions } from "vue" 2 | import { ElTableColumnProps } from './src/dependence' 3 | import { ScopedSlot } from "vue/types/vnode"; 4 | declare global { 5 | namespace JSX { 6 | interface Element extends VNode { } 7 | interface ElementClass extends Vue { } 8 | interface ElementAttributesProperty { } 9 | interface IntrinsicElements { 10 | 'transition': { 11 | name: string 12 | }, 13 | 'el-table-column': ElTableColumnProps & { 14 | scopedSlots: { [key: string]: ScopedSlot }; 15 | }; 16 | ElTableColumn: ElTableColumnProps & { 17 | scopedSlots: { [key: string]: ScopedSlot }; 18 | }; 19 | [elem: string]: any 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "element-tree-grid", 3 | "version": "0.1.4", 4 | "description": "element tree table with vue ", 5 | "main": "dist/tree-table.common.js", 6 | "typings": "types/index.d.ts", 7 | "scripts": { 8 | "dev": "rollup -w -c rollup.config.js", 9 | "build": "tsc -d & rollup -c rollup.config.js" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/foolishchow/element-tree-grid.git" 14 | }, 15 | "keywords": [ 16 | "element", 17 | "element-ui", 18 | "tree", 19 | "table", 20 | "grid", 21 | "vue", 22 | "tree-grid", 23 | "tree-table" 24 | ], 25 | "author": "foolishchow", 26 | "license": "MIT", 27 | "bugs": { 28 | "url": "https://github.com/foolishchow/element-tree-grid/issues" 29 | }, 30 | "homepage": "https://github.com/foolishchow/element-tree-grid#readme", 31 | "peerDependencies": { 32 | "vue": "^2.5.0" 33 | }, 34 | "devDependencies": { 35 | "babel-helper-vue-jsx-merge-props": "^2.0.2", 36 | "babel-plugin-syntax-jsx": "^6.18.0", 37 | "babel-plugin-transform-vue-jsx": "^3.3.0", 38 | "babel-polyfill": "^6.23.0", 39 | "babel-preset-es2015": "^6.22.0", 40 | "gulp-rollup": "^2.5.1", 41 | "rollup-plugin-babel": "^2.7.1", 42 | "rollup-plugin-commonjs": "^6.0.0", 43 | "rollup-plugin-node-resolve": "^2.0.0", 44 | "rollup-plugin-replace": "^1.1.1", 45 | "rollup-plugin-uglify": "^1.0.1", 46 | "rollup-typescript": "^1.1.2", 47 | "rollup-watch": "^4.3.1", 48 | "typescript": "^2.8.1", 49 | "vue": "^2.5.16" 50 | } 51 | } -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | const babel = require('rollup-plugin-babel'), 2 | nodeResolve = require('rollup-plugin-node-resolve'), 3 | Ts = require('rollup-typescript'), 4 | commonjs = require('rollup-plugin-commonjs'), 5 | uglify = require('rollup-plugin-uglify'); 6 | 7 | export default { 8 | entry: './src/index.tsx', 9 | moduleName: 'ElTableTreeColumn', 10 | plugins: [ 11 | Ts(), 12 | nodeResolve({ 13 | browser: true, 14 | module: true, 15 | // jsnext: true, 16 | main: true, 17 | skip: ['vue'] 18 | }), 19 | commonjs({ 20 | include: 'node_modules/**' 21 | }), 22 | babel({ runtimeHelpers: false }), 23 | ], 24 | targets: [ 25 | { dest: 'dist/tree-table.common.js', format: 'cjs' }, 26 | { dest: 'dist/tree-table.js', format: 'umd' }, 27 | { dest: 'dist/tree-table.es.js', format: 'es' } 28 | ] 29 | } -------------------------------------------------------------------------------- /src/dependence.ts: -------------------------------------------------------------------------------- 1 | import { CreateElement, VNode } from "vue"; 2 | 3 | export type PopoverPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end' 4 | export type TableColumnType = 'default' | 'selection' | 'index' | 'expand' 5 | export type TableColumnFixedType = 'left' | 'right' 6 | export interface RenderHeaderData { 7 | /** The column that is current rendering */ 8 | column: any, 9 | 10 | /** The index of the rendering column */ 11 | $index: number 12 | } 13 | 14 | export type TableColumn = { 15 | /** Label of the column */ 16 | label: string, 17 | 18 | /** Property name of the source data */ 19 | property: string, 20 | 21 | /** Type of the column */ 22 | type: string, 23 | 24 | /** Whether column is fixed at left/right */ 25 | fixed: boolean | string 26 | } 27 | 28 | /** Component size definition for button, input, etc */ 29 | export type ElementUIComponentSize = 'large' | 'medium' | 'small' | 'mini' 30 | 31 | /** Horizontal alignment */ 32 | export type ElementUIHorizontalAlignment = 'left' | 'center' | 'right' 33 | 34 | export interface TableColumnFilter { 35 | /** The text to show in the filter's panel */ 36 | text: string, 37 | 38 | /** The value of the filter */ 39 | value: any 40 | } 41 | 42 | export type ElTableColumnProps = { 43 | /** Type of the column. If set to `selection`, the column will display checkbox. If set to `index`, the column will display index of the row (staring from 1). If set to `expand`, the column will display expand icon. */ 44 | type?: TableColumnType 45 | 46 | /** Column label */ 47 | label?: string 48 | 49 | /** Column's key. If you need to use the filter-change event, you need this attribute to identify which column is being filtered */ 50 | columnKey?: string 51 | 52 | /** Field name. You can also use its alias: property */ 53 | prop?: string 54 | 55 | /** Column width */ 56 | width?: string 57 | 58 | /** Column minimum width. Columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion */ 59 | minWidth?: string 60 | 61 | /** Whether column is fixed at left/right. Will be fixed at left if `true` */ 62 | fixed?: boolean | TableColumnFixedType 63 | 64 | /** Render function for table header of this column */ 65 | renderHeader?: (h: CreateElement, data: RenderHeaderData) => VNode | string 66 | 67 | /** Whether column can be sorted */ 68 | sortable?: boolean 69 | 70 | /** Sorting method. Works when `sortable` is `true` */ 71 | sortMethod?: (a: any, b: any) => number 72 | 73 | /** Whether column width can be resized. Works when border of `el-table` is `true` */ 74 | resizable?: boolean 75 | 76 | /** Function that formats content */ 77 | formatter?: (row: object, column: TableColumn) => any 78 | 79 | /** Whether to hide extra content and show them in a tooltip when hovering on the cell */ 80 | showOverflowTooltip?: boolean 81 | 82 | /** Alignment */ 83 | align?: ElementUIHorizontalAlignment 84 | 85 | /** Alignment of the table header. If omitted, the value of the `align` attribute will be applied */ 86 | headerAlign?: ElementUIHorizontalAlignment 87 | 88 | /** Class name of cells in the column */ 89 | className?: string 90 | 91 | /** Class name of the label of this column */ 92 | labelClassName?: string 93 | 94 | /** Function that determines if a certain row can be selected, works when `type` is `'selection'` */ 95 | selectable?: (row: object, index: number) => boolean 96 | 97 | /** Whether to reserve selection after data refreshing, works when `type` is `'selection'` */ 98 | reserveSelection?: boolean 99 | 100 | /** An array of data filtering options */ 101 | filters?: TableColumnFilter[] 102 | 103 | /** Placement for the filter dropdown */ 104 | filterPlacement?: PopoverPlacement 105 | 106 | /** Whether data filtering supports multiple options */ 107 | filterMultiple?: Boolean 108 | 109 | /** Data filtering method. If `filter-multiple` is on, this method will be called multiple times for each row, and a row will display if one of the calls returns `true` */ 110 | filterMethod?: (value: any, row: object) => boolean 111 | 112 | /** Filter value for selected data, might be useful when table header is rendered with `render-header` */ 113 | filteredValue?: TableColumnFilter[] 114 | 115 | 116 | }; 117 | export type ElTableColumnPropsInner = { 118 | /** Type of the column. If set to `selection`, the column will display checkbox. If set to `index`, the column will display index of the row (staring from 1). If set to `expand`, the column will display expand icon. */ 119 | type?: TableColumnType 120 | 121 | /** Column label */ 122 | label?: string 123 | 124 | /** Column's key. If you need to use the filter-change event, you need this attribute to identify which column is being filtered */ 125 | columnKey?: string 126 | 127 | /** Field name. You can also use its alias: property */ 128 | prop: string 129 | 130 | /** Column width */ 131 | width?: string 132 | 133 | /** Column minimum width. Columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion */ 134 | minWidth?: string 135 | 136 | /** Whether column is fixed at left/right. Will be fixed at left if `true` */ 137 | fixed?: boolean | TableColumnFixedType 138 | 139 | /** Render function for table header of this column */ 140 | renderHeader?: (h: CreateElement, data: RenderHeaderData) => VNode | string 141 | 142 | /** Whether column can be sorted */ 143 | sortable?: boolean 144 | 145 | /** Sorting method. Works when `sortable` is `true` */ 146 | sortMethod?: (a: any, b: any) => number 147 | 148 | /** Whether column width can be resized. Works when border of `el-table` is `true` */ 149 | resizable?: boolean 150 | 151 | /** Function that formats content */ 152 | formatter?: (row: object, column: TableColumn) => any 153 | 154 | /** Whether to hide extra content and show them in a tooltip when hovering on the cell */ 155 | showOverflowTooltip?: boolean 156 | 157 | /** Alignment */ 158 | align?: ElementUIHorizontalAlignment 159 | 160 | /** Alignment of the table header. If omitted, the value of the `align` attribute will be applied */ 161 | headerAlign?: ElementUIHorizontalAlignment 162 | 163 | /** Class name of cells in the column */ 164 | className?: string 165 | 166 | /** Class name of the label of this column */ 167 | labelClassName?: string 168 | 169 | /** Function that determines if a certain row can be selected, works when `type` is `'selection'` */ 170 | selectable?: (row: object, index: number) => boolean 171 | 172 | /** Whether to reserve selection after data refreshing, works when `type` is `'selection'` */ 173 | reserveSelection?: boolean 174 | 175 | /** An array of data filtering options */ 176 | filters?: TableColumnFilter[] 177 | 178 | /** Placement for the filter dropdown */ 179 | filterPlacement?: PopoverPlacement 180 | 181 | /** Whether data filtering supports multiple options */ 182 | filterMultiple?: Boolean 183 | 184 | /** Data filtering method. If `filter-multiple` is on, this method will be called multiple times for each row, and a row will display if one of the calls returns `true` */ 185 | filterMethod?: (value: any, row: object) => boolean 186 | 187 | /** Filter value for selected data, might be useful when table header is rendered with `render-header` */ 188 | filteredValue?: TableColumnFilter[] 189 | 190 | 191 | }; 192 | 193 | 194 | -------------------------------------------------------------------------------- /src/expand.ts: -------------------------------------------------------------------------------- 1 | import { ColumnRow, ColumnScope } from "./index"; 2 | import { RenderContext } from "vue"; 3 | import { ElTableTreeColumnPropsInner } from "./props"; 4 | import { isLoadingRow, isExpandedRow } from "./utils"; 5 | 6 | const hash = () => Math.floor(Math.random() * Math.random() * Math.random() * Math.random() * 1000); 7 | export const clone = function (data: any) { 8 | return JSON.parse(JSON.stringify(data)) 9 | } 10 | const index = (hash: string, data: ColumnRow[]) => { 11 | var i = 0; 12 | while (data[i]) { 13 | let c = data[i]; 14 | if (c.$extra && c.$extra.hash == hash) { 15 | break; 16 | } 17 | i++; 18 | }; 19 | return i; 20 | } 21 | const indexOf = (val: any, arr: any[]) => { 22 | var has = -1; 23 | for (var i = 0; i < arr.length; i++) { 24 | if (arr[i] == val) { 25 | has = i; 26 | break; 27 | } 28 | } 29 | return has; 30 | } 31 | 32 | 33 | const descendantsIds = (id: any, data: ColumnRow[], parentKey: string, treeKey: string) => { 34 | var result: any[] = [], 35 | compare = [id], 36 | length = -1; 37 | while (length != compare.length) { 38 | length = compare.length; 39 | data.forEach(function (item) { 40 | if (indexOf(item[parentKey], compare) > -1 && indexOf(item[treeKey], compare) == -1) { 41 | result.push(item[treeKey]) 42 | compare.push(item[treeKey]) 43 | } 44 | }); 45 | } 46 | return result; 47 | } 48 | 49 | 50 | 51 | 52 | const has = function (context: RenderContext, item: ColumnRow, list: ColumnRow[]) { 53 | let key = context.props.treeKey, 54 | parentKey = context.props.parentKey; 55 | let uniqueKey = item[key]; 56 | let has = false; 57 | list.forEach(row => { 58 | if (row[key] == uniqueKey || row[key] == item[parentKey]) { 59 | has = true; 60 | } 61 | }); 62 | return has; 63 | } 64 | 65 | const toggleExpanded = function (context: RenderContext, scope: ColumnScope, isExpended: boolean) { 66 | let { treeKey } = context.props, 67 | { states } = scope.store; 68 | states._treeCachedExpanded = states._treeCachedExpanded.filter(r => r[treeKey] != scope.row[treeKey]) 69 | if (isExpended) { 70 | states._treeRowExpanded = states._treeRowExpanded.filter(r => r[treeKey] != scope.row[treeKey]); 71 | } else { 72 | states._treeRowExpanded.push(scope.row) 73 | } 74 | } 75 | const toggleLoading = function (context: RenderContext, scope: ColumnScope, isloading: boolean) { 76 | let { treeKey } = context.props; 77 | if (isloading) { 78 | scope.store.states._treeRowLoading = scope.store.states._treeRowLoading.filter(r => r[treeKey] != scope.row[treeKey]); 79 | } else { 80 | scope.store.states._treeRowLoading.push(scope.row) 81 | } 82 | } 83 | 84 | const commit = function (context: RenderContext, scope: ColumnScope, list: ColumnRow[]) { 85 | let owner = scope.store.table; //methods.owner(context.parent); 86 | let states = scope.store.states; 87 | // let selection = states.selection; 88 | owner.store.commit('setData', list); 89 | 90 | /* owner.clearSelection(); 91 | let data = owner.store.states._data; 92 | data.forEach(row => { 93 | if (has(context, row, selection)) { 94 | owner.toggleRowSelection(row) 95 | } 96 | }); */ 97 | } 98 | 99 | const getIndex = function (context: RenderContext, scope: ColumnScope, data: ColumnRow[]) { 100 | let index = -1, 101 | { treeKey } = context.props; 102 | data.forEach((r, i) => { 103 | if (r[treeKey] == scope.row[treeKey]) { index = i } 104 | }) 105 | return index; 106 | } 107 | 108 | const Colspand = function (context: RenderContext, scope: ColumnScope, data: ColumnRow[]) { 109 | let { parentKey, treeKey, childKey } = context.props, 110 | states = scope.store.states, 111 | row = scope.row, 112 | result: ColumnRow[] = []; 113 | let removeIds: any[] = []; 114 | removeIds = descendantsIds(row[treeKey], data, parentKey, treeKey); 115 | data = data.filter(item => !removeIds.some(id => id == item[treeKey])) 116 | let NeedToCached = states._treeRowExpanded.filter(item => removeIds.some(id => id == item[treeKey])) 117 | let { _treeCachedExpanded } = states; 118 | NeedToCached.forEach(item => { 119 | if (!_treeCachedExpanded.some(i => i[treeKey] == item[treeKey])) { 120 | states._treeCachedExpanded.push(item) 121 | } 122 | }) 123 | states._treeRowExpanded = states._treeRowExpanded.filter(item => !removeIds.some(id => id == item[treeKey])) 124 | commit(context, scope, data); 125 | } 126 | 127 | const insertRows = function (context: RenderContext, scope: ColumnScope, children: ColumnRow[], updateChild: boolean = false) { 128 | let _data = clone(scope.store.states._data); 129 | let _index = getIndex(context, scope, _data); 130 | var prefix = _data.slice(0, _index + 1); 131 | var i = 0; 132 | while (i < _index + 1) { 133 | _data.shift(); 134 | i++; 135 | } 136 | if (updateChild) prefix[_index][context.props.childKey] = children; 137 | _data = prefix.concat(children).concat(_data); 138 | return _data; 139 | } 140 | const ExpandRemote = function (context: RenderContext, scope: ColumnScope, data: ColumnRow[]) { 141 | let { treeKey, remote } = context.props; 142 | toggleLoading(context, scope, false); 143 | const CallBack = function (children: ColumnRow[]) { 144 | let { childNumKey } = context.props; 145 | toggleLoading(context, scope, true); 146 | let _data: ColumnRow[]; 147 | if (children && children.length > 0) { 148 | let updateChild = !context.props.allRemote; 149 | _data = insertRows(context, scope, children, updateChild); 150 | } else { 151 | _data = clone(scope.store.states._data); 152 | let _index = getIndex(context, scope, _data); 153 | _data[_index][childNumKey] = 0; 154 | } 155 | commit(context, scope, _data); 156 | } 157 | commit(context, scope, data); 158 | remote(scope.row, CallBack); 159 | // console.info(scope.store.states._treeCachedExpanded) 160 | } 161 | 162 | const Expand = function (context: RenderContext, scope: ColumnScope, data: ColumnRow[]) { 163 | let { childKey } = context.props; 164 | data = insertRows(context, scope, scope.row[childKey]); 165 | commit(context, scope, data); 166 | } 167 | 168 | export function doExpand(context: RenderContext, scope: ColumnScope) { 169 | let data: ColumnRow[] = clone(scope.store.states._data), 170 | { childKey } = context.props; 171 | 172 | // line is loading 173 | if (isLoadingRow(context, scope)) return; 174 | let isExpended = isExpandedRow(context, scope) 175 | toggleExpanded(context, scope, isExpended) 176 | if (isExpended) { 177 | return Colspand(context, scope, data); 178 | } 179 | let { remote, allRemote } = context.props; 180 | if (remote && allRemote) { 181 | return ExpandRemote(context, scope, data) 182 | } 183 | if (scope.row[childKey]) { 184 | return Expand(context, scope, data) 185 | } else if (remote) { 186 | return ExpandRemote(context, scope, data) 187 | } 188 | Expand(context, scope, data) 189 | } -------------------------------------------------------------------------------- /src/index.tsx: -------------------------------------------------------------------------------- 1 | import { CreateElement, RenderContext } from "vue"; 2 | import { TableColumn } from "./dependence"; 3 | import * as Expand from './expand'; 4 | import ElTableInjecter from './inject'; 5 | import { ElTableStore, ElTableTreeColumnPropDefine, ElTableTreeColumnProps as ElTableTreeColumnPropsOrigin, ElTableTreeColumnPropsInner, ElTableTreeColumnType } from "./props"; 6 | import * as util from './utils'; 7 | 8 | export type ColumnRow = { 9 | [key: string]: any; 10 | } 11 | export type ColumnScope = { 12 | row: ColumnRow, 13 | column: TableColumn; 14 | $index: number; 15 | store: ElTableStore; 16 | } 17 | export type ElTableTreeColumnProps = ElTableTreeColumnPropsOrigin; 18 | 19 | const RenderFolder = function (h: CreateElement, context: RenderContext, scope: ColumnScope) { 20 | if (util.isNeedExpanedRow(context, scope)) { 21 | setTimeout(() => { 22 | Expand.doExpand(context, scope) 23 | }, 15); 24 | } 25 | return { 27 | e.preventDefault(); 28 | Expand.doExpand(context, scope) 29 | }}> 30 | 31 | {" "} 32 | 33 | 34 | {util.renderDetail(h, context, scope)} 35 | 36 | } 37 | 38 | const RenderLeaf = function (h: CreateElement, context: RenderContext, scope: ColumnScope) { 39 | return 40 | 41 | {util.renderDetail(h, context, scope)} 42 | 43 | } 44 | 45 | const RenderContext = function (h: CreateElement, context: RenderContext, scope: ColumnScope): any { 46 | ElTableInjecter.Inject(context, scope); 47 | let hasChild = util.hasChild(context, scope); 48 | if (hasChild) return RenderFolder(h, context, scope); 49 | return RenderLeaf(h, context, scope); 50 | } 51 | 52 | const ElTableTreeColumn: ElTableTreeColumnType = { 53 | name: 'el-table-tree-column', 54 | functional: true, 55 | props: ElTableTreeColumnPropDefine, 56 | render(this: undefined, h: CreateElement, context: RenderContext) { 57 | // props will be lost when `scopedSlots` is rendering 58 | let attr: any = {}; 59 | Object.keys(context.props).map(k => { 60 | attr[k] = (context.props as any)[k] 61 | }) 62 | let attrs = { attrs: attr }; 63 | return RenderContext(h, context, scope) }}> 65 | 66 | } 67 | } as ElTableTreeColumnType; 68 | 69 | 70 | if (typeof window !== 'undefined' && (window as any).Vue) { 71 | ((window as any).Vue as any).component('el-table-tree-column', ElTableTreeColumn) 72 | } 73 | 74 | export default ElTableTreeColumn; -------------------------------------------------------------------------------- /src/inject.ts: -------------------------------------------------------------------------------- 1 | import { RenderContext } from "vue"; 2 | import { ColumnRow, ColumnScope } from "."; 3 | import { ElTableTreeColumnPropsInner, ElTableType } from "./props"; 4 | 5 | export class ElTableInject { 6 | private Injected: { [key: string]: boolean } = {}; 7 | private InjectedTable: { [key: string]: ElTableType } = {} 8 | 9 | isInjected(scope: ColumnScope) { 10 | return this.Injected[scope.store.table.tableId]; 11 | } 12 | Inject(context: RenderContext, scope: ColumnScope) { 13 | if (this.isInjected(scope)) return; 14 | this.InjectedTable[scope.store.table.tableId] = scope.store.table; 15 | this.Injected[scope.store.table.tableId] = true; 16 | let key = context.props.treeKey, 17 | parentKey = context.props.parentKey; 18 | const table = scope.store.table 19 | scope.store.table.$on("current-change", () => { 20 | validateAllExpanded(table, key) 21 | }) 22 | scope.store.states._treeRowExpanded = []; 23 | scope.store.states._treeRowLoading = []; 24 | scope.store.states._treeCachedExpanded = []; 25 | scope.store.states._treeInitedExpanded = []; 26 | // scope.store.mutations 27 | } 28 | } 29 | 30 | const validateAllExpanded = ( 31 | table: ElTableType, key: string, ) => { 32 | let data = table.store.states._data, 33 | _treeRowExpanded = table.store.states._treeRowExpanded; 34 | const IsDataListChanged = _treeRowExpanded.every(expanded => data.every(row => row[key] != expanded[key])) 35 | if (IsDataListChanged) { 36 | table.store.states._treeRowExpanded = []; 37 | } 38 | } 39 | export default new ElTableInject(); -------------------------------------------------------------------------------- /src/props.ts: -------------------------------------------------------------------------------- 1 | import Vue, { FunctionalComponentOptions } from "vue"; 2 | import { ElTableColumnProps, ElTableColumnPropsInner, TableColumn } from "./dependence"; 3 | export type ElTableTreeColumnProps = ElTableColumnProps & { 4 | treeKey: string; 5 | childNumKey?: string; 6 | parentKey?: string; 7 | levelKey?: string; 8 | childKey?: string; 9 | expandKey?: string; 10 | fileIcon?: string; 11 | folderIcon?: string; 12 | remote?: Function; 13 | allRemote?: boolean; 14 | expandAll?: boolean; 15 | indentSize?: number; 16 | } 17 | 18 | export type ElTableTreeColumnPropsInner = ElTableColumnPropsInner & { 19 | treeKey: string; 20 | childNumKey: string; 21 | parentKey: string; 22 | levelKey: string; 23 | childKey: string; 24 | expandKey: string; 25 | fileIcon: string; 26 | folderIcon: string; 27 | remote: (parentRow: any, callback: (child: any[]) => void) => void; 28 | allRemote: boolean; 29 | expandAll: boolean; 30 | indentSize: number; 31 | } 32 | export const ElTableTreeColumnPropDefine = { 33 | prop: { 34 | type: String 35 | }, 36 | label: String, 37 | className: String, 38 | labelClassName: String, 39 | property: String, 40 | width: {}, 41 | minWidth: {}, 42 | renderHeader: Function, 43 | sortable: { 44 | type: [String, Boolean], 45 | default: false 46 | }, 47 | sortMethod: Function, 48 | resizable: { 49 | type: Boolean, 50 | default: true 51 | }, 52 | context: {}, 53 | columnKey: String, 54 | align: String, 55 | headerAlign: String, 56 | showTooltipWhenOverflow: Boolean, 57 | showOverflowTooltip: Boolean, 58 | fixed: [Boolean, String], 59 | formatter: Function, 60 | selectable: Function, 61 | reserveSelection: Boolean, 62 | filterMethod: Function, 63 | filteredValue: Array, 64 | filters: Array, 65 | filterMultiple: { 66 | type: Boolean, 67 | default: true 68 | }, 69 | treeKey: { 70 | type: String, 71 | default: 'id' 72 | }, 73 | childNumKey: { 74 | type: String, 75 | default: 'child_num' 76 | }, 77 | parentKey: { 78 | type: String, 79 | default: 'parent_id' 80 | }, 81 | levelKey: { 82 | type: String, 83 | default: 'depth' 84 | }, 85 | childKey: { 86 | type: String, 87 | default: 'children' 88 | }, 89 | fileIcon: { 90 | type: String, 91 | default: 'el-icon-file' 92 | }, 93 | folderIcon: { 94 | type: String, 95 | default: 'el-icon-folder' 96 | }, 97 | remote: { 98 | type: Function, 99 | default: null 100 | }, 101 | allRemote: { 102 | type: Boolean, 103 | default: false 104 | }, 105 | indentSize: { 106 | type: Number, 107 | default: 14 108 | }, 109 | expandAll: { 110 | type: Boolean, 111 | default: false 112 | }, 113 | expandKey: { 114 | type: String, 115 | default: 'expanded' 116 | }, 117 | 118 | }; 119 | 120 | export type ElTableStoreStates = { 121 | columns: TableColumn[]; 122 | currentRow: Row; 123 | data: Row[]; 124 | defaultExpandAll: boolean; 125 | expandRows: Row[]; 126 | filteredData: Row[]; 127 | filters: Row; 128 | fixedColumns: TableColumn[]; 129 | fixedLeafColumns: TableColumn[]; 130 | fixedLeafColumnsLength: number; 131 | hoverRow: null | Row; 132 | isAllSelected: boolean; 133 | isComplex: boolean; 134 | leafColumns: TableColumn[]; 135 | leafColumnsLength: number; 136 | originColumns: TableColumn[]; 137 | reserveSelection: boolean; 138 | rightFixedColumns: TableColumn[]; 139 | rightFixedLeafColumns: TableColumn[]; 140 | rightFixedLeafColumnsLength: number; 141 | rowKey?: string; 142 | selectOnIndeterminate: boolean; 143 | selectable?: boolean; 144 | selection: Row[]; 145 | sortOrder?: any; 146 | sortProp?: any; 147 | sortingColumn?: TableColumn; 148 | _columns: TableColumn[]; 149 | _data: Row[]; 150 | 151 | // injected 152 | _treeRowExpanded: Row[]; 153 | _treeRowLoading: Row[]; 154 | _treeCachedExpanded: Row[]; 155 | _treeInitedExpanded: any[]; 156 | } 157 | export type ElTableType = Vue & { 158 | tableId: string; 159 | store: ElTableStore; 160 | clearSelection(): void; 161 | toggleRowSelection(row: Row): void; 162 | } 163 | export type ElTableStore = { 164 | table: ElTableType; 165 | 166 | states: ElTableStoreStates; 167 | mutations: { 168 | setData(states: ElTableStoreStates, data: Row[]): void; 169 | changeSortCondition(states: ElTableStoreStates, options: any): void; 170 | filterChange(states: ElTableStoreStates, options: any): void; 171 | insertColumn(states: ElTableStoreStates, column: TableColumn, index: number, parent?: TableColumn): void; 172 | removeColumn(states: ElTableStoreStates, column: TableColumn, parent?: TableColumn): void; 173 | setHoverRow(states: ElTableStoreStates, row: Row): void; 174 | setCurrentRow(states: ElTableStoreStates, row: Row): void; 175 | rowSelectedChanged(states: ElTableStoreStates, row: Row): void; 176 | toggleAllSelection(states: ElTableStoreStates): void; 177 | 178 | } 179 | 180 | commit(name: 'setData', list: Row[]): void; 181 | commit(name: 'changeSortCondition', options: any): void; 182 | commit(name: 'filterChange', options: any): void; 183 | commit(name: 'insertColumn', column: TableColumn, index: number, parent?: TableColumn): void; 184 | commit(name: 'removeColumn', column: TableColumn, parent?: TableColumn): void; 185 | commit(name: 'setHoverRow', list: Row[]): void; 186 | commit(name: 'rowSelectedChanged', list: Row[]): void; 187 | commit(name: 'toggleAllSelection'): void; 188 | } 189 | export type ElTableTreeColumnType = FunctionalComponentOptions -------------------------------------------------------------------------------- /src/utils.tsx: -------------------------------------------------------------------------------- 1 | import { CreateElement, RenderContext } from "vue"; 2 | import { ColumnScope } from './index'; 3 | import { ElTableTreeColumnPropsInner } from "./props"; 4 | export function hasChild(context: RenderContext, scope: ColumnScope) { 5 | let { childNumKey, childKey } = context.props, 6 | { row } = scope; 7 | if (row[childNumKey] != undefined) { 8 | return row[childNumKey] > 0 ? true : false; 9 | } 10 | if (row[childKey] != undefined) { 11 | return row[childKey].length > 0 ? true : false; 12 | } else { 13 | return false; 14 | } 15 | } 16 | 17 | function hasChildInData(context: RenderContext, scope: ColumnScope) { 18 | let { childNumKey, childKey, treeKey, parentKey } = context.props, 19 | data = scope.store.states._data, 20 | { row } = scope; 21 | return data.filter(d => d[parentKey] == row[treeKey]).length > 0 22 | } 23 | 24 | 25 | export function paddingLeft(context: RenderContext, scope: ColumnScope) { 26 | return (parseInt(scope.row[context.props.levelKey]) * parseInt(context.props.indentSize.toString())) + 'px'; 27 | } 28 | function removeCachedExpanedRow(context: RenderContext, scope: ColumnScope) { 29 | let { _treeCachedExpanded } = scope.store.states, 30 | { treeKey } = context.props, 31 | row = scope.row; 32 | scope.store.states._treeCachedExpanded = _treeCachedExpanded.filter(crow => crow[treeKey] != row[treeKey]); 33 | } 34 | function isCachedExpanedRow(context: RenderContext, scope: ColumnScope) { 35 | let { _treeCachedExpanded } = scope.store.states, 36 | { treeKey } = context.props, 37 | row = scope.row; 38 | return _treeCachedExpanded.map(row => row[treeKey]).filter(_treeKey => _treeKey == row[treeKey]).length > 0; 39 | } 40 | 41 | const isUnExpanded = (context: RenderContext, scope: ColumnScope) => { 42 | let row = scope.row, 43 | data = scope.store.states._data, 44 | _treeRowExpanded = scope.store.states._treeRowExpanded, 45 | key = context.props.treeKey, 46 | parentKey = context.props.parentKey; 47 | let _hasChild = hasChild(context, scope); 48 | if (!_hasChild) return false; 49 | let IsRowShowed = data.some(item => item[key] == row[key]); 50 | if (!IsRowShowed) return false; 51 | let isInexpanded = scope.store.states._treeRowExpanded.some(treeKey => treeKey[context.props.treeKey] == scope.row[context.props.treeKey]) 52 | if (!isInexpanded) return false; 53 | return !hasChildInData(context, scope) 54 | } 55 | export function isNeedExpanedRow(context: RenderContext, scope: ColumnScope) { 56 | if ( 57 | context.props.expandAll && 58 | !scope.store.states._treeInitedExpanded.some(treeKey => treeKey == scope.row[context.props.treeKey]) 59 | ) { 60 | scope.store.states._treeInitedExpanded.push(scope.row[context.props.treeKey]); 61 | return true; 62 | } 63 | if (isLoadingRow(context, scope)) return false; 64 | if (isUnExpanded(context, scope)) { 65 | scope.store.states._treeRowExpanded = scope.store.states._treeRowExpanded 66 | .filter(ex => ex[context.props.treeKey] != scope.row[context.props.treeKey]); 67 | return true; 68 | } 69 | let { expandKey } = context.props, 70 | row = scope.row; 71 | 72 | if (expandKey && row[expandKey] 73 | && 74 | !scope.store.states._treeInitedExpanded.some(treeKey => treeKey == row[context.props.treeKey]) 75 | ) { 76 | scope.store.states._treeInitedExpanded.push(scope.row[context.props.treeKey]); 77 | return true; 78 | } 79 | let result = isCachedExpanedRow(context, scope); 80 | if (result) removeCachedExpanedRow(context, scope); 81 | return result; 82 | } 83 | 84 | export function isLoadingRow(context: RenderContext, scope: ColumnScope) { 85 | let { _treeRowLoading } = scope.store.states, 86 | { treeKey } = context.props, 87 | row = scope.row; 88 | return _treeRowLoading.map(row => row[treeKey]).filter(_treeKey => _treeKey == row[treeKey]).length > 0; 89 | } 90 | export function isExpandedRow(context: RenderContext, scope: ColumnScope) { 91 | let { _treeRowExpanded } = scope.store.states, 92 | { treeKey } = context.props, 93 | row = scope.row; 94 | return _treeRowExpanded.map(row => row[treeKey]).filter(_treeKey => _treeKey == row[treeKey]).length > 0; 95 | } 96 | 97 | export function icon(scope: ColumnScope, context: RenderContext) { 98 | if (isLoadingRow(context, scope)) return 'el-icon-loading'; 99 | if (isExpandedRow(context, scope)) return 'el-icon-caret-bottom'; 100 | return 'el-icon-caret-right'; 101 | } 102 | 103 | export function folderIcon(context: RenderContext, scope: ColumnScope) { 104 | let floder = context.props.folderIcon, 105 | floder_open = context.props.folderIcon + '-open'; 106 | return isExpandedRow(context, scope) ? floder_open : floder; 107 | } 108 | 109 | export function renderDetail(h: CreateElement, context: RenderContext, scope: ColumnScope): any { 110 | if (context.data.scopedSlots && context.data.scopedSlots.default) { 111 | return context.data.scopedSlots.default(scope); 112 | } 113 | if (context.props.formatter) { 114 | return {context.props.formatter(scope.row, scope.column)} 115 | } 116 | return {" "}{scope.row[context.props.prop]} 117 | } 118 | 119 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | "*.d.ts", 4 | "./src/**/*", 5 | ], 6 | "exclude": [ 7 | "node_modules", 8 | ".webpack" 9 | ], 10 | "compilerOptions": { 11 | "jsx": "preserve", 12 | "jsxFactory": "h", 13 | "allowSyntheticDefaultImports": true, 14 | "experimentalDecorators": true, 15 | "allowJs": false, 16 | "module": "esnext", 17 | "target": "es5", 18 | "moduleResolution": "node", 19 | "isolatedModules": false, 20 | "strict": true, /* Enable all strict type-checking options. */ 21 | "noImplicitAny": true, 22 | "strictPropertyInitialization": false, 23 | "lib": [ 24 | "dom", 25 | "es5", 26 | "es6", 27 | "es7", 28 | "es2015.promise" 29 | ], 30 | "sourceMap": false, 31 | "pretty": true, 32 | "baseUrl": "./", 33 | "outDir": "./types", 34 | "declaration": true 35 | } 36 | } -------------------------------------------------------------------------------- /types/dependence.d.ts: -------------------------------------------------------------------------------- 1 | import { CreateElement, VNode } from "vue"; 2 | export declare type PopoverPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end'; 3 | export declare type TableColumnType = 'default' | 'selection' | 'index' | 'expand'; 4 | export declare type TableColumnFixedType = 'left' | 'right'; 5 | export interface RenderHeaderData { 6 | /** The column that is current rendering */ 7 | column: any; 8 | /** The index of the rendering column */ 9 | $index: number; 10 | } 11 | export declare type TableColumn = { 12 | /** Label of the column */ 13 | label: string; 14 | /** Property name of the source data */ 15 | property: string; 16 | /** Type of the column */ 17 | type: string; 18 | /** Whether column is fixed at left/right */ 19 | fixed: boolean | string; 20 | }; 21 | /** Component size definition for button, input, etc */ 22 | export declare type ElementUIComponentSize = 'large' | 'medium' | 'small' | 'mini'; 23 | /** Horizontal alignment */ 24 | export declare type ElementUIHorizontalAlignment = 'left' | 'center' | 'right'; 25 | export interface TableColumnFilter { 26 | /** The text to show in the filter's panel */ 27 | text: string; 28 | /** The value of the filter */ 29 | value: any; 30 | } 31 | export declare type ElTableColumnProps = { 32 | /** Type of the column. If set to `selection`, the column will display checkbox. If set to `index`, the column will display index of the row (staring from 1). If set to `expand`, the column will display expand icon. */ 33 | type?: TableColumnType; 34 | /** Column label */ 35 | label?: string; 36 | /** Column's key. If you need to use the filter-change event, you need this attribute to identify which column is being filtered */ 37 | columnKey?: string; 38 | /** Field name. You can also use its alias: property */ 39 | prop?: string; 40 | /** Column width */ 41 | width?: string; 42 | /** Column minimum width. Columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion */ 43 | minWidth?: string; 44 | /** Whether column is fixed at left/right. Will be fixed at left if `true` */ 45 | fixed?: boolean | TableColumnFixedType; 46 | /** Render function for table header of this column */ 47 | renderHeader?: (h: CreateElement, data: RenderHeaderData) => VNode | string; 48 | /** Whether column can be sorted */ 49 | sortable?: boolean; 50 | /** Sorting method. Works when `sortable` is `true` */ 51 | sortMethod?: (a: any, b: any) => number; 52 | /** Whether column width can be resized. Works when border of `el-table` is `true` */ 53 | resizable?: boolean; 54 | /** Function that formats content */ 55 | formatter?: (row: object, column: TableColumn) => any; 56 | /** Whether to hide extra content and show them in a tooltip when hovering on the cell */ 57 | showOverflowTooltip?: boolean; 58 | /** Alignment */ 59 | align?: ElementUIHorizontalAlignment; 60 | /** Alignment of the table header. If omitted, the value of the `align` attribute will be applied */ 61 | headerAlign?: ElementUIHorizontalAlignment; 62 | /** Class name of cells in the column */ 63 | className?: string; 64 | /** Class name of the label of this column */ 65 | labelClassName?: string; 66 | /** Function that determines if a certain row can be selected, works when `type` is `'selection'` */ 67 | selectable?: (row: object, index: number) => boolean; 68 | /** Whether to reserve selection after data refreshing, works when `type` is `'selection'` */ 69 | reserveSelection?: boolean; 70 | /** An array of data filtering options */ 71 | filters?: TableColumnFilter[]; 72 | /** Placement for the filter dropdown */ 73 | filterPlacement?: PopoverPlacement; 74 | /** Whether data filtering supports multiple options */ 75 | filterMultiple?: Boolean; 76 | /** Data filtering method. If `filter-multiple` is on, this method will be called multiple times for each row, and a row will display if one of the calls returns `true` */ 77 | filterMethod?: (value: any, row: object) => boolean; 78 | /** Filter value for selected data, might be useful when table header is rendered with `render-header` */ 79 | filteredValue?: TableColumnFilter[]; 80 | }; 81 | export declare type ElTableColumnPropsInner = { 82 | /** Type of the column. If set to `selection`, the column will display checkbox. If set to `index`, the column will display index of the row (staring from 1). If set to `expand`, the column will display expand icon. */ 83 | type?: TableColumnType; 84 | /** Column label */ 85 | label?: string; 86 | /** Column's key. If you need to use the filter-change event, you need this attribute to identify which column is being filtered */ 87 | columnKey?: string; 88 | /** Field name. You can also use its alias: property */ 89 | prop: string; 90 | /** Column width */ 91 | width?: string; 92 | /** Column minimum width. Columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion */ 93 | minWidth?: string; 94 | /** Whether column is fixed at left/right. Will be fixed at left if `true` */ 95 | fixed?: boolean | TableColumnFixedType; 96 | /** Render function for table header of this column */ 97 | renderHeader?: (h: CreateElement, data: RenderHeaderData) => VNode | string; 98 | /** Whether column can be sorted */ 99 | sortable?: boolean; 100 | /** Sorting method. Works when `sortable` is `true` */ 101 | sortMethod?: (a: any, b: any) => number; 102 | /** Whether column width can be resized. Works when border of `el-table` is `true` */ 103 | resizable?: boolean; 104 | /** Function that formats content */ 105 | formatter?: (row: object, column: TableColumn) => any; 106 | /** Whether to hide extra content and show them in a tooltip when hovering on the cell */ 107 | showOverflowTooltip?: boolean; 108 | /** Alignment */ 109 | align?: ElementUIHorizontalAlignment; 110 | /** Alignment of the table header. If omitted, the value of the `align` attribute will be applied */ 111 | headerAlign?: ElementUIHorizontalAlignment; 112 | /** Class name of cells in the column */ 113 | className?: string; 114 | /** Class name of the label of this column */ 115 | labelClassName?: string; 116 | /** Function that determines if a certain row can be selected, works when `type` is `'selection'` */ 117 | selectable?: (row: object, index: number) => boolean; 118 | /** Whether to reserve selection after data refreshing, works when `type` is `'selection'` */ 119 | reserveSelection?: boolean; 120 | /** An array of data filtering options */ 121 | filters?: TableColumnFilter[]; 122 | /** Placement for the filter dropdown */ 123 | filterPlacement?: PopoverPlacement; 124 | /** Whether data filtering supports multiple options */ 125 | filterMultiple?: Boolean; 126 | /** Data filtering method. If `filter-multiple` is on, this method will be called multiple times for each row, and a row will display if one of the calls returns `true` */ 127 | filterMethod?: (value: any, row: object) => boolean; 128 | /** Filter value for selected data, might be useful when table header is rendered with `render-header` */ 129 | filteredValue?: TableColumnFilter[]; 130 | }; 131 | -------------------------------------------------------------------------------- /types/expand.d.ts: -------------------------------------------------------------------------------- 1 | import { ColumnScope } from "./index"; 2 | import { RenderContext } from "vue"; 3 | import { ElTableTreeColumnPropsInner } from "./props"; 4 | export declare const clone: (data: any) => any; 5 | export declare function doExpand(context: RenderContext, scope: ColumnScope): void; 6 | -------------------------------------------------------------------------------- /types/index.d.ts: -------------------------------------------------------------------------------- 1 | import { TableColumn } from "./dependence"; 2 | import { ElTableStore, ElTableTreeColumnProps as ElTableTreeColumnPropsOrigin, ElTableTreeColumnType } from "./props"; 3 | export declare type ColumnRow = { 4 | [key: string]: any; 5 | }; 6 | export declare type ColumnScope = { 7 | row: ColumnRow; 8 | column: TableColumn; 9 | $index: number; 10 | store: ElTableStore; 11 | }; 12 | export declare type ElTableTreeColumnProps = ElTableTreeColumnPropsOrigin; 13 | declare const ElTableTreeColumn: ElTableTreeColumnType; 14 | export default ElTableTreeColumn; 15 | -------------------------------------------------------------------------------- /types/inject.d.ts: -------------------------------------------------------------------------------- 1 | import { RenderContext } from "vue"; 2 | import { ColumnScope } from "."; 3 | import { ElTableTreeColumnPropsInner } from "./props"; 4 | export declare class ElTableInject { 5 | private Injected; 6 | private InjectedTable; 7 | isInjected(scope: ColumnScope): boolean; 8 | Inject(context: RenderContext, scope: ColumnScope): void; 9 | } 10 | declare const _default: ElTableInject; 11 | export default _default; 12 | -------------------------------------------------------------------------------- /types/props.d.ts: -------------------------------------------------------------------------------- 1 | import Vue, { FunctionalComponentOptions } from "vue"; 2 | import { ElTableColumnProps, ElTableColumnPropsInner, TableColumn } from "./dependence"; 3 | export declare type ElTableTreeColumnProps = ElTableColumnProps & { 4 | treeKey: string; 5 | childNumKey?: string; 6 | parentKey?: string; 7 | levelKey?: string; 8 | childKey?: string; 9 | expandKey?: string; 10 | fileIcon?: string; 11 | folderIcon?: string; 12 | remote?: Function; 13 | allRemote?: boolean; 14 | expandAll?: boolean; 15 | indentSize?: number; 16 | }; 17 | export declare type ElTableTreeColumnPropsInner = ElTableColumnPropsInner & { 18 | treeKey: string; 19 | childNumKey: string; 20 | parentKey: string; 21 | levelKey: string; 22 | childKey: string; 23 | expandKey: string; 24 | fileIcon: string; 25 | folderIcon: string; 26 | remote: (parentRow: any, callback: (child: any[]) => void) => void; 27 | allRemote: boolean; 28 | expandAll: boolean; 29 | indentSize: number; 30 | }; 31 | export declare const ElTableTreeColumnPropDefine: { 32 | prop: { 33 | type: StringConstructor; 34 | }; 35 | label: StringConstructor; 36 | className: StringConstructor; 37 | labelClassName: StringConstructor; 38 | property: StringConstructor; 39 | width: {}; 40 | minWidth: {}; 41 | renderHeader: FunctionConstructor; 42 | sortable: { 43 | type: (StringConstructor | BooleanConstructor)[]; 44 | default: boolean; 45 | }; 46 | sortMethod: FunctionConstructor; 47 | resizable: { 48 | type: BooleanConstructor; 49 | default: boolean; 50 | }; 51 | context: {}; 52 | columnKey: StringConstructor; 53 | align: StringConstructor; 54 | headerAlign: StringConstructor; 55 | showTooltipWhenOverflow: BooleanConstructor; 56 | showOverflowTooltip: BooleanConstructor; 57 | fixed: (StringConstructor | BooleanConstructor)[]; 58 | formatter: FunctionConstructor; 59 | selectable: FunctionConstructor; 60 | reserveSelection: BooleanConstructor; 61 | filterMethod: FunctionConstructor; 62 | filteredValue: ArrayConstructor; 63 | filters: ArrayConstructor; 64 | filterMultiple: { 65 | type: BooleanConstructor; 66 | default: boolean; 67 | }; 68 | treeKey: { 69 | type: StringConstructor; 70 | default: string; 71 | }; 72 | childNumKey: { 73 | type: StringConstructor; 74 | default: string; 75 | }; 76 | parentKey: { 77 | type: StringConstructor; 78 | default: string; 79 | }; 80 | levelKey: { 81 | type: StringConstructor; 82 | default: string; 83 | }; 84 | childKey: { 85 | type: StringConstructor; 86 | default: string; 87 | }; 88 | fileIcon: { 89 | type: StringConstructor; 90 | default: string; 91 | }; 92 | folderIcon: { 93 | type: StringConstructor; 94 | default: string; 95 | }; 96 | remote: { 97 | type: FunctionConstructor; 98 | default: null; 99 | }; 100 | allRemote: { 101 | type: BooleanConstructor; 102 | default: boolean; 103 | }; 104 | indentSize: { 105 | type: NumberConstructor; 106 | default: number; 107 | }; 108 | expandAll: { 109 | type: BooleanConstructor; 110 | default: boolean; 111 | }; 112 | expandKey: { 113 | type: StringConstructor; 114 | default: string; 115 | }; 116 | }; 117 | export declare type ElTableStoreStates = { 118 | columns: TableColumn[]; 119 | currentRow: Row; 120 | data: Row[]; 121 | defaultExpandAll: boolean; 122 | expandRows: Row[]; 123 | filteredData: Row[]; 124 | filters: Row; 125 | fixedColumns: TableColumn[]; 126 | fixedLeafColumns: TableColumn[]; 127 | fixedLeafColumnsLength: number; 128 | hoverRow: null | Row; 129 | isAllSelected: boolean; 130 | isComplex: boolean; 131 | leafColumns: TableColumn[]; 132 | leafColumnsLength: number; 133 | originColumns: TableColumn[]; 134 | reserveSelection: boolean; 135 | rightFixedColumns: TableColumn[]; 136 | rightFixedLeafColumns: TableColumn[]; 137 | rightFixedLeafColumnsLength: number; 138 | rowKey?: string; 139 | selectOnIndeterminate: boolean; 140 | selectable?: boolean; 141 | selection: Row[]; 142 | sortOrder?: any; 143 | sortProp?: any; 144 | sortingColumn?: TableColumn; 145 | _columns: TableColumn[]; 146 | _data: Row[]; 147 | _treeRowExpanded: Row[]; 148 | _treeRowLoading: Row[]; 149 | _treeCachedExpanded: Row[]; 150 | _treeInitedExpanded: any[]; 151 | }; 152 | export declare type ElTableType = Vue & { 153 | tableId: string; 154 | store: ElTableStore; 155 | clearSelection(): void; 156 | toggleRowSelection(row: Row): void; 157 | }; 158 | export declare type ElTableStore = { 159 | table: ElTableType; 160 | states: ElTableStoreStates; 161 | mutations: { 162 | setData(states: ElTableStoreStates, data: Row[]): void; 163 | changeSortCondition(states: ElTableStoreStates, options: any): void; 164 | filterChange(states: ElTableStoreStates, options: any): void; 165 | insertColumn(states: ElTableStoreStates, column: TableColumn, index: number, parent?: TableColumn): void; 166 | removeColumn(states: ElTableStoreStates, column: TableColumn, parent?: TableColumn): void; 167 | setHoverRow(states: ElTableStoreStates, row: Row): void; 168 | setCurrentRow(states: ElTableStoreStates, row: Row): void; 169 | rowSelectedChanged(states: ElTableStoreStates, row: Row): void; 170 | toggleAllSelection(states: ElTableStoreStates): void; 171 | }; 172 | commit(name: 'setData', list: Row[]): void; 173 | commit(name: 'changeSortCondition', options: any): void; 174 | commit(name: 'filterChange', options: any): void; 175 | commit(name: 'insertColumn', column: TableColumn, index: number, parent?: TableColumn): void; 176 | commit(name: 'removeColumn', column: TableColumn, parent?: TableColumn): void; 177 | commit(name: 'setHoverRow', list: Row[]): void; 178 | commit(name: 'rowSelectedChanged', list: Row[]): void; 179 | commit(name: 'toggleAllSelection'): void; 180 | }; 181 | export declare type ElTableTreeColumnType = FunctionalComponentOptions; 182 | -------------------------------------------------------------------------------- /types/utils.d.ts: -------------------------------------------------------------------------------- 1 | import { CreateElement, RenderContext } from "vue"; 2 | import { ColumnScope } from './index'; 3 | import { ElTableTreeColumnPropsInner } from "./props"; 4 | export declare function hasChild(context: RenderContext, scope: ColumnScope): boolean; 5 | export declare function paddingLeft(context: RenderContext, scope: ColumnScope): string; 6 | export declare function isNeedExpanedRow(context: RenderContext, scope: ColumnScope): boolean; 7 | export declare function isLoadingRow(context: RenderContext, scope: ColumnScope): boolean; 8 | export declare function isExpandedRow(context: RenderContext, scope: ColumnScope): boolean; 9 | export declare function icon(scope: ColumnScope, context: RenderContext): "el-icon-loading" | "el-icon-caret-bottom" | "el-icon-caret-right"; 10 | export declare function folderIcon(context: RenderContext, scope: ColumnScope): string; 11 | export declare function renderDetail(h: CreateElement, context: RenderContext, scope: ColumnScope): any; 12 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | abbrev@1: 6 | version "1.1.1" 7 | resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" 8 | 9 | acorn@^4.0.1: 10 | version "4.0.11" 11 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0" 12 | 13 | ajv@^4.9.1: 14 | version "4.11.8" 15 | resolved "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" 16 | dependencies: 17 | co "^4.6.0" 18 | json-stable-stringify "^1.0.1" 19 | 20 | align-text@^0.1.1, align-text@^0.1.3: 21 | version "0.1.4" 22 | resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" 23 | dependencies: 24 | kind-of "^3.0.2" 25 | longest "^1.0.1" 26 | repeat-string "^1.5.2" 27 | 28 | ansi-regex@^2.0.0: 29 | version "2.1.1" 30 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 31 | 32 | ansi-styles@^2.2.1: 33 | version "2.2.1" 34 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" 35 | 36 | anymatch@^1.3.0: 37 | version "1.3.2" 38 | resolved "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" 39 | dependencies: 40 | micromatch "^2.1.5" 41 | normalize-path "^2.0.0" 42 | 43 | aproba@^1.0.3: 44 | version "1.2.0" 45 | resolved "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" 46 | 47 | are-we-there-yet@~1.1.2: 48 | version "1.1.4" 49 | resolved "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" 50 | dependencies: 51 | delegates "^1.0.0" 52 | readable-stream "^2.0.6" 53 | 54 | arr-diff@^2.0.0: 55 | version "2.0.0" 56 | resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" 57 | dependencies: 58 | arr-flatten "^1.0.1" 59 | 60 | arr-flatten@^1.0.1: 61 | version "1.0.1" 62 | resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" 63 | 64 | array-differ@^1.0.0: 65 | version "1.0.0" 66 | resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" 67 | 68 | array-uniq@^1.0.2: 69 | version "1.0.3" 70 | resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" 71 | 72 | array-unique@^0.2.1: 73 | version "0.2.1" 74 | resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" 75 | 76 | asn1@~0.2.3: 77 | version "0.2.3" 78 | resolved "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" 79 | 80 | assert-plus@1.0.0, assert-plus@^1.0.0: 81 | version "1.0.0" 82 | resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" 83 | 84 | assert-plus@^0.2.0: 85 | version "0.2.0" 86 | resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" 87 | 88 | async-each@^1.0.0: 89 | version "1.0.1" 90 | resolved "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" 91 | 92 | asynckit@^0.4.0: 93 | version "0.4.0" 94 | resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" 95 | 96 | aws-sign2@~0.6.0: 97 | version "0.6.0" 98 | resolved "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" 99 | 100 | aws4@^1.2.1: 101 | version "1.6.0" 102 | resolved "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" 103 | 104 | babel-code-frame@^6.22.0: 105 | version "6.22.0" 106 | resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" 107 | dependencies: 108 | chalk "^1.1.0" 109 | esutils "^2.0.2" 110 | js-tokens "^3.0.0" 111 | 112 | babel-core@6, babel-core@^6.24.0: 113 | version "6.24.0" 114 | resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.24.0.tgz#8f36a0a77f5c155aed6f920b844d23ba56742a02" 115 | dependencies: 116 | babel-code-frame "^6.22.0" 117 | babel-generator "^6.24.0" 118 | babel-helpers "^6.23.0" 119 | babel-messages "^6.23.0" 120 | babel-register "^6.24.0" 121 | babel-runtime "^6.22.0" 122 | babel-template "^6.23.0" 123 | babel-traverse "^6.23.1" 124 | babel-types "^6.23.0" 125 | babylon "^6.11.0" 126 | convert-source-map "^1.1.0" 127 | debug "^2.1.1" 128 | json5 "^0.5.0" 129 | lodash "^4.2.0" 130 | minimatch "^3.0.2" 131 | path-is-absolute "^1.0.0" 132 | private "^0.1.6" 133 | slash "^1.0.0" 134 | source-map "^0.5.0" 135 | 136 | babel-generator@^6.24.0: 137 | version "6.24.0" 138 | resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.24.0.tgz#eba270a8cc4ce6e09a61be43465d7c62c1f87c56" 139 | dependencies: 140 | babel-messages "^6.23.0" 141 | babel-runtime "^6.22.0" 142 | babel-types "^6.23.0" 143 | detect-indent "^4.0.0" 144 | jsesc "^1.3.0" 145 | lodash "^4.2.0" 146 | source-map "^0.5.0" 147 | trim-right "^1.0.1" 148 | 149 | babel-helper-call-delegate@^6.22.0: 150 | version "6.22.0" 151 | resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.22.0.tgz#119921b56120f17e9dae3f74b4f5cc7bcc1b37ef" 152 | dependencies: 153 | babel-helper-hoist-variables "^6.22.0" 154 | babel-runtime "^6.22.0" 155 | babel-traverse "^6.22.0" 156 | babel-types "^6.22.0" 157 | 158 | babel-helper-define-map@^6.23.0: 159 | version "6.23.0" 160 | resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.23.0.tgz#1444f960c9691d69a2ced6a205315f8fd00804e7" 161 | dependencies: 162 | babel-helper-function-name "^6.23.0" 163 | babel-runtime "^6.22.0" 164 | babel-types "^6.23.0" 165 | lodash "^4.2.0" 166 | 167 | babel-helper-function-name@^6.22.0, babel-helper-function-name@^6.23.0: 168 | version "6.23.0" 169 | resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.23.0.tgz#25742d67175c8903dbe4b6cb9d9e1fcb8dcf23a6" 170 | dependencies: 171 | babel-helper-get-function-arity "^6.22.0" 172 | babel-runtime "^6.22.0" 173 | babel-template "^6.23.0" 174 | babel-traverse "^6.23.0" 175 | babel-types "^6.23.0" 176 | 177 | babel-helper-get-function-arity@^6.22.0: 178 | version "6.22.0" 179 | resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.22.0.tgz#0beb464ad69dc7347410ac6ade9f03a50634f5ce" 180 | dependencies: 181 | babel-runtime "^6.22.0" 182 | babel-types "^6.22.0" 183 | 184 | babel-helper-hoist-variables@^6.22.0: 185 | version "6.22.0" 186 | resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.22.0.tgz#3eacbf731d80705845dd2e9718f600cfb9b4ba72" 187 | dependencies: 188 | babel-runtime "^6.22.0" 189 | babel-types "^6.22.0" 190 | 191 | babel-helper-optimise-call-expression@^6.23.0: 192 | version "6.23.0" 193 | resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.23.0.tgz#f3ee7eed355b4282138b33d02b78369e470622f5" 194 | dependencies: 195 | babel-runtime "^6.22.0" 196 | babel-types "^6.23.0" 197 | 198 | babel-helper-regex@^6.22.0: 199 | version "6.22.0" 200 | resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.22.0.tgz#79f532be1647b1f0ee3474b5f5c3da58001d247d" 201 | dependencies: 202 | babel-runtime "^6.22.0" 203 | babel-types "^6.22.0" 204 | lodash "^4.2.0" 205 | 206 | babel-helper-replace-supers@^6.22.0, babel-helper-replace-supers@^6.23.0: 207 | version "6.23.0" 208 | resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.23.0.tgz#eeaf8ad9b58ec4337ca94223bacdca1f8d9b4bfd" 209 | dependencies: 210 | babel-helper-optimise-call-expression "^6.23.0" 211 | babel-messages "^6.23.0" 212 | babel-runtime "^6.22.0" 213 | babel-template "^6.23.0" 214 | babel-traverse "^6.23.0" 215 | babel-types "^6.23.0" 216 | 217 | babel-helper-vue-jsx-merge-props@^2.0.2: 218 | version "2.0.2" 219 | resolved "https://registry.yarnpkg.com/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.2.tgz#aceb1c373588279e2755ea1cfd35c22394fd33f8" 220 | 221 | babel-helpers@^6.23.0: 222 | version "6.23.0" 223 | resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.23.0.tgz#4f8f2e092d0b6a8808a4bde79c27f1e2ecf0d992" 224 | dependencies: 225 | babel-runtime "^6.22.0" 226 | babel-template "^6.23.0" 227 | 228 | babel-messages@^6.23.0: 229 | version "6.23.0" 230 | resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" 231 | dependencies: 232 | babel-runtime "^6.22.0" 233 | 234 | babel-plugin-check-es2015-constants@^6.22.0: 235 | version "6.22.0" 236 | resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" 237 | dependencies: 238 | babel-runtime "^6.22.0" 239 | 240 | babel-plugin-syntax-jsx@^6.18.0: 241 | version "6.18.0" 242 | resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" 243 | 244 | babel-plugin-transform-es2015-arrow-functions@^6.22.0: 245 | version "6.22.0" 246 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" 247 | dependencies: 248 | babel-runtime "^6.22.0" 249 | 250 | babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: 251 | version "6.22.0" 252 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" 253 | dependencies: 254 | babel-runtime "^6.22.0" 255 | 256 | babel-plugin-transform-es2015-block-scoping@^6.22.0: 257 | version "6.23.0" 258 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.23.0.tgz#e48895cf0b375be148cd7c8879b422707a053b51" 259 | dependencies: 260 | babel-runtime "^6.22.0" 261 | babel-template "^6.23.0" 262 | babel-traverse "^6.23.0" 263 | babel-types "^6.23.0" 264 | lodash "^4.2.0" 265 | 266 | babel-plugin-transform-es2015-classes@^6.22.0, babel-plugin-transform-es2015-classes@^6.9.0: 267 | version "6.23.0" 268 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.23.0.tgz#49b53f326202a2fd1b3bbaa5e2edd8a4f78643c1" 269 | dependencies: 270 | babel-helper-define-map "^6.23.0" 271 | babel-helper-function-name "^6.23.0" 272 | babel-helper-optimise-call-expression "^6.23.0" 273 | babel-helper-replace-supers "^6.23.0" 274 | babel-messages "^6.23.0" 275 | babel-runtime "^6.22.0" 276 | babel-template "^6.23.0" 277 | babel-traverse "^6.23.0" 278 | babel-types "^6.23.0" 279 | 280 | babel-plugin-transform-es2015-computed-properties@^6.22.0: 281 | version "6.22.0" 282 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.22.0.tgz#7c383e9629bba4820c11b0425bdd6290f7f057e7" 283 | dependencies: 284 | babel-runtime "^6.22.0" 285 | babel-template "^6.22.0" 286 | 287 | babel-plugin-transform-es2015-destructuring@^6.22.0: 288 | version "6.23.0" 289 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" 290 | dependencies: 291 | babel-runtime "^6.22.0" 292 | 293 | babel-plugin-transform-es2015-duplicate-keys@^6.22.0: 294 | version "6.22.0" 295 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.22.0.tgz#672397031c21610d72dd2bbb0ba9fb6277e1c36b" 296 | dependencies: 297 | babel-runtime "^6.22.0" 298 | babel-types "^6.22.0" 299 | 300 | babel-plugin-transform-es2015-for-of@^6.22.0: 301 | version "6.23.0" 302 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" 303 | dependencies: 304 | babel-runtime "^6.22.0" 305 | 306 | babel-plugin-transform-es2015-function-name@^6.22.0: 307 | version "6.22.0" 308 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.22.0.tgz#f5fcc8b09093f9a23c76ac3d9e392c3ec4b77104" 309 | dependencies: 310 | babel-helper-function-name "^6.22.0" 311 | babel-runtime "^6.22.0" 312 | babel-types "^6.22.0" 313 | 314 | babel-plugin-transform-es2015-literals@^6.22.0: 315 | version "6.22.0" 316 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" 317 | dependencies: 318 | babel-runtime "^6.22.0" 319 | 320 | babel-plugin-transform-es2015-modules-amd@^6.24.0: 321 | version "6.24.0" 322 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.0.tgz#a1911fb9b7ec7e05a43a63c5995007557bcf6a2e" 323 | dependencies: 324 | babel-plugin-transform-es2015-modules-commonjs "^6.24.0" 325 | babel-runtime "^6.22.0" 326 | babel-template "^6.22.0" 327 | 328 | babel-plugin-transform-es2015-modules-commonjs@^6.24.0: 329 | version "6.24.0" 330 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.0.tgz#e921aefb72c2cc26cb03d107626156413222134f" 331 | dependencies: 332 | babel-plugin-transform-strict-mode "^6.22.0" 333 | babel-runtime "^6.22.0" 334 | babel-template "^6.23.0" 335 | babel-types "^6.23.0" 336 | 337 | babel-plugin-transform-es2015-modules-systemjs@^6.22.0: 338 | version "6.23.0" 339 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.23.0.tgz#ae3469227ffac39b0310d90fec73bfdc4f6317b0" 340 | dependencies: 341 | babel-helper-hoist-variables "^6.22.0" 342 | babel-runtime "^6.22.0" 343 | babel-template "^6.23.0" 344 | 345 | babel-plugin-transform-es2015-modules-umd@^6.24.0: 346 | version "6.24.0" 347 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.0.tgz#fd5fa63521cae8d273927c3958afd7c067733450" 348 | dependencies: 349 | babel-plugin-transform-es2015-modules-amd "^6.24.0" 350 | babel-runtime "^6.22.0" 351 | babel-template "^6.23.0" 352 | 353 | babel-plugin-transform-es2015-object-super@^6.22.0: 354 | version "6.22.0" 355 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.22.0.tgz#daa60e114a042ea769dd53fe528fc82311eb98fc" 356 | dependencies: 357 | babel-helper-replace-supers "^6.22.0" 358 | babel-runtime "^6.22.0" 359 | 360 | babel-plugin-transform-es2015-parameters@^6.22.0: 361 | version "6.23.0" 362 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.23.0.tgz#3a2aabb70c8af945d5ce386f1a4250625a83ae3b" 363 | dependencies: 364 | babel-helper-call-delegate "^6.22.0" 365 | babel-helper-get-function-arity "^6.22.0" 366 | babel-runtime "^6.22.0" 367 | babel-template "^6.23.0" 368 | babel-traverse "^6.23.0" 369 | babel-types "^6.23.0" 370 | 371 | babel-plugin-transform-es2015-shorthand-properties@^6.22.0: 372 | version "6.22.0" 373 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.22.0.tgz#8ba776e0affaa60bff21e921403b8a652a2ff723" 374 | dependencies: 375 | babel-runtime "^6.22.0" 376 | babel-types "^6.22.0" 377 | 378 | babel-plugin-transform-es2015-spread@^6.22.0: 379 | version "6.22.0" 380 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" 381 | dependencies: 382 | babel-runtime "^6.22.0" 383 | 384 | babel-plugin-transform-es2015-sticky-regex@^6.22.0: 385 | version "6.22.0" 386 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.22.0.tgz#ab316829e866ee3f4b9eb96939757d19a5bc4593" 387 | dependencies: 388 | babel-helper-regex "^6.22.0" 389 | babel-runtime "^6.22.0" 390 | babel-types "^6.22.0" 391 | 392 | babel-plugin-transform-es2015-template-literals@^6.22.0: 393 | version "6.22.0" 394 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" 395 | dependencies: 396 | babel-runtime "^6.22.0" 397 | 398 | babel-plugin-transform-es2015-typeof-symbol@^6.22.0: 399 | version "6.23.0" 400 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" 401 | dependencies: 402 | babel-runtime "^6.22.0" 403 | 404 | babel-plugin-transform-es2015-unicode-regex@^6.22.0: 405 | version "6.22.0" 406 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.22.0.tgz#8d9cc27e7ee1decfe65454fb986452a04a613d20" 407 | dependencies: 408 | babel-helper-regex "^6.22.0" 409 | babel-runtime "^6.22.0" 410 | regexpu-core "^2.0.0" 411 | 412 | babel-plugin-transform-regenerator@^6.22.0: 413 | version "6.22.0" 414 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.22.0.tgz#65740593a319c44522157538d690b84094617ea6" 415 | dependencies: 416 | regenerator-transform "0.9.8" 417 | 418 | babel-plugin-transform-strict-mode@^6.22.0: 419 | version "6.22.0" 420 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.22.0.tgz#e008df01340fdc87e959da65991b7e05970c8c7c" 421 | dependencies: 422 | babel-runtime "^6.22.0" 423 | babel-types "^6.22.0" 424 | 425 | babel-plugin-transform-vue-jsx@^3.3.0: 426 | version "3.4.2" 427 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-3.4.2.tgz#906cfe3f1b669b15d3298fffe1006ad31c447d2c" 428 | dependencies: 429 | esutils "^2.0.2" 430 | 431 | babel-polyfill@^6.23.0: 432 | version "6.23.0" 433 | resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d" 434 | dependencies: 435 | babel-runtime "^6.22.0" 436 | core-js "^2.4.0" 437 | regenerator-runtime "^0.10.0" 438 | 439 | babel-preset-es2015@^6.22.0: 440 | version "6.24.0" 441 | resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.0.tgz#c162d68b1932696e036cd3110dc1ccd303d2673a" 442 | dependencies: 443 | babel-plugin-check-es2015-constants "^6.22.0" 444 | babel-plugin-transform-es2015-arrow-functions "^6.22.0" 445 | babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" 446 | babel-plugin-transform-es2015-block-scoping "^6.22.0" 447 | babel-plugin-transform-es2015-classes "^6.22.0" 448 | babel-plugin-transform-es2015-computed-properties "^6.22.0" 449 | babel-plugin-transform-es2015-destructuring "^6.22.0" 450 | babel-plugin-transform-es2015-duplicate-keys "^6.22.0" 451 | babel-plugin-transform-es2015-for-of "^6.22.0" 452 | babel-plugin-transform-es2015-function-name "^6.22.0" 453 | babel-plugin-transform-es2015-literals "^6.22.0" 454 | babel-plugin-transform-es2015-modules-amd "^6.24.0" 455 | babel-plugin-transform-es2015-modules-commonjs "^6.24.0" 456 | babel-plugin-transform-es2015-modules-systemjs "^6.22.0" 457 | babel-plugin-transform-es2015-modules-umd "^6.24.0" 458 | babel-plugin-transform-es2015-object-super "^6.22.0" 459 | babel-plugin-transform-es2015-parameters "^6.22.0" 460 | babel-plugin-transform-es2015-shorthand-properties "^6.22.0" 461 | babel-plugin-transform-es2015-spread "^6.22.0" 462 | babel-plugin-transform-es2015-sticky-regex "^6.22.0" 463 | babel-plugin-transform-es2015-template-literals "^6.22.0" 464 | babel-plugin-transform-es2015-typeof-symbol "^6.22.0" 465 | babel-plugin-transform-es2015-unicode-regex "^6.22.0" 466 | babel-plugin-transform-regenerator "^6.22.0" 467 | 468 | babel-register@^6.24.0: 469 | version "6.24.0" 470 | resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.0.tgz#5e89f8463ba9970356d02eb07dabe3308b080cfd" 471 | dependencies: 472 | babel-core "^6.24.0" 473 | babel-runtime "^6.22.0" 474 | core-js "^2.4.0" 475 | home-or-tmp "^2.0.0" 476 | lodash "^4.2.0" 477 | mkdirp "^0.5.1" 478 | source-map-support "^0.4.2" 479 | 480 | babel-runtime@^6.18.0, babel-runtime@^6.22.0: 481 | version "6.23.0" 482 | resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" 483 | dependencies: 484 | core-js "^2.4.0" 485 | regenerator-runtime "^0.10.0" 486 | 487 | babel-template@^6.22.0, babel-template@^6.23.0: 488 | version "6.23.0" 489 | resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.23.0.tgz#04d4f270adbb3aa704a8143ae26faa529238e638" 490 | dependencies: 491 | babel-runtime "^6.22.0" 492 | babel-traverse "^6.23.0" 493 | babel-types "^6.23.0" 494 | babylon "^6.11.0" 495 | lodash "^4.2.0" 496 | 497 | babel-traverse@^6.22.0, babel-traverse@^6.23.0, babel-traverse@^6.23.1: 498 | version "6.23.1" 499 | resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.23.1.tgz#d3cb59010ecd06a97d81310065f966b699e14f48" 500 | dependencies: 501 | babel-code-frame "^6.22.0" 502 | babel-messages "^6.23.0" 503 | babel-runtime "^6.22.0" 504 | babel-types "^6.23.0" 505 | babylon "^6.15.0" 506 | debug "^2.2.0" 507 | globals "^9.0.0" 508 | invariant "^2.2.0" 509 | lodash "^4.2.0" 510 | 511 | babel-types@^6.19.0, babel-types@^6.22.0, babel-types@^6.23.0: 512 | version "6.23.0" 513 | resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.23.0.tgz#bb17179d7538bad38cd0c9e115d340f77e7e9acf" 514 | dependencies: 515 | babel-runtime "^6.22.0" 516 | esutils "^2.0.2" 517 | lodash "^4.2.0" 518 | to-fast-properties "^1.0.1" 519 | 520 | babylon@^6.11.0, babylon@^6.15.0: 521 | version "6.16.1" 522 | resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.16.1.tgz#30c5a22f481978a9e7f8cdfdf496b11d94b404d3" 523 | 524 | balanced-match@^0.4.1: 525 | version "0.4.2" 526 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" 527 | 528 | bcrypt-pbkdf@^1.0.0: 529 | version "1.0.1" 530 | resolved "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" 531 | dependencies: 532 | tweetnacl "^0.14.3" 533 | 534 | beeper@^1.0.0: 535 | version "1.1.1" 536 | resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" 537 | 538 | binary-extensions@^1.0.0: 539 | version "1.11.0" 540 | resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" 541 | 542 | block-stream@*: 543 | version "0.0.9" 544 | resolved "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" 545 | dependencies: 546 | inherits "~2.0.0" 547 | 548 | boom@2.x.x: 549 | version "2.10.1" 550 | resolved "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" 551 | dependencies: 552 | hoek "2.x.x" 553 | 554 | brace-expansion@^1.0.0: 555 | version "1.1.6" 556 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" 557 | dependencies: 558 | balanced-match "^0.4.1" 559 | concat-map "0.0.1" 560 | 561 | braces@^1.8.2: 562 | version "1.8.5" 563 | resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" 564 | dependencies: 565 | expand-range "^1.8.1" 566 | preserve "^0.2.0" 567 | repeat-element "^1.1.2" 568 | 569 | browser-resolve@^1.11.0: 570 | version "1.11.2" 571 | resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" 572 | dependencies: 573 | resolve "1.1.7" 574 | 575 | buffer-from@^0.1.0: 576 | version "0.1.1" 577 | resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-0.1.1.tgz#57b18b1da0a19ec06f33837a5275a242351bd75e" 578 | dependencies: 579 | is-array-buffer-x "^1.0.13" 580 | 581 | buffer-shims@^1.0.0: 582 | version "1.0.0" 583 | resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" 584 | 585 | builtin-modules@^1.1.0: 586 | version "1.1.1" 587 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" 588 | 589 | camelcase@^1.0.2: 590 | version "1.2.1" 591 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" 592 | 593 | caseless@~0.12.0: 594 | version "0.12.0" 595 | resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" 596 | 597 | center-align@^0.1.1: 598 | version "0.1.3" 599 | resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" 600 | dependencies: 601 | align-text "^0.1.3" 602 | lazy-cache "^1.0.3" 603 | 604 | chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1: 605 | version "1.1.3" 606 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" 607 | dependencies: 608 | ansi-styles "^2.2.1" 609 | escape-string-regexp "^1.0.2" 610 | has-ansi "^2.0.0" 611 | strip-ansi "^3.0.0" 612 | supports-color "^2.0.0" 613 | 614 | chokidar@^1.7.0: 615 | version "1.7.0" 616 | resolved "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" 617 | dependencies: 618 | anymatch "^1.3.0" 619 | async-each "^1.0.0" 620 | glob-parent "^2.0.0" 621 | inherits "^2.0.1" 622 | is-binary-path "^1.0.0" 623 | is-glob "^2.0.0" 624 | path-is-absolute "^1.0.0" 625 | readdirp "^2.0.0" 626 | optionalDependencies: 627 | fsevents "^1.0.0" 628 | 629 | cliui@^2.1.0: 630 | version "2.1.0" 631 | resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" 632 | dependencies: 633 | center-align "^0.1.1" 634 | right-align "^0.1.1" 635 | wordwrap "0.0.2" 636 | 637 | clone-stats@^0.0.1: 638 | version "0.0.1" 639 | resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" 640 | 641 | clone@^1.0.0: 642 | version "1.0.2" 643 | resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" 644 | 645 | co@^4.6.0: 646 | version "4.6.0" 647 | resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" 648 | 649 | code-point-at@^1.0.0: 650 | version "1.1.0" 651 | resolved "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" 652 | 653 | combined-stream@^1.0.5, combined-stream@~1.0.5: 654 | version "1.0.6" 655 | resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" 656 | dependencies: 657 | delayed-stream "~1.0.0" 658 | 659 | concat-map@0.0.1: 660 | version "0.0.1" 661 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 662 | 663 | console-control-strings@^1.0.0, console-control-strings@~1.1.0: 664 | version "1.1.0" 665 | resolved "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" 666 | 667 | convert-source-map@^1.1.0: 668 | version "1.4.0" 669 | resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.4.0.tgz#e3dad195bf61bfe13a7a3c73e9876ec14a0268f3" 670 | 671 | core-js@^2.4.0: 672 | version "2.4.1" 673 | resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" 674 | 675 | core-util-is@1.0.2, core-util-is@~1.0.0: 676 | version "1.0.2" 677 | resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" 678 | 679 | cryptiles@2.x.x: 680 | version "2.0.5" 681 | resolved "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" 682 | dependencies: 683 | boom "2.x.x" 684 | 685 | dashdash@^1.12.0: 686 | version "1.14.1" 687 | resolved "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" 688 | dependencies: 689 | assert-plus "^1.0.0" 690 | 691 | dateformat@^2.0.0: 692 | version "2.0.0" 693 | resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17" 694 | 695 | debug@^2.1.1, debug@^2.2.0: 696 | version "2.6.3" 697 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d" 698 | dependencies: 699 | ms "0.7.2" 700 | 701 | decamelize@^1.0.0: 702 | version "1.2.0" 703 | resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" 704 | 705 | deep-extend@~0.4.0: 706 | version "0.4.2" 707 | resolved "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" 708 | 709 | delayed-stream@~1.0.0: 710 | version "1.0.0" 711 | resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" 712 | 713 | delegates@^1.0.0: 714 | version "1.0.0" 715 | resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" 716 | 717 | detect-indent@^4.0.0: 718 | version "4.0.0" 719 | resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" 720 | dependencies: 721 | repeating "^2.0.0" 722 | 723 | detect-libc@^1.0.2: 724 | version "1.0.3" 725 | resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" 726 | 727 | duplexer2@0.0.2: 728 | version "0.0.2" 729 | resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" 730 | dependencies: 731 | readable-stream "~1.1.9" 732 | 733 | ecc-jsbn@~0.1.1: 734 | version "0.1.1" 735 | resolved "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" 736 | dependencies: 737 | jsbn "~0.1.0" 738 | 739 | escape-string-regexp@^1.0.2: 740 | version "1.0.5" 741 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 742 | 743 | estree-walker@^0.2.1: 744 | version "0.2.1" 745 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e" 746 | 747 | estree-walker@^0.3.0: 748 | version "0.3.1" 749 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.3.1.tgz#e6b1a51cf7292524e7237c312e5fe6660c1ce1aa" 750 | 751 | esutils@^2.0.2: 752 | version "2.0.2" 753 | resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" 754 | 755 | expand-brackets@^0.1.4: 756 | version "0.1.5" 757 | resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" 758 | dependencies: 759 | is-posix-bracket "^0.1.0" 760 | 761 | expand-range@^1.8.1: 762 | version "1.8.2" 763 | resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" 764 | dependencies: 765 | fill-range "^2.1.0" 766 | 767 | extend@~3.0.0: 768 | version "3.0.1" 769 | resolved "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" 770 | 771 | extglob@^0.3.1: 772 | version "0.3.2" 773 | resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" 774 | dependencies: 775 | is-extglob "^1.0.0" 776 | 777 | extsprintf@1.3.0: 778 | version "1.3.0" 779 | resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" 780 | 781 | extsprintf@^1.2.0: 782 | version "1.4.0" 783 | resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" 784 | 785 | fancy-log@^1.1.0: 786 | version "1.3.0" 787 | resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.0.tgz#45be17d02bb9917d60ccffd4995c999e6c8c9948" 788 | dependencies: 789 | chalk "^1.1.1" 790 | time-stamp "^1.0.0" 791 | 792 | filename-regex@^2.0.0: 793 | version "2.0.0" 794 | resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" 795 | 796 | fill-range@^2.1.0: 797 | version "2.2.3" 798 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" 799 | dependencies: 800 | is-number "^2.1.0" 801 | isobject "^2.0.0" 802 | randomatic "^1.1.3" 803 | repeat-element "^1.1.2" 804 | repeat-string "^1.5.2" 805 | 806 | for-in@^1.0.1: 807 | version "1.0.2" 808 | resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" 809 | 810 | for-own@^0.1.4: 811 | version "0.1.5" 812 | resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" 813 | dependencies: 814 | for-in "^1.0.1" 815 | 816 | forever-agent@~0.6.1: 817 | version "0.6.1" 818 | resolved "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" 819 | 820 | form-data@~2.1.1: 821 | version "2.1.4" 822 | resolved "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" 823 | dependencies: 824 | asynckit "^0.4.0" 825 | combined-stream "^1.0.5" 826 | mime-types "^2.1.12" 827 | 828 | fs.realpath@^1.0.0: 829 | version "1.0.0" 830 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 831 | 832 | fsevents@^1.0.0: 833 | version "1.1.3" 834 | resolved "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8" 835 | dependencies: 836 | nan "^2.3.0" 837 | node-pre-gyp "^0.6.39" 838 | 839 | fstream-ignore@^1.0.5: 840 | version "1.0.5" 841 | resolved "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" 842 | dependencies: 843 | fstream "^1.0.0" 844 | inherits "2" 845 | minimatch "^3.0.0" 846 | 847 | fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: 848 | version "1.0.11" 849 | resolved "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" 850 | dependencies: 851 | graceful-fs "^4.1.2" 852 | inherits "~2.0.0" 853 | mkdirp ">=0.5 0" 854 | rimraf "2" 855 | 856 | gauge@~2.7.3: 857 | version "2.7.4" 858 | resolved "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" 859 | dependencies: 860 | aproba "^1.0.3" 861 | console-control-strings "^1.0.0" 862 | has-unicode "^2.0.0" 863 | object-assign "^4.1.0" 864 | signal-exit "^3.0.0" 865 | string-width "^1.0.1" 866 | strip-ansi "^3.0.1" 867 | wide-align "^1.1.0" 868 | 869 | getpass@^0.1.1: 870 | version "0.1.7" 871 | resolved "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" 872 | dependencies: 873 | assert-plus "^1.0.0" 874 | 875 | glob-base@^0.3.0: 876 | version "0.3.0" 877 | resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" 878 | dependencies: 879 | glob-parent "^2.0.0" 880 | is-glob "^2.0.0" 881 | 882 | glob-parent@^2.0.0: 883 | version "2.0.0" 884 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" 885 | dependencies: 886 | is-glob "^2.0.0" 887 | 888 | glob@^7.0.5: 889 | version "7.1.1" 890 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" 891 | dependencies: 892 | fs.realpath "^1.0.0" 893 | inflight "^1.0.4" 894 | inherits "2" 895 | minimatch "^3.0.2" 896 | once "^1.3.0" 897 | path-is-absolute "^1.0.0" 898 | 899 | globals@^9.0.0: 900 | version "9.16.0" 901 | resolved "https://registry.yarnpkg.com/globals/-/globals-9.16.0.tgz#63e903658171ec2d9f51b1d31de5e2b8dc01fb80" 902 | 903 | glogg@^1.0.0: 904 | version "1.0.0" 905 | resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.0.tgz#7fe0f199f57ac906cf512feead8f90ee4a284fc5" 906 | dependencies: 907 | sparkles "^1.0.0" 908 | 909 | graceful-fs@^4.1.2: 910 | version "4.1.11" 911 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" 912 | 913 | gulp-rollup@^2.5.1: 914 | version "2.11.0" 915 | resolved "https://registry.yarnpkg.com/gulp-rollup/-/gulp-rollup-2.11.0.tgz#d8eac089960e4dbc29ae1151ec170552f26d51b8" 916 | dependencies: 917 | buffer-from "^0.1.0" 918 | gulp-util "^3.0.6" 919 | readable-stream "^2.1.4" 920 | rollup "^0.41.4" 921 | rollup-plugin-hypothetical "^1.1.0" 922 | 923 | gulp-util@^3.0.6: 924 | version "3.0.8" 925 | resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" 926 | dependencies: 927 | array-differ "^1.0.0" 928 | array-uniq "^1.0.2" 929 | beeper "^1.0.0" 930 | chalk "^1.0.0" 931 | dateformat "^2.0.0" 932 | fancy-log "^1.1.0" 933 | gulplog "^1.0.0" 934 | has-gulplog "^0.1.0" 935 | lodash._reescape "^3.0.0" 936 | lodash._reevaluate "^3.0.0" 937 | lodash._reinterpolate "^3.0.0" 938 | lodash.template "^3.0.0" 939 | minimist "^1.1.0" 940 | multipipe "^0.1.2" 941 | object-assign "^3.0.0" 942 | replace-ext "0.0.1" 943 | through2 "^2.0.0" 944 | vinyl "^0.5.0" 945 | 946 | gulplog@^1.0.0: 947 | version "1.0.0" 948 | resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" 949 | dependencies: 950 | glogg "^1.0.0" 951 | 952 | har-schema@^1.0.5: 953 | version "1.0.5" 954 | resolved "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" 955 | 956 | har-validator@~4.2.1: 957 | version "4.2.1" 958 | resolved "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" 959 | dependencies: 960 | ajv "^4.9.1" 961 | har-schema "^1.0.5" 962 | 963 | has-ansi@^2.0.0: 964 | version "2.0.0" 965 | resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" 966 | dependencies: 967 | ansi-regex "^2.0.0" 968 | 969 | has-gulplog@^0.1.0: 970 | version "0.1.0" 971 | resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" 972 | dependencies: 973 | sparkles "^1.0.0" 974 | 975 | has-symbol-support-x@^1.1.0: 976 | version "1.1.0" 977 | resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.1.0.tgz#286d792eac673c0c2308fc7b2160b75cebadd550" 978 | 979 | has-to-string-tag-x@^1.1.0: 980 | version "1.1.0" 981 | resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.1.0.tgz#fd718cf21c24d2e5e5dd94c4fe2134c1583b1e68" 982 | dependencies: 983 | has-symbol-support-x "^1.1.0" 984 | 985 | has-unicode@^2.0.0: 986 | version "2.0.1" 987 | resolved "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" 988 | 989 | hawk@3.1.3, hawk@~3.1.3: 990 | version "3.1.3" 991 | resolved "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" 992 | dependencies: 993 | boom "2.x.x" 994 | cryptiles "2.x.x" 995 | hoek "2.x.x" 996 | sntp "1.x.x" 997 | 998 | hoek@2.x.x: 999 | version "2.16.3" 1000 | resolved "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" 1001 | 1002 | home-or-tmp@^2.0.0: 1003 | version "2.0.0" 1004 | resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" 1005 | dependencies: 1006 | os-homedir "^1.0.0" 1007 | os-tmpdir "^1.0.1" 1008 | 1009 | http-signature@~1.1.0: 1010 | version "1.1.1" 1011 | resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" 1012 | dependencies: 1013 | assert-plus "^0.2.0" 1014 | jsprim "^1.2.2" 1015 | sshpk "^1.7.0" 1016 | 1017 | inflight@^1.0.4: 1018 | version "1.0.6" 1019 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 1020 | dependencies: 1021 | once "^1.3.0" 1022 | wrappy "1" 1023 | 1024 | inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: 1025 | version "2.0.3" 1026 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 1027 | 1028 | ini@~1.3.0: 1029 | version "1.3.5" 1030 | resolved "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" 1031 | 1032 | invariant@^2.2.0: 1033 | version "2.2.2" 1034 | resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" 1035 | dependencies: 1036 | loose-envify "^1.0.0" 1037 | 1038 | is-array-buffer-x@^1.0.13: 1039 | version "1.1.0" 1040 | resolved "https://registry.yarnpkg.com/is-array-buffer-x/-/is-array-buffer-x-1.1.0.tgz#047e20b772f8a0958224485adfbbe78d2cccf926" 1041 | dependencies: 1042 | has-to-string-tag-x "^1.1.0" 1043 | is-object-like-x "^1.1.0" 1044 | to-string-tag-x "^1.1.0" 1045 | 1046 | is-binary-path@^1.0.0: 1047 | version "1.0.1" 1048 | resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" 1049 | dependencies: 1050 | binary-extensions "^1.0.0" 1051 | 1052 | is-buffer@^1.0.2: 1053 | version "1.1.5" 1054 | resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" 1055 | 1056 | is-dotfile@^1.0.0: 1057 | version "1.0.2" 1058 | resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" 1059 | 1060 | is-equal-shallow@^0.1.3: 1061 | version "0.1.3" 1062 | resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" 1063 | dependencies: 1064 | is-primitive "^2.0.0" 1065 | 1066 | is-extendable@^0.1.1: 1067 | version "0.1.1" 1068 | resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" 1069 | 1070 | is-extglob@^1.0.0: 1071 | version "1.0.0" 1072 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" 1073 | 1074 | is-finite@^1.0.0: 1075 | version "1.0.2" 1076 | resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" 1077 | dependencies: 1078 | number-is-nan "^1.0.0" 1079 | 1080 | is-fullwidth-code-point@^1.0.0: 1081 | version "1.0.0" 1082 | resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" 1083 | dependencies: 1084 | number-is-nan "^1.0.0" 1085 | 1086 | is-function-x@^1.1.0: 1087 | version "1.1.0" 1088 | resolved "https://registry.yarnpkg.com/is-function-x/-/is-function-x-1.1.0.tgz#a4493b118ab70a0763d4ec2517a2d3a0e6ba069d" 1089 | dependencies: 1090 | has-to-string-tag-x "^1.1.0" 1091 | is-primitive "^2.0.0" 1092 | to-string-tag-x "^1.1.0" 1093 | 1094 | is-glob@^2.0.0, is-glob@^2.0.1: 1095 | version "2.0.1" 1096 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" 1097 | dependencies: 1098 | is-extglob "^1.0.0" 1099 | 1100 | is-number@^2.0.2, is-number@^2.1.0: 1101 | version "2.1.0" 1102 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" 1103 | dependencies: 1104 | kind-of "^3.0.2" 1105 | 1106 | is-object-like-x@^1.1.0: 1107 | version "1.1.0" 1108 | resolved "https://registry.yarnpkg.com/is-object-like-x/-/is-object-like-x-1.1.0.tgz#fa08a2caf41bf1e422039677a4fd5727fb00a59c" 1109 | dependencies: 1110 | is-function-x "^1.1.0" 1111 | is-primitive "^2.0.0" 1112 | 1113 | is-posix-bracket@^0.1.0: 1114 | version "0.1.1" 1115 | resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" 1116 | 1117 | is-primitive@^2.0.0: 1118 | version "2.0.0" 1119 | resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" 1120 | 1121 | is-typedarray@~1.0.0: 1122 | version "1.0.0" 1123 | resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" 1124 | 1125 | isarray@0.0.1: 1126 | version "0.0.1" 1127 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" 1128 | 1129 | isarray@1.0.0, isarray@~1.0.0: 1130 | version "1.0.0" 1131 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" 1132 | 1133 | isobject@^2.0.0: 1134 | version "2.1.0" 1135 | resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" 1136 | dependencies: 1137 | isarray "1.0.0" 1138 | 1139 | isstream@~0.1.2: 1140 | version "0.1.2" 1141 | resolved "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" 1142 | 1143 | js-tokens@^3.0.0: 1144 | version "3.0.1" 1145 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" 1146 | 1147 | jsbn@~0.1.0: 1148 | version "0.1.1" 1149 | resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" 1150 | 1151 | jsesc@^1.3.0: 1152 | version "1.3.0" 1153 | resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" 1154 | 1155 | jsesc@~0.5.0: 1156 | version "0.5.0" 1157 | resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" 1158 | 1159 | json-schema@0.2.3: 1160 | version "0.2.3" 1161 | resolved "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" 1162 | 1163 | json-stable-stringify@^1.0.1: 1164 | version "1.0.1" 1165 | resolved "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" 1166 | dependencies: 1167 | jsonify "~0.0.0" 1168 | 1169 | json-stringify-safe@~5.0.1: 1170 | version "5.0.1" 1171 | resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" 1172 | 1173 | json5@^0.5.0: 1174 | version "0.5.1" 1175 | resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" 1176 | 1177 | jsonify@~0.0.0: 1178 | version "0.0.0" 1179 | resolved "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" 1180 | 1181 | jsprim@^1.2.2: 1182 | version "1.4.1" 1183 | resolved "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" 1184 | dependencies: 1185 | assert-plus "1.0.0" 1186 | extsprintf "1.3.0" 1187 | json-schema "0.2.3" 1188 | verror "1.10.0" 1189 | 1190 | kind-of@^3.0.2: 1191 | version "3.1.0" 1192 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47" 1193 | dependencies: 1194 | is-buffer "^1.0.2" 1195 | 1196 | lazy-cache@^1.0.3: 1197 | version "1.0.4" 1198 | resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" 1199 | 1200 | lodash._basecopy@^3.0.0: 1201 | version "3.0.1" 1202 | resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" 1203 | 1204 | lodash._basetostring@^3.0.0: 1205 | version "3.0.1" 1206 | resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5" 1207 | 1208 | lodash._basevalues@^3.0.0: 1209 | version "3.0.0" 1210 | resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" 1211 | 1212 | lodash._getnative@^3.0.0: 1213 | version "3.9.1" 1214 | resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" 1215 | 1216 | lodash._isiterateecall@^3.0.0: 1217 | version "3.0.9" 1218 | resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" 1219 | 1220 | lodash._reescape@^3.0.0: 1221 | version "3.0.0" 1222 | resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a" 1223 | 1224 | lodash._reevaluate@^3.0.0: 1225 | version "3.0.0" 1226 | resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed" 1227 | 1228 | lodash._reinterpolate@^3.0.0: 1229 | version "3.0.0" 1230 | resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" 1231 | 1232 | lodash._root@^3.0.0: 1233 | version "3.0.1" 1234 | resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" 1235 | 1236 | lodash.escape@^3.0.0: 1237 | version "3.2.0" 1238 | resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" 1239 | dependencies: 1240 | lodash._root "^3.0.0" 1241 | 1242 | lodash.isarguments@^3.0.0: 1243 | version "3.1.0" 1244 | resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" 1245 | 1246 | lodash.isarray@^3.0.0: 1247 | version "3.0.4" 1248 | resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" 1249 | 1250 | lodash.isnull@^3.0.0: 1251 | version "3.0.0" 1252 | resolved "https://registry.yarnpkg.com/lodash.isnull/-/lodash.isnull-3.0.0.tgz#fafbe59ea1dca27eed786534039dd84c2e07c56e" 1253 | 1254 | lodash.keys@^3.0.0: 1255 | version "3.1.2" 1256 | resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" 1257 | dependencies: 1258 | lodash._getnative "^3.0.0" 1259 | lodash.isarguments "^3.0.0" 1260 | lodash.isarray "^3.0.0" 1261 | 1262 | lodash.restparam@^3.0.0: 1263 | version "3.6.1" 1264 | resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" 1265 | 1266 | lodash.template@^3.0.0: 1267 | version "3.6.2" 1268 | resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f" 1269 | dependencies: 1270 | lodash._basecopy "^3.0.0" 1271 | lodash._basetostring "^3.0.0" 1272 | lodash._basevalues "^3.0.0" 1273 | lodash._isiterateecall "^3.0.0" 1274 | lodash._reinterpolate "^3.0.0" 1275 | lodash.escape "^3.0.0" 1276 | lodash.keys "^3.0.0" 1277 | lodash.restparam "^3.0.0" 1278 | lodash.templatesettings "^3.0.0" 1279 | 1280 | lodash.templatesettings@^3.0.0: 1281 | version "3.1.1" 1282 | resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5" 1283 | dependencies: 1284 | lodash._reinterpolate "^3.0.0" 1285 | lodash.escape "^3.0.0" 1286 | 1287 | lodash@^4.2.0: 1288 | version "4.17.4" 1289 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" 1290 | 1291 | longest@^1.0.1: 1292 | version "1.0.1" 1293 | resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" 1294 | 1295 | loose-envify@^1.0.0: 1296 | version "1.3.1" 1297 | resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" 1298 | dependencies: 1299 | js-tokens "^3.0.0" 1300 | 1301 | magic-string@^0.15.2: 1302 | version "0.15.2" 1303 | resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.15.2.tgz#0681d7388741bbc3addaa65060992624c6c09e9c" 1304 | dependencies: 1305 | vlq "^0.2.1" 1306 | 1307 | magic-string@^0.19.0: 1308 | version "0.19.0" 1309 | resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.19.0.tgz#198948217254e3e0b93080e01146b7c73b2a06b2" 1310 | dependencies: 1311 | vlq "^0.2.1" 1312 | 1313 | micromatch@^2.1.5, micromatch@^2.3.11: 1314 | version "2.3.11" 1315 | resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" 1316 | dependencies: 1317 | arr-diff "^2.0.0" 1318 | array-unique "^0.2.1" 1319 | braces "^1.8.2" 1320 | expand-brackets "^0.1.4" 1321 | extglob "^0.3.1" 1322 | filename-regex "^2.0.0" 1323 | is-extglob "^1.0.0" 1324 | is-glob "^2.0.1" 1325 | kind-of "^3.0.2" 1326 | normalize-path "^2.0.1" 1327 | object.omit "^2.0.0" 1328 | parse-glob "^3.0.4" 1329 | regex-cache "^0.4.2" 1330 | 1331 | mime-db@~1.33.0: 1332 | version "1.33.0" 1333 | resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" 1334 | 1335 | mime-types@^2.1.12, mime-types@~2.1.7: 1336 | version "2.1.18" 1337 | resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" 1338 | dependencies: 1339 | mime-db "~1.33.0" 1340 | 1341 | minimatch@^3.0.0, minimatch@^3.0.2: 1342 | version "3.0.3" 1343 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" 1344 | dependencies: 1345 | brace-expansion "^1.0.0" 1346 | 1347 | minimist@0.0.8: 1348 | version "0.0.8" 1349 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 1350 | 1351 | minimist@^1.1.0, minimist@^1.2.0: 1352 | version "1.2.0" 1353 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" 1354 | 1355 | "mkdirp@>=0.5 0", mkdirp@^0.5.1: 1356 | version "0.5.1" 1357 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 1358 | dependencies: 1359 | minimist "0.0.8" 1360 | 1361 | ms@0.7.2: 1362 | version "0.7.2" 1363 | resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" 1364 | 1365 | multipipe@^0.1.2: 1366 | version "0.1.2" 1367 | resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" 1368 | dependencies: 1369 | duplexer2 "0.0.2" 1370 | 1371 | nan@^2.3.0: 1372 | version "2.10.0" 1373 | resolved "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" 1374 | 1375 | node-pre-gyp@^0.6.39: 1376 | version "0.6.39" 1377 | resolved "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" 1378 | dependencies: 1379 | detect-libc "^1.0.2" 1380 | hawk "3.1.3" 1381 | mkdirp "^0.5.1" 1382 | nopt "^4.0.1" 1383 | npmlog "^4.0.2" 1384 | rc "^1.1.7" 1385 | request "2.81.0" 1386 | rimraf "^2.6.1" 1387 | semver "^5.3.0" 1388 | tar "^2.2.1" 1389 | tar-pack "^3.4.0" 1390 | 1391 | nopt@^4.0.1: 1392 | version "4.0.1" 1393 | resolved "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" 1394 | dependencies: 1395 | abbrev "1" 1396 | osenv "^0.1.4" 1397 | 1398 | normalize-path@^2.0.0: 1399 | version "2.1.1" 1400 | resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" 1401 | dependencies: 1402 | remove-trailing-separator "^1.0.1" 1403 | 1404 | normalize-path@^2.0.1: 1405 | version "2.0.1" 1406 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" 1407 | 1408 | npmlog@^4.0.2: 1409 | version "4.1.2" 1410 | resolved "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" 1411 | dependencies: 1412 | are-we-there-yet "~1.1.2" 1413 | console-control-strings "~1.1.0" 1414 | gauge "~2.7.3" 1415 | set-blocking "~2.0.0" 1416 | 1417 | number-is-nan@^1.0.0: 1418 | version "1.0.1" 1419 | resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" 1420 | 1421 | oauth-sign@~0.8.1: 1422 | version "0.8.2" 1423 | resolved "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" 1424 | 1425 | object-assign@^3.0.0: 1426 | version "3.0.0" 1427 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" 1428 | 1429 | object-assign@^4.1.0: 1430 | version "4.1.1" 1431 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 1432 | 1433 | object.omit@^2.0.0: 1434 | version "2.0.1" 1435 | resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" 1436 | dependencies: 1437 | for-own "^0.1.4" 1438 | is-extendable "^0.1.1" 1439 | 1440 | once@^1.3.0: 1441 | version "1.3.3" 1442 | resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" 1443 | dependencies: 1444 | wrappy "1" 1445 | 1446 | once@^1.3.3: 1447 | version "1.4.0" 1448 | resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 1449 | dependencies: 1450 | wrappy "1" 1451 | 1452 | os-homedir@^1.0.0: 1453 | version "1.0.2" 1454 | resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" 1455 | 1456 | os-tmpdir@^1.0.0, os-tmpdir@^1.0.1: 1457 | version "1.0.2" 1458 | resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" 1459 | 1460 | osenv@^0.1.4: 1461 | version "0.1.5" 1462 | resolved "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" 1463 | dependencies: 1464 | os-homedir "^1.0.0" 1465 | os-tmpdir "^1.0.0" 1466 | 1467 | parse-glob@^3.0.4: 1468 | version "3.0.4" 1469 | resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" 1470 | dependencies: 1471 | glob-base "^0.3.0" 1472 | is-dotfile "^1.0.0" 1473 | is-extglob "^1.0.0" 1474 | is-glob "^2.0.0" 1475 | 1476 | path-is-absolute@^1.0.0: 1477 | version "1.0.1" 1478 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 1479 | 1480 | path-parse@^1.0.5: 1481 | version "1.0.5" 1482 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" 1483 | 1484 | performance-now@^0.2.0: 1485 | version "0.2.0" 1486 | resolved "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" 1487 | 1488 | preserve@^0.2.0: 1489 | version "0.2.0" 1490 | resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" 1491 | 1492 | private@^0.1.6: 1493 | version "0.1.7" 1494 | resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" 1495 | 1496 | process-nextick-args@~1.0.6: 1497 | version "1.0.7" 1498 | resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" 1499 | 1500 | process-nextick-args@~2.0.0: 1501 | version "2.0.0" 1502 | resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" 1503 | 1504 | punycode@^1.4.1: 1505 | version "1.4.1" 1506 | resolved "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" 1507 | 1508 | qs@~6.4.0: 1509 | version "6.4.0" 1510 | resolved "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" 1511 | 1512 | randomatic@^1.1.3: 1513 | version "1.1.6" 1514 | resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" 1515 | dependencies: 1516 | is-number "^2.0.2" 1517 | kind-of "^3.0.2" 1518 | 1519 | rc@^1.1.7: 1520 | version "1.2.6" 1521 | resolved "https://registry.npmjs.org/rc/-/rc-1.2.6.tgz#eb18989c6d4f4f162c399f79ddd29f3835568092" 1522 | dependencies: 1523 | deep-extend "~0.4.0" 1524 | ini "~1.3.0" 1525 | minimist "^1.2.0" 1526 | strip-json-comments "~2.0.1" 1527 | 1528 | readable-stream@^2.0.2, readable-stream@^2.1.4, readable-stream@^2.1.5: 1529 | version "2.2.5" 1530 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.5.tgz#a0b187304e05bab01a4ce2b4cc9c607d5aa1d606" 1531 | dependencies: 1532 | buffer-shims "^1.0.0" 1533 | core-util-is "~1.0.0" 1534 | inherits "~2.0.1" 1535 | isarray "~1.0.0" 1536 | process-nextick-args "~1.0.6" 1537 | string_decoder "~0.10.x" 1538 | util-deprecate "~1.0.1" 1539 | 1540 | readable-stream@^2.0.6: 1541 | version "2.3.5" 1542 | resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz#b4f85003a938cbb6ecbce2a124fb1012bd1a838d" 1543 | dependencies: 1544 | core-util-is "~1.0.0" 1545 | inherits "~2.0.3" 1546 | isarray "~1.0.0" 1547 | process-nextick-args "~2.0.0" 1548 | safe-buffer "~5.1.1" 1549 | string_decoder "~1.0.3" 1550 | util-deprecate "~1.0.1" 1551 | 1552 | readable-stream@~1.1.9: 1553 | version "1.1.14" 1554 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" 1555 | dependencies: 1556 | core-util-is "~1.0.0" 1557 | inherits "~2.0.1" 1558 | isarray "0.0.1" 1559 | string_decoder "~0.10.x" 1560 | 1561 | readdirp@^2.0.0: 1562 | version "2.1.0" 1563 | resolved "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" 1564 | dependencies: 1565 | graceful-fs "^4.1.2" 1566 | minimatch "^3.0.2" 1567 | readable-stream "^2.0.2" 1568 | set-immediate-shim "^1.0.1" 1569 | 1570 | regenerate@^1.2.1: 1571 | version "1.3.2" 1572 | resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" 1573 | 1574 | regenerator-runtime@^0.10.0: 1575 | version "0.10.3" 1576 | resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.3.tgz#8c4367a904b51ea62a908ac310bf99ff90a82a3e" 1577 | 1578 | regenerator-transform@0.9.8: 1579 | version "0.9.8" 1580 | resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.8.tgz#0f88bb2bc03932ddb7b6b7312e68078f01026d6c" 1581 | dependencies: 1582 | babel-runtime "^6.18.0" 1583 | babel-types "^6.19.0" 1584 | private "^0.1.6" 1585 | 1586 | regex-cache@^0.4.2: 1587 | version "0.4.3" 1588 | resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" 1589 | dependencies: 1590 | is-equal-shallow "^0.1.3" 1591 | is-primitive "^2.0.0" 1592 | 1593 | regexpu-core@^2.0.0: 1594 | version "2.0.0" 1595 | resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" 1596 | dependencies: 1597 | regenerate "^1.2.1" 1598 | regjsgen "^0.2.0" 1599 | regjsparser "^0.1.4" 1600 | 1601 | regjsgen@^0.2.0: 1602 | version "0.2.0" 1603 | resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" 1604 | 1605 | regjsparser@^0.1.4: 1606 | version "0.1.5" 1607 | resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" 1608 | dependencies: 1609 | jsesc "~0.5.0" 1610 | 1611 | remove-trailing-separator@^1.0.1: 1612 | version "1.1.0" 1613 | resolved "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" 1614 | 1615 | repeat-element@^1.1.2: 1616 | version "1.1.2" 1617 | resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" 1618 | 1619 | repeat-string@^1.5.2: 1620 | version "1.6.1" 1621 | resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" 1622 | 1623 | repeating@^2.0.0: 1624 | version "2.0.1" 1625 | resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" 1626 | dependencies: 1627 | is-finite "^1.0.0" 1628 | 1629 | replace-ext@0.0.1: 1630 | version "0.0.1" 1631 | resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" 1632 | 1633 | request@2.81.0: 1634 | version "2.81.0" 1635 | resolved "https://registry.npmjs.org/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" 1636 | dependencies: 1637 | aws-sign2 "~0.6.0" 1638 | aws4 "^1.2.1" 1639 | caseless "~0.12.0" 1640 | combined-stream "~1.0.5" 1641 | extend "~3.0.0" 1642 | forever-agent "~0.6.1" 1643 | form-data "~2.1.1" 1644 | har-validator "~4.2.1" 1645 | hawk "~3.1.3" 1646 | http-signature "~1.1.0" 1647 | is-typedarray "~1.0.0" 1648 | isstream "~0.1.2" 1649 | json-stringify-safe "~5.0.1" 1650 | mime-types "~2.1.7" 1651 | oauth-sign "~0.8.1" 1652 | performance-now "^0.2.0" 1653 | qs "~6.4.0" 1654 | safe-buffer "^5.0.1" 1655 | stringstream "~0.0.4" 1656 | tough-cookie "~2.3.0" 1657 | tunnel-agent "^0.6.0" 1658 | uuid "^3.0.0" 1659 | 1660 | require-relative@0.8.7: 1661 | version "0.8.7" 1662 | resolved "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz#7999539fc9e047a37928fa196f8e1563dabd36de" 1663 | 1664 | resolve@1.1.7: 1665 | version "1.1.7" 1666 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" 1667 | 1668 | resolve@^1.1.6, resolve@^1.1.7: 1669 | version "1.3.2" 1670 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.2.tgz#1f0442c9e0cbb8136e87b9305f932f46c7f28235" 1671 | dependencies: 1672 | path-parse "^1.0.5" 1673 | 1674 | right-align@^0.1.1: 1675 | version "0.1.3" 1676 | resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" 1677 | dependencies: 1678 | align-text "^0.1.1" 1679 | 1680 | rimraf@2, rimraf@^2.5.1, rimraf@^2.6.1: 1681 | version "2.6.2" 1682 | resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" 1683 | dependencies: 1684 | glob "^7.0.5" 1685 | 1686 | rollup-plugin-babel@^2.7.1: 1687 | version "2.7.1" 1688 | resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-2.7.1.tgz#16528197b0f938a1536f44683c7a93d573182f57" 1689 | dependencies: 1690 | babel-core "6" 1691 | babel-plugin-transform-es2015-classes "^6.9.0" 1692 | object-assign "^4.1.0" 1693 | rollup-pluginutils "^1.5.0" 1694 | 1695 | rollup-plugin-commonjs@^6.0.0: 1696 | version "6.0.1" 1697 | resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-6.0.1.tgz#d6587badda75b6f7e6bc351e616da7802e6082b8" 1698 | dependencies: 1699 | acorn "^4.0.1" 1700 | estree-walker "^0.3.0" 1701 | magic-string "^0.19.0" 1702 | resolve "^1.1.7" 1703 | rollup-pluginutils "^1.5.1" 1704 | 1705 | rollup-plugin-hypothetical@^1.1.0: 1706 | version "1.2.1" 1707 | resolved "https://registry.yarnpkg.com/rollup-plugin-hypothetical/-/rollup-plugin-hypothetical-1.2.1.tgz#f427077b7bab592cc298197ab9aaac4fe4efa055" 1708 | 1709 | rollup-plugin-node-resolve@^2.0.0: 1710 | version "2.0.0" 1711 | resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-2.0.0.tgz#07e0ae94ac002a3ea36e8f33ca121d9f836b1309" 1712 | dependencies: 1713 | browser-resolve "^1.11.0" 1714 | builtin-modules "^1.1.0" 1715 | resolve "^1.1.6" 1716 | 1717 | rollup-plugin-replace@^1.1.1: 1718 | version "1.1.1" 1719 | resolved "https://registry.yarnpkg.com/rollup-plugin-replace/-/rollup-plugin-replace-1.1.1.tgz#396315ded050a6ce43b9518a886a3f60efb1ea33" 1720 | dependencies: 1721 | magic-string "^0.15.2" 1722 | minimatch "^3.0.2" 1723 | rollup-pluginutils "^1.5.0" 1724 | 1725 | rollup-plugin-uglify@^1.0.1: 1726 | version "1.0.1" 1727 | resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-1.0.1.tgz#11d0b0c8bcd2d07e6908f74fd16b0152390b922a" 1728 | dependencies: 1729 | uglify-js "^2.6.1" 1730 | 1731 | rollup-pluginutils@^1.5.0, rollup-pluginutils@^1.5.1: 1732 | version "1.5.2" 1733 | resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408" 1734 | dependencies: 1735 | estree-walker "^0.2.1" 1736 | minimatch "^3.0.2" 1737 | 1738 | rollup-pluginutils@^2.0.1: 1739 | version "2.0.1" 1740 | resolved "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz#7ec95b3573f6543a46a6461bd9a7c544525d0fc0" 1741 | dependencies: 1742 | estree-walker "^0.3.0" 1743 | micromatch "^2.3.11" 1744 | 1745 | rollup-typescript@^1.1.2: 1746 | version "1.1.2" 1747 | resolved "https://registry.npmjs.org/rollup-typescript/-/rollup-typescript-1.1.2.tgz#6b2a1bc1250008b8b2171479261484c0dc842d65" 1748 | dependencies: 1749 | rollup-pluginutils "^2.0.1" 1750 | tslib "^1.9.0" 1751 | 1752 | rollup-watch@^4.3.1: 1753 | version "4.3.1" 1754 | resolved "https://registry.npmjs.org/rollup-watch/-/rollup-watch-4.3.1.tgz#5aa1eaeab787addf368905d102b39d6fc5ce4a8b" 1755 | dependencies: 1756 | chokidar "^1.7.0" 1757 | require-relative "0.8.7" 1758 | rollup-pluginutils "^2.0.1" 1759 | 1760 | rollup@^0.41.4: 1761 | version "0.41.5" 1762 | resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.41.5.tgz#cdfaade5cd1c2c7314351566a50ef74df6e66e3d" 1763 | dependencies: 1764 | source-map-support "^0.4.0" 1765 | 1766 | safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: 1767 | version "5.1.1" 1768 | resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" 1769 | 1770 | semver@^5.3.0: 1771 | version "5.5.0" 1772 | resolved "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" 1773 | 1774 | set-blocking@~2.0.0: 1775 | version "2.0.0" 1776 | resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" 1777 | 1778 | set-immediate-shim@^1.0.1: 1779 | version "1.0.1" 1780 | resolved "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" 1781 | 1782 | signal-exit@^3.0.0: 1783 | version "3.0.2" 1784 | resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" 1785 | 1786 | slash@^1.0.0: 1787 | version "1.0.0" 1788 | resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" 1789 | 1790 | sntp@1.x.x: 1791 | version "1.0.9" 1792 | resolved "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" 1793 | dependencies: 1794 | hoek "2.x.x" 1795 | 1796 | source-map-support@^0.4.0, source-map-support@^0.4.2: 1797 | version "0.4.12" 1798 | resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.12.tgz#f47d02bf01efaf0c160d3a37d038401b92b1867e" 1799 | dependencies: 1800 | source-map "^0.5.6" 1801 | 1802 | source-map@^0.5.0, source-map@^0.5.6, source-map@~0.5.1: 1803 | version "0.5.6" 1804 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" 1805 | 1806 | sparkles@^1.0.0: 1807 | version "1.0.0" 1808 | resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" 1809 | 1810 | sshpk@^1.7.0: 1811 | version "1.14.1" 1812 | resolved "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb" 1813 | dependencies: 1814 | asn1 "~0.2.3" 1815 | assert-plus "^1.0.0" 1816 | dashdash "^1.12.0" 1817 | getpass "^0.1.1" 1818 | optionalDependencies: 1819 | bcrypt-pbkdf "^1.0.0" 1820 | ecc-jsbn "~0.1.1" 1821 | jsbn "~0.1.0" 1822 | tweetnacl "~0.14.0" 1823 | 1824 | string-width@^1.0.1, string-width@^1.0.2: 1825 | version "1.0.2" 1826 | resolved "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" 1827 | dependencies: 1828 | code-point-at "^1.0.0" 1829 | is-fullwidth-code-point "^1.0.0" 1830 | strip-ansi "^3.0.0" 1831 | 1832 | string_decoder@~0.10.x: 1833 | version "0.10.31" 1834 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" 1835 | 1836 | string_decoder@~1.0.3: 1837 | version "1.0.3" 1838 | resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" 1839 | dependencies: 1840 | safe-buffer "~5.1.0" 1841 | 1842 | stringstream@~0.0.4: 1843 | version "0.0.5" 1844 | resolved "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" 1845 | 1846 | strip-ansi@^3.0.0, strip-ansi@^3.0.1: 1847 | version "3.0.1" 1848 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 1849 | dependencies: 1850 | ansi-regex "^2.0.0" 1851 | 1852 | strip-json-comments@~2.0.1: 1853 | version "2.0.1" 1854 | resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" 1855 | 1856 | supports-color@^2.0.0: 1857 | version "2.0.0" 1858 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" 1859 | 1860 | tar-pack@^3.4.0: 1861 | version "3.4.1" 1862 | resolved "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" 1863 | dependencies: 1864 | debug "^2.2.0" 1865 | fstream "^1.0.10" 1866 | fstream-ignore "^1.0.5" 1867 | once "^1.3.3" 1868 | readable-stream "^2.1.4" 1869 | rimraf "^2.5.1" 1870 | tar "^2.2.1" 1871 | uid-number "^0.0.6" 1872 | 1873 | tar@^2.2.1: 1874 | version "2.2.1" 1875 | resolved "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" 1876 | dependencies: 1877 | block-stream "*" 1878 | fstream "^1.0.2" 1879 | inherits "2" 1880 | 1881 | through2@^2.0.0: 1882 | version "2.0.3" 1883 | resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" 1884 | dependencies: 1885 | readable-stream "^2.1.5" 1886 | xtend "~4.0.1" 1887 | 1888 | time-stamp@^1.0.0: 1889 | version "1.0.1" 1890 | resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.0.1.tgz#9f4bd23559c9365966f3302dbba2b07c6b99b151" 1891 | 1892 | to-fast-properties@^1.0.1: 1893 | version "1.0.2" 1894 | resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" 1895 | 1896 | to-string-tag-x@^1.1.0: 1897 | version "1.1.0" 1898 | resolved "https://registry.yarnpkg.com/to-string-tag-x/-/to-string-tag-x-1.1.0.tgz#69cb42ac1fda925150f4aacd7c9638319d3c2746" 1899 | dependencies: 1900 | lodash.isnull "^3.0.0" 1901 | validate.io-undefined "^1.0.3" 1902 | 1903 | tough-cookie@~2.3.0: 1904 | version "2.3.4" 1905 | resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" 1906 | dependencies: 1907 | punycode "^1.4.1" 1908 | 1909 | trim-right@^1.0.1: 1910 | version "1.0.1" 1911 | resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" 1912 | 1913 | tslib@^1.9.0: 1914 | version "1.9.0" 1915 | resolved "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" 1916 | 1917 | tunnel-agent@^0.6.0: 1918 | version "0.6.0" 1919 | resolved "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" 1920 | dependencies: 1921 | safe-buffer "^5.0.1" 1922 | 1923 | tweetnacl@^0.14.3, tweetnacl@~0.14.0: 1924 | version "0.14.5" 1925 | resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" 1926 | 1927 | typescript@^2.8.1: 1928 | version "2.8.1" 1929 | resolved "https://registry.npmjs.org/typescript/-/typescript-2.8.1.tgz#6160e4f8f195d5ba81d4876f9c0cc1fbc0820624" 1930 | 1931 | uglify-js@^2.6.1: 1932 | version "2.8.12" 1933 | resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.12.tgz#8a50f5d482243650b7108f6080aa3a6afe2a6c55" 1934 | dependencies: 1935 | source-map "~0.5.1" 1936 | uglify-to-browserify "~1.0.0" 1937 | yargs "~3.10.0" 1938 | 1939 | uglify-to-browserify@~1.0.0: 1940 | version "1.0.2" 1941 | resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" 1942 | 1943 | uid-number@^0.0.6: 1944 | version "0.0.6" 1945 | resolved "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" 1946 | 1947 | util-deprecate@~1.0.1: 1948 | version "1.0.2" 1949 | resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" 1950 | 1951 | uuid@^3.0.0: 1952 | version "3.2.1" 1953 | resolved "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" 1954 | 1955 | validate.io-undefined@^1.0.3: 1956 | version "1.0.3" 1957 | resolved "https://registry.yarnpkg.com/validate.io-undefined/-/validate.io-undefined-1.0.3.tgz#7e27fcbb315b841e78243431897671929e20b7f4" 1958 | 1959 | verror@1.10.0: 1960 | version "1.10.0" 1961 | resolved "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" 1962 | dependencies: 1963 | assert-plus "^1.0.0" 1964 | core-util-is "1.0.2" 1965 | extsprintf "^1.2.0" 1966 | 1967 | vinyl@^0.5.0: 1968 | version "0.5.3" 1969 | resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde" 1970 | dependencies: 1971 | clone "^1.0.0" 1972 | clone-stats "^0.0.1" 1973 | replace-ext "0.0.1" 1974 | 1975 | vlq@^0.2.1: 1976 | version "0.2.1" 1977 | resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.1.tgz#14439d711891e682535467f8587c5630e4222a6c" 1978 | 1979 | vue@^2.5.16: 1980 | version "2.5.16" 1981 | resolved "https://registry.npmjs.org/vue/-/vue-2.5.16.tgz#07edb75e8412aaeed871ebafa99f4672584a0085" 1982 | 1983 | wide-align@^1.1.0: 1984 | version "1.1.2" 1985 | resolved "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" 1986 | dependencies: 1987 | string-width "^1.0.2" 1988 | 1989 | window-size@0.1.0: 1990 | version "0.1.0" 1991 | resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" 1992 | 1993 | wordwrap@0.0.2: 1994 | version "0.0.2" 1995 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" 1996 | 1997 | wrappy@1: 1998 | version "1.0.2" 1999 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 2000 | 2001 | xtend@~4.0.1: 2002 | version "4.0.1" 2003 | resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" 2004 | 2005 | yargs@~3.10.0: 2006 | version "3.10.0" 2007 | resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" 2008 | dependencies: 2009 | camelcase "^1.0.2" 2010 | cliui "^2.1.0" 2011 | decamelize "^1.0.0" 2012 | window-size "0.1.0" 2013 | --------------------------------------------------------------------------------