diff --git a/.gitignore b/.gitignore
index ccb6f59..2811c26 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,4 +37,7 @@ npm-debug.log.*
# cypress
cypress/screenshots
-cypress/videos
\ No newline at end of file
+cypress/videos
+
+# dist
+dist
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index 83c5b23..2361417 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,7 +6,15 @@ cache:
- ~/.npm
- ~/.cache
- node_modules
+branches:
+ only:
+ - master
+notifications:
+ email: false
install:
- npm install
script:
- - npm test
\ No newline at end of file
+ - npm run test
+ - npm run build
+after_success:
+ - ./node_modules/.bin/travis-deploy-once "npm run semantic-release"
diff --git a/dist/frappe-datatable.cjs.css b/dist/frappe-datatable.cjs.css
deleted file mode 100644
index 8ce9ace..0000000
--- a/dist/frappe-datatable.cjs.css
+++ /dev/null
@@ -1,282 +0,0 @@
-/* This file is processed by postcss */
-/* variables */
-
-.data-table {
-
- /* styling */
- position: relative;
- overflow: auto;
-}
-
-/* resets */
-
-.data-table *, .data-table *::after, .data-table *::before {
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
- }
-
-.data-table button, .data-table input {
- overflow: visible;
- font-family: inherit;
- font-size: inherit;
- line-height: inherit;
- margin: 0;
- padding: 0;
- }
-
-.data-table .input-style {
- outline: none;
- width: 100%;
- border: none;
- }
-
-.data-table *, .data-table *:focus {
- outline: none;
- border-radius: 0px;
- -webkit-box-shadow: none;
- box-shadow: none;
- }
-
-.data-table table {
- border-collapse: collapse;
- }
-
-.data-table table td {
- padding: 0;
- border: 1px solid #d1d8dd;
- }
-
-.data-table thead td {
- border-bottom-width: 1px;
- }
-
-.data-table .freeze-container {
- display: -webkit-box;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-pack: center;
- -ms-flex-pack: center;
- justify-content: center;
- -ms-flex-line-pack: center;
- align-content: center;
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- background-color: #f5f7fa;
- opacity: 0.5;
- font-size: 2em;
- }
-
-.data-table .freeze-container span {
- position: absolute;
- top: 50%;
- -webkit-transform: translateY(-50%);
- transform: translateY(-50%);
- }
-
-.data-table .hide {
- display: none;
- }
-
-.data-table .toast-message {
- position: absolute;
- bottom: 16px;
- bottom: 1rem;
- left: 50%;
- -webkit-transform: translateX(-50%);
- transform: translateX(-50%);
- }
-
-.data-table .toast-message span {
- display: inline-block;
- background-color: rgba(0, 0, 0, .8);
- color: #dfe2e5;
- border-radius: 3px;
- padding: 8px 16px;
- padding: 0.5rem 1rem;
- }
-
-.body-scrollable {
- max-height: 500px;
- overflow: auto;
- border-bottom: 1px solid #d1d8dd;
-}
-
-.body-scrollable.row-highlight-all .data-table-row:not(.row-unhighlight) {
- background-color: #f5f7fa;
- }
-
-.data-table-header {
- position: absolute;
- top: 0;
- left: 0;
- background-color: white;
- font-weight: bold;
-}
-
-.data-table-header .content span:not(.column-resizer) {
- cursor: pointer;
- }
-
-.data-table-header .column-resizer {
- display: none;
- position: absolute;
- right: 0;
- top: 0;
- width: 4px;
- width: 0.25rem;
- height: 100%;
- background-color: rgb(82, 146, 247);
- cursor: col-resize;
- }
-
-.data-table-header .data-table-dropdown {
- position: absolute;
- right: 10px;
- display: -webkit-inline-box;
- display: -ms-inline-flexbox;
- display: inline-flex;
- vertical-align: top;
- text-align: left;
- }
-
-.data-table-header .data-table-dropdown.is-active .data-table-dropdown-list {
- display: block;
- }
-
-.data-table-header .data-table-dropdown.is-active .data-table-dropdown-toggle {
- display: block;
- }
-
-.data-table-header .data-table-dropdown-toggle {
- display: none;
- background-color: transparent;
- border: none;
- }
-
-.data-table-header .data-table-dropdown-list {
- display: none;
- font-weight: normal;
-
- position: absolute;
- min-width: 128px;
- min-width: 8rem;
- top: 100%;
- right: 0;
- z-index: 1;
- background-color: white;
- border-radius: 3px;
- -webkit-box-shadow: 0 2px 3px rgba(10, 10, 10, .1), 0 0 0 1px rgba(10, 10, 10, .1);
- box-shadow: 0 2px 3px rgba(10, 10, 10, .1), 0 0 0 1px rgba(10, 10, 10, .1);
- padding-bottom: 8px;
- padding-bottom: 0.5rem;
- padding-top: 8px;
- padding-top: 0.5rem;
- }
-
-.data-table-header .data-table-dropdown-list> div {
- padding: 8px 16px;
- padding: 0.5rem 1rem;
- }
-
-.data-table-header .data-table-dropdown-list> div:hover {
- background-color: #f5f7fa;
- }
-
-.data-table-header .data-table-cell.remove-column {
- background-color: #FD8B8B;
- -webkit-transition: 300ms background-color ease-in-out;
- transition: 300ms background-color ease-in-out;
- }
-
-.data-table-header .data-table-cell.sortable-chosen {
- background-color: #f5f7fa;
- }
-
-.data-table-cell {
- position: relative;
-}
-
-.data-table-cell .content {
- padding: 8px;
- padding: 0.5rem;
- border: 2px solid transparent;
- }
-
-.data-table-cell .content.ellipsis {
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- }
-
-.data-table-cell .edit-cell {
- display: none;
- padding: 8px;
- padding: 0.5rem;
- background: #fff;
- z-index: 1;
- height: 100%;
- }
-
-.data-table-cell.selected .content {
- border: 2px solid rgb(82, 146, 247);
- }
-
-.data-table-cell.editing .content {
- display: none;
- }
-
-.data-table-cell.editing .edit-cell {
- border: 2px solid rgb(82, 146, 247);
- display: block;
- }
-
-.data-table-cell.highlight {
- background-color: #f5f7fa;
- }
-
-.data-table-cell:hover .column-resizer {
- display: inline-block;
- }
-
-.data-table-cell:hover .data-table-dropdown-toggle {
- display: block;
- }
-
-.data-table-cell .tree-node {
- display: inline-block;
- position: relative;
- }
-
-.data-table-cell .toggle {
- display: inline-block;
- position: absolute;
- padding: 0 4px;
- cursor: pointer;
- }
-
-.data-table-cell .toggle:before {
- content: '▼';
- }
-
-.data-table-cell.tree-close .toggle:before {
- content: '►';
- }
-
-.data-table-row.row-highlight {
- background-color: #f5f7fa;
- }
-
-.noselect {
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-
-body.data-table-resize {
- cursor: col-resize;
-}
diff --git a/dist/frappe-datatable.cjs.js b/dist/frappe-datatable.cjs.js
deleted file mode 100644
index c0f75a3..0000000
--- a/dist/frappe-datatable.cjs.js
+++ /dev/null
@@ -1,3683 +0,0 @@
-'use strict';
-
-function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
-
-var Sortable = _interopDefault(require('sortablejs'));
-var Clusterize = _interopDefault(require('clusterize.js'));
-
-function $(expr, con) {
- return typeof expr === 'string' ?
- (con || document).querySelector(expr) :
- expr || null;
-}
-
-$.each = (expr, con) => {
- return typeof expr === 'string' ?
- Array.from((con || document).querySelectorAll(expr)) :
- expr || null;
-};
-
-$.create = (tag, o) => {
- let element = document.createElement(tag);
-
- for (let i in o) {
- let val = o[i];
-
- if (i === 'inside') {
- $(val).appendChild(element);
- } else
- if (i === 'around') {
- let ref = $(val);
- ref.parentNode.insertBefore(element, ref);
- element.appendChild(ref);
- } else
- if (i === 'styles') {
- if (typeof val === 'object') {
- Object.keys(val).map(prop => {
- element.style[prop] = val[prop];
- });
- }
- } else
- if (i in element) {
- element[i] = val;
- } else {
- element.setAttribute(i, val);
- }
- }
-
- return element;
-};
-
-$.on = (element, event, selector, callback) => {
- if (!callback) {
- callback = selector;
- $.bind(element, event, callback);
- } else {
- $.delegate(element, event, selector, callback);
- }
-};
-
-$.off = (element, event, handler) => {
- element.removeEventListener(event, handler);
-};
-
-$.bind = (element, event, callback) => {
- event.split(/\s+/).forEach(function (event) {
- element.addEventListener(event, callback);
- });
-};
-
-$.delegate = (element, event, selector, callback) => {
- element.addEventListener(event, function (e) {
- const delegatedTarget = e.target.closest(selector);
- if (delegatedTarget) {
- e.delegatedTarget = delegatedTarget;
- callback.call(this, e, delegatedTarget);
- }
- });
-};
-
-$.unbind = (element, o) => {
- if (element) {
- for (let event in o) {
- let callback = o[event];
-
- event.split(/\s+/).forEach(function (event) {
- element.removeEventListener(event, callback);
- });
- }
- }
-};
-
-$.fire = (target, type, properties) => {
- let evt = document.createEvent('HTMLEvents');
-
- evt.initEvent(type, true, true);
-
- for (let j in properties) {
- evt[j] = properties[j];
- }
-
- return target.dispatchEvent(evt);
-};
-
-$.data = (element, attrs) => { // eslint-disable-line
- if (!attrs) {
- return element.dataset;
- }
-
- for (const attr in attrs) {
- element.dataset[attr] = attrs[attr];
- }
-};
-
-$.style = (elements, styleMap) => { // eslint-disable-line
-
- if (typeof styleMap === 'string') {
- return $.getStyle(elements, styleMap);
- }
-
- if (!Array.isArray(elements)) {
- elements = [elements];
- }
-
- elements.map(element => {
- for (const prop in styleMap) {
- element.style[prop] = styleMap[prop];
- }
- });
-};
-
-$.removeStyle = (elements, styleProps) => {
- if (!Array.isArray(elements)) {
- elements = [elements];
- }
-
- if (!Array.isArray(styleProps)) {
- styleProps = [styleProps];
- }
-
- elements.map(element => {
- for (const prop of styleProps) {
- element.style[prop] = '';
- }
- });
-};
-
-$.getStyle = (element, prop) => {
- let val = getComputedStyle(element)[prop];
-
- if (['width', 'height'].includes(prop)) {
- val = parseFloat(val);
- }
-
- return val;
-};
-
-$.closest = (selector, element) => {
- if (!element) return null;
-
- if (element.matches(selector)) {
- return element;
- }
-
- return $.closest(selector, element.parentNode);
-};
-
-$.inViewport = (el, parentEl) => {
- const {
- top,
- left,
- bottom,
- right
- } = el.getBoundingClientRect();
- const {
- top: pTop,
- left: pLeft,
- bottom: pBottom,
- right: pRight
- } = parentEl.getBoundingClientRect();
-
- return top >= pTop && left >= pLeft && bottom <= pBottom && right <= pRight;
-};
-
-$.scrollTop = function scrollTop(element, pixels) {
- requestAnimationFrame(() => {
- element.scrollTop = pixels;
- });
-};
-
-$.scrollbarWidth = function scrollbarWidth() {
- // Create the measurement node
- const scrollDiv = document.createElement('div');
- $.style(scrollDiv, {
- width: '100px',
- height: '100px',
- overflow: 'scroll',
- position: 'absolute',
- top: '-9999px'
- });
- document.body.appendChild(scrollDiv);
-
- // Get the scrollbar width
- const scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
-
- // Delete the DIV
- document.body.removeChild(scrollDiv);
-
- return scrollbarWidth;
-};
-
-/**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
-function isObject(value) {
- var type = typeof value;
- return value != null && (type == 'object' || type == 'function');
-}
-
-var isObject_1 = isObject;
-
-var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
-
-/** Detect free variable `global` from Node.js. */
-var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
-
-var _freeGlobal = freeGlobal;
-
-/** Detect free variable `self`. */
-var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
-
-/** Used as a reference to the global object. */
-var root = _freeGlobal || freeSelf || Function('return this')();
-
-var _root = root;
-
-/**
- * Gets the timestamp of the number of milliseconds that have elapsed since
- * the Unix epoch (1 January 1970 00:00:00 UTC).
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Date
- * @returns {number} Returns the timestamp.
- * @example
- *
- * _.defer(function(stamp) {
- * console.log(_.now() - stamp);
- * }, _.now());
- * // => Logs the number of milliseconds it took for the deferred invocation.
- */
-var now = function() {
- return _root.Date.now();
-};
-
-var now_1 = now;
-
-/** Built-in value references. */
-var Symbol = _root.Symbol;
-
-var _Symbol = Symbol;
-
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
-var nativeObjectToString = objectProto.toString;
-
-/** Built-in value references. */
-var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
-
-/**
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the raw `toStringTag`.
- */
-function getRawTag(value) {
- var isOwn = hasOwnProperty.call(value, symToStringTag),
- tag = value[symToStringTag];
-
- try {
- value[symToStringTag] = undefined;
- } catch (e) {}
-
- var result = nativeObjectToString.call(value);
- {
- if (isOwn) {
- value[symToStringTag] = tag;
- } else {
- delete value[symToStringTag];
- }
- }
- return result;
-}
-
-var _getRawTag = getRawTag;
-
-/** Used for built-in method references. */
-var objectProto$1 = Object.prototype;
-
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
-var nativeObjectToString$1 = objectProto$1.toString;
-
-/**
- * Converts `value` to a string using `Object.prototype.toString`.
- *
- * @private
- * @param {*} value The value to convert.
- * @returns {string} Returns the converted string.
- */
-function objectToString(value) {
- return nativeObjectToString$1.call(value);
-}
-
-var _objectToString = objectToString;
-
-/** `Object#toString` result references. */
-var nullTag = '[object Null]',
- undefinedTag = '[object Undefined]';
-
-/** Built-in value references. */
-var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
-
-/**
- * The base implementation of `getTag` without fallbacks for buggy environments.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
-function baseGetTag(value) {
- if (value == null) {
- return value === undefined ? undefinedTag : nullTag;
- }
- return (symToStringTag$1 && symToStringTag$1 in Object(value))
- ? _getRawTag(value)
- : _objectToString(value);
-}
-
-var _baseGetTag = baseGetTag;
-
-/**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
-function isObjectLike(value) {
- return value != null && typeof value == 'object';
-}
-
-var isObjectLike_1 = isObjectLike;
-
-/** `Object#toString` result references. */
-var symbolTag = '[object Symbol]';
-
-/**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
-function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
-}
-
-var isSymbol_1 = isSymbol;
-
-/** Used as references for various `Number` constants. */
-var NAN = 0 / 0;
-
-/** Used to match leading and trailing whitespace. */
-var reTrim = /^\s+|\s+$/g;
-
-/** Used to detect bad signed hexadecimal string values. */
-var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
-
-/** Used to detect binary string values. */
-var reIsBinary = /^0b[01]+$/i;
-
-/** Used to detect octal string values. */
-var reIsOctal = /^0o[0-7]+$/i;
-
-/** Built-in method references without a dependency on `root`. */
-var freeParseInt = parseInt;
-
-/**
- * Converts `value` to a number.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {number} Returns the number.
- * @example
- *
- * _.toNumber(3.2);
- * // => 3.2
- *
- * _.toNumber(Number.MIN_VALUE);
- * // => 5e-324
- *
- * _.toNumber(Infinity);
- * // => Infinity
- *
- * _.toNumber('3.2');
- * // => 3.2
- */
-function toNumber(value) {
- if (typeof value == 'number') {
- return value;
- }
- if (isSymbol_1(value)) {
- return NAN;
- }
- if (isObject_1(value)) {
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
- value = isObject_1(other) ? (other + '') : other;
- }
- if (typeof value != 'string') {
- return value === 0 ? value : +value;
- }
- value = value.replace(reTrim, '');
- var isBinary = reIsBinary.test(value);
- return (isBinary || reIsOctal.test(value))
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
- : (reIsBadHex.test(value) ? NAN : +value);
-}
-
-var toNumber_1 = toNumber;
-
-/** Error message constants. */
-var FUNC_ERROR_TEXT = 'Expected a function';
-
-/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max,
- nativeMin = Math.min;
-
-/**
- * Creates a debounced function that delays invoking `func` until after `wait`
- * milliseconds have elapsed since the last time the debounced function was
- * invoked. The debounced function comes with a `cancel` method to cancel
- * delayed `func` invocations and a `flush` method to immediately invoke them.
- * Provide `options` to indicate whether `func` should be invoked on the
- * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
- * with the last arguments provided to the debounced function. Subsequent
- * calls to the debounced function return the result of the last `func`
- * invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
- * invoked on the trailing edge of the timeout only if the debounced function
- * is invoked more than once during the `wait` timeout.
- *
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
- *
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
- * for details over the differences between `_.debounce` and `_.throttle`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to debounce.
- * @param {number} [wait=0] The number of milliseconds to delay.
- * @param {Object} [options={}] The options object.
- * @param {boolean} [options.leading=false]
- * Specify invoking on the leading edge of the timeout.
- * @param {number} [options.maxWait]
- * The maximum time `func` is allowed to be delayed before it's invoked.
- * @param {boolean} [options.trailing=true]
- * Specify invoking on the trailing edge of the timeout.
- * @returns {Function} Returns the new debounced function.
- * @example
- *
- * // Avoid costly calculations while the window size is in flux.
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
- *
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
- * 'leading': true,
- * 'trailing': false
- * }));
- *
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
- * var source = new EventSource('/stream');
- * jQuery(source).on('message', debounced);
- *
- * // Cancel the trailing debounced invocation.
- * jQuery(window).on('popstate', debounced.cancel);
- */
-function debounce(func, wait, options) {
- var lastArgs,
- lastThis,
- maxWait,
- result,
- timerId,
- lastCallTime,
- lastInvokeTime = 0,
- leading = false,
- maxing = false,
- trailing = true;
-
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- wait = toNumber_1(wait) || 0;
- if (isObject_1(options)) {
- leading = !!options.leading;
- maxing = 'maxWait' in options;
- maxWait = maxing ? nativeMax(toNumber_1(options.maxWait) || 0, wait) : maxWait;
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
-
- function invokeFunc(time) {
- var args = lastArgs,
- thisArg = lastThis;
-
- lastArgs = lastThis = undefined;
- lastInvokeTime = time;
- result = func.apply(thisArg, args);
- return result;
- }
-
- function leadingEdge(time) {
- // Reset any `maxWait` timer.
- lastInvokeTime = time;
- // Start the timer for the trailing edge.
- timerId = setTimeout(timerExpired, wait);
- // Invoke the leading edge.
- return leading ? invokeFunc(time) : result;
- }
-
- function remainingWait(time) {
- var timeSinceLastCall = time - lastCallTime,
- timeSinceLastInvoke = time - lastInvokeTime,
- timeWaiting = wait - timeSinceLastCall;
-
- return maxing
- ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
- : timeWaiting;
- }
-
- function shouldInvoke(time) {
- var timeSinceLastCall = time - lastCallTime,
- timeSinceLastInvoke = time - lastInvokeTime;
-
- // Either this is the first call, activity has stopped and we're at the
- // trailing edge, the system time has gone backwards and we're treating
- // it as the trailing edge, or we've hit the `maxWait` limit.
- return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
- }
-
- function timerExpired() {
- var time = now_1();
- if (shouldInvoke(time)) {
- return trailingEdge(time);
- }
- // Restart the timer.
- timerId = setTimeout(timerExpired, remainingWait(time));
- }
-
- function trailingEdge(time) {
- timerId = undefined;
-
- // Only invoke if we have `lastArgs` which means `func` has been
- // debounced at least once.
- if (trailing && lastArgs) {
- return invokeFunc(time);
- }
- lastArgs = lastThis = undefined;
- return result;
- }
-
- function cancel() {
- if (timerId !== undefined) {
- clearTimeout(timerId);
- }
- lastInvokeTime = 0;
- lastArgs = lastCallTime = lastThis = timerId = undefined;
- }
-
- function flush() {
- return timerId === undefined ? result : trailingEdge(now_1());
- }
-
- function debounced() {
- var time = now_1(),
- isInvoking = shouldInvoke(time);
-
- lastArgs = arguments;
- lastThis = this;
- lastCallTime = time;
-
- if (isInvoking) {
- if (timerId === undefined) {
- return leadingEdge(lastCallTime);
- }
- if (maxing) {
- // Handle invocations in a tight loop.
- timerId = setTimeout(timerExpired, wait);
- return invokeFunc(lastCallTime);
- }
- }
- if (timerId === undefined) {
- timerId = setTimeout(timerExpired, wait);
- }
- return result;
- }
- debounced.cancel = cancel;
- debounced.flush = flush;
- return debounced;
-}
-
-var debounce_1 = debounce;
-
-/** Error message constants. */
-var FUNC_ERROR_TEXT$1 = 'Expected a function';
-
-/**
- * Creates a throttled function that only invokes `func` at most once per
- * every `wait` milliseconds. The throttled function comes with a `cancel`
- * method to cancel delayed `func` invocations and a `flush` method to
- * immediately invoke them. Provide `options` to indicate whether `func`
- * should be invoked on the leading and/or trailing edge of the `wait`
- * timeout. The `func` is invoked with the last arguments provided to the
- * throttled function. Subsequent calls to the throttled function return the
- * result of the last `func` invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
- * invoked on the trailing edge of the timeout only if the throttled function
- * is invoked more than once during the `wait` timeout.
- *
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
- *
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
- * for details over the differences between `_.throttle` and `_.debounce`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to throttle.
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
- * @param {Object} [options={}] The options object.
- * @param {boolean} [options.leading=true]
- * Specify invoking on the leading edge of the timeout.
- * @param {boolean} [options.trailing=true]
- * Specify invoking on the trailing edge of the timeout.
- * @returns {Function} Returns the new throttled function.
- * @example
- *
- * // Avoid excessively updating the position while scrolling.
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
- *
- * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
- * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
- * jQuery(element).on('click', throttled);
- *
- * // Cancel the trailing throttled invocation.
- * jQuery(window).on('popstate', throttled.cancel);
- */
-function throttle(func, wait, options) {
- var leading = true,
- trailing = true;
-
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT$1);
- }
- if (isObject_1(options)) {
- leading = 'leading' in options ? !!options.leading : leading;
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
- return debounce_1(func, wait, {
- 'leading': leading,
- 'maxWait': wait,
- 'trailing': trailing
- });
-}
-
-var throttle_1 = throttle;
-
-function camelCaseToDash(str) {
- return str.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`);
-}
-
-function makeDataAttributeString(props) {
- const keys = Object.keys(props);
-
- return keys
- .map((key) => {
- const _key = camelCaseToDash(key);
- const val = props[key];
-
- if (val === undefined) return '';
- return `data-${_key}="${val}" `;
- })
- .join('')
- .trim();
-}
-
-function copyTextToClipboard(text) {
- // https://stackoverflow.com/a/30810322/5353542
- var textArea = document.createElement('textarea');
-
- //
- // *** This styling is an extra step which is likely not required. ***
- //
- // Why is it here? To ensure:
- // 1. the element is able to have focus and selection.
- // 2. if element was to flash render it has minimal visual impact.
- // 3. less flakyness with selection and copying which **might** occur if
- // the textarea element is not visible.
- //
- // The likelihood is the element won't even render, not even a flash,
- // so some of these are just precautions. However in IE the element
- // is visible whilst the popup box asking the user for permission for
- // the web page to copy to the clipboard.
- //
-
- // Place in top-left corner of screen regardless of scroll position.
- textArea.style.position = 'fixed';
- textArea.style.top = 0;
- textArea.style.left = 0;
-
- // Ensure it has a small width and height. Setting to 1px / 1em
- // doesn't work as this gives a negative w/h on some browsers.
- textArea.style.width = '2em';
- textArea.style.height = '2em';
-
- // We don't need padding, reducing the size if it does flash render.
- textArea.style.padding = 0;
-
- // Clean up any borders.
- textArea.style.border = 'none';
- textArea.style.outline = 'none';
- textArea.style.boxShadow = 'none';
-
- // Avoid flash of white box if rendered for any reason.
- textArea.style.background = 'transparent';
-
- textArea.value = text;
-
- document.body.appendChild(textArea);
-
- textArea.select();
-
- try {
- document.execCommand('copy');
- } catch (err) {
- console.log('Oops, unable to copy');
- }
-
- document.body.removeChild(textArea);
-}
-
-function isNumeric(val) {
- return !isNaN(val);
-}
-
-let throttle$1 = throttle_1;
-
-let debounce$1 = debounce_1;
-
-function nextTick(fn, context = null) {
- return (...args) => {
- return new Promise(resolve => {
- const execute = () => {
- const out = fn.apply(context, args);
- resolve(out);
- };
- setTimeout(execute);
- });
- };
-}
-function linkProperties(target, source, properties) {
- const props = properties.reduce((acc, prop) => {
- acc[prop] = {
- get() {
- return source[prop];
- }
- };
- return acc;
- }, {});
- Object.defineProperties(target, props);
-}
-function isSet(val) {
- return val !== undefined || val !== null;
-}
-
-function notSet(val) {
- return !isSet(val);
-}
-
-function isNumber(val) {
- return !isNaN(val);
-}
-
-function ensureArray(val) {
- if (!Array.isArray(val)) {
- return [val];
- }
- return val;
-}
-
-class DataManager {
- constructor(options) {
- this.options = options;
- this.sortRows = nextTick(this.sortRows, this);
- this.switchColumn = nextTick(this.switchColumn, this);
- this.removeColumn = nextTick(this.removeColumn, this);
- this.filterRows = nextTick(this.filterRows, this);
- }
-
- init(data, columns) {
- if (!data) {
- data = this.options.data;
- }
- if (columns) {
- this.options.columns = columns;
- }
-
- this.data = data;
-
- this.rowCount = 0;
- this.columns = [];
- this.rows = [];
-
- this.prepareColumns();
- this.prepareRows();
- this.prepareTreeRows();
- this.prepareRowView();
-
- this.prepareNumericColumns();
- }
-
- // computed property
- get currentSort() {
- const col = this.columns.find(col => col.sortOrder !== 'none');
- return col || {
- colIndex: -1,
- sortOrder: 'none'
- };
- }
-
- prepareColumns() {
- this.columns = [];
- this.validateColumns();
- this.prepareDefaultColumns();
- this.prepareHeader();
- }
-
- prepareDefaultColumns() {
- if (this.options.checkboxColumn && !this.hasColumnById('_checkbox')) {
- const cell = {
- id: '_checkbox',
- content: this.getCheckboxHTML(),
- editable: false,
- resizable: false,
- sortable: false,
- focusable: false,
- dropdown: false,
- width: 32
- };
- this.columns.push(cell);
- }
-
- if (this.options.serialNoColumn && !this.hasColumnById('_rowIndex')) {
- let cell = {
- id: '_rowIndex',
- content: '',
- align: 'center',
- editable: false,
- resizable: false,
- focusable: false,
- dropdown: false
- };
-
- this.columns.push(cell);
- }
- }
-
- prepareHeader() {
- let columns = this.columns.concat(this.options.columns);
- const baseCell = {
- isHeader: 1,
- editable: true,
- sortable: true,
- resizable: true,
- focusable: true,
- dropdown: true,
- width: null,
- format: (value) => {
- if (value === null || value === undefined) {
- return '';
- }
- return value + '';
- }
- };
-
- this.columns = columns
- .map((cell, i) => this.prepareCell(cell, i))
- .map(col => Object.assign({}, baseCell, col))
- .map(col => {
- col.content = col.content || col.name || '';
- col.id = col.id || col.content;
- return col;
- });
- }
-
- prepareCell(content, i) {
- const cell = {
- content: '',
- sortOrder: 'none',
- colIndex: i,
- column: this.columns[i]
- };
-
- if (content !== null && typeof content === 'object') {
- // passed as column/header
- Object.assign(cell, content);
- } else {
- cell.content = content;
- }
-
- return cell;
- }
-
- prepareNumericColumns() {
- const row0 = this.getRow(0);
- if (!row0) return;
- this.columns = this.columns.map((column, i) => {
-
- const cellValue = row0[i].content;
- if (!column.align && isNumeric(cellValue)) {
- column.align = 'right';
- }
-
- return column;
- });
- }
-
- prepareRows() {
- this.validateData(this.data);
-
- this.rows = this.data.map((d, i) => {
- const index = this._getNextRowCount();
-
- let row = [];
- let meta = {
- rowIndex: index
- };
-
- if (Array.isArray(d)) {
- // row is an array
- if (this.options.checkboxColumn) {
- row.push(this.getCheckboxHTML());
- }
- if (this.options.serialNoColumn) {
- row.push((index + 1) + '');
- }
- row = row.concat(d);
-
- while (row.length < this.columns.length) {
- row.push('');
- }
-
- } else {
- // row is an object
- for (let col of this.columns) {
- if (col.id === '_checkbox') {
- row.push(this.getCheckboxHTML());
- } else if (col.id === '_rowIndex') {
- row.push((index + 1) + '');
- } else {
- row.push(d[col.id]);
- }
- }
-
- meta.indent = d.indent || 0;
- }
-
- return this.prepareRow(row, meta);
- });
- }
-
- prepareTreeRows() {
- this.rows.forEach((row, i) => {
- if (isNumber(row.meta.indent)) {
- // if (i === 36) debugger;
- const nextRow = this.getRow(i + 1);
- row.meta.isLeaf = !nextRow ||
- notSet(nextRow.meta.indent) ||
- nextRow.meta.indent <= row.meta.indent;
- }
- });
- }
-
- prepareRowView() {
- // This is order in which rows will be rendered in the table.
- // When sorting happens, only this.rowViewOrder will change
- // and not the original this.rows
- this.rowViewOrder = this.rows.map(row => row.meta.rowIndex);
- }
-
- prepareRow(row, meta) {
- const baseRowCell = {
- rowIndex: meta.rowIndex,
- indent: meta.indent
- };
-
- row = row
- .map((cell, i) => this.prepareCell(cell, i))
- .map(cell => Object.assign({}, baseRowCell, cell));
-
- // monkey patched in array object
- row.meta = meta;
- return row;
- }
-
- validateColumns() {
- const columns = this.options.columns;
- if (!Array.isArray(columns)) {
- throw new DataError('`columns` must be an array');
- }
-
- columns.forEach((column, i) => {
- if (typeof column !== 'string' && typeof column !== 'object') {
- throw new DataError(`column "${i}" must be a string or an object`);
- }
- });
- }
-
- validateData(data) {
- if (Array.isArray(data) &&
- (data.length === 0 || Array.isArray(data[0]) || typeof data[0] === 'object')) {
- return true;
- }
- throw new DataError('`data` must be an array of arrays or objects');
- }
-
- appendRows(rows) {
- this.validateData(rows);
-
- this.rows.push(...this.prepareRows(rows));
- }
-
- sortRows(colIndex, sortOrder = 'none') {
- colIndex = +colIndex;
-
- // reset sortOrder and update for colIndex
- this.getColumns()
- .map(col => {
- if (col.colIndex === colIndex) {
- col.sortOrder = sortOrder;
- } else {
- col.sortOrder = 'none';
- }
- });
-
- this._sortRows(colIndex, sortOrder);
- }
-
- _sortRows(colIndex, sortOrder) {
-
- if (this.currentSort.colIndex === colIndex) {
- // reverse the array if only sortOrder changed
- if (
- (this.currentSort.sortOrder === 'asc' && sortOrder === 'desc') ||
- (this.currentSort.sortOrder === 'desc' && sortOrder === 'asc')
- ) {
- this.reverseArray(this.rowViewOrder);
- this.currentSort.sortOrder = sortOrder;
- return;
- }
- }
-
- this.rowViewOrder.sort((a, b) => {
- const aIndex = a;
- const bIndex = b;
- const aContent = this.getCell(colIndex, a).content;
- const bContent = this.getCell(colIndex, b).content;
-
- if (sortOrder === 'none') {
- return aIndex - bIndex;
- } else if (sortOrder === 'asc') {
- if (aContent < bContent) return -1;
- if (aContent > bContent) return 1;
- if (aContent === bContent) return 0;
- } else if (sortOrder === 'desc') {
- if (aContent < bContent) return 1;
- if (aContent > bContent) return -1;
- if (aContent === bContent) return 0;
- }
- return 0;
- });
-
- if (this.hasColumnById('_rowIndex')) {
- // update row index
- const srNoColIndex = this.getColumnIndexById('_rowIndex');
- this.rows.forEach((row, index) => {
- const viewIndex = this.rowViewOrder.indexOf(index);
- const cell = row[srNoColIndex];
- cell.content = (viewIndex + 1) + '';
- });
- }
- }
-
- reverseArray(array) {
- let left = null;
- let right = null;
- let length = array.length;
-
- for (left = 0, right = length - 1; left < right; left += 1, right -= 1) {
- const temporary = array[left];
-
- array[left] = array[right];
- array[right] = temporary;
- }
- }
-
- switchColumn(index1, index2) {
- // update columns
- const temp = this.columns[index1];
- this.columns[index1] = this.columns[index2];
- this.columns[index2] = temp;
-
- this.columns[index1].colIndex = index1;
- this.columns[index2].colIndex = index2;
-
- // update rows
- this.rows.forEach(row => {
- const newCell1 = Object.assign({}, row[index1], {
- colIndex: index2
- });
- const newCell2 = Object.assign({}, row[index2], {
- colIndex: index1
- });
-
- row[index2] = newCell1;
- row[index1] = newCell2;
- });
- }
-
- removeColumn(index) {
- index = +index;
- const filter = cell => cell.colIndex !== index;
- const map = (cell, i) => Object.assign({}, cell, {
- colIndex: i
- });
- // update columns
- this.columns = this.columns
- .filter(filter)
- .map(map);
-
- // update rows
- this.rows.forEach(row => {
- // remove cell
- row.splice(index, 1);
- // update colIndex
- row.forEach((cell, i) => {
- cell.colIndex = i;
- });
- });
- }
-
- updateRow(row, rowIndex) {
- if (row.length < this.columns.length) {
- if (this.hasColumnById('_rowIndex')) {
- const val = (rowIndex + 1) + '';
-
- row = [val].concat(row);
- }
-
- if (this.hasColumnById('_checkbox')) {
- const val = '';
-
- row = [val].concat(row);
- }
- }
-
- const _row = this.prepareRow(row, {rowIndex});
- const index = this.rows.findIndex(row => row[0].rowIndex === rowIndex);
- this.rows[index] = _row;
-
- return _row;
- }
-
- updateCell(colIndex, rowIndex, options) {
- let cell;
- if (typeof colIndex === 'object') {
- // cell object was passed,
- // must have colIndex, rowIndex
- cell = colIndex;
- colIndex = cell.colIndex;
- rowIndex = cell.rowIndex;
- // the object passed must be merged with original cell
- options = cell;
- }
- cell = this.getCell(colIndex, rowIndex);
-
- // mutate object directly
- for (let key in options) {
- const newVal = options[key];
- if (newVal !== undefined) {
- cell[key] = newVal;
- }
- }
-
- return cell;
- }
-
- updateColumn(colIndex, keyValPairs) {
- const column = this.getColumn(colIndex);
- for (let key in keyValPairs) {
- const newVal = keyValPairs[key];
- if (newVal !== undefined) {
- column[key] = newVal;
- }
- }
- return column;
- }
-
- filterRows(keyword, colIndex) {
- let rowsToHide = [];
- let rowsToShow = [];
- const cells = this.rows.map(row => row[colIndex]);
-
- cells.forEach(cell => {
- const hay = String(cell.content || '').toLowerCase();
- const needle = (keyword || '').toLowerCase();
-
- if (!needle || hay.includes(needle)) {
- rowsToShow.push(cell.rowIndex);
- } else {
- rowsToHide.push(cell.rowIndex);
- }
- });
-
- this._filteredRows = rowsToShow;
-
- return {
- rowsToHide,
- rowsToShow
- };
- }
-
- getFilteredRowIndices() {
- return this._filteredRows || this.rows.map(row => row.meta.rowIndex);
- }
-
- getRowCount() {
- return this.rowCount;
- }
-
- _getNextRowCount() {
- const val = this.rowCount;
-
- this.rowCount++;
- return val;
- }
-
- getRows(start, end) {
- return this.rows.slice(start, end);
- }
-
- getRowsForView(start, end) {
- const rows = this.rowViewOrder.map(i => this.rows[i]);
- return rows.slice(start, end);
- }
-
- getColumns(skipStandardColumns) {
- let columns = this.columns;
-
- if (skipStandardColumns) {
- columns = columns.slice(this.getStandardColumnCount());
- }
-
- return columns;
- }
-
- getStandardColumnCount() {
- if (this.options.checkboxColumn && this.options.serialNoColumn) {
- return 2;
- }
-
- if (this.options.checkboxColumn || this.options.serialNoColumn) {
- return 1;
- }
-
- return 0;
- }
-
- getColumnCount(skipStandardColumns) {
- let val = this.columns.length;
-
- if (skipStandardColumns) {
- val = val - this.getStandardColumnCount();
- }
-
- return val;
- }
-
- getColumn(colIndex) {
- colIndex = +colIndex;
-
- if (colIndex < 0) {
- // negative indexes
- colIndex = this.columns.length + colIndex;
- }
-
- return this.columns.find(col => col.colIndex === colIndex);
- }
-
- getColumnById(id) {
- return this.columns.find(col => col.id === id);
- }
-
- getRow(rowIndex) {
- rowIndex = +rowIndex;
- return this.rows[rowIndex];
- }
-
- getCell(colIndex, rowIndex) {
- rowIndex = +rowIndex;
- colIndex = +colIndex;
- return this.getRow(rowIndex)[colIndex];
- }
-
- getChildren(parentRowIndex) {
- parentRowIndex = +parentRowIndex;
- const parentIndent = this.getRow(parentRowIndex).meta.indent;
- const out = [];
-
- for (let i = parentRowIndex + 1; i < this.rowCount; i++) {
- const row = this.getRow(i);
- if (isNaN(row.meta.indent)) continue;
-
- if (row.meta.indent > parentIndent) {
- out.push(i);
- }
-
- if (row.meta.indent === parentIndent) {
- break;
- }
- }
-
- return out;
- }
-
- getImmediateChildren(parentRowIndex) {
- parentRowIndex = +parentRowIndex;
- const parentIndent = this.getRow(parentRowIndex).meta.indent;
- const out = [];
- const childIndent = parentIndent + 1;
-
- for (let i = parentRowIndex + 1; i < this.rowCount; i++) {
- const row = this.getRow(i);
- if (isNaN(row.meta.indent) || row.meta.indent > childIndent) continue;
-
- if (row.meta.indent === childIndent) {
- out.push(i);
- }
-
- if (row.meta.indent === parentIndent) {
- break;
- }
- }
-
- return out;
- }
-
- get() {
- return {
- columns: this.columns,
- rows: this.rows
- };
- }
-
- /**
- * Returns the original data which was passed
- * based on rowIndex
- * @param {Number} rowIndex
- * @returns Array|Object
- * @memberof DataManager
- */
- getData(rowIndex) {
- return this.data[rowIndex];
- }
-
- hasColumn(name) {
- return Boolean(this.columns.find(col => col.content === name));
- }
-
- hasColumnById(id) {
- return Boolean(this.columns.find(col => col.id === id));
- }
-
- getColumnIndex(name) {
- return this.columns.findIndex(col => col.content === name);
- }
-
- getColumnIndexById(id) {
- return this.columns.findIndex(col => col.id === id);
- }
-
- getCheckboxHTML() {
- return '';
- }
-}
-
-// Custom Errors
-class DataError extends TypeError {}
-
-class CellManager {
- constructor(instance) {
- this.instance = instance;
- linkProperties(this, this.instance, [
- 'wrapper',
- 'options',
- 'style',
- 'bodyScrollable',
- 'columnmanager',
- 'rowmanager',
- 'datamanager',
- 'keyboard'
- ]);
-
- this.bindEvents();
- }
-
- bindEvents() {
- this.bindFocusCell();
- this.bindEditCell();
- this.bindKeyboardSelection();
- this.bindCopyCellContents();
- this.bindMouseEvents();
- this.bindTreeEvents();
- }
-
- bindFocusCell() {
- this.bindKeyboardNav();
- }
-
- bindEditCell() {
- this.$editingCell = null;
-
- $.on(this.bodyScrollable, 'dblclick', '.dt-cell', (e, cell) => {
- this.activateEditing(cell);
- });
-
- this.keyboard.on('enter', () => {
- if (this.$focusedCell && !this.$editingCell) {
- // enter keypress on focused cell
- this.activateEditing(this.$focusedCell);
- } else if (this.$editingCell) {
- // enter keypress on editing cell
- this.submitEditing();
- this.deactivateEditing();
- }
- });
- }
-
- bindKeyboardNav() {
- const focusCell = (direction) => {
- if (!this.$focusedCell || this.$editingCell) {
- return false;
- }
-
- let $cell = this.$focusedCell;
-
- if (direction === 'left' || direction === 'shift+tab') {
- $cell = this.getLeftCell$($cell);
- } else if (direction === 'right' || direction === 'tab') {
- $cell = this.getRightCell$($cell);
- } else if (direction === 'up') {
- $cell = this.getAboveCell$($cell);
- } else if (direction === 'down') {
- $cell = this.getBelowCell$($cell);
- }
-
- this.focusCell($cell);
- return true;
- };
-
- const focusLastCell = (direction) => {
- if (!this.$focusedCell || this.$editingCell) {
- return false;
- }
-
- let $cell = this.$focusedCell;
- const {
- rowIndex,
- colIndex
- } = $.data($cell);
-
- if (direction === 'left') {
- $cell = this.getLeftMostCell$(rowIndex);
- } else if (direction === 'right') {
- $cell = this.getRightMostCell$(rowIndex);
- } else if (direction === 'up') {
- $cell = this.getTopMostCell$(colIndex);
- } else if (direction === 'down') {
- $cell = this.getBottomMostCell$(colIndex);
- }
-
- this.focusCell($cell);
- return true;
- };
-
- ['left', 'right', 'up', 'down', 'tab', 'shift+tab']
- .map(direction => this.keyboard.on(direction, () => focusCell(direction)));
-
- ['left', 'right', 'up', 'down']
- .map(direction => this.keyboard.on(`ctrl+${direction}`, () => focusLastCell(direction)));
-
- this.keyboard.on('esc', () => {
- this.deactivateEditing();
- this.columnmanager.toggleFilter(false);
- });
-
- if (this.options.inlineFilters) {
- this.keyboard.on('ctrl+f', (e) => {
- const $cell = $.closest('.dt-cell', e.target);
- const { colIndex } = $.data($cell);
-
- this.activateFilter(colIndex);
- return true;
- });
- }
- }
-
- bindKeyboardSelection() {
- const getNextSelectionCursor = (direction) => {
- let $selectionCursor = this.getSelectionCursor();
-
- if (direction === 'left') {
- $selectionCursor = this.getLeftCell$($selectionCursor);
- } else if (direction === 'right') {
- $selectionCursor = this.getRightCell$($selectionCursor);
- } else if (direction === 'up') {
- $selectionCursor = this.getAboveCell$($selectionCursor);
- } else if (direction === 'down') {
- $selectionCursor = this.getBelowCell$($selectionCursor);
- }
-
- return $selectionCursor;
- };
-
- ['left', 'right', 'up', 'down']
- .map(direction =>
- this.keyboard.on(`shift+${direction}`, () => this.selectArea(getNextSelectionCursor(direction))));
- }
-
- bindCopyCellContents() {
- this.keyboard.on('ctrl+c', () => {
- const noOfCellsCopied = this.copyCellContents(this.$focusedCell, this.$selectionCursor);
- const message = `${noOfCellsCopied} cell${noOfCellsCopied > 1 ? 's' : ''} copied`;
- if (noOfCellsCopied) {
- this.instance.showToastMessage(message, 2);
- }
- });
-
- if (this.options.pasteFromClipboard) {
- this.keyboard.on('ctrl+v', (e) => {
- // hack
- // https://stackoverflow.com/a/2177059/5353542
- this.instance.pasteTarget.focus();
-
- setTimeout(() => {
- const data = this.instance.pasteTarget.value;
- this.instance.pasteTarget.value = '';
- this.pasteContentInCell(data);
- }, 10);
-
- return false;
- });
- }
- }
-
- bindMouseEvents() {
- let mouseDown = null;
-
- $.on(this.bodyScrollable, 'mousedown', '.dt-cell', (e) => {
- mouseDown = true;
- this.focusCell($(e.delegatedTarget));
- });
-
- $.on(this.bodyScrollable, 'mouseup', () => {
- mouseDown = false;
- });
-
- const selectArea = (e) => {
- if (!mouseDown) return;
- this.selectArea($(e.delegatedTarget));
- };
-
- $.on(this.bodyScrollable, 'mousemove', '.dt-cell', throttle$1(selectArea, 50));
- }
-
- bindTreeEvents() {
- $.on(this.bodyScrollable, 'click', '.dt-tree-node__toggle', (e, $toggle) => {
- const $cell = $.closest('.dt-cell', $toggle);
- const { rowIndex } = $.data($cell);
-
- if ($cell.classList.contains('dt-cell--tree-close')) {
- this.rowmanager.openSingleNode(rowIndex);
- } else {
- this.rowmanager.closeSingleNode(rowIndex);
- }
- });
- }
-
- focusCell($cell, {
- skipClearSelection = 0
- } = {}) {
- if (!$cell) return;
-
- // don't focus if already editing cell
- if ($cell === this.$editingCell) return;
-
- const {
- colIndex,
- isHeader
- } = $.data($cell);
- if (isHeader) {
- return;
- }
-
- const column = this.columnmanager.getColumn(colIndex);
- if (column.focusable === false) {
- return;
- }
-
- this.scrollToCell($cell);
-
- this.deactivateEditing();
- if (!skipClearSelection) {
- this.clearSelection();
- }
-
- if (this.$focusedCell) {
- this.$focusedCell.classList.remove('dt-cell--focus');
- }
-
- this.$focusedCell = $cell;
- $cell.classList.add('dt-cell--focus');
-
- // so that keyboard nav works
- $cell.focus();
-
- this.highlightRowColumnHeader($cell);
- }
-
- highlightRowColumnHeader($cell) {
- const {
- colIndex,
- rowIndex
- } = $.data($cell);
-
- const srNoColIndex = this.datamanager.getColumnIndexById('_rowIndex');
- const colHeaderSelector = `.dt-cell--header-${colIndex}`;
- const rowHeaderSelector = `.dt-cell--${srNoColIndex}-${rowIndex}`;
-
- if (this.lastHeaders) {
- this.lastHeaders.forEach(header => header.classList.remove('dt-cell--highlight'));
- }
-
- const colHeader = $(colHeaderSelector, this.wrapper);
- const rowHeader = $(rowHeaderSelector, this.wrapper);
-
- this.lastHeaders = [colHeader, rowHeader];
- this.lastHeaders.forEach(header => header.classList.add('dt-cell--highlight'));
- }
-
- selectAreaOnClusterChanged() {
- if (!(this.$focusedCell && this.$selectionCursor)) return;
- const {
- colIndex,
- rowIndex
- } = $.data(this.$selectionCursor);
- const $cell = this.getCell$(colIndex, rowIndex);
-
- if (!$cell || $cell === this.$selectionCursor) return;
-
- // selectArea needs $focusedCell
- const fCell = $.data(this.$focusedCell);
- this.$focusedCell = this.getCell$(fCell.colIndex, fCell.rowIndex);
-
- this.selectArea($cell);
- }
-
- focusCellOnClusterChanged() {
- if (!this.$focusedCell) return;
-
- const {
- colIndex,
- rowIndex
- } = $.data(this.$focusedCell);
- const $cell = this.getCell$(colIndex, rowIndex);
-
- if (!$cell) return;
- // this function is called after selectAreaOnClusterChanged,
- // focusCell calls clearSelection which resets the area selection
- // so a flag to skip it
- this.focusCell($cell, {
- skipClearSelection: 1
- });
- }
-
- selectArea($selectionCursor) {
- if (!this.$focusedCell) return;
-
- if (this._selectArea(this.$focusedCell, $selectionCursor)) {
- // valid selection
- this.$selectionCursor = $selectionCursor;
- }
- }
-
- _selectArea($cell1, $cell2) {
- if ($cell1 === $cell2) return false;
-
- const cells = this.getCellsInRange($cell1, $cell2);
- if (!cells) return false;
-
- this.clearSelection();
- this._selectedCells = cells.map(index => this.getCell$(...index));
- requestAnimationFrame(() => {
- this._selectedCells.map($cell => $cell.classList.add('dt-cell--highlight'));
- });
- return true;
- }
-
- getCellsInRange($cell1, $cell2) {
- let colIndex1, rowIndex1, colIndex2, rowIndex2;
-
- if (typeof $cell1 === 'number') {
- [colIndex1, rowIndex1, colIndex2, rowIndex2] = arguments;
- } else
- if (typeof $cell1 === 'object') {
- if (!($cell1 && $cell2)) {
- return false;
- }
-
- const cell1 = $.data($cell1);
- const cell2 = $.data($cell2);
-
- colIndex1 = +cell1.colIndex;
- rowIndex1 = +cell1.rowIndex;
- colIndex2 = +cell2.colIndex;
- rowIndex2 = +cell2.rowIndex;
- }
-
- if (rowIndex1 > rowIndex2) {
- [rowIndex1, rowIndex2] = [rowIndex2, rowIndex1];
- }
-
- if (colIndex1 > colIndex2) {
- [colIndex1, colIndex2] = [colIndex2, colIndex1];
- }
-
- if (this.isStandardCell(colIndex1) || this.isStandardCell(colIndex2)) {
- return false;
- }
-
- const cells = [];
- let colIndex = colIndex1;
- let rowIndex = rowIndex1;
- const rowIndices = [];
-
- while (rowIndex <= rowIndex2) {
- rowIndices.push(rowIndex);
- rowIndex += 1;
- }
-
- rowIndices.map((rowIndex) => {
- while (colIndex <= colIndex2) {
- cells.push([colIndex, rowIndex]);
- colIndex++;
- }
- colIndex = colIndex1;
- });
-
- return cells;
- }
-
- clearSelection() {
- (this._selectedCells || [])
- .forEach($cell => $cell.classList.remove('dt-cell--highlight'));
-
- this._selectedCells = [];
- this.$selectionCursor = null;
- }
-
- getSelectionCursor() {
- return this.$selectionCursor || this.$focusedCell;
- }
-
- activateEditing($cell) {
- this.focusCell($cell);
- const {
- rowIndex,
- colIndex
- } = $.data($cell);
-
- const col = this.columnmanager.getColumn(colIndex);
- if (col && (col.editable === false || col.focusable === false)) {
- return;
- }
-
- const cell = this.getCell(colIndex, rowIndex);
- if (cell && cell.editable === false) {
- return;
- }
-
- if (this.$editingCell) {
- const {
- _rowIndex,
- _colIndex
- } = $.data(this.$editingCell);
-
- if (rowIndex === _rowIndex && colIndex === _colIndex) {
- // editing the same cell
- return;
- }
- }
-
- this.$editingCell = $cell;
- $cell.classList.add('dt-cell--editing');
-
- const $editCell = $('.dt-cell__edit', $cell);
- $editCell.innerHTML = '';
-
- const editor = this.getEditor(colIndex, rowIndex, cell.content, $editCell);
-
- if (editor) {
- this.currentCellEditor = editor;
- // initialize editing input with cell value
- editor.initValue(cell.content, rowIndex, col);
- }
- }
-
- deactivateEditing() {
- // keep focus on the cell so that keyboard navigation works
- if (this.$focusedCell) this.$focusedCell.focus();
-
- if (!this.$editingCell) return;
- this.$editingCell.classList.remove('dt-cell--editing');
- this.$editingCell = null;
- }
-
- getEditor(colIndex, rowIndex, value, parent) {
- const column = this.datamanager.getColumn(colIndex);
- const row = this.datamanager.getRow(rowIndex);
- const data = this.datamanager.getData(rowIndex);
- let editor = this.options.getEditor ?
- this.options.getEditor(colIndex, rowIndex, value, parent, column, row, data) :
- this.getDefaultEditor(parent);
-
- if (editor === false) {
- // explicitly returned false
- return false;
- }
- if (editor === undefined) {
- // didn't return editor, fallback to default
- editor = this.getDefaultEditor(parent);
- }
-
- return editor;
- }
-
- getDefaultEditor(parent) {
- const $input = $.create('input', {
- class: 'dt-input',
- type: 'text',
- inside: parent
- });
-
- return {
- initValue(value) {
- $input.focus();
- $input.value = value;
- },
- getValue() {
- return $input.value;
- },
- setValue(value) {
- $input.value = value;
- }
- };
- }
-
- submitEditing() {
- if (!this.$editingCell) return;
- const $cell = this.$editingCell;
- const {
- rowIndex,
- colIndex
- } = $.data($cell);
- const col = this.datamanager.getColumn(colIndex);
-
- if ($cell) {
- const editor = this.currentCellEditor;
-
- if (editor) {
- let valuePromise = editor.getValue();
-
- // convert to stubbed Promise
- if (!valuePromise.then) {
- valuePromise = Promise.resolve(valuePromise);
- }
-
- valuePromise.then((value) => {
- const done = editor.setValue(value, rowIndex, col);
- const oldValue = this.getCell(colIndex, rowIndex).content;
-
- // update cell immediately
- this.updateCell(colIndex, rowIndex, value);
- $cell.focus();
-
- if (done && done.then) {
- // revert to oldValue if promise fails
- done.catch((e) => {
- console.log(e);
- this.updateCell(colIndex, rowIndex, oldValue);
- });
- }
- });
- }
- }
-
- this.currentCellEditor = null;
- }
-
- copyCellContents($cell1, $cell2) {
- if (!$cell2 && $cell1) {
- // copy only focusedCell
- const {
- colIndex,
- rowIndex
- } = $.data($cell1);
- const cell = this.getCell(colIndex, rowIndex);
- copyTextToClipboard(cell.content);
- return 1;
- }
- const cells = this.getCellsInRange($cell1, $cell2);
-
- if (!cells) return 0;
-
- const rows = cells
- // get cell objects
- .map(index => this.getCell(...index))
- // convert to array of rows
- .reduce((acc, curr) => {
- const rowIndex = curr.rowIndex;
-
- acc[rowIndex] = acc[rowIndex] || [];
- acc[rowIndex].push(curr.content);
-
- return acc;
- }, []);
-
- const values = rows
- // join values by tab
- .map(row => row.join('\t'))
- // join rows by newline
- .join('\n');
-
- copyTextToClipboard(values);
-
- // return no of cells copied
- return rows.reduce((total, row) => total + row.length, 0);
- }
-
- pasteContentInCell(data) {
- if (!this.$focusedCell) return;
-
- const matrix = data
- .split('\n')
- .map(row => row.split('\t'))
- .filter(row => row.length && row.every(it => it));
-
- let { colIndex, rowIndex } = $.data(this.$focusedCell);
-
- let focusedCell = {
- colIndex: +colIndex,
- rowIndex: +rowIndex
- };
-
- matrix.forEach((row, i) => {
- let rowIndex = i + focusedCell.rowIndex;
- row.forEach((cell, j) => {
- let colIndex = j + focusedCell.colIndex;
- this.updateCell(colIndex, rowIndex, cell);
- });
- });
- }
-
- activateFilter(colIndex) {
- this.columnmanager.toggleFilter();
- this.columnmanager.focusFilter(colIndex);
-
- if (!this.columnmanager.isFilterShown) {
- // put focus back on cell
- this.$focusedCell.focus();
- }
- }
-
- updateCell(colIndex, rowIndex, value) {
- const cell = this.datamanager.updateCell(colIndex, rowIndex, {
- content: value
- });
- this.refreshCell(cell);
- }
-
- refreshCell(cell) {
- const $cell = $(this.selector(cell.colIndex, cell.rowIndex), this.bodyScrollable);
- $cell.innerHTML = this.getCellContent(cell);
- }
-
- toggleTreeButton(rowIndex, flag) {
- const colIndex = this.columnmanager.getFirstColumnIndex();
- const $cell = this.getCell$(colIndex, rowIndex);
- if ($cell) {
- $cell.classList[flag ? 'remove' : 'add']('dt-cell--tree-close');
- }
- }
-
- isStandardCell(colIndex) {
- // Standard cells are in Sr. No and Checkbox column
- return colIndex < this.columnmanager.getFirstColumnIndex();
- }
-
- getCell$(colIndex, rowIndex) {
- return $(this.selector(colIndex, rowIndex), this.bodyScrollable);
- }
-
- getAboveCell$($cell) {
- const {
- colIndex
- } = $.data($cell);
-
- let $aboveRow = $cell.parentElement.previousElementSibling;
- while ($aboveRow && $aboveRow.classList.contains('dt-row--hide')) {
- $aboveRow = $aboveRow.previousElementSibling;
- }
-
- if (!$aboveRow) return $cell;
- return $(`.dt-cell--col-${colIndex}`, $aboveRow);
- }
-
- getBelowCell$($cell) {
- const {
- colIndex
- } = $.data($cell);
-
- let $belowRow = $cell.parentElement.nextElementSibling;
- while ($belowRow && $belowRow.classList.contains('dt-row--hide')) {
- $belowRow = $belowRow.nextElementSibling;
- }
-
- if (!$belowRow) return $cell;
- return $(`.dt-cell--col-${colIndex}`, $belowRow);
- }
-
- getLeftCell$($cell) {
- return $cell.previousElementSibling;
- }
-
- getRightCell$($cell) {
- return $cell.nextElementSibling;
- }
-
- getLeftMostCell$(rowIndex) {
- return this.getCell$(this.columnmanager.getFirstColumnIndex(), rowIndex);
- }
-
- getRightMostCell$(rowIndex) {
- return this.getCell$(this.columnmanager.getLastColumnIndex(), rowIndex);
- }
-
- getTopMostCell$(colIndex) {
- return this.getCell$(colIndex, this.rowmanager.getFirstRowIndex());
- }
-
- getBottomMostCell$(colIndex) {
- return this.getCell$(colIndex, this.rowmanager.getLastRowIndex());
- }
-
- getCell(colIndex, rowIndex) {
- return this.instance.datamanager.getCell(colIndex, rowIndex);
- }
-
- getRowHeight() {
- return $.style($('.dt-row', this.bodyScrollable), 'height');
- }
-
- scrollToCell($cell) {
- if ($.inViewport($cell, this.bodyScrollable)) return false;
-
- const {
- rowIndex
- } = $.data($cell);
- this.rowmanager.scrollToRow(rowIndex);
- return false;
- }
-
- getRowCountPerPage() {
- return Math.ceil(this.instance.getViewportHeight() / this.getRowHeight());
- }
-
- getCellHTML(cell) {
- const {
- rowIndex,
- colIndex,
- isHeader,
- isFilter
- } = cell;
- const dataAttr = makeDataAttributeString({
- rowIndex,
- colIndex,
- isHeader,
- isFilter
- });
-
- const isBodyCell = !(isHeader || isFilter);
-
- const className = [
- 'dt-cell',
- 'dt-cell--col-' + colIndex,
- isBodyCell ? `dt-cell--${colIndex}-${rowIndex}` : '',
- isBodyCell ? 'dt-cell--row-' + rowIndex : '',
- isHeader ? 'dt-cell--header' : '',
- isHeader ? `dt-cell--header-${colIndex}` : '',
- isFilter ? 'dt-cell--filter' : ''
- ].join(' ');
-
- return `
-
- ${this.getCellContent(cell)}
- |
- `;
- }
-
- getCellContent(cell) {
- const {
- isHeader,
- isFilter,
- colIndex
- } = cell;
-
- const editable = !isHeader && cell.editable !== false;
- const editCellHTML = editable ? this.getEditCellHTML(colIndex) : '';
-
- const sortable = isHeader && cell.sortable !== false;
- const sortIndicator = sortable ?
- `
- ${this.options.sortIndicator[cell.sortOrder]}
- ` :
- '';
-
- const resizable = isHeader && cell.resizable !== false;
- const resizeColumn = resizable ? '' : '';
-
- const hasDropdown = isHeader && cell.dropdown !== false;
- const dropdown = hasDropdown ? this.columnmanager.getDropdownHTML() : '';
-
- const customFormatter = cell.format || (cell.column && cell.column.format) || null;
-
- let contentHTML;
- if (isHeader || isFilter || !customFormatter) {
- contentHTML = cell.content;
- } else {
- const row = this.datamanager.getRow(cell.rowIndex);
- const data = this.datamanager.getData(cell.rowIndex);
- contentHTML = customFormatter(cell.content, row, cell.column, data);
- }
-
- if (this.options.treeView && !(isHeader || isFilter) && cell.indent !== undefined) {
- const nextRow = this.datamanager.getRow(cell.rowIndex + 1);
- const addToggle = nextRow && nextRow.meta.indent > cell.indent;
-
- // Add toggle and indent in the first column
- const firstColumnIndex = this.datamanager.getColumnIndexById('_rowIndex') + 1;
- if (firstColumnIndex === cell.colIndex) {
- const padding = ((cell.indent || 0) + 1) * 1.5;
- const toggleHTML = addToggle ?
- `` : '';
- contentHTML = `
- ${toggleHTML}${contentHTML}`;
- }
- }
-
- const className = [
- 'dt-cell__content',
- isHeader ? `dt-cell__content--header-${colIndex}` : `dt-cell__content--col-${colIndex}`
- ].join(' ');
-
- return `
-
- ${contentHTML}
- ${sortIndicator}
- ${resizeColumn}
- ${dropdown}
-
- ${editCellHTML}
- `;
- }
-
- getEditCellHTML(colIndex) {
- return ``;
- }
-
- selector(colIndex, rowIndex) {
- return `.dt-cell--${colIndex}-${rowIndex}`;
- }
-}
-
-class ColumnManager {
- constructor(instance) {
- this.instance = instance;
-
- linkProperties(this, this.instance, [
- 'options',
- 'fireEvent',
- 'header',
- 'datamanager',
- 'style',
- 'wrapper',
- 'rowmanager',
- 'bodyScrollable'
- ]);
-
- this.bindEvents();
- }
-
- renderHeader() {
- this.header.innerHTML = '';
- this.refreshHeader();
- }
-
- refreshHeader() {
- const columns = this.datamanager.getColumns();
-
- // refresh html
- $('thead', this.header).innerHTML = this.getHeaderHTML(columns);
-
- this.$filterRow = $('.dt-row[data-is-filter]', this.header);
- if (this.$filterRow) {
- $.style(this.$filterRow, { display: 'none' });
- }
- // reset columnMap
- this.$columnMap = [];
- this.bindMoveColumn();
- }
-
- getHeaderHTML(columns) {
- let html = this.rowmanager.getRowHTML(columns, {
- isHeader: 1
- });
- if (this.options.inlineFilters) {
- html += this.rowmanager.getRowHTML(columns, {
- isFilter: 1
- });
- }
- return html;
- }
-
- bindEvents() {
- this.bindDropdown();
- this.bindResizeColumn();
- this.bindFilter();
- }
-
- bindDropdown() {
- let $activeDropdown;
- let activeClass = 'dt-dropdown--active';
- let toggleClass = '.dt-dropdown__toggle';
-
- $.on(this.header, 'click', toggleClass, (e, $button) => {
- const $dropdown = $.closest('.dt-dropdown', $button);
-
- if (!$dropdown.classList.contains(activeClass)) {
- deactivateDropdown();
- $dropdown.classList.add(activeClass);
- $activeDropdown = $dropdown;
- } else {
- deactivateDropdown();
- }
- });
-
- $.on(document.body, 'click', (e) => {
- if (e.target.matches(toggleClass)) return;
- deactivateDropdown();
- });
-
- const dropdownItems = this.options.headerDropdown;
-
- $.on(this.header, 'click', '.dt-dropdown__list-item', (e, $item) => {
- const $col = $.closest('.dt-cell', $item);
- const {
- index
- } = $.data($item);
- const {
- colIndex
- } = $.data($col);
- let callback = dropdownItems[index].action;
-
- callback && callback.call(this.instance, this.getColumn(colIndex));
- });
-
- function deactivateDropdown(e) {
- $activeDropdown && $activeDropdown.classList.remove(activeClass);
- $activeDropdown = null;
- }
- }
-
- bindResizeColumn() {
- let isDragging = false;
- let $resizingCell, startWidth, startX;
-
- $.on(this.header, 'mousedown', '.dt-cell .dt-cell__resize-handle', (e, $handle) => {
- document.body.classList.add('dt-resize');
- const $cell = $handle.parentNode.parentNode;
- $resizingCell = $cell;
- const {
- colIndex
- } = $.data($resizingCell);
- const col = this.getColumn(colIndex);
-
- if (col && col.resizable === false) {
- return;
- }
-
- isDragging = true;
- startWidth = $.style($('.dt-cell__content', $resizingCell), 'width');
- startX = e.pageX;
- });
-
- $.on(document.body, 'mouseup', (e) => {
- document.body.classList.remove('dt-resize');
- if (!$resizingCell) return;
- isDragging = false;
-
- const {
- colIndex
- } = $.data($resizingCell);
- this.setColumnWidth(colIndex);
- this.style.setBodyStyle();
- $resizingCell = null;
- });
-
- $.on(document.body, 'mousemove', (e) => {
- if (!isDragging) return;
- const finalWidth = startWidth + (e.pageX - startX);
- const {
- colIndex
- } = $.data($resizingCell);
-
- if (this.getColumnMinWidth(colIndex) > finalWidth) {
- // don't resize past minWidth
- return;
- }
- this.datamanager.updateColumn(colIndex, {
- width: finalWidth
- });
- this.setColumnHeaderWidth(colIndex);
- });
- }
-
- bindMoveColumn() {
- const $parent = $('.dt-row', this.header);
-
- this.sortable = Sortable.create($parent, {
- onEnd: (e) => {
- const {
- oldIndex,
- newIndex
- } = e;
- const $draggedCell = e.item;
- const {
- colIndex
- } = $.data($draggedCell);
- if (+colIndex === newIndex) return;
-
- this.switchColumn(oldIndex, newIndex);
- },
- preventOnFilter: false,
- filter: '.dt-cell__resize-handle, .dt-dropdown',
- chosenClass: 'dt-cell--dragging',
- animation: 150
- });
- }
-
- sortColumn(colIndex, nextSortOrder) {
- this.instance.freeze();
- this.sortRows(colIndex, nextSortOrder)
- .then(() => {
- this.refreshHeader();
- return this.rowmanager.refreshRows();
- })
- .then(() => this.instance.unfreeze())
- .then(() => {
- this.fireEvent('onSortColumn', this.getColumn(colIndex));
- });
- }
-
- removeColumn(colIndex) {
- const removedCol = this.getColumn(colIndex);
- this.instance.freeze();
- this.datamanager.removeColumn(colIndex)
- .then(() => {
- this.refreshHeader();
- return this.rowmanager.refreshRows();
- })
- .then(() => this.instance.unfreeze())
- .then(() => {
- this.fireEvent('onRemoveColumn', removedCol);
- });
- }
-
- switchColumn(oldIndex, newIndex) {
- this.instance.freeze();
- this.datamanager.switchColumn(oldIndex, newIndex)
- .then(() => {
- this.refreshHeader();
- return this.rowmanager.refreshRows();
- })
- .then(() => {
- this.setColumnWidth(oldIndex);
- this.setColumnWidth(newIndex);
- this.instance.unfreeze();
- })
- .then(() => {
- this.fireEvent('onSwitchColumn',
- this.getColumn(oldIndex), this.getColumn(newIndex)
- );
- });
- }
-
- toggleFilter(flag) {
- let showFilter;
- if (flag === undefined) {
- showFilter = !this.isFilterShown;
- } else {
- showFilter = flag;
- }
-
- if (showFilter) {
- $.style(this.$filterRow, { display: '' });
- } else {
- $.style(this.$filterRow, { display: 'none' });
- }
-
- this.isFilterShown = showFilter;
- this.style.setBodyStyle();
- }
-
- focusFilter(colIndex) {
- if (!this.isFilterShown) return;
-
- const $filterInput = $(`[data-col-index="${colIndex}"] .dt-filter`, this.$filterRow);
- $filterInput.focus();
- }
-
- bindFilter() {
- if (!this.options.inlineFilters) return;
- const handler = e => {
- const $filterCell = $.closest('.dt-cell', e.target);
- const {
- colIndex
- } = $.data($filterCell);
- const keyword = e.target.value;
-
- this.datamanager.filterRows(keyword, colIndex)
- .then(({
- rowsToHide,
- rowsToShow
- }) => {
- this.rowmanager.hideRows(rowsToHide);
- this.rowmanager.showRows(rowsToShow);
- });
- };
- $.on(this.header, 'keydown', '.dt-filter', debounce$1(handler, 300));
- }
-
- sortRows(colIndex, sortOrder) {
- return this.datamanager.sortRows(colIndex, sortOrder);
- }
-
- getColumn(colIndex) {
- return this.datamanager.getColumn(colIndex);
- }
-
- getColumns() {
- return this.datamanager.getColumns();
- }
-
- setColumnWidth(colIndex, width) {
- colIndex = +colIndex;
-
- let columnWidth = width || this.getColumn(colIndex).width;
-
- const selector = [
- `.dt-cell__content--col-${colIndex}`,
- `.dt-cell__edit--col-${colIndex}`
- ].join(', ');
-
- const styles = {
- width: columnWidth + 'px'
- };
-
- this.style.setStyle(selector, styles);
- }
-
- setColumnHeaderWidth(colIndex) {
- colIndex = +colIndex;
- this.$columnMap = this.$columnMap || [];
- const selector = `.dt-cell__content--header-${colIndex}`;
- const {
- width
- } = this.getColumn(colIndex);
-
- let $column = this.$columnMap[colIndex];
- if (!$column) {
- $column = this.header.querySelector(selector);
- this.$columnMap[colIndex] = $column;
- }
-
- $column.style.width = width + 'px';
- }
-
- getColumnMinWidth(colIndex) {
- colIndex = +colIndex;
- return this.getColumn(colIndex).minWidth || 24;
- }
-
- getFirstColumnIndex() {
- return this.datamanager.getColumnIndexById('_rowIndex') + 1;
- }
-
- getHeaderCell$(colIndex) {
- return $(`.dt-cell--header-${colIndex}`, this.header);
- }
-
- getLastColumnIndex() {
- return this.datamanager.getColumnCount() - 1;
- }
-
- getDropdownHTML() {
- const { dropdownButton, headerDropdown: dropdownItems } = this.options;
-
- return `
-
-
${dropdownButton}
-
- ${dropdownItems.map((d, i) => `
-
${d.label}
- `).join('')}
-
-
- `;
- }
-}
-
-class RowManager {
- constructor(instance) {
- this.instance = instance;
- linkProperties(this, this.instance, [
- 'options',
- 'fireEvent',
- 'wrapper',
- 'bodyScrollable',
- 'bodyRenderer'
- ]);
-
- this.bindEvents();
- this.refreshRows = nextTick(this.refreshRows, this);
- }
-
- get datamanager() {
- return this.instance.datamanager;
- }
-
- get cellmanager() {
- return this.instance.cellmanager;
- }
-
- bindEvents() {
- this.bindCheckbox();
- }
-
- bindCheckbox() {
- if (!this.options.checkboxColumn) return;
-
- // map of checked rows
- this.checkMap = [];
-
- $.on(this.wrapper, 'click', '.dt-cell[data-col-index="0"] [type="checkbox"]', (e, $checkbox) => {
- const $cell = $checkbox.closest('.dt-cell');
- const {
- rowIndex,
- isHeader
- } = $.data($cell);
- const checked = $checkbox.checked;
-
- if (isHeader) {
- this.checkAll(checked);
- } else {
- this.checkRow(rowIndex, checked);
- }
- });
- }
-
- refreshRows() {
- this.instance.renderBody();
- this.instance.setDimensions();
- }
-
- refreshRow(row, rowIndex) {
- const _row = this.datamanager.updateRow(row, rowIndex);
-
- _row.forEach(cell => {
- this.cellmanager.refreshCell(cell);
- });
- }
-
- getCheckedRows() {
- if (!this.checkMap) {
- return [];
- }
-
- let out = [];
- for (let rowIndex in this.checkMap) {
- const checked = this.checkMap[rowIndex];
- if (checked === 1) {
- out.push(rowIndex);
- }
- }
-
- return out;
- }
-
- highlightCheckedRows() {
- this.getCheckedRows()
- .map(rowIndex => this.checkRow(rowIndex, true));
- }
-
- checkRow(rowIndex, toggle) {
- const value = toggle ? 1 : 0;
- const selector = rowIndex =>
- `.dt-cell[data-row-index="${rowIndex}"][data-col-index="0"] [type="checkbox"]`;
- // update internal map
- this.checkMap[rowIndex] = value;
- // set checkbox value explicitly
- $.each(selector(rowIndex), this.bodyScrollable)
- .map(input => {
- input.checked = toggle;
- });
- // highlight row
- this.highlightRow(rowIndex, toggle);
- this.showCheckStatus();
- this.fireEvent('onCheckRow', this.datamanager.getRow(rowIndex));
- }
-
- checkAll(toggle) {
- const value = toggle ? 1 : 0;
-
- // update internal map
- if (toggle) {
- this.checkMap = Array.from(Array(this.getTotalRows())).map(c => value);
- } else {
- this.checkMap = [];
- }
- // set checkbox value
- $.each('.dt-cell[data-col-index="0"] [type="checkbox"]', this.bodyScrollable)
- .map(input => {
- input.checked = toggle;
- });
- // highlight all
- this.highlightAll(toggle);
- this.showCheckStatus();
- }
-
- showCheckStatus() {
- if (!this.options.checkedRowStatus) return;
- const checkedRows = this.getCheckedRows();
- const count = checkedRows.length;
- if (count > 0) {
- this.bodyRenderer.showToastMessage(`${count} row${count > 1 ? 's' : ''} selected`);
- } else {
- this.bodyRenderer.clearToastMessage();
- }
- }
-
- highlightRow(rowIndex, toggle = true) {
- const $row = this.getRow$(rowIndex);
- if (!$row) return;
-
- if (!toggle && this.bodyScrollable.classList.contains('dt-scrollable--highlight-all')) {
- $row.classList.add('dt-row--unhighlight');
- return;
- }
-
- if (toggle && $row.classList.contains('dt-row--unhighlight')) {
- $row.classList.remove('dt-row--unhighlight');
- }
-
- this._highlightedRows = this._highlightedRows || {};
-
- if (toggle) {
- $row.classList.add('dt-row--highlight');
- this._highlightedRows[rowIndex] = $row;
- } else {
- $row.classList.remove('dt-row--highlight');
- delete this._highlightedRows[rowIndex];
- }
- }
-
- highlightAll(toggle = true) {
- if (toggle) {
- this.bodyScrollable.classList.add('dt-scrollable--highlight-all');
- } else {
- this.bodyScrollable.classList.remove('dt-scrollable--highlight-all');
- for (const rowIndex in this._highlightedRows) {
- const $row = this._highlightedRows[rowIndex];
- $row.classList.remove('dt-row--highlight');
- }
- this._highlightedRows = {};
- }
- }
-
- hideRows(rowIndices) {
- rowIndices = ensureArray(rowIndices);
- rowIndices.map(rowIndex => {
- const $tr = this.getRow$(rowIndex);
- $tr.classList.add('dt-row--hide');
- });
- }
-
- showRows(rowIndices) {
- rowIndices = ensureArray(rowIndices);
- rowIndices.map(rowIndex => {
- const $tr = this.getRow$(rowIndex);
- $tr.classList.remove('dt-row--hide');
- });
- }
-
- openSingleNode(rowIndex) {
- const rowsToShow = this.datamanager.getImmediateChildren(rowIndex);
- this.showRows(rowsToShow);
- this.cellmanager.toggleTreeButton(rowIndex, true);
- }
-
- closeSingleNode(rowIndex) {
- const children = this.datamanager.getImmediateChildren(rowIndex);
- children.forEach(childIndex => {
- const row = this.datamanager.getRow(childIndex);
- if (row.meta.isLeaf) {
- // close
- this.hideRows(childIndex);
- this.cellmanager.toggleTreeButton(childIndex, false);
- } else {
- this.closeSingleNode(childIndex);
- this.hideRows(childIndex);
- }
- });
- this.cellmanager.toggleTreeButton(rowIndex, false);
- }
-
- getRow$(rowIndex) {
- return $(this.selector(rowIndex), this.bodyScrollable);
- }
-
- getTotalRows() {
- return this.datamanager.getRowCount();
- }
-
- getFirstRowIndex() {
- return 0;
- }
-
- getLastRowIndex() {
- return this.datamanager.getRowCount() - 1;
- }
-
- scrollToRow(rowIndex) {
- rowIndex = +rowIndex;
- this._lastScrollTo = this._lastScrollTo || 0;
- const $row = this.getRow$(rowIndex);
- if ($.inViewport($row, this.bodyScrollable)) return;
-
- const {
- height
- } = $row.getBoundingClientRect();
- const {
- top,
- bottom
- } = this.bodyScrollable.getBoundingClientRect();
- const rowsInView = Math.floor((bottom - top) / height);
-
- let offset = 0;
- if (rowIndex > this._lastScrollTo) {
- offset = height * ((rowIndex + 1) - rowsInView);
- } else {
- offset = height * ((rowIndex + 1) - 1);
- }
-
- this._lastScrollTo = rowIndex;
- $.scrollTop(this.bodyScrollable, offset);
- }
-
- getRowHTML(row, props) {
- const dataAttr = makeDataAttributeString(props);
-
- if (props.isFilter) {
- row = row.map(cell => (Object.assign({}, cell, {
- content: this.getFilterInput({
- colIndex: cell.colIndex
- }),
- isFilter: 1,
- isHeader: undefined,
- editable: false
- })));
- }
-
- return `
-
- ${row.map(cell => this.cellmanager.getCellHTML(cell)).join('')}
-
- `;
- }
-
- getFilterInput(props) {
- const dataAttr = makeDataAttributeString(props);
- return ``;
- }
-
- selector(rowIndex) {
- return `.dt-row[data-row-index="${rowIndex}"]`;
- }
-}
-
-class BodyRenderer {
- constructor(instance) {
- this.instance = instance;
- this.options = instance.options;
- this.datamanager = instance.datamanager;
- this.rowmanager = instance.rowmanager;
- this.cellmanager = instance.cellmanager;
- this.bodyScrollable = instance.bodyScrollable;
- this.log = instance.log;
- this.appendRemainingData = nextTick(this.appendRemainingData, this);
- }
-
- render() {
- if (this.options.clusterize) {
- this.renderBodyWithClusterize();
- } else {
- this.renderBodyHTML();
- }
- }
-
- renderBodyHTML() {
- const rows = this.datamanager.getRowsForView();
-
- this.bodyScrollable.innerHTML = this.getBodyHTML(rows);
- this.instance.setDimensions();
- this.restoreState();
- }
-
- renderBodyWithClusterize() {
- // first page
- const rows = this.datamanager.getRowsForView(0, 20);
- let initialData = this.getDataForClusterize(rows);
-
- if (initialData.length === 0) {
- initialData = [this.getNoDataHTML()];
- }
-
- if (!this.clusterize) {
- // empty body
- this.bodyScrollable.innerHTML = this.getBodyHTML([]);
-
- // first 20 rows will appended
- // rest of them in nextTick
- this.clusterize = new Clusterize({
- rows: initialData,
- scrollElem: this.bodyScrollable,
- contentElem: $('tbody', this.bodyScrollable),
- callbacks: {
- clusterChanged: () => this.restoreState()
- },
- /* eslint-disable */
- show_no_data_row: false,
- /* eslint-enable */
- });
-
- // setDimensions requires atleast 1 row to exist in dom
- this.instance.setDimensions();
- } else {
- this.clusterize.update(initialData);
- }
-
- this.appendRemainingData();
- }
-
- restoreState() {
- this.rowmanager.highlightCheckedRows();
- this.cellmanager.selectAreaOnClusterChanged();
- this.cellmanager.focusCellOnClusterChanged();
- }
-
- appendRemainingData() {
- const rows = this.datamanager.getRowsForView(20);
- const data = this.getDataForClusterize(rows);
- this.clusterize.append(data);
- }
-
- showToastMessage(message, hideAfter) {
- this.instance.toastMessage.innerHTML = this.getToastMessageHTML(message);
-
- if (hideAfter) {
- setTimeout(() => {
- this.clearToastMessage();
- }, hideAfter * 1000);
- }
- }
-
- clearToastMessage() {
- this.instance.toastMessage.innerHTML = '';
- }
-
- getDataForClusterize(rows) {
- return rows.map(row => this.rowmanager.getRowHTML(row, row.meta));
- }
-
- getBodyHTML(rows) {
- return `
-
-
- ${rows.map(row => this.rowmanager.getRowHTML(row, row.meta)).join('')}
-
-
- `;
- }
-
- getNoDataHTML() {
- return `${this.options.noDataMessage}
`;
- }
-
- getToastMessageHTML(message) {
- return `${message}`;
- }
-}
-
-class Style {
- constructor(instance) {
- this.instance = instance;
-
- linkProperties(this, this.instance, [
- 'options', 'datamanager', 'columnmanager',
- 'header', 'bodyScrollable', 'datatableWrapper',
- 'getColumn'
- ]);
-
- this.scopeClass = 'dt-instance-' + instance.constructor.instances;
- instance.datatableWrapper.classList.add(this.scopeClass);
-
- const styleEl = document.createElement('style');
- instance.wrapper.insertBefore(styleEl, instance.datatableWrapper);
- this.styleEl = styleEl;
-
- this.bindResizeWindow();
- }
-
- get stylesheet() {
- return this.styleEl.sheet;
- }
-
- bindResizeWindow() {
- if (this.options.layout === 'fluid') {
- $.on(window, 'resize', throttle$1(() => {
- this.distributeRemainingWidth();
- this.refreshColumnWidth();
- this.compensateScrollbarWidth();
- this.setBodyStyle();
- }, 300));
- }
- }
-
- destroy() {
- this.styleEl.remove();
- }
-
- setStyle(selector, styleObject) {
- if (selector.includes(',')) {
- selector.split(',')
- .map(s => s.trim())
- .forEach(selector => {
- this.setStyle(selector, styleObject);
- });
- return;
- }
-
- this._styleRulesMap = this._styleRulesMap || {};
- const prefixedSelector = this._getPrefixedSelector(selector);
-
- if (this._styleRulesMap[prefixedSelector]) {
- // find and remove
- const index = Array.from(this.stylesheet.cssRules)
- .findIndex(rule => rule.selectorText === prefixedSelector);
- this.stylesheet.deleteRule(index);
-
- // merge with old styleobject
- styleObject = Object.assign({}, this._styleRulesMap[prefixedSelector], styleObject);
- }
-
- const styleString = this._getRuleString(styleObject);
- const ruleString = `${prefixedSelector} { ${styleString} }`;
-
- this._styleRulesMap[prefixedSelector] = styleObject;
- this.stylesheet.insertRule(ruleString);
- }
-
- _getPrefixedSelector(selector) {
- return `.${this.scopeClass} ${selector}`;
- }
-
- _getRuleString(styleObject) {
- return Object.keys(styleObject)
- .map(prop => {
- let dashed = prop;
- if (!prop.includes('-')) {
- dashed = camelCaseToDash(prop);
- }
- return `${dashed}:${styleObject[prop]};`;
- })
- .join('');
- }
-
- setDimensions() {
- this.setHeaderStyle();
-
- this.setupMinWidth();
- this.setupNaturalColumnWidth();
- this.setupColumnWidth();
- this.distributeRemainingWidth();
- this.setColumnStyle();
- this.compensateScrollbarWidth();
-
- this.setDefaultCellHeight();
- this.setBodyStyle();
- }
-
- setHeaderStyle() {
- if (this.options.layout === 'fluid') {
- // setting width as 0 will ensure that the
- // header doesn't take the available space
- $.style(this.header, {
- width: 0
- });
- }
-
- $.style(this.header, {
- margin: 0
- });
- }
-
- setupMinWidth() {
- $.each('.dt-cell[data-is-header]', this.header).map(col => {
- const { colIndex } = $.data(col);
- const column = this.getColumn(colIndex);
-
- if (!column.minWidth) {
- const width = $.style($('.dt-cell__content', col), 'width');
- // only set this once
- column.minWidth = width;
- }
- });
- }
-
- setupNaturalColumnWidth() {
- if (!$('.dt-row')) return;
-
- // set initial width as naturally calculated by table's first row
- $.each('.dt-row[data-row-index="0"] .dt-cell', this.bodyScrollable).map($cell => {
- const {
- colIndex
- } = $.data($cell);
- const column = this.datamanager.getColumn(colIndex);
-
- let naturalWidth = $.style($('.dt-cell__content', $cell), 'width');
-
- if (column.id === '_rowIndex') {
- naturalWidth = this.getRowIndexColumnWidth(naturalWidth);
- column.width = naturalWidth;
- }
-
- column.naturalWidth = naturalWidth;
- });
- }
-
- setupColumnWidth() {
- if (this.options.layout === 'ratio') {
- let totalWidth = $.style(this.datatableWrapper, 'width');
-
- if (this.options.serialNoColumn) {
- const rowIndexColumn = this.datamanager.getColumnById('_rowIndex');
- totalWidth = totalWidth - rowIndexColumn.width - 1;
- }
-
- if (this.options.checkboxColumn) {
- const rowIndexColumn = this.datamanager.getColumnById('_checkbox');
- totalWidth = totalWidth - rowIndexColumn.width - 1;
- }
-
- const totalParts = this.datamanager.getColumns()
- .map(column => {
- if (column.id === '_rowIndex' || column.id === '_checkbox') {
- return 0;
- }
- if (!column.width) {
- column.width = 1;
- }
- column.ratioWidth = parseInt(column.width, 10);
- return column.ratioWidth;
- })
- .reduce((a, c) => a + c);
-
- const onePart = totalWidth / totalParts;
-
- this.datamanager.getColumns()
- .map(column => {
- if (column.id === '_rowIndex' || column.id === '_checkbox') return;
- column.width = Math.floor(onePart * column.ratioWidth) - 1;
- });
- } else {
- this.datamanager.getColumns()
- .map(column => {
- if (!column.width) {
- column.width = column.naturalWidth;
- }
- if (column.width < column.minWidth) {
- column.width = column.minWidth;
- }
- });
- }
- }
-
- compensateScrollbarWidth() {
- requestAnimationFrame(() => {
- const scrollbarWidth = $.scrollbarWidth();
- const lastCol = this.datamanager.getColumn(-1);
- const width = lastCol.width - scrollbarWidth;
- this.columnmanager.setColumnWidth(lastCol.colIndex, width);
- });
- }
-
- distributeRemainingWidth() {
- if (this.options.layout !== 'fluid') return;
-
- const wrapperWidth = $.style(this.instance.datatableWrapper, 'width');
- const headerWidth = $.style(this.header, 'width');
- const resizableColumns = this.datamanager.getColumns().filter(col => col.resizable);
- const deltaWidth = (wrapperWidth - headerWidth) / resizableColumns.length;
-
- resizableColumns.map(col => {
- const width = $.style(this.getColumnHeaderElement(col.colIndex), 'width');
- let finalWidth = Math.floor(width + deltaWidth) - 2;
-
- this.datamanager.updateColumn(col.colIndex, {
- width: finalWidth
- });
- });
- }
-
- setDefaultCellHeight() {
- if (this.options.dynamicRowHeight) return;
- if (this.__cellHeightSet) return;
- const $firstCell = $('.dt-cell[data-is-header]', this.instance.header);
- if (!$firstCell) return;
-
- const height = this.options.cellHeight || $.style($firstCell, 'height');
- if (height) {
- this.setCellHeight(height);
- this.__cellHeightSet = true;
- }
- }
-
- setCellHeight(height) {
- this.setStyle('.dt-cell__content, .dt-cell__edit', {
- height: height + 'px'
- });
- }
-
- setColumnStyle() {
- // align columns
- this.datamanager.getColumns()
- .map(column => {
- // alignment
- if (!column.align) {
- column.align = 'left';
- }
- if (!['left', 'center', 'right'].includes(column.align)) {
- column.align = 'left';
- }
- this.setStyle(`.dt-cell--col-${column.colIndex}`, {
- 'text-align': column.align
- });
-
- // width
- this.columnmanager.setColumnHeaderWidth(column.colIndex);
- this.columnmanager.setColumnWidth(column.colIndex);
- });
- this.setBodyStyle();
- }
-
- refreshColumnWidth() {
- this.datamanager.getColumns()
- .map(column => {
- this.columnmanager.setColumnHeaderWidth(column.colIndex);
- this.columnmanager.setColumnWidth(column.colIndex);
- });
- }
-
- setBodyStyle() {
- requestAnimationFrame(() => {
- const width = $.style(this.header, 'width');
-
- $.style(this.bodyScrollable, {
- width: width + 'px'
- });
-
- const $body = $('.dt-body', this.bodyScrollable);
-
- if ($body) {
- $.style($body, {
- height: '0px'
- });
- }
-
- $.style(this.bodyScrollable, {
- marginTop: $.style(this.header, 'height') + 'px'
- });
-
- $.style($('table', this.bodyScrollable), {
- margin: 0,
- width: '100%'
- });
- });
- }
-
- getColumnHeaderElement(colIndex) {
- colIndex = +colIndex;
- if (colIndex < 0) return null;
- return $(`.dt-cell[data-col-index="${colIndex}"]`, this.header);
- }
-
- getRowIndexColumnWidth(baseWidth) {
- this._rowIndexColumnWidthMap = this._rowIndexColumnWidthMap || {};
- const rowCount = this.datamanager.getRowCount();
- const digits = (rowCount + '').length;
-
- if (!this._rowIndexColumnWidthMap[digits]) {
- // add 8px for each unit
- this._rowIndexColumnWidthMap[digits] = baseWidth + ((digits - 1) * 8);
- }
-
- return this._rowIndexColumnWidthMap[digits];
- }
-}
-
-const KEYCODES = {
- 13: 'enter',
- 91: 'meta',
- 16: 'shift',
- 17: 'ctrl',
- 18: 'alt',
- 37: 'left',
- 38: 'up',
- 39: 'right',
- 40: 'down',
- 9: 'tab',
- 27: 'esc',
- 67: 'c',
- 70: 'f',
- 86: 'v'
-};
-
-class Keyboard {
- constructor(element) {
- this.listeners = {};
- $.on(element, 'keydown', this.handler.bind(this));
- }
-
- handler(e) {
- let key = KEYCODES[e.keyCode];
-
- if (e.shiftKey && key !== 'shift') {
- key = 'shift+' + key;
- }
-
- if ((e.ctrlKey && key !== 'ctrl') || (e.metaKey && key !== 'meta')) {
- key = 'ctrl+' + key;
- }
-
- const listeners = this.listeners[key];
-
- if (listeners && listeners.length > 0) {
- for (let listener of listeners) {
- const preventBubbling = listener(e);
- if (preventBubbling === undefined || preventBubbling === true) {
- e.preventDefault();
- }
- }
- }
- }
-
- on(key, listener) {
- const keys = key.split(',').map(k => k.trim());
-
- keys.map(key => {
- this.listeners[key] = this.listeners[key] || [];
- this.listeners[key].push(listener);
- });
- }
-}
-
-var DEFAULT_OPTIONS = {
- columns: [],
- data: [],
- dropdownButton: '▼',
- headerDropdown: [
- {
- label: 'Sort Ascending',
- action: function (column) {
- this.sortColumn(column.colIndex, 'asc');
- }
- },
- {
- label: 'Sort Descending',
- action: function (column) {
- this.sortColumn(column.colIndex, 'desc');
- }
- },
- {
- label: 'Reset sorting',
- action: function (column) {
- this.sortColumn(column.colIndex, 'none');
- }
- },
- {
- label: 'Remove column',
- action: function (column) {
- this.removeColumn(column.colIndex);
- }
- }
- ],
- events: {
- onRemoveColumn(column) {},
- onSwitchColumn(column1, column2) {},
- onSortColumn(column) {},
- onCheckRow(row) {}
- },
- sortIndicator: {
- asc: '↑',
- desc: '↓',
- none: ''
- },
- freezeMessage: '',
- getEditor: null,
- serialNoColumn: true,
- checkboxColumn: false,
- clusterize: true,
- logs: false,
- layout: 'fixed', // fixed, fluid, ratio
- noDataMessage: 'No Data',
- cellHeight: null,
- inlineFilters: false,
- treeView: false,
- checkedRowStatus: true,
- dynamicRowHeight: false,
- pasteFromClipboard: false
-};
-
-class DataTable {
- constructor(wrapper, options) {
- DataTable.instances++;
-
- if (typeof wrapper === 'string') {
- // css selector
- wrapper = document.querySelector(wrapper);
- }
- this.wrapper = wrapper;
- if (!(this.wrapper instanceof HTMLElement)) {
- throw new Error('Invalid argument given for `wrapper`');
- }
-
- this.buildOptions(options);
- this.prepare();
-
- this.style = new Style(this);
- this.keyboard = new Keyboard(this.wrapper);
- this.datamanager = new DataManager(this.options);
- this.rowmanager = new RowManager(this);
- this.columnmanager = new ColumnManager(this);
- this.cellmanager = new CellManager(this);
- this.bodyRenderer = new BodyRenderer(this);
-
- if (this.options.data) {
- this.refresh();
- }
- }
-
- buildOptions(options) {
- this.options = this.options || {};
-
- this.options = Object.assign(
- {}, DEFAULT_OPTIONS,
- this.options || {}, options
- );
-
- options.headerDropdown = options.headerDropdown || [];
- this.options.headerDropdown = [
- ...DEFAULT_OPTIONS.headerDropdown,
- ...options.headerDropdown
- ];
-
- // custom user events
- this.events = Object.assign(
- {}, DEFAULT_OPTIONS.events,
- this.options.events || {},
- options.events || {}
- );
- this.fireEvent = this.fireEvent.bind(this);
- }
-
- prepare() {
- this.prepareDom();
- this.unfreeze();
- }
-
- prepareDom() {
- this.wrapper.innerHTML = `
-
-
-
-
-
-
- ${this.options.freezeMessage}
-
-
-
-
-
- `;
-
- this.datatableWrapper = $('.datatable', this.wrapper);
- this.header = $('.dt-header', this.wrapper);
- this.bodyScrollable = $('.dt-scrollable', this.wrapper);
- this.freezeContainer = $('.dt-freeze', this.wrapper);
- this.toastMessage = $('.dt-toast', this.wrapper);
- this.pasteTarget = $('.dt-paste-target', this.wrapper);
- }
-
- refresh(data, columns) {
- this.datamanager.init(data, columns);
- this.render();
- this.setDimensions();
- }
-
- destroy() {
- this.wrapper.innerHTML = '';
- this.style.destroy();
- }
-
- appendRows(rows) {
- this.datamanager.appendRows(rows);
- this.rowmanager.refreshRows();
- }
-
- refreshRow(row, rowIndex) {
- this.rowmanager.refreshRow(row, rowIndex);
- }
-
- render() {
- this.renderHeader();
- this.renderBody();
- }
-
- renderHeader() {
- this.columnmanager.renderHeader();
- }
-
- renderBody() {
- this.bodyRenderer.render();
- }
-
- setDimensions() {
- this.style.setDimensions();
- }
-
- showToastMessage(message, hideAfter) {
- this.bodyRenderer.showToastMessage(message, hideAfter);
- }
-
- clearToastMessage() {
- this.bodyRenderer.clearToastMessage();
- }
-
- getColumn(colIndex) {
- return this.datamanager.getColumn(colIndex);
- }
-
- getColumns() {
- return this.datamanager.getColumns();
- }
-
- getRows() {
- return this.datamanager.getRows();
- }
-
- getCell(colIndex, rowIndex) {
- return this.datamanager.getCell(colIndex, rowIndex);
- }
-
- getColumnHeaderElement(colIndex) {
- return this.columnmanager.getColumnHeaderElement(colIndex);
- }
-
- getViewportHeight() {
- if (!this.viewportHeight) {
- this.viewportHeight = $.style(this.bodyScrollable, 'height');
- }
-
- return this.viewportHeight;
- }
-
- sortColumn(colIndex, sortOrder) {
- this.columnmanager.sortColumn(colIndex, sortOrder);
- }
-
- removeColumn(colIndex) {
- this.columnmanager.removeColumn(colIndex);
- }
-
- scrollToLastColumn() {
- this.datatableWrapper.scrollLeft = 9999;
- }
-
- freeze() {
- $.style(this.freezeContainer, {
- display: ''
- });
- }
-
- unfreeze() {
- $.style(this.freezeContainer, {
- display: 'none'
- });
- }
-
- updateOptions(options) {
- this.buildOptions(options);
- }
-
- fireEvent(eventName, ...args) {
- this.events[eventName].apply(this, args);
- }
-
- log() {
- if (this.options.logs) {
- console.log.apply(console, arguments);
- }
- }
-}
-
-DataTable.instances = 0;
-
-var name = "frappe-datatable";
-var version = "0.0.9";
-var description = "A modern datatable library for the web";
-var main = "dist/frappe-datatable.cjs.js";
-var scripts = {"start":"yarn run dev","build":"rollup -c","production":"rollup -c --production","build:docs":"rollup -c --docs","dev":"rollup -c -w","cy:server":"http-server -p 8989","cy:open":"cypress open","cy:run":"cypress run","test":"start-server-and-test cy:server http://localhost:8989 cy:run"};
-var devDependencies = {"chai":"3.5.0","cypress":"3.0.1","deepmerge":"^2.0.1","eslint-config-airbnb":"^16.1.0","eslint-config-airbnb-base":"^12.1.0","eslint-plugin-import":"^2.11.0","http-server":"^0.11.1","mocha":"3.3.0","postcss-cssnext":"^3.1.0","postcss-nested":"^3.0.0","rollup":"^0.59.4","rollup-plugin-commonjs":"^8.3.0","rollup-plugin-eslint":"^4.0.0","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.3","rollup-plugin-postcss":"^1.2.8","rollup-plugin-uglify-es":"^0.0.1","start-server-and-test":"^1.4.1"};
-var repository = {"type":"git","url":"https://github.com/frappe/datatable.git"};
-var keywords = ["datatable","data","grid","table"];
-var author = "Faris Ansari";
-var license = "MIT";
-var bugs = {"url":"https://github.com/frappe/datatable/issues"};
-var homepage = "https://frappe.github.io/datatable";
-var dependencies = {"clusterize.js":"^0.18.0","lodash":"^4.17.5","sortablejs":"^1.7.0"};
-var packageJson = {
- name: name,
- version: version,
- description: description,
- main: main,
- scripts: scripts,
- devDependencies: devDependencies,
- repository: repository,
- keywords: keywords,
- author: author,
- license: license,
- bugs: bugs,
- homepage: homepage,
- dependencies: dependencies
-};
-
-DataTable.__version__ = packageJson.version;
-
-module.exports = DataTable;
diff --git a/dist/frappe-datatable.css b/dist/frappe-datatable.css
deleted file mode 100644
index edffe35..0000000
--- a/dist/frappe-datatable.css
+++ /dev/null
@@ -1,257 +0,0 @@
-.datatable *, .datatable *::after, .datatable *::before {
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
- }
-
-.datatable {
- position: relative;
- overflow: auto;
-}
-
-.dt-header {
- border-collapse: collapse;
- border-bottom: 1px solid #d1d8dd;
-
- position: absolute;
- top: 0;
- left: 0;
- background-color: #fff;
-}
-
-.dt-body {
- border-collapse: collapse;
-}
-
-.dt-scrollable {
- max-height: 40vw;
- overflow: auto;
- border-bottom: 1px solid #d1d8dd;
-}
-
-.dt-scrollable--highlight-all {
- background-color: #fffce7;
- }
-
-.dt-scrollable__no-data {
- text-align: center;
- padding: 16px;
- padding: 1rem;
- border-left: 1px solid #d1d8dd;
- border-right: 1px solid #d1d8dd;
- }
-
-.dt-row--highlight {
- background-color: #fffce7;
- }
-
-.dt-row--unhighlight {
- background-color: #fff;
- }
-
-.dt-row--hide {
- display: none;
- }
-
-.dt-cell {
- border: 1px solid #d1d8dd;
- position: relative;
- outline: none;
- padding: 0;
-}
-
-.dt-cell__content {
- padding: 8px;
- padding: 0.5rem;
- border: 2px solid transparent;
- height: 100%;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- }
-
-.dt-cell__edit {
- display: none;
- padding: 8px;
- padding: 0.5rem;
- background-color: #fff;
- border: 2px solid rgb(255, 160, 10);
- z-index: 1;
- height: 100%;
- }
-
-.dt-cell__resize-handle {
- opacity: 0;
- position: absolute;
- right: -3px;
- top: 0;
- width: 5px;
- height: 100%;
- cursor: col-resize;
- z-index: 1;
- }
-
-.dt-cell--editing .dt-cell__content {
- display: none;
- }
-
-.dt-cell--editing .dt-cell__edit {
- display: block;
- }
-
-.dt-cell--focus .dt-cell__content {
- border-color: rgb(82, 146, 247);
- }
-
-.dt-cell--highlight {
- background-color: #f5f7fa;
- }
-
-.dt-cell--dragging {
- background-color: #f5f7fa;
- }
-
-.dt-cell--header .dt-cell__content {
- padding-right: 16px;
- padding-right: 1rem;
- font-weight: bold;
- }
-
-.dt-cell--header:hover .dt-dropdown__toggle {
- opacity: 1;
- }
-
-.dt-cell--tree-close .dt-tree-node__toggle:before {
- content: '►';
- }
-
-.dt-dropdown {
- position: absolute;
- right: 10px;
- display: -webkit-inline-box;
- display: -ms-inline-flexbox;
- display: inline-flex;
- vertical-align: top;
- text-align: left;
- font-weight: normal;
- cursor: pointer;
-}
-
-.dt-dropdown__toggle {
- opacity: 0;
- }
-
-.dt-dropdown__list {
- display: none;
-
- position: absolute;
- min-width: 128px;
- min-width: 8rem;
- top: 100%;
- right: 0;
- z-index: 1;
- background-color: #fff;
- border-radius: 3px;
- padding: 8px 0;
- padding: 0.5rem 0;
- -webkit-box-shadow: 0 2px 3px rgba(10, 10, 10, .1), 0 0 0 1px rgba(10, 10, 10, .1);
- box-shadow: 0 2px 3px rgba(10, 10, 10, .1), 0 0 0 1px rgba(10, 10, 10, .1);
- }
-
-.dt-dropdown__list-item {
- padding: 8px 16px;
- padding: 0.5rem 1rem;
- }
-
-.dt-dropdown__list-item:hover {
- background-color: #f5f7fa;
- }
-
-.dt-dropdown--active .dt-dropdown__list {
- display: block;
- }
-
-.dt-tree-node {
- display: inline-block;
- position: relative;
-}
-
-.dt-tree-node__toggle {
- display: inline-block;
- position: absolute;
- font-size: 10px;
- padding: 0 4px;
- cursor: pointer;
- }
-
-.dt-tree-node__toggle:before {
- content: '▼';
- }
-
-.dt-toast {
- position: absolute;
- bottom: 16px;
- bottom: 1rem;
- left: 50%;
- -webkit-transform: translateX(-50%);
- transform: translateX(-50%);
-}
-
-.dt-toast__message {
- display: inline-block;
- background-color: rgba(0, 0, 0, .8);
- color: #dfe2e5;
- border-radius: 3px;
- padding: 8px 16px;
- padding: 0.5rem 1rem;
- }
-
-.dt-input {
- outline: none;
- width: 100%;
- border: none;
- overflow: visible;
- font-family: inherit;
- font-size: inherit;
- line-height: inherit;
- margin: 0;
- padding: 0;
-}
-
-.dt-freeze {
- display: -webkit-box;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-pack: center;
- -ms-flex-pack: center;
- justify-content: center;
- -ms-flex-line-pack: center;
- align-content: center;
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- background-color: #f5f7fa;
- opacity: 0.5;
- font-size: 2em;
-}
-
-.dt-freeze__message {
- position: absolute;
- top: 50%;
- -webkit-transform: translateY(-50%);
- transform: translateY(-50%);
- }
-
-.dt-paste-target {
- position: fixed;
- left: -999em;
-}
-
-body.dt-resize {
- cursor: col-resize;
-}
diff --git a/dist/frappe-datatable.js b/dist/frappe-datatable.js
deleted file mode 100644
index 047f240..0000000
--- a/dist/frappe-datatable.js
+++ /dev/null
@@ -1,3684 +0,0 @@
-var DataTable = (function (Sortable,Clusterize) {
- 'use strict';
-
- Sortable = Sortable && Sortable.hasOwnProperty('default') ? Sortable['default'] : Sortable;
- Clusterize = Clusterize && Clusterize.hasOwnProperty('default') ? Clusterize['default'] : Clusterize;
-
- function $(expr, con) {
- return typeof expr === 'string' ?
- (con || document).querySelector(expr) :
- expr || null;
- }
-
- $.each = (expr, con) => {
- return typeof expr === 'string' ?
- Array.from((con || document).querySelectorAll(expr)) :
- expr || null;
- };
-
- $.create = (tag, o) => {
- let element = document.createElement(tag);
-
- for (let i in o) {
- let val = o[i];
-
- if (i === 'inside') {
- $(val).appendChild(element);
- } else
- if (i === 'around') {
- let ref = $(val);
- ref.parentNode.insertBefore(element, ref);
- element.appendChild(ref);
- } else
- if (i === 'styles') {
- if (typeof val === 'object') {
- Object.keys(val).map(prop => {
- element.style[prop] = val[prop];
- });
- }
- } else
- if (i in element) {
- element[i] = val;
- } else {
- element.setAttribute(i, val);
- }
- }
-
- return element;
- };
-
- $.on = (element, event, selector, callback) => {
- if (!callback) {
- callback = selector;
- $.bind(element, event, callback);
- } else {
- $.delegate(element, event, selector, callback);
- }
- };
-
- $.off = (element, event, handler) => {
- element.removeEventListener(event, handler);
- };
-
- $.bind = (element, event, callback) => {
- event.split(/\s+/).forEach(function (event) {
- element.addEventListener(event, callback);
- });
- };
-
- $.delegate = (element, event, selector, callback) => {
- element.addEventListener(event, function (e) {
- const delegatedTarget = e.target.closest(selector);
- if (delegatedTarget) {
- e.delegatedTarget = delegatedTarget;
- callback.call(this, e, delegatedTarget);
- }
- });
- };
-
- $.unbind = (element, o) => {
- if (element) {
- for (let event in o) {
- let callback = o[event];
-
- event.split(/\s+/).forEach(function (event) {
- element.removeEventListener(event, callback);
- });
- }
- }
- };
-
- $.fire = (target, type, properties) => {
- let evt = document.createEvent('HTMLEvents');
-
- evt.initEvent(type, true, true);
-
- for (let j in properties) {
- evt[j] = properties[j];
- }
-
- return target.dispatchEvent(evt);
- };
-
- $.data = (element, attrs) => { // eslint-disable-line
- if (!attrs) {
- return element.dataset;
- }
-
- for (const attr in attrs) {
- element.dataset[attr] = attrs[attr];
- }
- };
-
- $.style = (elements, styleMap) => { // eslint-disable-line
-
- if (typeof styleMap === 'string') {
- return $.getStyle(elements, styleMap);
- }
-
- if (!Array.isArray(elements)) {
- elements = [elements];
- }
-
- elements.map(element => {
- for (const prop in styleMap) {
- element.style[prop] = styleMap[prop];
- }
- });
- };
-
- $.removeStyle = (elements, styleProps) => {
- if (!Array.isArray(elements)) {
- elements = [elements];
- }
-
- if (!Array.isArray(styleProps)) {
- styleProps = [styleProps];
- }
-
- elements.map(element => {
- for (const prop of styleProps) {
- element.style[prop] = '';
- }
- });
- };
-
- $.getStyle = (element, prop) => {
- let val = getComputedStyle(element)[prop];
-
- if (['width', 'height'].includes(prop)) {
- val = parseFloat(val);
- }
-
- return val;
- };
-
- $.closest = (selector, element) => {
- if (!element) return null;
-
- if (element.matches(selector)) {
- return element;
- }
-
- return $.closest(selector, element.parentNode);
- };
-
- $.inViewport = (el, parentEl) => {
- const {
- top,
- left,
- bottom,
- right
- } = el.getBoundingClientRect();
- const {
- top: pTop,
- left: pLeft,
- bottom: pBottom,
- right: pRight
- } = parentEl.getBoundingClientRect();
-
- return top >= pTop && left >= pLeft && bottom <= pBottom && right <= pRight;
- };
-
- $.scrollTop = function scrollTop(element, pixels) {
- requestAnimationFrame(() => {
- element.scrollTop = pixels;
- });
- };
-
- $.scrollbarWidth = function scrollbarWidth() {
- // Create the measurement node
- const scrollDiv = document.createElement('div');
- $.style(scrollDiv, {
- width: '100px',
- height: '100px',
- overflow: 'scroll',
- position: 'absolute',
- top: '-9999px'
- });
- document.body.appendChild(scrollDiv);
-
- // Get the scrollbar width
- const scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
-
- // Delete the DIV
- document.body.removeChild(scrollDiv);
-
- return scrollbarWidth;
- };
-
- /**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
- function isObject(value) {
- var type = typeof value;
- return value != null && (type == 'object' || type == 'function');
- }
-
- var isObject_1 = isObject;
-
- var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
-
- /** Detect free variable `global` from Node.js. */
- var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
-
- var _freeGlobal = freeGlobal;
-
- /** Detect free variable `self`. */
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
-
- /** Used as a reference to the global object. */
- var root = _freeGlobal || freeSelf || Function('return this')();
-
- var _root = root;
-
- /**
- * Gets the timestamp of the number of milliseconds that have elapsed since
- * the Unix epoch (1 January 1970 00:00:00 UTC).
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Date
- * @returns {number} Returns the timestamp.
- * @example
- *
- * _.defer(function(stamp) {
- * console.log(_.now() - stamp);
- * }, _.now());
- * // => Logs the number of milliseconds it took for the deferred invocation.
- */
- var now = function() {
- return _root.Date.now();
- };
-
- var now_1 = now;
-
- /** Built-in value references. */
- var Symbol = _root.Symbol;
-
- var _Symbol = Symbol;
-
- /** Used for built-in method references. */
- var objectProto = Object.prototype;
-
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
-
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var nativeObjectToString = objectProto.toString;
-
- /** Built-in value references. */
- var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
-
- /**
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the raw `toStringTag`.
- */
- function getRawTag(value) {
- var isOwn = hasOwnProperty.call(value, symToStringTag),
- tag = value[symToStringTag];
-
- try {
- value[symToStringTag] = undefined;
- } catch (e) {}
-
- var result = nativeObjectToString.call(value);
- {
- if (isOwn) {
- value[symToStringTag] = tag;
- } else {
- delete value[symToStringTag];
- }
- }
- return result;
- }
-
- var _getRawTag = getRawTag;
-
- /** Used for built-in method references. */
- var objectProto$1 = Object.prototype;
-
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var nativeObjectToString$1 = objectProto$1.toString;
-
- /**
- * Converts `value` to a string using `Object.prototype.toString`.
- *
- * @private
- * @param {*} value The value to convert.
- * @returns {string} Returns the converted string.
- */
- function objectToString(value) {
- return nativeObjectToString$1.call(value);
- }
-
- var _objectToString = objectToString;
-
- /** `Object#toString` result references. */
- var nullTag = '[object Null]',
- undefinedTag = '[object Undefined]';
-
- /** Built-in value references. */
- var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
-
- /**
- * The base implementation of `getTag` without fallbacks for buggy environments.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- function baseGetTag(value) {
- if (value == null) {
- return value === undefined ? undefinedTag : nullTag;
- }
- return (symToStringTag$1 && symToStringTag$1 in Object(value))
- ? _getRawTag(value)
- : _objectToString(value);
- }
-
- var _baseGetTag = baseGetTag;
-
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return value != null && typeof value == 'object';
- }
-
- var isObjectLike_1 = isObjectLike;
-
- /** `Object#toString` result references. */
- var symbolTag = '[object Symbol]';
-
- /**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
- function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
- }
-
- var isSymbol_1 = isSymbol;
-
- /** Used as references for various `Number` constants. */
- var NAN = 0 / 0;
-
- /** Used to match leading and trailing whitespace. */
- var reTrim = /^\s+|\s+$/g;
-
- /** Used to detect bad signed hexadecimal string values. */
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
-
- /** Used to detect binary string values. */
- var reIsBinary = /^0b[01]+$/i;
-
- /** Used to detect octal string values. */
- var reIsOctal = /^0o[0-7]+$/i;
-
- /** Built-in method references without a dependency on `root`. */
- var freeParseInt = parseInt;
-
- /**
- * Converts `value` to a number.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {number} Returns the number.
- * @example
- *
- * _.toNumber(3.2);
- * // => 3.2
- *
- * _.toNumber(Number.MIN_VALUE);
- * // => 5e-324
- *
- * _.toNumber(Infinity);
- * // => Infinity
- *
- * _.toNumber('3.2');
- * // => 3.2
- */
- function toNumber(value) {
- if (typeof value == 'number') {
- return value;
- }
- if (isSymbol_1(value)) {
- return NAN;
- }
- if (isObject_1(value)) {
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
- value = isObject_1(other) ? (other + '') : other;
- }
- if (typeof value != 'string') {
- return value === 0 ? value : +value;
- }
- value = value.replace(reTrim, '');
- var isBinary = reIsBinary.test(value);
- return (isBinary || reIsOctal.test(value))
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
- : (reIsBadHex.test(value) ? NAN : +value);
- }
-
- var toNumber_1 = toNumber;
-
- /** Error message constants. */
- var FUNC_ERROR_TEXT = 'Expected a function';
-
- /* Built-in method references for those with the same name as other `lodash` methods. */
- var nativeMax = Math.max,
- nativeMin = Math.min;
-
- /**
- * Creates a debounced function that delays invoking `func` until after `wait`
- * milliseconds have elapsed since the last time the debounced function was
- * invoked. The debounced function comes with a `cancel` method to cancel
- * delayed `func` invocations and a `flush` method to immediately invoke them.
- * Provide `options` to indicate whether `func` should be invoked on the
- * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
- * with the last arguments provided to the debounced function. Subsequent
- * calls to the debounced function return the result of the last `func`
- * invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
- * invoked on the trailing edge of the timeout only if the debounced function
- * is invoked more than once during the `wait` timeout.
- *
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
- *
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
- * for details over the differences between `_.debounce` and `_.throttle`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to debounce.
- * @param {number} [wait=0] The number of milliseconds to delay.
- * @param {Object} [options={}] The options object.
- * @param {boolean} [options.leading=false]
- * Specify invoking on the leading edge of the timeout.
- * @param {number} [options.maxWait]
- * The maximum time `func` is allowed to be delayed before it's invoked.
- * @param {boolean} [options.trailing=true]
- * Specify invoking on the trailing edge of the timeout.
- * @returns {Function} Returns the new debounced function.
- * @example
- *
- * // Avoid costly calculations while the window size is in flux.
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
- *
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
- * 'leading': true,
- * 'trailing': false
- * }));
- *
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
- * var source = new EventSource('/stream');
- * jQuery(source).on('message', debounced);
- *
- * // Cancel the trailing debounced invocation.
- * jQuery(window).on('popstate', debounced.cancel);
- */
- function debounce(func, wait, options) {
- var lastArgs,
- lastThis,
- maxWait,
- result,
- timerId,
- lastCallTime,
- lastInvokeTime = 0,
- leading = false,
- maxing = false,
- trailing = true;
-
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- wait = toNumber_1(wait) || 0;
- if (isObject_1(options)) {
- leading = !!options.leading;
- maxing = 'maxWait' in options;
- maxWait = maxing ? nativeMax(toNumber_1(options.maxWait) || 0, wait) : maxWait;
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
-
- function invokeFunc(time) {
- var args = lastArgs,
- thisArg = lastThis;
-
- lastArgs = lastThis = undefined;
- lastInvokeTime = time;
- result = func.apply(thisArg, args);
- return result;
- }
-
- function leadingEdge(time) {
- // Reset any `maxWait` timer.
- lastInvokeTime = time;
- // Start the timer for the trailing edge.
- timerId = setTimeout(timerExpired, wait);
- // Invoke the leading edge.
- return leading ? invokeFunc(time) : result;
- }
-
- function remainingWait(time) {
- var timeSinceLastCall = time - lastCallTime,
- timeSinceLastInvoke = time - lastInvokeTime,
- timeWaiting = wait - timeSinceLastCall;
-
- return maxing
- ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
- : timeWaiting;
- }
-
- function shouldInvoke(time) {
- var timeSinceLastCall = time - lastCallTime,
- timeSinceLastInvoke = time - lastInvokeTime;
-
- // Either this is the first call, activity has stopped and we're at the
- // trailing edge, the system time has gone backwards and we're treating
- // it as the trailing edge, or we've hit the `maxWait` limit.
- return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
- }
-
- function timerExpired() {
- var time = now_1();
- if (shouldInvoke(time)) {
- return trailingEdge(time);
- }
- // Restart the timer.
- timerId = setTimeout(timerExpired, remainingWait(time));
- }
-
- function trailingEdge(time) {
- timerId = undefined;
-
- // Only invoke if we have `lastArgs` which means `func` has been
- // debounced at least once.
- if (trailing && lastArgs) {
- return invokeFunc(time);
- }
- lastArgs = lastThis = undefined;
- return result;
- }
-
- function cancel() {
- if (timerId !== undefined) {
- clearTimeout(timerId);
- }
- lastInvokeTime = 0;
- lastArgs = lastCallTime = lastThis = timerId = undefined;
- }
-
- function flush() {
- return timerId === undefined ? result : trailingEdge(now_1());
- }
-
- function debounced() {
- var time = now_1(),
- isInvoking = shouldInvoke(time);
-
- lastArgs = arguments;
- lastThis = this;
- lastCallTime = time;
-
- if (isInvoking) {
- if (timerId === undefined) {
- return leadingEdge(lastCallTime);
- }
- if (maxing) {
- // Handle invocations in a tight loop.
- timerId = setTimeout(timerExpired, wait);
- return invokeFunc(lastCallTime);
- }
- }
- if (timerId === undefined) {
- timerId = setTimeout(timerExpired, wait);
- }
- return result;
- }
- debounced.cancel = cancel;
- debounced.flush = flush;
- return debounced;
- }
-
- var debounce_1 = debounce;
-
- /** Error message constants. */
- var FUNC_ERROR_TEXT$1 = 'Expected a function';
-
- /**
- * Creates a throttled function that only invokes `func` at most once per
- * every `wait` milliseconds. The throttled function comes with a `cancel`
- * method to cancel delayed `func` invocations and a `flush` method to
- * immediately invoke them. Provide `options` to indicate whether `func`
- * should be invoked on the leading and/or trailing edge of the `wait`
- * timeout. The `func` is invoked with the last arguments provided to the
- * throttled function. Subsequent calls to the throttled function return the
- * result of the last `func` invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
- * invoked on the trailing edge of the timeout only if the throttled function
- * is invoked more than once during the `wait` timeout.
- *
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
- *
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
- * for details over the differences between `_.throttle` and `_.debounce`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to throttle.
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
- * @param {Object} [options={}] The options object.
- * @param {boolean} [options.leading=true]
- * Specify invoking on the leading edge of the timeout.
- * @param {boolean} [options.trailing=true]
- * Specify invoking on the trailing edge of the timeout.
- * @returns {Function} Returns the new throttled function.
- * @example
- *
- * // Avoid excessively updating the position while scrolling.
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
- *
- * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
- * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
- * jQuery(element).on('click', throttled);
- *
- * // Cancel the trailing throttled invocation.
- * jQuery(window).on('popstate', throttled.cancel);
- */
- function throttle(func, wait, options) {
- var leading = true,
- trailing = true;
-
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT$1);
- }
- if (isObject_1(options)) {
- leading = 'leading' in options ? !!options.leading : leading;
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
- return debounce_1(func, wait, {
- 'leading': leading,
- 'maxWait': wait,
- 'trailing': trailing
- });
- }
-
- var throttle_1 = throttle;
-
- function camelCaseToDash(str) {
- return str.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`);
- }
-
- function makeDataAttributeString(props) {
- const keys = Object.keys(props);
-
- return keys
- .map((key) => {
- const _key = camelCaseToDash(key);
- const val = props[key];
-
- if (val === undefined) return '';
- return `data-${_key}="${val}" `;
- })
- .join('')
- .trim();
- }
-
- function copyTextToClipboard(text) {
- // https://stackoverflow.com/a/30810322/5353542
- var textArea = document.createElement('textarea');
-
- //
- // *** This styling is an extra step which is likely not required. ***
- //
- // Why is it here? To ensure:
- // 1. the element is able to have focus and selection.
- // 2. if element was to flash render it has minimal visual impact.
- // 3. less flakyness with selection and copying which **might** occur if
- // the textarea element is not visible.
- //
- // The likelihood is the element won't even render, not even a flash,
- // so some of these are just precautions. However in IE the element
- // is visible whilst the popup box asking the user for permission for
- // the web page to copy to the clipboard.
- //
-
- // Place in top-left corner of screen regardless of scroll position.
- textArea.style.position = 'fixed';
- textArea.style.top = 0;
- textArea.style.left = 0;
-
- // Ensure it has a small width and height. Setting to 1px / 1em
- // doesn't work as this gives a negative w/h on some browsers.
- textArea.style.width = '2em';
- textArea.style.height = '2em';
-
- // We don't need padding, reducing the size if it does flash render.
- textArea.style.padding = 0;
-
- // Clean up any borders.
- textArea.style.border = 'none';
- textArea.style.outline = 'none';
- textArea.style.boxShadow = 'none';
-
- // Avoid flash of white box if rendered for any reason.
- textArea.style.background = 'transparent';
-
- textArea.value = text;
-
- document.body.appendChild(textArea);
-
- textArea.select();
-
- try {
- document.execCommand('copy');
- } catch (err) {
- console.log('Oops, unable to copy');
- }
-
- document.body.removeChild(textArea);
- }
-
- function isNumeric(val) {
- return !isNaN(val);
- }
-
- let throttle$1 = throttle_1;
-
- let debounce$1 = debounce_1;
-
- function nextTick(fn, context = null) {
- return (...args) => {
- return new Promise(resolve => {
- const execute = () => {
- const out = fn.apply(context, args);
- resolve(out);
- };
- setTimeout(execute);
- });
- };
- }
- function linkProperties(target, source, properties) {
- const props = properties.reduce((acc, prop) => {
- acc[prop] = {
- get() {
- return source[prop];
- }
- };
- return acc;
- }, {});
- Object.defineProperties(target, props);
- }
- function isSet(val) {
- return val !== undefined || val !== null;
- }
-
- function notSet(val) {
- return !isSet(val);
- }
-
- function isNumber(val) {
- return !isNaN(val);
- }
-
- function ensureArray(val) {
- if (!Array.isArray(val)) {
- return [val];
- }
- return val;
- }
-
- class DataManager {
- constructor(options) {
- this.options = options;
- this.sortRows = nextTick(this.sortRows, this);
- this.switchColumn = nextTick(this.switchColumn, this);
- this.removeColumn = nextTick(this.removeColumn, this);
- this.filterRows = nextTick(this.filterRows, this);
- }
-
- init(data, columns) {
- if (!data) {
- data = this.options.data;
- }
- if (columns) {
- this.options.columns = columns;
- }
-
- this.data = data;
-
- this.rowCount = 0;
- this.columns = [];
- this.rows = [];
-
- this.prepareColumns();
- this.prepareRows();
- this.prepareTreeRows();
- this.prepareRowView();
-
- this.prepareNumericColumns();
- }
-
- // computed property
- get currentSort() {
- const col = this.columns.find(col => col.sortOrder !== 'none');
- return col || {
- colIndex: -1,
- sortOrder: 'none'
- };
- }
-
- prepareColumns() {
- this.columns = [];
- this.validateColumns();
- this.prepareDefaultColumns();
- this.prepareHeader();
- }
-
- prepareDefaultColumns() {
- if (this.options.checkboxColumn && !this.hasColumnById('_checkbox')) {
- const cell = {
- id: '_checkbox',
- content: this.getCheckboxHTML(),
- editable: false,
- resizable: false,
- sortable: false,
- focusable: false,
- dropdown: false,
- width: 32
- };
- this.columns.push(cell);
- }
-
- if (this.options.serialNoColumn && !this.hasColumnById('_rowIndex')) {
- let cell = {
- id: '_rowIndex',
- content: '',
- align: 'center',
- editable: false,
- resizable: false,
- focusable: false,
- dropdown: false
- };
-
- this.columns.push(cell);
- }
- }
-
- prepareHeader() {
- let columns = this.columns.concat(this.options.columns);
- const baseCell = {
- isHeader: 1,
- editable: true,
- sortable: true,
- resizable: true,
- focusable: true,
- dropdown: true,
- width: null,
- format: (value) => {
- if (value === null || value === undefined) {
- return '';
- }
- return value + '';
- }
- };
-
- this.columns = columns
- .map((cell, i) => this.prepareCell(cell, i))
- .map(col => Object.assign({}, baseCell, col))
- .map(col => {
- col.content = col.content || col.name || '';
- col.id = col.id || col.content;
- return col;
- });
- }
-
- prepareCell(content, i) {
- const cell = {
- content: '',
- sortOrder: 'none',
- colIndex: i,
- column: this.columns[i]
- };
-
- if (content !== null && typeof content === 'object') {
- // passed as column/header
- Object.assign(cell, content);
- } else {
- cell.content = content;
- }
-
- return cell;
- }
-
- prepareNumericColumns() {
- const row0 = this.getRow(0);
- if (!row0) return;
- this.columns = this.columns.map((column, i) => {
-
- const cellValue = row0[i].content;
- if (!column.align && isNumeric(cellValue)) {
- column.align = 'right';
- }
-
- return column;
- });
- }
-
- prepareRows() {
- this.validateData(this.data);
-
- this.rows = this.data.map((d, i) => {
- const index = this._getNextRowCount();
-
- let row = [];
- let meta = {
- rowIndex: index
- };
-
- if (Array.isArray(d)) {
- // row is an array
- if (this.options.checkboxColumn) {
- row.push(this.getCheckboxHTML());
- }
- if (this.options.serialNoColumn) {
- row.push((index + 1) + '');
- }
- row = row.concat(d);
-
- while (row.length < this.columns.length) {
- row.push('');
- }
-
- } else {
- // row is an object
- for (let col of this.columns) {
- if (col.id === '_checkbox') {
- row.push(this.getCheckboxHTML());
- } else if (col.id === '_rowIndex') {
- row.push((index + 1) + '');
- } else {
- row.push(d[col.id]);
- }
- }
-
- meta.indent = d.indent || 0;
- }
-
- return this.prepareRow(row, meta);
- });
- }
-
- prepareTreeRows() {
- this.rows.forEach((row, i) => {
- if (isNumber(row.meta.indent)) {
- // if (i === 36) debugger;
- const nextRow = this.getRow(i + 1);
- row.meta.isLeaf = !nextRow ||
- notSet(nextRow.meta.indent) ||
- nextRow.meta.indent <= row.meta.indent;
- }
- });
- }
-
- prepareRowView() {
- // This is order in which rows will be rendered in the table.
- // When sorting happens, only this.rowViewOrder will change
- // and not the original this.rows
- this.rowViewOrder = this.rows.map(row => row.meta.rowIndex);
- }
-
- prepareRow(row, meta) {
- const baseRowCell = {
- rowIndex: meta.rowIndex,
- indent: meta.indent
- };
-
- row = row
- .map((cell, i) => this.prepareCell(cell, i))
- .map(cell => Object.assign({}, baseRowCell, cell));
-
- // monkey patched in array object
- row.meta = meta;
- return row;
- }
-
- validateColumns() {
- const columns = this.options.columns;
- if (!Array.isArray(columns)) {
- throw new DataError('`columns` must be an array');
- }
-
- columns.forEach((column, i) => {
- if (typeof column !== 'string' && typeof column !== 'object') {
- throw new DataError(`column "${i}" must be a string or an object`);
- }
- });
- }
-
- validateData(data) {
- if (Array.isArray(data) &&
- (data.length === 0 || Array.isArray(data[0]) || typeof data[0] === 'object')) {
- return true;
- }
- throw new DataError('`data` must be an array of arrays or objects');
- }
-
- appendRows(rows) {
- this.validateData(rows);
-
- this.rows.push(...this.prepareRows(rows));
- }
-
- sortRows(colIndex, sortOrder = 'none') {
- colIndex = +colIndex;
-
- // reset sortOrder and update for colIndex
- this.getColumns()
- .map(col => {
- if (col.colIndex === colIndex) {
- col.sortOrder = sortOrder;
- } else {
- col.sortOrder = 'none';
- }
- });
-
- this._sortRows(colIndex, sortOrder);
- }
-
- _sortRows(colIndex, sortOrder) {
-
- if (this.currentSort.colIndex === colIndex) {
- // reverse the array if only sortOrder changed
- if (
- (this.currentSort.sortOrder === 'asc' && sortOrder === 'desc') ||
- (this.currentSort.sortOrder === 'desc' && sortOrder === 'asc')
- ) {
- this.reverseArray(this.rowViewOrder);
- this.currentSort.sortOrder = sortOrder;
- return;
- }
- }
-
- this.rowViewOrder.sort((a, b) => {
- const aIndex = a;
- const bIndex = b;
- const aContent = this.getCell(colIndex, a).content;
- const bContent = this.getCell(colIndex, b).content;
-
- if (sortOrder === 'none') {
- return aIndex - bIndex;
- } else if (sortOrder === 'asc') {
- if (aContent < bContent) return -1;
- if (aContent > bContent) return 1;
- if (aContent === bContent) return 0;
- } else if (sortOrder === 'desc') {
- if (aContent < bContent) return 1;
- if (aContent > bContent) return -1;
- if (aContent === bContent) return 0;
- }
- return 0;
- });
-
- if (this.hasColumnById('_rowIndex')) {
- // update row index
- const srNoColIndex = this.getColumnIndexById('_rowIndex');
- this.rows.forEach((row, index) => {
- const viewIndex = this.rowViewOrder.indexOf(index);
- const cell = row[srNoColIndex];
- cell.content = (viewIndex + 1) + '';
- });
- }
- }
-
- reverseArray(array) {
- let left = null;
- let right = null;
- let length = array.length;
-
- for (left = 0, right = length - 1; left < right; left += 1, right -= 1) {
- const temporary = array[left];
-
- array[left] = array[right];
- array[right] = temporary;
- }
- }
-
- switchColumn(index1, index2) {
- // update columns
- const temp = this.columns[index1];
- this.columns[index1] = this.columns[index2];
- this.columns[index2] = temp;
-
- this.columns[index1].colIndex = index1;
- this.columns[index2].colIndex = index2;
-
- // update rows
- this.rows.forEach(row => {
- const newCell1 = Object.assign({}, row[index1], {
- colIndex: index2
- });
- const newCell2 = Object.assign({}, row[index2], {
- colIndex: index1
- });
-
- row[index2] = newCell1;
- row[index1] = newCell2;
- });
- }
-
- removeColumn(index) {
- index = +index;
- const filter = cell => cell.colIndex !== index;
- const map = (cell, i) => Object.assign({}, cell, {
- colIndex: i
- });
- // update columns
- this.columns = this.columns
- .filter(filter)
- .map(map);
-
- // update rows
- this.rows.forEach(row => {
- // remove cell
- row.splice(index, 1);
- // update colIndex
- row.forEach((cell, i) => {
- cell.colIndex = i;
- });
- });
- }
-
- updateRow(row, rowIndex) {
- if (row.length < this.columns.length) {
- if (this.hasColumnById('_rowIndex')) {
- const val = (rowIndex + 1) + '';
-
- row = [val].concat(row);
- }
-
- if (this.hasColumnById('_checkbox')) {
- const val = '';
-
- row = [val].concat(row);
- }
- }
-
- const _row = this.prepareRow(row, {rowIndex});
- const index = this.rows.findIndex(row => row[0].rowIndex === rowIndex);
- this.rows[index] = _row;
-
- return _row;
- }
-
- updateCell(colIndex, rowIndex, options) {
- let cell;
- if (typeof colIndex === 'object') {
- // cell object was passed,
- // must have colIndex, rowIndex
- cell = colIndex;
- colIndex = cell.colIndex;
- rowIndex = cell.rowIndex;
- // the object passed must be merged with original cell
- options = cell;
- }
- cell = this.getCell(colIndex, rowIndex);
-
- // mutate object directly
- for (let key in options) {
- const newVal = options[key];
- if (newVal !== undefined) {
- cell[key] = newVal;
- }
- }
-
- return cell;
- }
-
- updateColumn(colIndex, keyValPairs) {
- const column = this.getColumn(colIndex);
- for (let key in keyValPairs) {
- const newVal = keyValPairs[key];
- if (newVal !== undefined) {
- column[key] = newVal;
- }
- }
- return column;
- }
-
- filterRows(keyword, colIndex) {
- let rowsToHide = [];
- let rowsToShow = [];
- const cells = this.rows.map(row => row[colIndex]);
-
- cells.forEach(cell => {
- const hay = String(cell.content || '').toLowerCase();
- const needle = (keyword || '').toLowerCase();
-
- if (!needle || hay.includes(needle)) {
- rowsToShow.push(cell.rowIndex);
- } else {
- rowsToHide.push(cell.rowIndex);
- }
- });
-
- this._filteredRows = rowsToShow;
-
- return {
- rowsToHide,
- rowsToShow
- };
- }
-
- getFilteredRowIndices() {
- return this._filteredRows || this.rows.map(row => row.meta.rowIndex);
- }
-
- getRowCount() {
- return this.rowCount;
- }
-
- _getNextRowCount() {
- const val = this.rowCount;
-
- this.rowCount++;
- return val;
- }
-
- getRows(start, end) {
- return this.rows.slice(start, end);
- }
-
- getRowsForView(start, end) {
- const rows = this.rowViewOrder.map(i => this.rows[i]);
- return rows.slice(start, end);
- }
-
- getColumns(skipStandardColumns) {
- let columns = this.columns;
-
- if (skipStandardColumns) {
- columns = columns.slice(this.getStandardColumnCount());
- }
-
- return columns;
- }
-
- getStandardColumnCount() {
- if (this.options.checkboxColumn && this.options.serialNoColumn) {
- return 2;
- }
-
- if (this.options.checkboxColumn || this.options.serialNoColumn) {
- return 1;
- }
-
- return 0;
- }
-
- getColumnCount(skipStandardColumns) {
- let val = this.columns.length;
-
- if (skipStandardColumns) {
- val = val - this.getStandardColumnCount();
- }
-
- return val;
- }
-
- getColumn(colIndex) {
- colIndex = +colIndex;
-
- if (colIndex < 0) {
- // negative indexes
- colIndex = this.columns.length + colIndex;
- }
-
- return this.columns.find(col => col.colIndex === colIndex);
- }
-
- getColumnById(id) {
- return this.columns.find(col => col.id === id);
- }
-
- getRow(rowIndex) {
- rowIndex = +rowIndex;
- return this.rows[rowIndex];
- }
-
- getCell(colIndex, rowIndex) {
- rowIndex = +rowIndex;
- colIndex = +colIndex;
- return this.getRow(rowIndex)[colIndex];
- }
-
- getChildren(parentRowIndex) {
- parentRowIndex = +parentRowIndex;
- const parentIndent = this.getRow(parentRowIndex).meta.indent;
- const out = [];
-
- for (let i = parentRowIndex + 1; i < this.rowCount; i++) {
- const row = this.getRow(i);
- if (isNaN(row.meta.indent)) continue;
-
- if (row.meta.indent > parentIndent) {
- out.push(i);
- }
-
- if (row.meta.indent === parentIndent) {
- break;
- }
- }
-
- return out;
- }
-
- getImmediateChildren(parentRowIndex) {
- parentRowIndex = +parentRowIndex;
- const parentIndent = this.getRow(parentRowIndex).meta.indent;
- const out = [];
- const childIndent = parentIndent + 1;
-
- for (let i = parentRowIndex + 1; i < this.rowCount; i++) {
- const row = this.getRow(i);
- if (isNaN(row.meta.indent) || row.meta.indent > childIndent) continue;
-
- if (row.meta.indent === childIndent) {
- out.push(i);
- }
-
- if (row.meta.indent === parentIndent) {
- break;
- }
- }
-
- return out;
- }
-
- get() {
- return {
- columns: this.columns,
- rows: this.rows
- };
- }
-
- /**
- * Returns the original data which was passed
- * based on rowIndex
- * @param {Number} rowIndex
- * @returns Array|Object
- * @memberof DataManager
- */
- getData(rowIndex) {
- return this.data[rowIndex];
- }
-
- hasColumn(name) {
- return Boolean(this.columns.find(col => col.content === name));
- }
-
- hasColumnById(id) {
- return Boolean(this.columns.find(col => col.id === id));
- }
-
- getColumnIndex(name) {
- return this.columns.findIndex(col => col.content === name);
- }
-
- getColumnIndexById(id) {
- return this.columns.findIndex(col => col.id === id);
- }
-
- getCheckboxHTML() {
- return '';
- }
- }
-
- // Custom Errors
- class DataError extends TypeError {}
-
- class CellManager {
- constructor(instance) {
- this.instance = instance;
- linkProperties(this, this.instance, [
- 'wrapper',
- 'options',
- 'style',
- 'bodyScrollable',
- 'columnmanager',
- 'rowmanager',
- 'datamanager',
- 'keyboard'
- ]);
-
- this.bindEvents();
- }
-
- bindEvents() {
- this.bindFocusCell();
- this.bindEditCell();
- this.bindKeyboardSelection();
- this.bindCopyCellContents();
- this.bindMouseEvents();
- this.bindTreeEvents();
- }
-
- bindFocusCell() {
- this.bindKeyboardNav();
- }
-
- bindEditCell() {
- this.$editingCell = null;
-
- $.on(this.bodyScrollable, 'dblclick', '.dt-cell', (e, cell) => {
- this.activateEditing(cell);
- });
-
- this.keyboard.on('enter', () => {
- if (this.$focusedCell && !this.$editingCell) {
- // enter keypress on focused cell
- this.activateEditing(this.$focusedCell);
- } else if (this.$editingCell) {
- // enter keypress on editing cell
- this.submitEditing();
- this.deactivateEditing();
- }
- });
- }
-
- bindKeyboardNav() {
- const focusCell = (direction) => {
- if (!this.$focusedCell || this.$editingCell) {
- return false;
- }
-
- let $cell = this.$focusedCell;
-
- if (direction === 'left' || direction === 'shift+tab') {
- $cell = this.getLeftCell$($cell);
- } else if (direction === 'right' || direction === 'tab') {
- $cell = this.getRightCell$($cell);
- } else if (direction === 'up') {
- $cell = this.getAboveCell$($cell);
- } else if (direction === 'down') {
- $cell = this.getBelowCell$($cell);
- }
-
- this.focusCell($cell);
- return true;
- };
-
- const focusLastCell = (direction) => {
- if (!this.$focusedCell || this.$editingCell) {
- return false;
- }
-
- let $cell = this.$focusedCell;
- const {
- rowIndex,
- colIndex
- } = $.data($cell);
-
- if (direction === 'left') {
- $cell = this.getLeftMostCell$(rowIndex);
- } else if (direction === 'right') {
- $cell = this.getRightMostCell$(rowIndex);
- } else if (direction === 'up') {
- $cell = this.getTopMostCell$(colIndex);
- } else if (direction === 'down') {
- $cell = this.getBottomMostCell$(colIndex);
- }
-
- this.focusCell($cell);
- return true;
- };
-
- ['left', 'right', 'up', 'down', 'tab', 'shift+tab']
- .map(direction => this.keyboard.on(direction, () => focusCell(direction)));
-
- ['left', 'right', 'up', 'down']
- .map(direction => this.keyboard.on(`ctrl+${direction}`, () => focusLastCell(direction)));
-
- this.keyboard.on('esc', () => {
- this.deactivateEditing();
- this.columnmanager.toggleFilter(false);
- });
-
- if (this.options.inlineFilters) {
- this.keyboard.on('ctrl+f', (e) => {
- const $cell = $.closest('.dt-cell', e.target);
- const { colIndex } = $.data($cell);
-
- this.activateFilter(colIndex);
- return true;
- });
- }
- }
-
- bindKeyboardSelection() {
- const getNextSelectionCursor = (direction) => {
- let $selectionCursor = this.getSelectionCursor();
-
- if (direction === 'left') {
- $selectionCursor = this.getLeftCell$($selectionCursor);
- } else if (direction === 'right') {
- $selectionCursor = this.getRightCell$($selectionCursor);
- } else if (direction === 'up') {
- $selectionCursor = this.getAboveCell$($selectionCursor);
- } else if (direction === 'down') {
- $selectionCursor = this.getBelowCell$($selectionCursor);
- }
-
- return $selectionCursor;
- };
-
- ['left', 'right', 'up', 'down']
- .map(direction =>
- this.keyboard.on(`shift+${direction}`, () => this.selectArea(getNextSelectionCursor(direction))));
- }
-
- bindCopyCellContents() {
- this.keyboard.on('ctrl+c', () => {
- const noOfCellsCopied = this.copyCellContents(this.$focusedCell, this.$selectionCursor);
- const message = `${noOfCellsCopied} cell${noOfCellsCopied > 1 ? 's' : ''} copied`;
- if (noOfCellsCopied) {
- this.instance.showToastMessage(message, 2);
- }
- });
-
- if (this.options.pasteFromClipboard) {
- this.keyboard.on('ctrl+v', (e) => {
- // hack
- // https://stackoverflow.com/a/2177059/5353542
- this.instance.pasteTarget.focus();
-
- setTimeout(() => {
- const data = this.instance.pasteTarget.value;
- this.instance.pasteTarget.value = '';
- this.pasteContentInCell(data);
- }, 10);
-
- return false;
- });
- }
- }
-
- bindMouseEvents() {
- let mouseDown = null;
-
- $.on(this.bodyScrollable, 'mousedown', '.dt-cell', (e) => {
- mouseDown = true;
- this.focusCell($(e.delegatedTarget));
- });
-
- $.on(this.bodyScrollable, 'mouseup', () => {
- mouseDown = false;
- });
-
- const selectArea = (e) => {
- if (!mouseDown) return;
- this.selectArea($(e.delegatedTarget));
- };
-
- $.on(this.bodyScrollable, 'mousemove', '.dt-cell', throttle$1(selectArea, 50));
- }
-
- bindTreeEvents() {
- $.on(this.bodyScrollable, 'click', '.dt-tree-node__toggle', (e, $toggle) => {
- const $cell = $.closest('.dt-cell', $toggle);
- const { rowIndex } = $.data($cell);
-
- if ($cell.classList.contains('dt-cell--tree-close')) {
- this.rowmanager.openSingleNode(rowIndex);
- } else {
- this.rowmanager.closeSingleNode(rowIndex);
- }
- });
- }
-
- focusCell($cell, {
- skipClearSelection = 0
- } = {}) {
- if (!$cell) return;
-
- // don't focus if already editing cell
- if ($cell === this.$editingCell) return;
-
- const {
- colIndex,
- isHeader
- } = $.data($cell);
- if (isHeader) {
- return;
- }
-
- const column = this.columnmanager.getColumn(colIndex);
- if (column.focusable === false) {
- return;
- }
-
- this.scrollToCell($cell);
-
- this.deactivateEditing();
- if (!skipClearSelection) {
- this.clearSelection();
- }
-
- if (this.$focusedCell) {
- this.$focusedCell.classList.remove('dt-cell--focus');
- }
-
- this.$focusedCell = $cell;
- $cell.classList.add('dt-cell--focus');
-
- // so that keyboard nav works
- $cell.focus();
-
- this.highlightRowColumnHeader($cell);
- }
-
- highlightRowColumnHeader($cell) {
- const {
- colIndex,
- rowIndex
- } = $.data($cell);
-
- const srNoColIndex = this.datamanager.getColumnIndexById('_rowIndex');
- const colHeaderSelector = `.dt-cell--header-${colIndex}`;
- const rowHeaderSelector = `.dt-cell--${srNoColIndex}-${rowIndex}`;
-
- if (this.lastHeaders) {
- this.lastHeaders.forEach(header => header.classList.remove('dt-cell--highlight'));
- }
-
- const colHeader = $(colHeaderSelector, this.wrapper);
- const rowHeader = $(rowHeaderSelector, this.wrapper);
-
- this.lastHeaders = [colHeader, rowHeader];
- this.lastHeaders.forEach(header => header.classList.add('dt-cell--highlight'));
- }
-
- selectAreaOnClusterChanged() {
- if (!(this.$focusedCell && this.$selectionCursor)) return;
- const {
- colIndex,
- rowIndex
- } = $.data(this.$selectionCursor);
- const $cell = this.getCell$(colIndex, rowIndex);
-
- if (!$cell || $cell === this.$selectionCursor) return;
-
- // selectArea needs $focusedCell
- const fCell = $.data(this.$focusedCell);
- this.$focusedCell = this.getCell$(fCell.colIndex, fCell.rowIndex);
-
- this.selectArea($cell);
- }
-
- focusCellOnClusterChanged() {
- if (!this.$focusedCell) return;
-
- const {
- colIndex,
- rowIndex
- } = $.data(this.$focusedCell);
- const $cell = this.getCell$(colIndex, rowIndex);
-
- if (!$cell) return;
- // this function is called after selectAreaOnClusterChanged,
- // focusCell calls clearSelection which resets the area selection
- // so a flag to skip it
- this.focusCell($cell, {
- skipClearSelection: 1
- });
- }
-
- selectArea($selectionCursor) {
- if (!this.$focusedCell) return;
-
- if (this._selectArea(this.$focusedCell, $selectionCursor)) {
- // valid selection
- this.$selectionCursor = $selectionCursor;
- }
- }
-
- _selectArea($cell1, $cell2) {
- if ($cell1 === $cell2) return false;
-
- const cells = this.getCellsInRange($cell1, $cell2);
- if (!cells) return false;
-
- this.clearSelection();
- this._selectedCells = cells.map(index => this.getCell$(...index));
- requestAnimationFrame(() => {
- this._selectedCells.map($cell => $cell.classList.add('dt-cell--highlight'));
- });
- return true;
- }
-
- getCellsInRange($cell1, $cell2) {
- let colIndex1, rowIndex1, colIndex2, rowIndex2;
-
- if (typeof $cell1 === 'number') {
- [colIndex1, rowIndex1, colIndex2, rowIndex2] = arguments;
- } else
- if (typeof $cell1 === 'object') {
- if (!($cell1 && $cell2)) {
- return false;
- }
-
- const cell1 = $.data($cell1);
- const cell2 = $.data($cell2);
-
- colIndex1 = +cell1.colIndex;
- rowIndex1 = +cell1.rowIndex;
- colIndex2 = +cell2.colIndex;
- rowIndex2 = +cell2.rowIndex;
- }
-
- if (rowIndex1 > rowIndex2) {
- [rowIndex1, rowIndex2] = [rowIndex2, rowIndex1];
- }
-
- if (colIndex1 > colIndex2) {
- [colIndex1, colIndex2] = [colIndex2, colIndex1];
- }
-
- if (this.isStandardCell(colIndex1) || this.isStandardCell(colIndex2)) {
- return false;
- }
-
- const cells = [];
- let colIndex = colIndex1;
- let rowIndex = rowIndex1;
- const rowIndices = [];
-
- while (rowIndex <= rowIndex2) {
- rowIndices.push(rowIndex);
- rowIndex += 1;
- }
-
- rowIndices.map((rowIndex) => {
- while (colIndex <= colIndex2) {
- cells.push([colIndex, rowIndex]);
- colIndex++;
- }
- colIndex = colIndex1;
- });
-
- return cells;
- }
-
- clearSelection() {
- (this._selectedCells || [])
- .forEach($cell => $cell.classList.remove('dt-cell--highlight'));
-
- this._selectedCells = [];
- this.$selectionCursor = null;
- }
-
- getSelectionCursor() {
- return this.$selectionCursor || this.$focusedCell;
- }
-
- activateEditing($cell) {
- this.focusCell($cell);
- const {
- rowIndex,
- colIndex
- } = $.data($cell);
-
- const col = this.columnmanager.getColumn(colIndex);
- if (col && (col.editable === false || col.focusable === false)) {
- return;
- }
-
- const cell = this.getCell(colIndex, rowIndex);
- if (cell && cell.editable === false) {
- return;
- }
-
- if (this.$editingCell) {
- const {
- _rowIndex,
- _colIndex
- } = $.data(this.$editingCell);
-
- if (rowIndex === _rowIndex && colIndex === _colIndex) {
- // editing the same cell
- return;
- }
- }
-
- this.$editingCell = $cell;
- $cell.classList.add('dt-cell--editing');
-
- const $editCell = $('.dt-cell__edit', $cell);
- $editCell.innerHTML = '';
-
- const editor = this.getEditor(colIndex, rowIndex, cell.content, $editCell);
-
- if (editor) {
- this.currentCellEditor = editor;
- // initialize editing input with cell value
- editor.initValue(cell.content, rowIndex, col);
- }
- }
-
- deactivateEditing() {
- // keep focus on the cell so that keyboard navigation works
- if (this.$focusedCell) this.$focusedCell.focus();
-
- if (!this.$editingCell) return;
- this.$editingCell.classList.remove('dt-cell--editing');
- this.$editingCell = null;
- }
-
- getEditor(colIndex, rowIndex, value, parent) {
- const column = this.datamanager.getColumn(colIndex);
- const row = this.datamanager.getRow(rowIndex);
- const data = this.datamanager.getData(rowIndex);
- let editor = this.options.getEditor ?
- this.options.getEditor(colIndex, rowIndex, value, parent, column, row, data) :
- this.getDefaultEditor(parent);
-
- if (editor === false) {
- // explicitly returned false
- return false;
- }
- if (editor === undefined) {
- // didn't return editor, fallback to default
- editor = this.getDefaultEditor(parent);
- }
-
- return editor;
- }
-
- getDefaultEditor(parent) {
- const $input = $.create('input', {
- class: 'dt-input',
- type: 'text',
- inside: parent
- });
-
- return {
- initValue(value) {
- $input.focus();
- $input.value = value;
- },
- getValue() {
- return $input.value;
- },
- setValue(value) {
- $input.value = value;
- }
- };
- }
-
- submitEditing() {
- if (!this.$editingCell) return;
- const $cell = this.$editingCell;
- const {
- rowIndex,
- colIndex
- } = $.data($cell);
- const col = this.datamanager.getColumn(colIndex);
-
- if ($cell) {
- const editor = this.currentCellEditor;
-
- if (editor) {
- let valuePromise = editor.getValue();
-
- // convert to stubbed Promise
- if (!valuePromise.then) {
- valuePromise = Promise.resolve(valuePromise);
- }
-
- valuePromise.then((value) => {
- const done = editor.setValue(value, rowIndex, col);
- const oldValue = this.getCell(colIndex, rowIndex).content;
-
- // update cell immediately
- this.updateCell(colIndex, rowIndex, value);
- $cell.focus();
-
- if (done && done.then) {
- // revert to oldValue if promise fails
- done.catch((e) => {
- console.log(e);
- this.updateCell(colIndex, rowIndex, oldValue);
- });
- }
- });
- }
- }
-
- this.currentCellEditor = null;
- }
-
- copyCellContents($cell1, $cell2) {
- if (!$cell2 && $cell1) {
- // copy only focusedCell
- const {
- colIndex,
- rowIndex
- } = $.data($cell1);
- const cell = this.getCell(colIndex, rowIndex);
- copyTextToClipboard(cell.content);
- return 1;
- }
- const cells = this.getCellsInRange($cell1, $cell2);
-
- if (!cells) return 0;
-
- const rows = cells
- // get cell objects
- .map(index => this.getCell(...index))
- // convert to array of rows
- .reduce((acc, curr) => {
- const rowIndex = curr.rowIndex;
-
- acc[rowIndex] = acc[rowIndex] || [];
- acc[rowIndex].push(curr.content);
-
- return acc;
- }, []);
-
- const values = rows
- // join values by tab
- .map(row => row.join('\t'))
- // join rows by newline
- .join('\n');
-
- copyTextToClipboard(values);
-
- // return no of cells copied
- return rows.reduce((total, row) => total + row.length, 0);
- }
-
- pasteContentInCell(data) {
- if (!this.$focusedCell) return;
-
- const matrix = data
- .split('\n')
- .map(row => row.split('\t'))
- .filter(row => row.length && row.every(it => it));
-
- let { colIndex, rowIndex } = $.data(this.$focusedCell);
-
- let focusedCell = {
- colIndex: +colIndex,
- rowIndex: +rowIndex
- };
-
- matrix.forEach((row, i) => {
- let rowIndex = i + focusedCell.rowIndex;
- row.forEach((cell, j) => {
- let colIndex = j + focusedCell.colIndex;
- this.updateCell(colIndex, rowIndex, cell);
- });
- });
- }
-
- activateFilter(colIndex) {
- this.columnmanager.toggleFilter();
- this.columnmanager.focusFilter(colIndex);
-
- if (!this.columnmanager.isFilterShown) {
- // put focus back on cell
- this.$focusedCell.focus();
- }
- }
-
- updateCell(colIndex, rowIndex, value) {
- const cell = this.datamanager.updateCell(colIndex, rowIndex, {
- content: value
- });
- this.refreshCell(cell);
- }
-
- refreshCell(cell) {
- const $cell = $(this.selector(cell.colIndex, cell.rowIndex), this.bodyScrollable);
- $cell.innerHTML = this.getCellContent(cell);
- }
-
- toggleTreeButton(rowIndex, flag) {
- const colIndex = this.columnmanager.getFirstColumnIndex();
- const $cell = this.getCell$(colIndex, rowIndex);
- if ($cell) {
- $cell.classList[flag ? 'remove' : 'add']('dt-cell--tree-close');
- }
- }
-
- isStandardCell(colIndex) {
- // Standard cells are in Sr. No and Checkbox column
- return colIndex < this.columnmanager.getFirstColumnIndex();
- }
-
- getCell$(colIndex, rowIndex) {
- return $(this.selector(colIndex, rowIndex), this.bodyScrollable);
- }
-
- getAboveCell$($cell) {
- const {
- colIndex
- } = $.data($cell);
-
- let $aboveRow = $cell.parentElement.previousElementSibling;
- while ($aboveRow && $aboveRow.classList.contains('dt-row--hide')) {
- $aboveRow = $aboveRow.previousElementSibling;
- }
-
- if (!$aboveRow) return $cell;
- return $(`.dt-cell--col-${colIndex}`, $aboveRow);
- }
-
- getBelowCell$($cell) {
- const {
- colIndex
- } = $.data($cell);
-
- let $belowRow = $cell.parentElement.nextElementSibling;
- while ($belowRow && $belowRow.classList.contains('dt-row--hide')) {
- $belowRow = $belowRow.nextElementSibling;
- }
-
- if (!$belowRow) return $cell;
- return $(`.dt-cell--col-${colIndex}`, $belowRow);
- }
-
- getLeftCell$($cell) {
- return $cell.previousElementSibling;
- }
-
- getRightCell$($cell) {
- return $cell.nextElementSibling;
- }
-
- getLeftMostCell$(rowIndex) {
- return this.getCell$(this.columnmanager.getFirstColumnIndex(), rowIndex);
- }
-
- getRightMostCell$(rowIndex) {
- return this.getCell$(this.columnmanager.getLastColumnIndex(), rowIndex);
- }
-
- getTopMostCell$(colIndex) {
- return this.getCell$(colIndex, this.rowmanager.getFirstRowIndex());
- }
-
- getBottomMostCell$(colIndex) {
- return this.getCell$(colIndex, this.rowmanager.getLastRowIndex());
- }
-
- getCell(colIndex, rowIndex) {
- return this.instance.datamanager.getCell(colIndex, rowIndex);
- }
-
- getRowHeight() {
- return $.style($('.dt-row', this.bodyScrollable), 'height');
- }
-
- scrollToCell($cell) {
- if ($.inViewport($cell, this.bodyScrollable)) return false;
-
- const {
- rowIndex
- } = $.data($cell);
- this.rowmanager.scrollToRow(rowIndex);
- return false;
- }
-
- getRowCountPerPage() {
- return Math.ceil(this.instance.getViewportHeight() / this.getRowHeight());
- }
-
- getCellHTML(cell) {
- const {
- rowIndex,
- colIndex,
- isHeader,
- isFilter
- } = cell;
- const dataAttr = makeDataAttributeString({
- rowIndex,
- colIndex,
- isHeader,
- isFilter
- });
-
- const isBodyCell = !(isHeader || isFilter);
-
- const className = [
- 'dt-cell',
- 'dt-cell--col-' + colIndex,
- isBodyCell ? `dt-cell--${colIndex}-${rowIndex}` : '',
- isBodyCell ? 'dt-cell--row-' + rowIndex : '',
- isHeader ? 'dt-cell--header' : '',
- isHeader ? `dt-cell--header-${colIndex}` : '',
- isFilter ? 'dt-cell--filter' : ''
- ].join(' ');
-
- return `
-
- ${this.getCellContent(cell)}
- |
- `;
- }
-
- getCellContent(cell) {
- const {
- isHeader,
- isFilter,
- colIndex
- } = cell;
-
- const editable = !isHeader && cell.editable !== false;
- const editCellHTML = editable ? this.getEditCellHTML(colIndex) : '';
-
- const sortable = isHeader && cell.sortable !== false;
- const sortIndicator = sortable ?
- `
- ${this.options.sortIndicator[cell.sortOrder]}
- ` :
- '';
-
- const resizable = isHeader && cell.resizable !== false;
- const resizeColumn = resizable ? '' : '';
-
- const hasDropdown = isHeader && cell.dropdown !== false;
- const dropdown = hasDropdown ? this.columnmanager.getDropdownHTML() : '';
-
- const customFormatter = cell.format || (cell.column && cell.column.format) || null;
-
- let contentHTML;
- if (isHeader || isFilter || !customFormatter) {
- contentHTML = cell.content;
- } else {
- const row = this.datamanager.getRow(cell.rowIndex);
- const data = this.datamanager.getData(cell.rowIndex);
- contentHTML = customFormatter(cell.content, row, cell.column, data);
- }
-
- if (this.options.treeView && !(isHeader || isFilter) && cell.indent !== undefined) {
- const nextRow = this.datamanager.getRow(cell.rowIndex + 1);
- const addToggle = nextRow && nextRow.meta.indent > cell.indent;
-
- // Add toggle and indent in the first column
- const firstColumnIndex = this.datamanager.getColumnIndexById('_rowIndex') + 1;
- if (firstColumnIndex === cell.colIndex) {
- const padding = ((cell.indent || 0) + 1) * 1.5;
- const toggleHTML = addToggle ?
- `` : '';
- contentHTML = `
- ${toggleHTML}${contentHTML}`;
- }
- }
-
- const className = [
- 'dt-cell__content',
- isHeader ? `dt-cell__content--header-${colIndex}` : `dt-cell__content--col-${colIndex}`
- ].join(' ');
-
- return `
-
- ${contentHTML}
- ${sortIndicator}
- ${resizeColumn}
- ${dropdown}
-
- ${editCellHTML}
- `;
- }
-
- getEditCellHTML(colIndex) {
- return ``;
- }
-
- selector(colIndex, rowIndex) {
- return `.dt-cell--${colIndex}-${rowIndex}`;
- }
- }
-
- class ColumnManager {
- constructor(instance) {
- this.instance = instance;
-
- linkProperties(this, this.instance, [
- 'options',
- 'fireEvent',
- 'header',
- 'datamanager',
- 'style',
- 'wrapper',
- 'rowmanager',
- 'bodyScrollable'
- ]);
-
- this.bindEvents();
- }
-
- renderHeader() {
- this.header.innerHTML = '';
- this.refreshHeader();
- }
-
- refreshHeader() {
- const columns = this.datamanager.getColumns();
-
- // refresh html
- $('thead', this.header).innerHTML = this.getHeaderHTML(columns);
-
- this.$filterRow = $('.dt-row[data-is-filter]', this.header);
- if (this.$filterRow) {
- $.style(this.$filterRow, { display: 'none' });
- }
- // reset columnMap
- this.$columnMap = [];
- this.bindMoveColumn();
- }
-
- getHeaderHTML(columns) {
- let html = this.rowmanager.getRowHTML(columns, {
- isHeader: 1
- });
- if (this.options.inlineFilters) {
- html += this.rowmanager.getRowHTML(columns, {
- isFilter: 1
- });
- }
- return html;
- }
-
- bindEvents() {
- this.bindDropdown();
- this.bindResizeColumn();
- this.bindFilter();
- }
-
- bindDropdown() {
- let $activeDropdown;
- let activeClass = 'dt-dropdown--active';
- let toggleClass = '.dt-dropdown__toggle';
-
- $.on(this.header, 'click', toggleClass, (e, $button) => {
- const $dropdown = $.closest('.dt-dropdown', $button);
-
- if (!$dropdown.classList.contains(activeClass)) {
- deactivateDropdown();
- $dropdown.classList.add(activeClass);
- $activeDropdown = $dropdown;
- } else {
- deactivateDropdown();
- }
- });
-
- $.on(document.body, 'click', (e) => {
- if (e.target.matches(toggleClass)) return;
- deactivateDropdown();
- });
-
- const dropdownItems = this.options.headerDropdown;
-
- $.on(this.header, 'click', '.dt-dropdown__list-item', (e, $item) => {
- const $col = $.closest('.dt-cell', $item);
- const {
- index
- } = $.data($item);
- const {
- colIndex
- } = $.data($col);
- let callback = dropdownItems[index].action;
-
- callback && callback.call(this.instance, this.getColumn(colIndex));
- });
-
- function deactivateDropdown(e) {
- $activeDropdown && $activeDropdown.classList.remove(activeClass);
- $activeDropdown = null;
- }
- }
-
- bindResizeColumn() {
- let isDragging = false;
- let $resizingCell, startWidth, startX;
-
- $.on(this.header, 'mousedown', '.dt-cell .dt-cell__resize-handle', (e, $handle) => {
- document.body.classList.add('dt-resize');
- const $cell = $handle.parentNode.parentNode;
- $resizingCell = $cell;
- const {
- colIndex
- } = $.data($resizingCell);
- const col = this.getColumn(colIndex);
-
- if (col && col.resizable === false) {
- return;
- }
-
- isDragging = true;
- startWidth = $.style($('.dt-cell__content', $resizingCell), 'width');
- startX = e.pageX;
- });
-
- $.on(document.body, 'mouseup', (e) => {
- document.body.classList.remove('dt-resize');
- if (!$resizingCell) return;
- isDragging = false;
-
- const {
- colIndex
- } = $.data($resizingCell);
- this.setColumnWidth(colIndex);
- this.style.setBodyStyle();
- $resizingCell = null;
- });
-
- $.on(document.body, 'mousemove', (e) => {
- if (!isDragging) return;
- const finalWidth = startWidth + (e.pageX - startX);
- const {
- colIndex
- } = $.data($resizingCell);
-
- if (this.getColumnMinWidth(colIndex) > finalWidth) {
- // don't resize past minWidth
- return;
- }
- this.datamanager.updateColumn(colIndex, {
- width: finalWidth
- });
- this.setColumnHeaderWidth(colIndex);
- });
- }
-
- bindMoveColumn() {
- const $parent = $('.dt-row', this.header);
-
- this.sortable = Sortable.create($parent, {
- onEnd: (e) => {
- const {
- oldIndex,
- newIndex
- } = e;
- const $draggedCell = e.item;
- const {
- colIndex
- } = $.data($draggedCell);
- if (+colIndex === newIndex) return;
-
- this.switchColumn(oldIndex, newIndex);
- },
- preventOnFilter: false,
- filter: '.dt-cell__resize-handle, .dt-dropdown',
- chosenClass: 'dt-cell--dragging',
- animation: 150
- });
- }
-
- sortColumn(colIndex, nextSortOrder) {
- this.instance.freeze();
- this.sortRows(colIndex, nextSortOrder)
- .then(() => {
- this.refreshHeader();
- return this.rowmanager.refreshRows();
- })
- .then(() => this.instance.unfreeze())
- .then(() => {
- this.fireEvent('onSortColumn', this.getColumn(colIndex));
- });
- }
-
- removeColumn(colIndex) {
- const removedCol = this.getColumn(colIndex);
- this.instance.freeze();
- this.datamanager.removeColumn(colIndex)
- .then(() => {
- this.refreshHeader();
- return this.rowmanager.refreshRows();
- })
- .then(() => this.instance.unfreeze())
- .then(() => {
- this.fireEvent('onRemoveColumn', removedCol);
- });
- }
-
- switchColumn(oldIndex, newIndex) {
- this.instance.freeze();
- this.datamanager.switchColumn(oldIndex, newIndex)
- .then(() => {
- this.refreshHeader();
- return this.rowmanager.refreshRows();
- })
- .then(() => {
- this.setColumnWidth(oldIndex);
- this.setColumnWidth(newIndex);
- this.instance.unfreeze();
- })
- .then(() => {
- this.fireEvent('onSwitchColumn',
- this.getColumn(oldIndex), this.getColumn(newIndex)
- );
- });
- }
-
- toggleFilter(flag) {
- let showFilter;
- if (flag === undefined) {
- showFilter = !this.isFilterShown;
- } else {
- showFilter = flag;
- }
-
- if (showFilter) {
- $.style(this.$filterRow, { display: '' });
- } else {
- $.style(this.$filterRow, { display: 'none' });
- }
-
- this.isFilterShown = showFilter;
- this.style.setBodyStyle();
- }
-
- focusFilter(colIndex) {
- if (!this.isFilterShown) return;
-
- const $filterInput = $(`[data-col-index="${colIndex}"] .dt-filter`, this.$filterRow);
- $filterInput.focus();
- }
-
- bindFilter() {
- if (!this.options.inlineFilters) return;
- const handler = e => {
- const $filterCell = $.closest('.dt-cell', e.target);
- const {
- colIndex
- } = $.data($filterCell);
- const keyword = e.target.value;
-
- this.datamanager.filterRows(keyword, colIndex)
- .then(({
- rowsToHide,
- rowsToShow
- }) => {
- this.rowmanager.hideRows(rowsToHide);
- this.rowmanager.showRows(rowsToShow);
- });
- };
- $.on(this.header, 'keydown', '.dt-filter', debounce$1(handler, 300));
- }
-
- sortRows(colIndex, sortOrder) {
- return this.datamanager.sortRows(colIndex, sortOrder);
- }
-
- getColumn(colIndex) {
- return this.datamanager.getColumn(colIndex);
- }
-
- getColumns() {
- return this.datamanager.getColumns();
- }
-
- setColumnWidth(colIndex, width) {
- colIndex = +colIndex;
-
- let columnWidth = width || this.getColumn(colIndex).width;
-
- const selector = [
- `.dt-cell__content--col-${colIndex}`,
- `.dt-cell__edit--col-${colIndex}`
- ].join(', ');
-
- const styles = {
- width: columnWidth + 'px'
- };
-
- this.style.setStyle(selector, styles);
- }
-
- setColumnHeaderWidth(colIndex) {
- colIndex = +colIndex;
- this.$columnMap = this.$columnMap || [];
- const selector = `.dt-cell__content--header-${colIndex}`;
- const {
- width
- } = this.getColumn(colIndex);
-
- let $column = this.$columnMap[colIndex];
- if (!$column) {
- $column = this.header.querySelector(selector);
- this.$columnMap[colIndex] = $column;
- }
-
- $column.style.width = width + 'px';
- }
-
- getColumnMinWidth(colIndex) {
- colIndex = +colIndex;
- return this.getColumn(colIndex).minWidth || 24;
- }
-
- getFirstColumnIndex() {
- return this.datamanager.getColumnIndexById('_rowIndex') + 1;
- }
-
- getHeaderCell$(colIndex) {
- return $(`.dt-cell--header-${colIndex}`, this.header);
- }
-
- getLastColumnIndex() {
- return this.datamanager.getColumnCount() - 1;
- }
-
- getDropdownHTML() {
- const { dropdownButton, headerDropdown: dropdownItems } = this.options;
-
- return `
-
-
${dropdownButton}
-
- ${dropdownItems.map((d, i) => `
-
${d.label}
- `).join('')}
-
-
- `;
- }
- }
-
- class RowManager {
- constructor(instance) {
- this.instance = instance;
- linkProperties(this, this.instance, [
- 'options',
- 'fireEvent',
- 'wrapper',
- 'bodyScrollable',
- 'bodyRenderer'
- ]);
-
- this.bindEvents();
- this.refreshRows = nextTick(this.refreshRows, this);
- }
-
- get datamanager() {
- return this.instance.datamanager;
- }
-
- get cellmanager() {
- return this.instance.cellmanager;
- }
-
- bindEvents() {
- this.bindCheckbox();
- }
-
- bindCheckbox() {
- if (!this.options.checkboxColumn) return;
-
- // map of checked rows
- this.checkMap = [];
-
- $.on(this.wrapper, 'click', '.dt-cell[data-col-index="0"] [type="checkbox"]', (e, $checkbox) => {
- const $cell = $checkbox.closest('.dt-cell');
- const {
- rowIndex,
- isHeader
- } = $.data($cell);
- const checked = $checkbox.checked;
-
- if (isHeader) {
- this.checkAll(checked);
- } else {
- this.checkRow(rowIndex, checked);
- }
- });
- }
-
- refreshRows() {
- this.instance.renderBody();
- this.instance.setDimensions();
- }
-
- refreshRow(row, rowIndex) {
- const _row = this.datamanager.updateRow(row, rowIndex);
-
- _row.forEach(cell => {
- this.cellmanager.refreshCell(cell);
- });
- }
-
- getCheckedRows() {
- if (!this.checkMap) {
- return [];
- }
-
- let out = [];
- for (let rowIndex in this.checkMap) {
- const checked = this.checkMap[rowIndex];
- if (checked === 1) {
- out.push(rowIndex);
- }
- }
-
- return out;
- }
-
- highlightCheckedRows() {
- this.getCheckedRows()
- .map(rowIndex => this.checkRow(rowIndex, true));
- }
-
- checkRow(rowIndex, toggle) {
- const value = toggle ? 1 : 0;
- const selector = rowIndex =>
- `.dt-cell[data-row-index="${rowIndex}"][data-col-index="0"] [type="checkbox"]`;
- // update internal map
- this.checkMap[rowIndex] = value;
- // set checkbox value explicitly
- $.each(selector(rowIndex), this.bodyScrollable)
- .map(input => {
- input.checked = toggle;
- });
- // highlight row
- this.highlightRow(rowIndex, toggle);
- this.showCheckStatus();
- this.fireEvent('onCheckRow', this.datamanager.getRow(rowIndex));
- }
-
- checkAll(toggle) {
- const value = toggle ? 1 : 0;
-
- // update internal map
- if (toggle) {
- this.checkMap = Array.from(Array(this.getTotalRows())).map(c => value);
- } else {
- this.checkMap = [];
- }
- // set checkbox value
- $.each('.dt-cell[data-col-index="0"] [type="checkbox"]', this.bodyScrollable)
- .map(input => {
- input.checked = toggle;
- });
- // highlight all
- this.highlightAll(toggle);
- this.showCheckStatus();
- }
-
- showCheckStatus() {
- if (!this.options.checkedRowStatus) return;
- const checkedRows = this.getCheckedRows();
- const count = checkedRows.length;
- if (count > 0) {
- this.bodyRenderer.showToastMessage(`${count} row${count > 1 ? 's' : ''} selected`);
- } else {
- this.bodyRenderer.clearToastMessage();
- }
- }
-
- highlightRow(rowIndex, toggle = true) {
- const $row = this.getRow$(rowIndex);
- if (!$row) return;
-
- if (!toggle && this.bodyScrollable.classList.contains('dt-scrollable--highlight-all')) {
- $row.classList.add('dt-row--unhighlight');
- return;
- }
-
- if (toggle && $row.classList.contains('dt-row--unhighlight')) {
- $row.classList.remove('dt-row--unhighlight');
- }
-
- this._highlightedRows = this._highlightedRows || {};
-
- if (toggle) {
- $row.classList.add('dt-row--highlight');
- this._highlightedRows[rowIndex] = $row;
- } else {
- $row.classList.remove('dt-row--highlight');
- delete this._highlightedRows[rowIndex];
- }
- }
-
- highlightAll(toggle = true) {
- if (toggle) {
- this.bodyScrollable.classList.add('dt-scrollable--highlight-all');
- } else {
- this.bodyScrollable.classList.remove('dt-scrollable--highlight-all');
- for (const rowIndex in this._highlightedRows) {
- const $row = this._highlightedRows[rowIndex];
- $row.classList.remove('dt-row--highlight');
- }
- this._highlightedRows = {};
- }
- }
-
- hideRows(rowIndices) {
- rowIndices = ensureArray(rowIndices);
- rowIndices.map(rowIndex => {
- const $tr = this.getRow$(rowIndex);
- $tr.classList.add('dt-row--hide');
- });
- }
-
- showRows(rowIndices) {
- rowIndices = ensureArray(rowIndices);
- rowIndices.map(rowIndex => {
- const $tr = this.getRow$(rowIndex);
- $tr.classList.remove('dt-row--hide');
- });
- }
-
- openSingleNode(rowIndex) {
- const rowsToShow = this.datamanager.getImmediateChildren(rowIndex);
- this.showRows(rowsToShow);
- this.cellmanager.toggleTreeButton(rowIndex, true);
- }
-
- closeSingleNode(rowIndex) {
- const children = this.datamanager.getImmediateChildren(rowIndex);
- children.forEach(childIndex => {
- const row = this.datamanager.getRow(childIndex);
- if (row.meta.isLeaf) {
- // close
- this.hideRows(childIndex);
- this.cellmanager.toggleTreeButton(childIndex, false);
- } else {
- this.closeSingleNode(childIndex);
- this.hideRows(childIndex);
- }
- });
- this.cellmanager.toggleTreeButton(rowIndex, false);
- }
-
- getRow$(rowIndex) {
- return $(this.selector(rowIndex), this.bodyScrollable);
- }
-
- getTotalRows() {
- return this.datamanager.getRowCount();
- }
-
- getFirstRowIndex() {
- return 0;
- }
-
- getLastRowIndex() {
- return this.datamanager.getRowCount() - 1;
- }
-
- scrollToRow(rowIndex) {
- rowIndex = +rowIndex;
- this._lastScrollTo = this._lastScrollTo || 0;
- const $row = this.getRow$(rowIndex);
- if ($.inViewport($row, this.bodyScrollable)) return;
-
- const {
- height
- } = $row.getBoundingClientRect();
- const {
- top,
- bottom
- } = this.bodyScrollable.getBoundingClientRect();
- const rowsInView = Math.floor((bottom - top) / height);
-
- let offset = 0;
- if (rowIndex > this._lastScrollTo) {
- offset = height * ((rowIndex + 1) - rowsInView);
- } else {
- offset = height * ((rowIndex + 1) - 1);
- }
-
- this._lastScrollTo = rowIndex;
- $.scrollTop(this.bodyScrollable, offset);
- }
-
- getRowHTML(row, props) {
- const dataAttr = makeDataAttributeString(props);
-
- if (props.isFilter) {
- row = row.map(cell => (Object.assign({}, cell, {
- content: this.getFilterInput({
- colIndex: cell.colIndex
- }),
- isFilter: 1,
- isHeader: undefined,
- editable: false
- })));
- }
-
- return `
-
- ${row.map(cell => this.cellmanager.getCellHTML(cell)).join('')}
-
- `;
- }
-
- getFilterInput(props) {
- const dataAttr = makeDataAttributeString(props);
- return ``;
- }
-
- selector(rowIndex) {
- return `.dt-row[data-row-index="${rowIndex}"]`;
- }
- }
-
- class BodyRenderer {
- constructor(instance) {
- this.instance = instance;
- this.options = instance.options;
- this.datamanager = instance.datamanager;
- this.rowmanager = instance.rowmanager;
- this.cellmanager = instance.cellmanager;
- this.bodyScrollable = instance.bodyScrollable;
- this.log = instance.log;
- this.appendRemainingData = nextTick(this.appendRemainingData, this);
- }
-
- render() {
- if (this.options.clusterize) {
- this.renderBodyWithClusterize();
- } else {
- this.renderBodyHTML();
- }
- }
-
- renderBodyHTML() {
- const rows = this.datamanager.getRowsForView();
-
- this.bodyScrollable.innerHTML = this.getBodyHTML(rows);
- this.instance.setDimensions();
- this.restoreState();
- }
-
- renderBodyWithClusterize() {
- // first page
- const rows = this.datamanager.getRowsForView(0, 20);
- let initialData = this.getDataForClusterize(rows);
-
- if (initialData.length === 0) {
- initialData = [this.getNoDataHTML()];
- }
-
- if (!this.clusterize) {
- // empty body
- this.bodyScrollable.innerHTML = this.getBodyHTML([]);
-
- // first 20 rows will appended
- // rest of them in nextTick
- this.clusterize = new Clusterize({
- rows: initialData,
- scrollElem: this.bodyScrollable,
- contentElem: $('tbody', this.bodyScrollable),
- callbacks: {
- clusterChanged: () => this.restoreState()
- },
- /* eslint-disable */
- show_no_data_row: false,
- /* eslint-enable */
- });
-
- // setDimensions requires atleast 1 row to exist in dom
- this.instance.setDimensions();
- } else {
- this.clusterize.update(initialData);
- }
-
- this.appendRemainingData();
- }
-
- restoreState() {
- this.rowmanager.highlightCheckedRows();
- this.cellmanager.selectAreaOnClusterChanged();
- this.cellmanager.focusCellOnClusterChanged();
- }
-
- appendRemainingData() {
- const rows = this.datamanager.getRowsForView(20);
- const data = this.getDataForClusterize(rows);
- this.clusterize.append(data);
- }
-
- showToastMessage(message, hideAfter) {
- this.instance.toastMessage.innerHTML = this.getToastMessageHTML(message);
-
- if (hideAfter) {
- setTimeout(() => {
- this.clearToastMessage();
- }, hideAfter * 1000);
- }
- }
-
- clearToastMessage() {
- this.instance.toastMessage.innerHTML = '';
- }
-
- getDataForClusterize(rows) {
- return rows.map(row => this.rowmanager.getRowHTML(row, row.meta));
- }
-
- getBodyHTML(rows) {
- return `
-
-
- ${rows.map(row => this.rowmanager.getRowHTML(row, row.meta)).join('')}
-
-
- `;
- }
-
- getNoDataHTML() {
- return `${this.options.noDataMessage}
`;
- }
-
- getToastMessageHTML(message) {
- return `${message}`;
- }
- }
-
- class Style {
- constructor(instance) {
- this.instance = instance;
-
- linkProperties(this, this.instance, [
- 'options', 'datamanager', 'columnmanager',
- 'header', 'bodyScrollable', 'datatableWrapper',
- 'getColumn'
- ]);
-
- this.scopeClass = 'dt-instance-' + instance.constructor.instances;
- instance.datatableWrapper.classList.add(this.scopeClass);
-
- const styleEl = document.createElement('style');
- instance.wrapper.insertBefore(styleEl, instance.datatableWrapper);
- this.styleEl = styleEl;
-
- this.bindResizeWindow();
- }
-
- get stylesheet() {
- return this.styleEl.sheet;
- }
-
- bindResizeWindow() {
- if (this.options.layout === 'fluid') {
- $.on(window, 'resize', throttle$1(() => {
- this.distributeRemainingWidth();
- this.refreshColumnWidth();
- this.compensateScrollbarWidth();
- this.setBodyStyle();
- }, 300));
- }
- }
-
- destroy() {
- this.styleEl.remove();
- }
-
- setStyle(selector, styleObject) {
- if (selector.includes(',')) {
- selector.split(',')
- .map(s => s.trim())
- .forEach(selector => {
- this.setStyle(selector, styleObject);
- });
- return;
- }
-
- this._styleRulesMap = this._styleRulesMap || {};
- const prefixedSelector = this._getPrefixedSelector(selector);
-
- if (this._styleRulesMap[prefixedSelector]) {
- // find and remove
- const index = Array.from(this.stylesheet.cssRules)
- .findIndex(rule => rule.selectorText === prefixedSelector);
- this.stylesheet.deleteRule(index);
-
- // merge with old styleobject
- styleObject = Object.assign({}, this._styleRulesMap[prefixedSelector], styleObject);
- }
-
- const styleString = this._getRuleString(styleObject);
- const ruleString = `${prefixedSelector} { ${styleString} }`;
-
- this._styleRulesMap[prefixedSelector] = styleObject;
- this.stylesheet.insertRule(ruleString);
- }
-
- _getPrefixedSelector(selector) {
- return `.${this.scopeClass} ${selector}`;
- }
-
- _getRuleString(styleObject) {
- return Object.keys(styleObject)
- .map(prop => {
- let dashed = prop;
- if (!prop.includes('-')) {
- dashed = camelCaseToDash(prop);
- }
- return `${dashed}:${styleObject[prop]};`;
- })
- .join('');
- }
-
- setDimensions() {
- this.setHeaderStyle();
-
- this.setupMinWidth();
- this.setupNaturalColumnWidth();
- this.setupColumnWidth();
- this.distributeRemainingWidth();
- this.setColumnStyle();
- this.compensateScrollbarWidth();
-
- this.setDefaultCellHeight();
- this.setBodyStyle();
- }
-
- setHeaderStyle() {
- if (this.options.layout === 'fluid') {
- // setting width as 0 will ensure that the
- // header doesn't take the available space
- $.style(this.header, {
- width: 0
- });
- }
-
- $.style(this.header, {
- margin: 0
- });
- }
-
- setupMinWidth() {
- $.each('.dt-cell[data-is-header]', this.header).map(col => {
- const { colIndex } = $.data(col);
- const column = this.getColumn(colIndex);
-
- if (!column.minWidth) {
- const width = $.style($('.dt-cell__content', col), 'width');
- // only set this once
- column.minWidth = width;
- }
- });
- }
-
- setupNaturalColumnWidth() {
- if (!$('.dt-row')) return;
-
- // set initial width as naturally calculated by table's first row
- $.each('.dt-row[data-row-index="0"] .dt-cell', this.bodyScrollable).map($cell => {
- const {
- colIndex
- } = $.data($cell);
- const column = this.datamanager.getColumn(colIndex);
-
- let naturalWidth = $.style($('.dt-cell__content', $cell), 'width');
-
- if (column.id === '_rowIndex') {
- naturalWidth = this.getRowIndexColumnWidth(naturalWidth);
- column.width = naturalWidth;
- }
-
- column.naturalWidth = naturalWidth;
- });
- }
-
- setupColumnWidth() {
- if (this.options.layout === 'ratio') {
- let totalWidth = $.style(this.datatableWrapper, 'width');
-
- if (this.options.serialNoColumn) {
- const rowIndexColumn = this.datamanager.getColumnById('_rowIndex');
- totalWidth = totalWidth - rowIndexColumn.width - 1;
- }
-
- if (this.options.checkboxColumn) {
- const rowIndexColumn = this.datamanager.getColumnById('_checkbox');
- totalWidth = totalWidth - rowIndexColumn.width - 1;
- }
-
- const totalParts = this.datamanager.getColumns()
- .map(column => {
- if (column.id === '_rowIndex' || column.id === '_checkbox') {
- return 0;
- }
- if (!column.width) {
- column.width = 1;
- }
- column.ratioWidth = parseInt(column.width, 10);
- return column.ratioWidth;
- })
- .reduce((a, c) => a + c);
-
- const onePart = totalWidth / totalParts;
-
- this.datamanager.getColumns()
- .map(column => {
- if (column.id === '_rowIndex' || column.id === '_checkbox') return;
- column.width = Math.floor(onePart * column.ratioWidth) - 1;
- });
- } else {
- this.datamanager.getColumns()
- .map(column => {
- if (!column.width) {
- column.width = column.naturalWidth;
- }
- if (column.width < column.minWidth) {
- column.width = column.minWidth;
- }
- });
- }
- }
-
- compensateScrollbarWidth() {
- requestAnimationFrame(() => {
- const scrollbarWidth = $.scrollbarWidth();
- const lastCol = this.datamanager.getColumn(-1);
- const width = lastCol.width - scrollbarWidth;
- this.columnmanager.setColumnWidth(lastCol.colIndex, width);
- });
- }
-
- distributeRemainingWidth() {
- if (this.options.layout !== 'fluid') return;
-
- const wrapperWidth = $.style(this.instance.datatableWrapper, 'width');
- const headerWidth = $.style(this.header, 'width');
- const resizableColumns = this.datamanager.getColumns().filter(col => col.resizable);
- const deltaWidth = (wrapperWidth - headerWidth) / resizableColumns.length;
-
- resizableColumns.map(col => {
- const width = $.style(this.getColumnHeaderElement(col.colIndex), 'width');
- let finalWidth = Math.floor(width + deltaWidth) - 2;
-
- this.datamanager.updateColumn(col.colIndex, {
- width: finalWidth
- });
- });
- }
-
- setDefaultCellHeight() {
- if (this.options.dynamicRowHeight) return;
- if (this.__cellHeightSet) return;
- const $firstCell = $('.dt-cell[data-is-header]', this.instance.header);
- if (!$firstCell) return;
-
- const height = this.options.cellHeight || $.style($firstCell, 'height');
- if (height) {
- this.setCellHeight(height);
- this.__cellHeightSet = true;
- }
- }
-
- setCellHeight(height) {
- this.setStyle('.dt-cell__content, .dt-cell__edit', {
- height: height + 'px'
- });
- }
-
- setColumnStyle() {
- // align columns
- this.datamanager.getColumns()
- .map(column => {
- // alignment
- if (!column.align) {
- column.align = 'left';
- }
- if (!['left', 'center', 'right'].includes(column.align)) {
- column.align = 'left';
- }
- this.setStyle(`.dt-cell--col-${column.colIndex}`, {
- 'text-align': column.align
- });
-
- // width
- this.columnmanager.setColumnHeaderWidth(column.colIndex);
- this.columnmanager.setColumnWidth(column.colIndex);
- });
- this.setBodyStyle();
- }
-
- refreshColumnWidth() {
- this.datamanager.getColumns()
- .map(column => {
- this.columnmanager.setColumnHeaderWidth(column.colIndex);
- this.columnmanager.setColumnWidth(column.colIndex);
- });
- }
-
- setBodyStyle() {
- requestAnimationFrame(() => {
- const width = $.style(this.header, 'width');
-
- $.style(this.bodyScrollable, {
- width: width + 'px'
- });
-
- const $body = $('.dt-body', this.bodyScrollable);
-
- if ($body) {
- $.style($body, {
- height: '0px'
- });
- }
-
- $.style(this.bodyScrollable, {
- marginTop: $.style(this.header, 'height') + 'px'
- });
-
- $.style($('table', this.bodyScrollable), {
- margin: 0,
- width: '100%'
- });
- });
- }
-
- getColumnHeaderElement(colIndex) {
- colIndex = +colIndex;
- if (colIndex < 0) return null;
- return $(`.dt-cell[data-col-index="${colIndex}"]`, this.header);
- }
-
- getRowIndexColumnWidth(baseWidth) {
- this._rowIndexColumnWidthMap = this._rowIndexColumnWidthMap || {};
- const rowCount = this.datamanager.getRowCount();
- const digits = (rowCount + '').length;
-
- if (!this._rowIndexColumnWidthMap[digits]) {
- // add 8px for each unit
- this._rowIndexColumnWidthMap[digits] = baseWidth + ((digits - 1) * 8);
- }
-
- return this._rowIndexColumnWidthMap[digits];
- }
- }
-
- const KEYCODES = {
- 13: 'enter',
- 91: 'meta',
- 16: 'shift',
- 17: 'ctrl',
- 18: 'alt',
- 37: 'left',
- 38: 'up',
- 39: 'right',
- 40: 'down',
- 9: 'tab',
- 27: 'esc',
- 67: 'c',
- 70: 'f',
- 86: 'v'
- };
-
- class Keyboard {
- constructor(element) {
- this.listeners = {};
- $.on(element, 'keydown', this.handler.bind(this));
- }
-
- handler(e) {
- let key = KEYCODES[e.keyCode];
-
- if (e.shiftKey && key !== 'shift') {
- key = 'shift+' + key;
- }
-
- if ((e.ctrlKey && key !== 'ctrl') || (e.metaKey && key !== 'meta')) {
- key = 'ctrl+' + key;
- }
-
- const listeners = this.listeners[key];
-
- if (listeners && listeners.length > 0) {
- for (let listener of listeners) {
- const preventBubbling = listener(e);
- if (preventBubbling === undefined || preventBubbling === true) {
- e.preventDefault();
- }
- }
- }
- }
-
- on(key, listener) {
- const keys = key.split(',').map(k => k.trim());
-
- keys.map(key => {
- this.listeners[key] = this.listeners[key] || [];
- this.listeners[key].push(listener);
- });
- }
- }
-
- var DEFAULT_OPTIONS = {
- columns: [],
- data: [],
- dropdownButton: '▼',
- headerDropdown: [
- {
- label: 'Sort Ascending',
- action: function (column) {
- this.sortColumn(column.colIndex, 'asc');
- }
- },
- {
- label: 'Sort Descending',
- action: function (column) {
- this.sortColumn(column.colIndex, 'desc');
- }
- },
- {
- label: 'Reset sorting',
- action: function (column) {
- this.sortColumn(column.colIndex, 'none');
- }
- },
- {
- label: 'Remove column',
- action: function (column) {
- this.removeColumn(column.colIndex);
- }
- }
- ],
- events: {
- onRemoveColumn(column) {},
- onSwitchColumn(column1, column2) {},
- onSortColumn(column) {},
- onCheckRow(row) {}
- },
- sortIndicator: {
- asc: '↑',
- desc: '↓',
- none: ''
- },
- freezeMessage: '',
- getEditor: null,
- serialNoColumn: true,
- checkboxColumn: false,
- clusterize: true,
- logs: false,
- layout: 'fixed', // fixed, fluid, ratio
- noDataMessage: 'No Data',
- cellHeight: null,
- inlineFilters: false,
- treeView: false,
- checkedRowStatus: true,
- dynamicRowHeight: false,
- pasteFromClipboard: false
- };
-
- class DataTable {
- constructor(wrapper, options) {
- DataTable.instances++;
-
- if (typeof wrapper === 'string') {
- // css selector
- wrapper = document.querySelector(wrapper);
- }
- this.wrapper = wrapper;
- if (!(this.wrapper instanceof HTMLElement)) {
- throw new Error('Invalid argument given for `wrapper`');
- }
-
- this.buildOptions(options);
- this.prepare();
-
- this.style = new Style(this);
- this.keyboard = new Keyboard(this.wrapper);
- this.datamanager = new DataManager(this.options);
- this.rowmanager = new RowManager(this);
- this.columnmanager = new ColumnManager(this);
- this.cellmanager = new CellManager(this);
- this.bodyRenderer = new BodyRenderer(this);
-
- if (this.options.data) {
- this.refresh();
- }
- }
-
- buildOptions(options) {
- this.options = this.options || {};
-
- this.options = Object.assign(
- {}, DEFAULT_OPTIONS,
- this.options || {}, options
- );
-
- options.headerDropdown = options.headerDropdown || [];
- this.options.headerDropdown = [
- ...DEFAULT_OPTIONS.headerDropdown,
- ...options.headerDropdown
- ];
-
- // custom user events
- this.events = Object.assign(
- {}, DEFAULT_OPTIONS.events,
- this.options.events || {},
- options.events || {}
- );
- this.fireEvent = this.fireEvent.bind(this);
- }
-
- prepare() {
- this.prepareDom();
- this.unfreeze();
- }
-
- prepareDom() {
- this.wrapper.innerHTML = `
-
-
-
-
-
-
- ${this.options.freezeMessage}
-
-
-
-
-
- `;
-
- this.datatableWrapper = $('.datatable', this.wrapper);
- this.header = $('.dt-header', this.wrapper);
- this.bodyScrollable = $('.dt-scrollable', this.wrapper);
- this.freezeContainer = $('.dt-freeze', this.wrapper);
- this.toastMessage = $('.dt-toast', this.wrapper);
- this.pasteTarget = $('.dt-paste-target', this.wrapper);
- }
-
- refresh(data, columns) {
- this.datamanager.init(data, columns);
- this.render();
- this.setDimensions();
- }
-
- destroy() {
- this.wrapper.innerHTML = '';
- this.style.destroy();
- }
-
- appendRows(rows) {
- this.datamanager.appendRows(rows);
- this.rowmanager.refreshRows();
- }
-
- refreshRow(row, rowIndex) {
- this.rowmanager.refreshRow(row, rowIndex);
- }
-
- render() {
- this.renderHeader();
- this.renderBody();
- }
-
- renderHeader() {
- this.columnmanager.renderHeader();
- }
-
- renderBody() {
- this.bodyRenderer.render();
- }
-
- setDimensions() {
- this.style.setDimensions();
- }
-
- showToastMessage(message, hideAfter) {
- this.bodyRenderer.showToastMessage(message, hideAfter);
- }
-
- clearToastMessage() {
- this.bodyRenderer.clearToastMessage();
- }
-
- getColumn(colIndex) {
- return this.datamanager.getColumn(colIndex);
- }
-
- getColumns() {
- return this.datamanager.getColumns();
- }
-
- getRows() {
- return this.datamanager.getRows();
- }
-
- getCell(colIndex, rowIndex) {
- return this.datamanager.getCell(colIndex, rowIndex);
- }
-
- getColumnHeaderElement(colIndex) {
- return this.columnmanager.getColumnHeaderElement(colIndex);
- }
-
- getViewportHeight() {
- if (!this.viewportHeight) {
- this.viewportHeight = $.style(this.bodyScrollable, 'height');
- }
-
- return this.viewportHeight;
- }
-
- sortColumn(colIndex, sortOrder) {
- this.columnmanager.sortColumn(colIndex, sortOrder);
- }
-
- removeColumn(colIndex) {
- this.columnmanager.removeColumn(colIndex);
- }
-
- scrollToLastColumn() {
- this.datatableWrapper.scrollLeft = 9999;
- }
-
- freeze() {
- $.style(this.freezeContainer, {
- display: ''
- });
- }
-
- unfreeze() {
- $.style(this.freezeContainer, {
- display: 'none'
- });
- }
-
- updateOptions(options) {
- this.buildOptions(options);
- }
-
- fireEvent(eventName, ...args) {
- this.events[eventName].apply(this, args);
- }
-
- log() {
- if (this.options.logs) {
- console.log.apply(console, arguments);
- }
- }
- }
-
- DataTable.instances = 0;
-
- var name = "frappe-datatable";
- var version = "0.0.9";
- var description = "A modern datatable library for the web";
- var main = "dist/frappe-datatable.cjs.js";
- var scripts = {"start":"yarn run dev","build":"rollup -c","production":"rollup -c --production","build:docs":"rollup -c --docs","dev":"rollup -c -w","cy:server":"http-server -p 8989","cy:open":"cypress open","cy:run":"cypress run","test":"start-server-and-test cy:server http://localhost:8989 cy:run"};
- var devDependencies = {"chai":"3.5.0","cypress":"3.0.1","deepmerge":"^2.0.1","eslint-config-airbnb":"^16.1.0","eslint-config-airbnb-base":"^12.1.0","eslint-plugin-import":"^2.11.0","http-server":"^0.11.1","mocha":"3.3.0","postcss-cssnext":"^3.1.0","postcss-nested":"^3.0.0","rollup":"^0.59.4","rollup-plugin-commonjs":"^8.3.0","rollup-plugin-eslint":"^4.0.0","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.3","rollup-plugin-postcss":"^1.2.8","rollup-plugin-uglify-es":"^0.0.1","start-server-and-test":"^1.4.1"};
- var repository = {"type":"git","url":"https://github.com/frappe/datatable.git"};
- var keywords = ["datatable","data","grid","table"];
- var author = "Faris Ansari";
- var license = "MIT";
- var bugs = {"url":"https://github.com/frappe/datatable/issues"};
- var homepage = "https://frappe.github.io/datatable";
- var dependencies = {"clusterize.js":"^0.18.0","lodash":"^4.17.5","sortablejs":"^1.7.0"};
- var packageJson = {
- name: name,
- version: version,
- description: description,
- main: main,
- scripts: scripts,
- devDependencies: devDependencies,
- repository: repository,
- keywords: keywords,
- author: author,
- license: license,
- bugs: bugs,
- homepage: homepage,
- dependencies: dependencies
- };
-
- DataTable.__version__ = packageJson.version;
-
- return DataTable;
-
-}(Sortable,Clusterize));
diff --git a/dist/frappe-datatable.min.css b/dist/frappe-datatable.min.css
deleted file mode 100644
index acf2da2..0000000
--- a/dist/frappe-datatable.min.css
+++ /dev/null
@@ -1 +0,0 @@
-.datatable *,.datatable :after,.datatable :before{-webkit-box-sizing:border-box;box-sizing:border-box}.datatable{position:relative;overflow:auto}.dt-header{border-bottom:1px solid #d1d8dd;position:absolute;top:0;left:0;background-color:#fff}.dt-body,.dt-header{border-collapse:collapse}.dt-scrollable{max-height:40vw;overflow:auto;border-bottom:1px solid #d1d8dd}.dt-scrollable--highlight-all{background-color:#fffce7}.dt-scrollable__no-data{text-align:center;padding:16px;padding:1rem;border-left:1px solid #d1d8dd;border-right:1px solid #d1d8dd}.dt-row--highlight{background-color:#fffce7}.dt-row--unhighlight{background-color:#fff}.dt-row--hide{display:none}.dt-cell{border:1px solid #d1d8dd;position:relative;outline:none;padding:0}.dt-cell__content{border:2px solid transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.dt-cell__content,.dt-cell__edit{padding:8px;padding:.5rem;height:100%}.dt-cell__edit{display:none;background-color:#fff;border:2px solid #ffa00a;z-index:1}.dt-cell__resize-handle{opacity:0;position:absolute;right:-3px;top:0;width:5px;height:100%;cursor:col-resize;z-index:1}.dt-cell--editing .dt-cell__content{display:none}.dt-cell--editing .dt-cell__edit{display:block}.dt-cell--focus .dt-cell__content{border-color:#5292f7}.dt-cell--dragging,.dt-cell--highlight{background-color:#f5f7fa}.dt-cell--header .dt-cell__content{padding-right:16px;padding-right:1rem;font-weight:700}.dt-cell--header:hover .dt-dropdown__toggle{opacity:1}.dt-cell--tree-close .dt-tree-node__toggle:before{content:"►"}.dt-dropdown{position:absolute;right:10px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;vertical-align:top;text-align:left;font-weight:400;cursor:pointer}.dt-dropdown__toggle{opacity:0}.dt-dropdown__list{display:none;position:absolute;min-width:128px;min-width:8rem;top:100%;right:0;z-index:1;background-color:#fff;border-radius:3px;padding:8px 0;padding:.5rem 0;-webkit-box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1)}.dt-dropdown__list-item{padding:8px 16px;padding:.5rem 1rem}.dt-dropdown__list-item:hover{background-color:#f5f7fa}.dt-dropdown--active .dt-dropdown__list{display:block}.dt-tree-node{display:inline-block;position:relative}.dt-tree-node__toggle{display:inline-block;position:absolute;font-size:10px;padding:0 4px;cursor:pointer}.dt-tree-node__toggle:before{content:"▼"}.dt-toast{position:absolute;bottom:16px;bottom:1rem;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.dt-toast__message{display:inline-block;background-color:rgba(0,0,0,.8);color:#dfe2e5;border-radius:3px;padding:8px 16px;padding:.5rem 1rem}.dt-input{outline:none;width:100%;border:none;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;padding:0}.dt-freeze{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-line-pack:center;align-content:center;position:absolute;left:0;right:0;top:0;bottom:0;background-color:#f5f7fa;opacity:.5;font-size:2em}.dt-freeze__message{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.dt-paste-target{position:fixed;left:-999em}body.dt-resize{cursor:col-resize}
\ No newline at end of file
diff --git a/dist/frappe-datatable.min.js b/dist/frappe-datatable.min.js
deleted file mode 100644
index e6502a9..0000000
--- a/dist/frappe-datatable.min.js
+++ /dev/null
@@ -1 +0,0 @@
-var DataTable=function(t,e){"use strict";function n(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function i(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function o(t){var e=M.call(t,H),n=t[H];try{t[H]=void 0}catch(t){}var i=k.call(t);return e?t[H]=n:delete t[H],i}function s(t){return j.call(t)}function r(t){return null==t?void 0===t?A:O:F&&F in Object(t)?L(t):W(t)}function l(t){return null!=t&&"object"==typeof t}function c(t){return"symbol"==typeof t||B(t)&&z(t)==D}function a(t){if("number"==typeof t)return t;if(N(t))return V;if(v(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=v(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(q,"");var n=K.test(t);return n||X.test(t)?U(t.slice(2),n?2:8):P.test(t)?V:+t}function h(t,e,n){function i(e){var n=d,i=f;return d=f=void 0,b=e,m=t.apply(i,n)}function o(t){return b=t,p=setTimeout(l,e),C?i(t):m}function s(t){var n=t-b,i=e-(t-w);return y?Q(i,g-n):i}function r(t){var n=t-w,i=t-b;return void 0===w||n>=e||n<0||y&&i>=g}function l(){var t=$();if(r(t))return c(t);p=setTimeout(l,s(t))}function c(t){return p=void 0,x&&d?i(t):(d=f=void 0,m)}function a(){void 0!==p&&clearTimeout(p),b=0,d=w=f=p=void 0}function h(){return void 0===p?m:c($())}function u(){var t=$(),n=r(t);if(d=arguments,f=this,w=t,n){if(void 0===p)return o(w);if(y)return p=setTimeout(l,e),i(w)}return void 0===p&&(p=setTimeout(l,e)),m}var d,f,g,m,p,w,b=0,C=!1,y=!1,x=!0;if("function"!=typeof t)throw new TypeError(G);return e=Z(e)||0,v(n)&&(C=!!n.leading,g=(y="maxWait"in n)?J(Z(n.maxWait)||0,e):g,x="trailing"in n?!!n.trailing:x),u.cancel=a,u.flush=h,u}function u(t,e,n){var i=!0,o=!0;if("function"!=typeof t)throw new TypeError(tt);return v(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),Y(t,e,{leading:i,maxWait:e,trailing:o})}function d(t){return t.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`)}function f(t){return Object.keys(t).map(e=>{const n=d(e);const i=t[e];if(void 0===i)return"";return`data-${n}="${i}" `}).join("").trim()}function g(t){var e=document.createElement("textarea");e.style.position="fixed",e.style.top=0,e.style.left=0,e.style.width="2em",e.style.height="2em",e.style.padding=0,e.style.border="none",e.style.outline="none",e.style.boxShadow="none",e.style.background="transparent",e.value=t,document.body.appendChild(e),e.select();try{document.execCommand("copy")}catch(t){console.log("Oops, unable to copy")}document.body.removeChild(e)}function m(t){return!isNaN(t)}function p(t,e=null){return(...n)=>new Promise(i=>{const o=()=>{const o=t.apply(e,n);i(o)};setTimeout(o)})}function w(t,e,n){const i=n.reduce((t,n)=>{t[n]={get(){return e[n]}};return t},{});Object.defineProperties(t,i)}function b(t){return void 0!==t||null!==t}function C(t){return!b(t)}function y(t){return!isNaN(t)}function x(t){return Array.isArray(t)?t:[t]}t=t&&t.hasOwnProperty("default")?t.default:t,e=e&&e.hasOwnProperty("default")?e.default:e,n.each=((t,e)=>"string"==typeof t?Array.from((e||document).querySelectorAll(t)):t||null),n.create=((t,e)=>{let i=document.createElement(t);for(let t in e){let o=e[t];if("inside"===t)n(o).appendChild(i);else if("around"===t){let t=n(o);t.parentNode.insertBefore(i,t),i.appendChild(t)}else"styles"===t?"object"==typeof o&&Object.keys(o).map(t=>{i.style[t]=o[t]}):t in i?i[t]=o:i.setAttribute(t,o)}return i}),n.on=((t,e,i,o)=>{o?n.delegate(t,e,i,o):(o=i,n.bind(t,e,o))}),n.off=((t,e,n)=>{t.removeEventListener(e,n)}),n.bind=((t,e,n)=>{e.split(/\s+/).forEach(function(e){t.addEventListener(e,n)})}),n.delegate=((t,e,n,i)=>{t.addEventListener(e,function(t){const e=t.target.closest(n);e&&(t.delegatedTarget=e,i.call(this,t,e))})}),n.unbind=((t,e)=>{if(t)for(let n in e){let i=e[n];n.split(/\s+/).forEach(function(e){t.removeEventListener(e,i)})}}),n.fire=((t,e,n)=>{let i=document.createEvent("HTMLEvents");i.initEvent(e,!0,!0);for(let t in n)i[t]=n[t];return t.dispatchEvent(i)}),n.data=((t,e)=>{if(!e)return t.dataset;for(const n in e)t.dataset[n]=e[n]}),n.style=((t,e)=>{if("string"==typeof e)return n.getStyle(t,e);Array.isArray(t)||(t=[t]);t.map(t=>{for(const n in e)t.style[n]=e[n]})}),n.removeStyle=((t,e)=>{Array.isArray(t)||(t=[t]);Array.isArray(e)||(e=[e]);t.map(t=>{for(const n of e)t.style[n]=""})}),n.getStyle=((t,e)=>{let n=getComputedStyle(t)[e];["width","height"].includes(e)&&(n=parseFloat(n));return n}),n.closest=((t,e)=>{if(!e)return null;if(e.matches(t))return e;return n.closest(t,e.parentNode)}),n.inViewport=((t,e)=>{const{top:top,left:left,bottom:bottom,right:right}=t.getBoundingClientRect();const{top:pTop,left:pLeft,bottom:pBottom,right:pRight}=e.getBoundingClientRect();return top>=pTop&&left>=pLeft&&bottom<=pBottom&&right<=pRight}),n.scrollTop=function(t,e){requestAnimationFrame(()=>{t.scrollTop=e})},n.scrollbarWidth=function(){const t=document.createElement("div");n.style(t,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(t);const e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e};var v=i,I="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},R="object"==typeof I&&I&&I.Object===Object&&I,S="object"==typeof self&&self&&self.Object===Object&&self,_=R||S||Function("return this")(),$=function(){return _.Date.now()},T=_.Symbol,E=Object.prototype,M=E.hasOwnProperty,k=E.toString,H=T?T.toStringTag:void 0,L=o,j=Object.prototype.toString,W=s,O="[object Null]",A="[object Undefined]",F=T?T.toStringTag:void 0,z=r,B=l,D="[object Symbol]",N=c,V=NaN,q=/^\s+|\s+$/g,P=/^[-+]0x[0-9a-f]+$/i,K=/^0b[01]+$/i,X=/^0o[0-7]+$/i,U=parseInt,Z=a,G="Expected a function",J=Math.max,Q=Math.min,Y=h,tt="Expected a function";let et=u,nt=Y;class it{constructor(t){this.options=t,this.sortRows=p(this.sortRows,this),this.switchColumn=p(this.switchColumn,this),this.removeColumn=p(this.removeColumn,this),this.filterRows=p(this.filterRows,this)}init(t,e){t||(t=this.options.data),e&&(this.options.columns=e),this.data=t,this.rowCount=0,this.columns=[],this.rows=[],this.prepareColumns(),this.prepareRows(),this.prepareTreeRows(),this.prepareRowView(),this.prepareNumericColumns()}get currentSort(){return this.columns.find(t=>"none"!==t.sortOrder)||{colIndex:-1,sortOrder:"none"}}prepareColumns(){this.columns=[],this.validateColumns(),this.prepareDefaultColumns(),this.prepareHeader()}prepareDefaultColumns(){if(this.options.checkboxColumn&&!this.hasColumnById("_checkbox")){const t={id:"_checkbox",content:this.getCheckboxHTML(),editable:!1,resizable:!1,sortable:!1,focusable:!1,dropdown:!1,width:32};this.columns.push(t)}if(this.options.serialNoColumn&&!this.hasColumnById("_rowIndex")){let t={id:"_rowIndex",content:"",align:"center",editable:!1,resizable:!1,focusable:!1,dropdown:!1};this.columns.push(t)}}prepareHeader(){let t=this.columns.concat(this.options.columns);const e={isHeader:1,editable:!0,sortable:!0,resizable:!0,focusable:!0,dropdown:!0,width:null,format:t=>{if(null===t||void 0===t)return"";return t+""}};this.columns=t.map((t,e)=>this.prepareCell(t,e)).map(t=>Object.assign({},e,t)).map(t=>{t.content=t.content||t.name||"";t.id=t.id||t.content;return t})}prepareCell(t,e){const n={content:"",sortOrder:"none",colIndex:e,column:this.columns[e]};return null!==t&&"object"==typeof t?Object.assign(n,t):n.content=t,n}prepareNumericColumns(){const t=this.getRow(0);t&&(this.columns=this.columns.map((e,n)=>{const i=t[n].content;!e.align&&m(i)&&(e.align="right");return e}))}prepareRows(){this.validateData(this.data),this.rows=this.data.map((t,e)=>{const n=this._getNextRowCount();let i=[];let o={rowIndex:n};if(Array.isArray(t))for(this.options.checkboxColumn&&i.push(this.getCheckboxHTML()),this.options.serialNoColumn&&i.push(n+1+""),i=i.concat(t);i.length{if(y(t.meta.indent)){const n=this.getRow(e+1);t.meta.isLeaf=!n||C(n.meta.indent)||n.meta.indent<=t.meta.indent}})}prepareRowView(){this.rowViewOrder=this.rows.map(t=>t.meta.rowIndex)}prepareRow(t,e){const n={rowIndex:e.rowIndex,indent:e.indent};return t=t.map((t,e)=>this.prepareCell(t,e)).map(t=>Object.assign({},n,t)),t.meta=e,t}validateColumns(){const t=this.options.columns;if(!Array.isArray(t))throw new ot("`columns` must be an array");t.forEach((t,e)=>{if("string"!=typeof t&&"object"!=typeof t)throw new ot(`column "${e}" must be a string or an object`)})}validateData(t){if(Array.isArray(t)&&(0===t.length||Array.isArray(t[0])||"object"==typeof t[0]))return!0;throw new ot("`data` must be an array of arrays or objects")}appendRows(t){this.validateData(t),this.rows.push(...this.prepareRows(t))}sortRows(t,e="none"){t=+t,this.getColumns().map(n=>{n.colIndex===t?n.sortOrder=e:n.sortOrder="none"}),this._sortRows(t,e)}_sortRows(t,e){if(this.currentSort.colIndex===t&&("asc"===this.currentSort.sortOrder&&"desc"===e||"desc"===this.currentSort.sortOrder&&"asc"===e))return this.reverseArray(this.rowViewOrder),void(this.currentSort.sortOrder=e);if(this.rowViewOrder.sort((n,i)=>{const o=n;const s=i;const r=this.getCell(t,n).content;const l=this.getCell(t,i).content;if("none"===e)return o-s;if("asc"===e){if(rl)return 1;if(r===l)return 0}else if("desc"===e){if(rl)return-1;if(r===l)return 0}return 0}),this.hasColumnById("_rowIndex")){const t=this.getColumnIndexById("_rowIndex");this.rows.forEach((e,n)=>{const i=this.rowViewOrder.indexOf(n);const o=e[t];o.content=i+1+""})}}reverseArray(t){let e=null,n=null;for(e=0,n=t.length-1;e{const i=Object.assign({},n[t],{colIndex:e});const o=Object.assign({},n[e],{colIndex:t});n[e]=i;n[t]=o})}removeColumn(t){t=+t;const e=e=>e.colIndex!==t,n=(t,e)=>Object.assign({},t,{colIndex:e});this.columns=this.columns.filter(e).map(n),this.rows.forEach(e=>{e.splice(t,1);e.forEach((t,e)=>{t.colIndex=e})})}updateRow(t,e){if(t.lengtht[0].rowIndex===e);return this.rows[i]=n,n}updateCell(t,e,n){let i;"object"==typeof t&&(t=(i=t).colIndex,e=i.rowIndex,n=i),i=this.getCell(t,e);for(let t in n){const e=n[t];void 0!==e&&(i[t]=e)}return i}updateColumn(t,e){const n=this.getColumn(t);for(let t in e){const i=e[t];void 0!==i&&(n[t]=i)}return n}filterRows(t,e){let n=[],i=[];return this.rows.map(t=>t[e]).forEach(e=>{const o=String(e.content||"").toLowerCase();const s=(t||"").toLowerCase();!s||o.includes(s)?i.push(e.rowIndex):n.push(e.rowIndex)}),this._filteredRows=i,{rowsToHide:n,rowsToShow:i}}getFilteredRowIndices(){return this._filteredRows||this.rows.map(t=>t.meta.rowIndex)}getRowCount(){return this.rowCount}_getNextRowCount(){const t=this.rowCount;return this.rowCount++,t}getRows(t,e){return this.rows.slice(t,e)}getRowsForView(t,e){return this.rowViewOrder.map(t=>this.rows[t]).slice(t,e)}getColumns(t){let e=this.columns;return t&&(e=e.slice(this.getStandardColumnCount())),e}getStandardColumnCount(){return this.options.checkboxColumn&&this.options.serialNoColumn?2:this.options.checkboxColumn||this.options.serialNoColumn?1:0}getColumnCount(t){let e=this.columns.length;return t&&(e-=this.getStandardColumnCount()),e}getColumn(t){return(t=+t)<0&&(t=this.columns.length+t),this.columns.find(e=>e.colIndex===t)}getColumnById(t){return this.columns.find(e=>e.id===t)}getRow(t){return t=+t,this.rows[t]}getCell(t,e){return e=+e,t=+t,this.getRow(e)[t]}getChildren(t){t=+t;const e=this.getRow(t).meta.indent,n=[];for(let i=t+1;ie&&n.push(i),t.meta.indent===e))break}return n}getImmediateChildren(t){t=+t;const e=this.getRow(t).meta.indent,n=[],i=e+1;for(let o=t+1;oi)&&(t.meta.indent===i&&n.push(o),t.meta.indent===e))break}return n}get(){return{columns:this.columns,rows:this.rows}}getData(t){return this.data[t]}hasColumn(t){return Boolean(this.columns.find(e=>e.content===t))}hasColumnById(t){return Boolean(this.columns.find(e=>e.id===t))}getColumnIndex(t){return this.columns.findIndex(e=>e.content===t)}getColumnIndexById(t){return this.columns.findIndex(e=>e.id===t)}getCheckboxHTML(){return''}}class ot extends TypeError{}class st{constructor(t){this.instance=t,w(this,this.instance,["wrapper","options","style","bodyScrollable","columnmanager","rowmanager","datamanager","keyboard"]),this.bindEvents()}bindEvents(){this.bindFocusCell(),this.bindEditCell(),this.bindKeyboardSelection(),this.bindCopyCellContents(),this.bindMouseEvents(),this.bindTreeEvents()}bindFocusCell(){this.bindKeyboardNav()}bindEditCell(){this.$editingCell=null,n.on(this.bodyScrollable,"dblclick",".dt-cell",(t,e)=>{this.activateEditing(e)}),this.keyboard.on("enter",()=>{this.$focusedCell&&!this.$editingCell?this.activateEditing(this.$focusedCell):this.$editingCell&&(this.submitEditing(),this.deactivateEditing())})}bindKeyboardNav(){const t=t=>{if(!this.$focusedCell||this.$editingCell)return!1;let e=this.$focusedCell;"left"===t||"shift+tab"===t?e=this.getLeftCell$(e):"right"===t||"tab"===t?e=this.getRightCell$(e):"up"===t?e=this.getAboveCell$(e):"down"===t&&(e=this.getBelowCell$(e));this.focusCell(e);return!0},e=t=>{if(!this.$focusedCell||this.$editingCell)return!1;let e=this.$focusedCell;const{rowIndex:rowIndex,colIndex:colIndex}=n.data(e);"left"===t?e=this.getLeftMostCell$(rowIndex):"right"===t?e=this.getRightMostCell$(rowIndex):"up"===t?e=this.getTopMostCell$(colIndex):"down"===t&&(e=this.getBottomMostCell$(colIndex));this.focusCell(e);return!0};["left","right","up","down","tab","shift+tab"].map(e=>this.keyboard.on(e,()=>t(e))),["left","right","up","down"].map(t=>this.keyboard.on(`ctrl+${t}`,()=>e(t))),this.keyboard.on("esc",()=>{this.deactivateEditing();this.columnmanager.toggleFilter(!1)}),this.options.inlineFilters&&this.keyboard.on("ctrl+f",t=>{const e=n.closest(".dt-cell",t.target);const{colIndex:colIndex}=n.data(e);this.activateFilter(colIndex);return!0})}bindKeyboardSelection(){const t=t=>{let e=this.getSelectionCursor();"left"===t?e=this.getLeftCell$(e):"right"===t?e=this.getRightCell$(e):"up"===t?e=this.getAboveCell$(e):"down"===t&&(e=this.getBelowCell$(e));return e};["left","right","up","down"].map(e=>this.keyboard.on(`shift+${e}`,()=>this.selectArea(t(e))))}bindCopyCellContents(){this.keyboard.on("ctrl+c",()=>{const t=this.copyCellContents(this.$focusedCell,this.$selectionCursor);const e=`${t} cell${t>1?"s":""} copied`;t&&this.instance.showToastMessage(e,2)}),this.options.pasteFromClipboard&&this.keyboard.on("ctrl+v",t=>{this.instance.pasteTarget.focus();setTimeout(()=>{const t=this.instance.pasteTarget.value;this.instance.pasteTarget.value="";this.pasteContentInCell(t)},10);return!1})}bindMouseEvents(){let t=null;n.on(this.bodyScrollable,"mousedown",".dt-cell",e=>{t=!0;this.focusCell(n(e.delegatedTarget))}),n.on(this.bodyScrollable,"mouseup",()=>{t=!1});const e=e=>{if(!t)return;this.selectArea(n(e.delegatedTarget))};n.on(this.bodyScrollable,"mousemove",".dt-cell",et(e,50))}bindTreeEvents(){n.on(this.bodyScrollable,"click",".dt-tree-node__toggle",(t,e)=>{const i=n.closest(".dt-cell",e);const{rowIndex:rowIndex}=n.data(i);i.classList.contains("dt-cell--tree-close")?this.rowmanager.openSingleNode(rowIndex):this.rowmanager.closeSingleNode(rowIndex)})}focusCell(t,{skipClearSelection:skipClearSelection=0}={}){if(t&&t!==this.$editingCell){const{colIndex:colIndex,isHeader:isHeader}=n.data(t);isHeader||!1!==this.columnmanager.getColumn(colIndex).focusable&&(this.scrollToCell(t),this.deactivateEditing(),skipClearSelection||this.clearSelection(),this.$focusedCell&&this.$focusedCell.classList.remove("dt-cell--focus"),this.$focusedCell=t,t.classList.add("dt-cell--focus"),t.focus(),this.highlightRowColumnHeader(t))}}highlightRowColumnHeader(t){const{colIndex:colIndex,rowIndex:rowIndex}=n.data(t),e=`.dt-cell--header-${colIndex}`,i=`.dt-cell--${this.datamanager.getColumnIndexById("_rowIndex")}-${rowIndex}`;this.lastHeaders&&this.lastHeaders.forEach(t=>t.classList.remove("dt-cell--highlight"));const o=n(e,this.wrapper),s=n(i,this.wrapper);this.lastHeaders=[o,s],this.lastHeaders.forEach(t=>t.classList.add("dt-cell--highlight"))}selectAreaOnClusterChanged(){if(this.$focusedCell&&this.$selectionCursor){const{colIndex:colIndex,rowIndex:rowIndex}=n.data(this.$selectionCursor),t=this.getCell$(colIndex,rowIndex);if(t&&t!==this.$selectionCursor){const e=n.data(this.$focusedCell);this.$focusedCell=this.getCell$(e.colIndex,e.rowIndex),this.selectArea(t)}}}focusCellOnClusterChanged(){if(this.$focusedCell){const{colIndex:colIndex,rowIndex:rowIndex}=n.data(this.$focusedCell),t=this.getCell$(colIndex,rowIndex);t&&this.focusCell(t,{skipClearSelection:1})}}selectArea(t){this.$focusedCell&&this._selectArea(this.$focusedCell,t)&&(this.$selectionCursor=t)}_selectArea(t,e){if(t===e)return!1;const n=this.getCellsInRange(t,e);return!!n&&(this.clearSelection(),this._selectedCells=n.map(t=>this.getCell$(...t)),requestAnimationFrame(()=>{this._selectedCells.map(t=>t.classList.add("dt-cell--highlight"))}),!0)}getCellsInRange(t,e){let i,o,s,r;if("number"==typeof t)[i,o,s,r]=arguments;else if("object"==typeof t){if(!t||!e)return!1;const l=n.data(t),c=n.data(e);i=+l.colIndex,o=+l.rowIndex,s=+c.colIndex,r=+c.rowIndex}if(o>r&&([o,r]=[r,o]),i>s&&([i,s]=[s,i]),this.isStandardCell(i)||this.isStandardCell(s))return!1;const l=[];let c=i,a=o;const h=[];for(;a<=r;)h.push(a),a+=1;return h.map(t=>{for(;c<=s;)l.push([c,t]),c++;c=i}),l}clearSelection(){(this._selectedCells||[]).forEach(t=>t.classList.remove("dt-cell--highlight")),this._selectedCells=[],this.$selectionCursor=null}getSelectionCursor(){return this.$selectionCursor||this.$focusedCell}activateEditing(t){this.focusCell(t);const{rowIndex:rowIndex,colIndex:colIndex}=n.data(t),e=this.columnmanager.getColumn(colIndex);if(!e||!1!==e.editable&&!1!==e.focusable){const i=this.getCell(colIndex,rowIndex);if(!i||!1!==i.editable){if(this.$editingCell){const{_rowIndex:_rowIndex,_colIndex:_colIndex}=n.data(this.$editingCell);if(rowIndex===_rowIndex&&colIndex===_colIndex)return}this.$editingCell=t,t.classList.add("dt-cell--editing");const o=n(".dt-cell__edit",t);o.innerHTML="";const s=this.getEditor(colIndex,rowIndex,i.content,o);s&&(this.currentCellEditor=s,s.initValue(i.content,rowIndex,e))}}}deactivateEditing(){this.$focusedCell&&this.$focusedCell.focus(),this.$editingCell&&(this.$editingCell.classList.remove("dt-cell--editing"),this.$editingCell=null)}getEditor(t,e,n,i){const o=this.datamanager.getColumn(t),s=this.datamanager.getRow(e),r=this.datamanager.getData(e);let l=this.options.getEditor?this.options.getEditor(t,e,n,i,o,s,r):this.getDefaultEditor(i);return!1!==l&&(void 0===l&&(l=this.getDefaultEditor(i)),l)}getDefaultEditor(t){const e=n.create("input",{class:"dt-input",type:"text",inside:t});return{initValue(t){e.focus(),e.value=t},getValue(){return e.value},setValue(t){e.value=t}}}submitEditing(){if(this.$editingCell){const t=this.$editingCell,{rowIndex:rowIndex,colIndex:colIndex}=n.data(t),e=this.datamanager.getColumn(colIndex);if(t){const n=this.currentCellEditor;if(n){let i=n.getValue();i.then||(i=Promise.resolve(i)),i.then(i=>{const o=n.setValue(i,rowIndex,e);const s=this.getCell(colIndex,rowIndex).content;this.updateCell(colIndex,rowIndex,i);t.focus();o&&o.then&&o.catch(t=>{console.log(t);this.updateCell(colIndex,rowIndex,s)})})}}this.currentCellEditor=null}}copyCellContents(t,e){if(!e&&t){const{colIndex:colIndex,rowIndex:rowIndex}=n.data(t),e=this.getCell(colIndex,rowIndex);return g(e.content),1}const i=this.getCellsInRange(t,e);if(!i)return 0;const o=i.map(t=>this.getCell(...t)).reduce((t,e)=>{const n=e.rowIndex;t[n]=t[n]||[];t[n].push(e.content);return t},[]);return g(o.map(t=>t.join("\t")).join("\n")),o.reduce((t,e)=>t+e.length,0)}pasteContentInCell(t){if(this.$focusedCell){const e=t.split("\n").map(t=>t.split("\t")).filter(t=>t.length&&t.every(t=>t));let{colIndex:colIndex,rowIndex:rowIndex}=n.data(this.$focusedCell),i={colIndex:+colIndex,rowIndex:+rowIndex};e.forEach((t,e)=>{let n=e+i.rowIndex;t.forEach((t,e)=>{let o=e+i.colIndex;this.updateCell(o,n,t)})})}}activateFilter(t){this.columnmanager.toggleFilter(),this.columnmanager.focusFilter(t),this.columnmanager.isFilterShown||this.$focusedCell.focus()}updateCell(t,e,n){const i=this.datamanager.updateCell(t,e,{content:n});this.refreshCell(i)}refreshCell(t){n(this.selector(t.colIndex,t.rowIndex),this.bodyScrollable).innerHTML=this.getCellContent(t)}toggleTreeButton(t,e){const n=this.columnmanager.getFirstColumnIndex(),i=this.getCell$(n,t);i&&i.classList[e?"remove":"add"]("dt-cell--tree-close")}isStandardCell(t){return t\n ${this.getCellContent(t)}\n \n `}getCellContent(t){const{isHeader:isHeader,isFilter:isFilter,colIndex:colIndex}=t,e=!isHeader&&!1!==t.editable?this.getEditCellHTML(colIndex):"",n=isHeader&&!1!==t.sortable?`\n ${this.options.sortIndicator[t.sortOrder]}\n `:"",i=isHeader&&!1!==t.resizable?'':"",o=isHeader&&!1!==t.dropdown?this.columnmanager.getDropdownHTML():"",s=t.format||t.column&&t.column.format||null;let r;if(isHeader||isFilter||!s)r=t.content;else{const e=this.datamanager.getRow(t.rowIndex),n=this.datamanager.getData(t.rowIndex);r=s(t.content,e,t.column,n)}if(this.options.treeView&&!isHeader&&!isFilter&&void 0!==t.indent){const e=this.datamanager.getRow(t.rowIndex+1),n=e&&e.meta.indent>t.indent,i=this.datamanager.getColumnIndexById("_rowIndex")+1;if(i===t.colIndex){const e=1.5*((t.indent||0)+1),i=n?``:"";r=`\n ${i}${r}`}}return`\n \n ${r}\n ${n}\n ${i}\n ${o}\n
\n ${e}\n `}getEditCellHTML(t){return``}selector(t,e){return`.dt-cell--${t}-${e}`}}class rt{constructor(t){this.instance=t,w(this,this.instance,["options","fireEvent","header","datamanager","style","wrapper","rowmanager","bodyScrollable"]),this.bindEvents()}renderHeader(){this.header.innerHTML="",this.refreshHeader()}refreshHeader(){const t=this.datamanager.getColumns();n("thead",this.header).innerHTML=this.getHeaderHTML(t),this.$filterRow=n(".dt-row[data-is-filter]",this.header),this.$filterRow&&n.style(this.$filterRow,{display:"none"}),this.$columnMap=[],this.bindMoveColumn()}getHeaderHTML(t){let e=this.rowmanager.getRowHTML(t,{isHeader:1});return this.options.inlineFilters&&(e+=this.rowmanager.getRowHTML(t,{isFilter:1})),e}bindEvents(){this.bindDropdown(),this.bindResizeColumn(),this.bindFilter()}bindDropdown(){function t(t){e&&e.classList.remove(i),e=null}let e,i="dt-dropdown--active";n.on(this.header,"click",".dt-dropdown__toggle",(o,s)=>{const r=n.closest(".dt-dropdown",s);r.classList.contains(i)?t():(t(),r.classList.add(i),e=r)}),n.on(document.body,"click",e=>{if(e.target.matches(".dt-dropdown__toggle"))return;t()});const o=this.options.headerDropdown;n.on(this.header,"click",".dt-dropdown__list-item",(t,e)=>{const i=n.closest(".dt-cell",e);const{index:index}=n.data(e);const{colIndex:colIndex}=n.data(i);let s=o[index].action;s&&s.call(this.instance,this.getColumn(colIndex))})}bindResizeColumn(){let t,e,i,o=!1;n.on(this.header,"mousedown",".dt-cell .dt-cell__resize-handle",(s,r)=>{document.body.classList.add("dt-resize");const l=r.parentNode.parentNode;t=l;const{colIndex:colIndex}=n.data(t);const c=this.getColumn(colIndex);if(c&&!1===c.resizable)return;o=!0;e=n.style(n(".dt-cell__content",t),"width");i=s.pageX}),n.on(document.body,"mouseup",e=>{document.body.classList.remove("dt-resize");if(!t)return;o=!1;const{colIndex:colIndex}=n.data(t);this.setColumnWidth(colIndex);this.style.setBodyStyle();t=null}),n.on(document.body,"mousemove",s=>{if(!o)return;const r=e+(s.pageX-i);const{colIndex:colIndex}=n.data(t);if(this.getColumnMinWidth(colIndex)>r)return;this.datamanager.updateColumn(colIndex,{width:r});this.setColumnHeaderWidth(colIndex)})}bindMoveColumn(){const e=n(".dt-row",this.header);this.sortable=t.create(e,{onEnd:t=>{const{oldIndex:oldIndex,newIndex:newIndex}=t;const e=t.item;const{colIndex:colIndex}=n.data(e);if(+colIndex===newIndex)return;this.switchColumn(oldIndex,newIndex)},preventOnFilter:!1,filter:".dt-cell__resize-handle, .dt-dropdown",chosenClass:"dt-cell--dragging",animation:150})}sortColumn(t,e){this.instance.freeze(),this.sortRows(t,e).then(()=>{this.refreshHeader();return this.rowmanager.refreshRows()}).then(()=>this.instance.unfreeze()).then(()=>{this.fireEvent("onSortColumn",this.getColumn(t))})}removeColumn(t){const e=this.getColumn(t);this.instance.freeze(),this.datamanager.removeColumn(t).then(()=>{this.refreshHeader();return this.rowmanager.refreshRows()}).then(()=>this.instance.unfreeze()).then(()=>{this.fireEvent("onRemoveColumn",e)})}switchColumn(t,e){this.instance.freeze(),this.datamanager.switchColumn(t,e).then(()=>{this.refreshHeader();return this.rowmanager.refreshRows()}).then(()=>{this.setColumnWidth(t);this.setColumnWidth(e);this.instance.unfreeze()}).then(()=>{this.fireEvent("onSwitchColumn",this.getColumn(t),this.getColumn(e))})}toggleFilter(t){let e;(e=void 0===t?!this.isFilterShown:t)?n.style(this.$filterRow,{display:""}):n.style(this.$filterRow,{display:"none"}),this.isFilterShown=e,this.style.setBodyStyle()}focusFilter(t){this.isFilterShown&&n(`[data-col-index="${t}"] .dt-filter`,this.$filterRow).focus()}bindFilter(){if(this.options.inlineFilters){const t=t=>{const e=n.closest(".dt-cell",t.target);const{colIndex:colIndex}=n.data(e);const i=t.target.value;this.datamanager.filterRows(i,colIndex).then(({rowsToHide:rowsToHide,rowsToShow:rowsToShow})=>{this.rowmanager.hideRows(rowsToHide);this.rowmanager.showRows(rowsToShow)})};n.on(this.header,"keydown",".dt-filter",nt(t,300))}}sortRows(t,e){return this.datamanager.sortRows(t,e)}getColumn(t){return this.datamanager.getColumn(t)}getColumns(){return this.datamanager.getColumns()}setColumnWidth(t,e){t=+t;let n=e||this.getColumn(t).width;const i=[`.dt-cell__content--col-${t}`,`.dt-cell__edit--col-${t}`].join(", "),o={width:n+"px"};this.style.setStyle(i,o)}setColumnHeaderWidth(t){t=+t,this.$columnMap=this.$columnMap||[];const e=`.dt-cell__content--header-${t}`,{width:width}=this.getColumn(t);let n=this.$columnMap[t];n||(n=this.header.querySelector(e),this.$columnMap[t]=n),n.style.width=width+"px"}getColumnMinWidth(t){return t=+t,this.getColumn(t).minWidth||24}getFirstColumnIndex(){return this.datamanager.getColumnIndexById("_rowIndex")+1}getHeaderCell$(t){return n(`.dt-cell--header-${t}`,this.header)}getLastColumnIndex(){return this.datamanager.getColumnCount()-1}getDropdownHTML(){const{dropdownButton:dropdownButton,headerDropdown:dropdownItems}=this.options;return`\n \n
${dropdownButton}
\n
\n ${dropdownItems.map((t,e)=>`\n
${t.label}
\n `).join("")}\n
\n
\n `}}class lt{constructor(t){this.instance=t,w(this,this.instance,["options","fireEvent","wrapper","bodyScrollable","bodyRenderer"]),this.bindEvents(),this.refreshRows=p(this.refreshRows,this)}get datamanager(){return this.instance.datamanager}get cellmanager(){return this.instance.cellmanager}bindEvents(){this.bindCheckbox()}bindCheckbox(){this.options.checkboxColumn&&(this.checkMap=[],n.on(this.wrapper,"click",'.dt-cell[data-col-index="0"] [type="checkbox"]',(t,e)=>{const i=e.closest(".dt-cell");const{rowIndex:rowIndex,isHeader:isHeader}=n.data(i);const o=e.checked;isHeader?this.checkAll(o):this.checkRow(rowIndex,o)}))}refreshRows(){this.instance.renderBody(),this.instance.setDimensions()}refreshRow(t,e){this.datamanager.updateRow(t,e).forEach(t=>{this.cellmanager.refreshCell(t)})}getCheckedRows(){if(!this.checkMap)return[];let t=[];for(let e in this.checkMap){const n=this.checkMap[e];1===n&&t.push(e)}return t}highlightCheckedRows(){this.getCheckedRows().map(t=>this.checkRow(t,!0))}checkRow(t,e){const i=e?1:0,o=t=>`.dt-cell[data-row-index="${t}"][data-col-index="0"] [type="checkbox"]`;this.checkMap[t]=i,n.each(o(t),this.bodyScrollable).map(t=>{t.checked=e}),this.highlightRow(t,e),this.showCheckStatus(),this.fireEvent("onCheckRow",this.datamanager.getRow(t))}checkAll(t){const e=t?1:0;this.checkMap=t?Array.from(Array(this.getTotalRows())).map(t=>e):[],n.each('.dt-cell[data-col-index="0"] [type="checkbox"]',this.bodyScrollable).map(e=>{e.checked=t}),this.highlightAll(t),this.showCheckStatus()}showCheckStatus(){if(this.options.checkedRowStatus){const t=this.getCheckedRows().length;t>0?this.bodyRenderer.showToastMessage(`${t} row${t>1?"s":""} selected`):this.bodyRenderer.clearToastMessage()}}highlightRow(t,e=!0){const n=this.getRow$(t);if(n){if(!e&&this.bodyScrollable.classList.contains("dt-scrollable--highlight-all"))return void n.classList.add("dt-row--unhighlight");e&&n.classList.contains("dt-row--unhighlight")&&n.classList.remove("dt-row--unhighlight"),this._highlightedRows=this._highlightedRows||{},e?(n.classList.add("dt-row--highlight"),this._highlightedRows[t]=n):(n.classList.remove("dt-row--highlight"),delete this._highlightedRows[t])}}highlightAll(t=!0){if(t)this.bodyScrollable.classList.add("dt-scrollable--highlight-all");else{this.bodyScrollable.classList.remove("dt-scrollable--highlight-all");for(const t in this._highlightedRows){const e=this._highlightedRows[t];e.classList.remove("dt-row--highlight")}this._highlightedRows={}}}hideRows(t){(t=x(t)).map(t=>{const e=this.getRow$(t);e.classList.add("dt-row--hide")})}showRows(t){(t=x(t)).map(t=>{const e=this.getRow$(t);e.classList.remove("dt-row--hide")})}openSingleNode(t){const e=this.datamanager.getImmediateChildren(t);this.showRows(e),this.cellmanager.toggleTreeButton(t,!0)}closeSingleNode(t){this.datamanager.getImmediateChildren(t).forEach(t=>{const e=this.datamanager.getRow(t);e.meta.isLeaf?(this.hideRows(t),this.cellmanager.toggleTreeButton(t,!1)):(this.closeSingleNode(t),this.hideRows(t))}),this.cellmanager.toggleTreeButton(t,!1)}getRow$(t){return n(this.selector(t),this.bodyScrollable)}getTotalRows(){return this.datamanager.getRowCount()}getFirstRowIndex(){return 0}getLastRowIndex(){return this.datamanager.getRowCount()-1}scrollToRow(t){t=+t,this._lastScrollTo=this._lastScrollTo||0;const e=this.getRow$(t);if(!n.inViewport(e,this.bodyScrollable)){const{height:height}=e.getBoundingClientRect(),{top:top,bottom:bottom}=this.bodyScrollable.getBoundingClientRect(),i=Math.floor((bottom-top)/height);let o=0;o=t>this._lastScrollTo?height*(t+1-i):height*(t+1-1),this._lastScrollTo=t,n.scrollTop(this.bodyScrollable,o)}}getRowHTML(t,e){const n=f(e);return e.isFilter&&(t=t.map(t=>Object.assign({},t,{content:this.getFilterInput({colIndex:t.colIndex}),isFilter:1,isHeader:void 0,editable:!1}))),`\n \n ${t.map(t=>this.cellmanager.getCellHTML(t)).join("")}\n
\n `}getFilterInput(t){return``}selector(t){return`.dt-row[data-row-index="${t}"]`}}class ct{constructor(t){this.instance=t,this.options=t.options,this.datamanager=t.datamanager,this.rowmanager=t.rowmanager,this.cellmanager=t.cellmanager,this.bodyScrollable=t.bodyScrollable,this.log=t.log,this.appendRemainingData=p(this.appendRemainingData,this)}render(){this.options.clusterize?this.renderBodyWithClusterize():this.renderBodyHTML()}renderBodyHTML(){const t=this.datamanager.getRowsForView();this.bodyScrollable.innerHTML=this.getBodyHTML(t),this.instance.setDimensions(),this.restoreState()}renderBodyWithClusterize(){const t=this.datamanager.getRowsForView(0,20);let i=this.getDataForClusterize(t);0===i.length&&(i=[this.getNoDataHTML()]),this.clusterize?this.clusterize.update(i):(this.bodyScrollable.innerHTML=this.getBodyHTML([]),this.clusterize=new e({rows:i,scrollElem:this.bodyScrollable,contentElem:n("tbody",this.bodyScrollable),callbacks:{clusterChanged:()=>this.restoreState()},show_no_data_row:!1}),this.instance.setDimensions()),this.appendRemainingData()}restoreState(){this.rowmanager.highlightCheckedRows(),this.cellmanager.selectAreaOnClusterChanged(),this.cellmanager.focusCellOnClusterChanged()}appendRemainingData(){const t=this.datamanager.getRowsForView(20),e=this.getDataForClusterize(t);this.clusterize.append(e)}showToastMessage(t,e){this.instance.toastMessage.innerHTML=this.getToastMessageHTML(t),e&&setTimeout(()=>{this.clearToastMessage()},1e3*e)}clearToastMessage(){this.instance.toastMessage.innerHTML=""}getDataForClusterize(t){return t.map(t=>this.rowmanager.getRowHTML(t,t.meta))}getBodyHTML(t){return`\n \n \n ${t.map(t=>this.rowmanager.getRowHTML(t,t.meta)).join("")}\n \n
\n `}getNoDataHTML(){return`${this.options.noDataMessage}
`}getToastMessageHTML(t){return`${t}`}}class at{constructor(t){this.instance=t,w(this,this.instance,["options","datamanager","columnmanager","header","bodyScrollable","datatableWrapper","getColumn"]),this.scopeClass="dt-instance-"+t.constructor.instances,t.datatableWrapper.classList.add(this.scopeClass);const e=document.createElement("style");t.wrapper.insertBefore(e,t.datatableWrapper),this.styleEl=e,this.bindResizeWindow()}get stylesheet(){return this.styleEl.sheet}bindResizeWindow(){"fluid"===this.options.layout&&n.on(window,"resize",et(()=>{this.distributeRemainingWidth();this.refreshColumnWidth();this.compensateScrollbarWidth();this.setBodyStyle()},300))}destroy(){this.styleEl.remove()}setStyle(t,e){if(t.includes(","))return void t.split(",").map(t=>t.trim()).forEach(t=>{this.setStyle(t,e)});this._styleRulesMap=this._styleRulesMap||{};const n=this._getPrefixedSelector(t);if(this._styleRulesMap[n]){const t=Array.from(this.stylesheet.cssRules).findIndex(t=>t.selectorText===n);this.stylesheet.deleteRule(t),e=Object.assign({},this._styleRulesMap[n],e)}const i=this._getRuleString(e),o=`${n} { ${i} }`;this._styleRulesMap[n]=e,this.stylesheet.insertRule(o)}_getPrefixedSelector(t){return`.${this.scopeClass} ${t}`}_getRuleString(t){return Object.keys(t).map(e=>{let n=e;e.includes("-")||(n=d(e));return`${n}:${t[e]};`}).join("")}setDimensions(){this.setHeaderStyle(),this.setupMinWidth(),this.setupNaturalColumnWidth(),this.setupColumnWidth(),this.distributeRemainingWidth(),this.setColumnStyle(),this.compensateScrollbarWidth(),this.setDefaultCellHeight(),this.setBodyStyle()}setHeaderStyle(){"fluid"===this.options.layout&&n.style(this.header,{width:0}),n.style(this.header,{margin:0})}setupMinWidth(){n.each(".dt-cell[data-is-header]",this.header).map(t=>{const{colIndex:colIndex}=n.data(t);const e=this.getColumn(colIndex);if(!e.minWidth){const i=n.style(n(".dt-cell__content",t),"width");e.minWidth=i}})}setupNaturalColumnWidth(){n(".dt-row")&&n.each('.dt-row[data-row-index="0"] .dt-cell',this.bodyScrollable).map(t=>{const{colIndex:colIndex}=n.data(t);const e=this.datamanager.getColumn(colIndex);let i=n.style(n(".dt-cell__content",t),"width");"_rowIndex"===e.id&&(i=this.getRowIndexColumnWidth(i),e.width=i);e.naturalWidth=i})}setupColumnWidth(){if("ratio"===this.options.layout){let t=n.style(this.datatableWrapper,"width");if(this.options.serialNoColumn){const e=this.datamanager.getColumnById("_rowIndex");t=t-e.width-1}if(this.options.checkboxColumn){const e=this.datamanager.getColumnById("_checkbox");t=t-e.width-1}const e=this.datamanager.getColumns().map(t=>{if("_rowIndex"===t.id||"_checkbox"===t.id)return 0;t.width||(t.width=1);t.ratioWidth=parseInt(t.width,10);return t.ratioWidth}).reduce((t,e)=>t+e),i=t/e;this.datamanager.getColumns().map(t=>{if("_rowIndex"===t.id||"_checkbox"===t.id)return;t.width=Math.floor(i*t.ratioWidth)-1})}else this.datamanager.getColumns().map(t=>{t.width||(t.width=t.naturalWidth);t.width{const t=n.scrollbarWidth();const e=this.datamanager.getColumn(-1);const i=e.width-t;this.columnmanager.setColumnWidth(e.colIndex,i)})}distributeRemainingWidth(){if("fluid"===this.options.layout){const t=n.style(this.instance.datatableWrapper,"width"),e=n.style(this.header,"width"),i=this.datamanager.getColumns().filter(t=>t.resizable),o=(t-e)/i.length;i.map(t=>{const e=n.style(this.getColumnHeaderElement(t.colIndex),"width");let i=Math.floor(e+o)-2;this.datamanager.updateColumn(t.colIndex,{width:i})})}}setDefaultCellHeight(){if(!this.options.dynamicRowHeight&&!this.__cellHeightSet){const t=n(".dt-cell[data-is-header]",this.instance.header);if(t){const e=this.options.cellHeight||n.style(t,"height");e&&(this.setCellHeight(e),this.__cellHeightSet=!0)}}}setCellHeight(t){this.setStyle(".dt-cell__content, .dt-cell__edit",{height:t+"px"})}setColumnStyle(){this.datamanager.getColumns().map(t=>{t.align||(t.align="left");["left","center","right"].includes(t.align)||(t.align="left");this.setStyle(`.dt-cell--col-${t.colIndex}`,{"text-align":t.align});this.columnmanager.setColumnHeaderWidth(t.colIndex);this.columnmanager.setColumnWidth(t.colIndex)}),this.setBodyStyle()}refreshColumnWidth(){this.datamanager.getColumns().map(t=>{this.columnmanager.setColumnHeaderWidth(t.colIndex);this.columnmanager.setColumnWidth(t.colIndex)})}setBodyStyle(){requestAnimationFrame(()=>{const t=n.style(this.header,"width");n.style(this.bodyScrollable,{width:t+"px"});const e=n(".dt-body",this.bodyScrollable);e&&n.style(e,{height:"0px"});n.style(this.bodyScrollable,{marginTop:n.style(this.header,"height")+"px"});n.style(n("table",this.bodyScrollable),{margin:0,width:"100%"})})}getColumnHeaderElement(t){return t=+t,t<0?null:n(`.dt-cell[data-col-index="${t}"]`,this.header)}getRowIndexColumnWidth(t){this._rowIndexColumnWidthMap=this._rowIndexColumnWidthMap||{};const e=(this.datamanager.getRowCount()+"").length;return this._rowIndexColumnWidthMap[e]||(this._rowIndexColumnWidthMap[e]=t+8*(e-1)),this._rowIndexColumnWidthMap[e]}}const ht={13:"enter",91:"meta",16:"shift",17:"ctrl",18:"alt",37:"left",38:"up",39:"right",40:"down",9:"tab",27:"esc",67:"c",70:"f",86:"v"};class ut{constructor(t){this.listeners={},n.on(t,"keydown",this.handler.bind(this))}handler(t){let e=ht[t.keyCode];t.shiftKey&&"shift"!==e&&(e="shift+"+e),(t.ctrlKey&&"ctrl"!==e||t.metaKey&&"meta"!==e)&&(e="ctrl+"+e);const n=this.listeners[e];if(n&&n.length>0)for(let e of n){const n=e(t);void 0!==n&&!0!==n||t.preventDefault()}}on(t,e){t.split(",").map(t=>t.trim()).map(t=>{this.listeners[t]=this.listeners[t]||[];this.listeners[t].push(e)})}}var dt={columns:[],data:[],dropdownButton:"▼",headerDropdown:[{label:"Sort Ascending",action:function(t){this.sortColumn(t.colIndex,"asc")}},{label:"Sort Descending",action:function(t){this.sortColumn(t.colIndex,"desc")}},{label:"Reset sorting",action:function(t){this.sortColumn(t.colIndex,"none")}},{label:"Remove column",action:function(t){this.removeColumn(t.colIndex)}}],events:{onRemoveColumn(t){},onSwitchColumn(t,e){},onSortColumn(t){},onCheckRow(t){}},sortIndicator:{asc:"↑",desc:"↓",none:""},freezeMessage:"",getEditor:null,serialNoColumn:!0,checkboxColumn:!1,clusterize:!0,logs:!1,layout:"fixed",noDataMessage:"No Data",cellHeight:null,inlineFilters:!1,treeView:!1,checkedRowStatus:!0,dynamicRowHeight:!1,pasteFromClipboard:!1};class ft{constructor(t,e){if(ft.instances++,"string"==typeof t&&(t=document.querySelector(t)),this.wrapper=t,!(this.wrapper instanceof HTMLElement))throw new Error("Invalid argument given for `wrapper`");this.buildOptions(e),this.prepare(),this.style=new at(this),this.keyboard=new ut(this.wrapper),this.datamanager=new it(this.options),this.rowmanager=new lt(this),this.columnmanager=new rt(this),this.cellmanager=new st(this),this.bodyRenderer=new ct(this),this.options.data&&this.refresh()}buildOptions(t){this.options=this.options||{},this.options=Object.assign({},dt,this.options||{},t),t.headerDropdown=t.headerDropdown||[],this.options.headerDropdown=[...dt.headerDropdown,...t.headerDropdown],this.events=Object.assign({},dt.events,this.options.events||{},t.events||{}),this.fireEvent=this.fireEvent.bind(this)}prepare(){this.prepareDom(),this.unfreeze()}prepareDom(){this.wrapper.innerHTML=`\n \n \n
\n
\n
\n \n ${this.options.freezeMessage}\n \n
\n
\n
\n
\n `,this.datatableWrapper=n(".datatable",this.wrapper),this.header=n(".dt-header",this.wrapper),this.bodyScrollable=n(".dt-scrollable",this.wrapper),this.freezeContainer=n(".dt-freeze",this.wrapper),this.toastMessage=n(".dt-toast",this.wrapper),this.pasteTarget=n(".dt-paste-target",this.wrapper)}refresh(t,e){this.datamanager.init(t,e),this.render(),this.setDimensions()}destroy(){this.wrapper.innerHTML="",this.style.destroy()}appendRows(t){this.datamanager.appendRows(t),this.rowmanager.refreshRows()}refreshRow(t,e){this.rowmanager.refreshRow(t,e)}render(){this.renderHeader(),this.renderBody()}renderHeader(){this.columnmanager.renderHeader()}renderBody(){this.bodyRenderer.render()}setDimensions(){this.style.setDimensions()}showToastMessage(t,e){this.bodyRenderer.showToastMessage(t,e)}clearToastMessage(){this.bodyRenderer.clearToastMessage()}getColumn(t){return this.datamanager.getColumn(t)}getColumns(){return this.datamanager.getColumns()}getRows(){return this.datamanager.getRows()}getCell(t,e){return this.datamanager.getCell(t,e)}getColumnHeaderElement(t){return this.columnmanager.getColumnHeaderElement(t)}getViewportHeight(){return this.viewportHeight||(this.viewportHeight=n.style(this.bodyScrollable,"height")),this.viewportHeight}sortColumn(t,e){this.columnmanager.sortColumn(t,e)}removeColumn(t){this.columnmanager.removeColumn(t)}scrollToLastColumn(){this.datatableWrapper.scrollLeft=9999}freeze(){n.style(this.freezeContainer,{display:""})}unfreeze(){n.style(this.freezeContainer,{display:"none"})}updateOptions(t){this.buildOptions(t)}fireEvent(t,...e){this.events[t].apply(this,e)}log(){this.options.logs&&console.log.apply(console,arguments)}}ft.instances=0;var gt={name:"frappe-datatable",version:"0.0.9",description:"A modern datatable library for the web",main:"dist/frappe-datatable.cjs.js",scripts:{start:"yarn run dev",build:"rollup -c",production:"rollup -c --production","build:docs":"rollup -c --docs",dev:"rollup -c -w","cy:server":"http-server -p 8989","cy:open":"cypress open","cy:run":"cypress run",test:"start-server-and-test cy:server http://localhost:8989 cy:run"},devDependencies:{chai:"3.5.0",cypress:"3.0.1",deepmerge:"^2.0.1","eslint-config-airbnb":"^16.1.0","eslint-config-airbnb-base":"^12.1.0","eslint-plugin-import":"^2.11.0","http-server":"^0.11.1",mocha:"3.3.0","postcss-cssnext":"^3.1.0","postcss-nested":"^3.0.0",rollup:"^0.59.4","rollup-plugin-commonjs":"^8.3.0","rollup-plugin-eslint":"^4.0.0","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.3","rollup-plugin-postcss":"^1.2.8","rollup-plugin-uglify-es":"^0.0.1","start-server-and-test":"^1.4.1"},repository:{type:"git",url:"https://github.com/frappe/datatable.git"},keywords:["datatable","data","grid","table"],author:"Faris Ansari",license:"MIT",bugs:{url:"https://github.com/frappe/datatable/issues"},homepage:"https://frappe.github.io/datatable",dependencies:{"clusterize.js":"^0.18.0",lodash:"^4.17.5",sortablejs:"^1.7.0"}};return ft.__version__=gt.version,ft}(Sortable,Clusterize);
diff --git a/package.json b/package.json
index 7660339..d46a64e 100644
--- a/package.json
+++ b/package.json
@@ -1,22 +1,23 @@
{
"name": "frappe-datatable",
- "version": "0.0.10",
+ "version": "0.0.0-development",
"description": "A modern datatable library for the web",
"main": "dist/frappe-datatable.cjs.js",
"scripts": {
"start": "yarn run dev",
- "build": "rollup -c",
- "production": "rollup -c --production",
- "build:docs": "rollup -c --docs",
+ "build": "rollup -c && rollup -c --production",
"dev": "rollup -c -w",
"cy:server": "http-server -p 8989",
"cy:open": "cypress open",
"cy:run": "cypress run",
- "test": "start-server-and-test cy:server http://localhost:8989 cy:run"
+ "test": "start-server-and-test cy:server http://localhost:8989 cy:run",
+ "travis-deploy-once": "travis-deploy-once",
+ "semantic-release": "semantic-release"
},
"devDependencies": {
"chai": "3.5.0",
"cypress": "3.0.1",
+ "cz-conventional-changelog": "^2.1.0",
"deepmerge": "^2.0.1",
"eslint-config-airbnb": "^16.1.0",
"eslint-config-airbnb-base": "^12.1.0",
@@ -32,7 +33,9 @@
"rollup-plugin-node-resolve": "^3.0.3",
"rollup-plugin-postcss": "^1.2.8",
"rollup-plugin-uglify-es": "^0.0.1",
- "start-server-and-test": "^1.4.1"
+ "semantic-release": "^15.6.3",
+ "start-server-and-test": "^1.4.1",
+ "travis-deploy-once": "^5.0.1"
},
"repository": {
"type": "git",
@@ -54,5 +57,10 @@
"clusterize.js": "^0.18.0",
"lodash": "^4.17.5",
"sortablejs": "^1.7.0"
+ },
+ "config": {
+ "commitizen": {
+ "path": "cz-conventional-changelog"
+ }
}
}
diff --git a/yarn.lock b/yarn.lock
index eecf5c5..987fa90 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -18,6 +18,100 @@
debug "^3.1.0"
lodash.once "^4.1.1"
+"@mrmlnc/readdir-enhanced@^2.2.1":
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
+ dependencies:
+ call-me-maybe "^1.0.1"
+ glob-to-regexp "^0.3.0"
+
+"@nodelib/fs.stat@^1.0.1":
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.0.tgz#50c1e2260ac0ed9439a181de3725a0168d59c48a"
+
+"@octokit/rest@^15.2.0":
+ version "15.9.4"
+ resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-15.9.4.tgz#c6cf0f483275d9c798b18419b7c9d417493bb70f"
+ dependencies:
+ before-after-hook "^1.1.0"
+ btoa-lite "^1.0.0"
+ debug "^3.1.0"
+ http-proxy-agent "^2.1.0"
+ https-proxy-agent "^2.2.0"
+ lodash "^4.17.4"
+ node-fetch "^2.1.1"
+ url-template "^2.0.8"
+
+"@semantic-release/commit-analyzer@^5.0.0":
+ version "5.0.5"
+ resolved "https://registry.yarnpkg.com/@semantic-release/commit-analyzer/-/commit-analyzer-5.0.5.tgz#e855acaab9a850b97ac4260fec8c6df36c0edc45"
+ dependencies:
+ conventional-changelog-angular "^5.0.0"
+ conventional-commits-parser "^3.0.0"
+ debug "^3.1.0"
+ import-from "^2.1.0"
+ lodash "^4.17.4"
+
+"@semantic-release/error@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@semantic-release/error/-/error-2.2.0.tgz#ee9d5a09c9969eade1ec864776aeda5c5cddbbf0"
+
+"@semantic-release/github@^4.1.0":
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/@semantic-release/github/-/github-4.3.0.tgz#94a9956e096b6e9782a14a17ecea5e6f27f5258f"
+ dependencies:
+ "@octokit/rest" "^15.2.0"
+ "@semantic-release/error" "^2.2.0"
+ aggregate-error "^1.0.0"
+ bottleneck "^2.0.1"
+ debug "^3.1.0"
+ fs-extra "^6.0.0"
+ globby "^8.0.0"
+ http-proxy-agent "^2.1.0"
+ https-proxy-agent "^2.2.1"
+ issue-parser "^2.0.0"
+ lodash "^4.17.4"
+ mime "^2.0.3"
+ p-filter "^1.0.0"
+ p-retry "^2.0.0"
+ parse-github-url "^1.0.1"
+ url-join "^4.0.0"
+
+"@semantic-release/npm@^3.2.0":
+ version "3.3.4"
+ resolved "https://registry.yarnpkg.com/@semantic-release/npm/-/npm-3.3.4.tgz#5a282877d55106e211d8a9a1d289103b67b4f2dc"
+ dependencies:
+ "@semantic-release/error" "^2.2.0"
+ aggregate-error "^1.0.0"
+ detect-indent "^5.0.0"
+ detect-newline "^2.1.0"
+ execa "^0.10.0"
+ fs-extra "^6.0.0"
+ lodash "^4.17.4"
+ nerf-dart "^1.0.0"
+ normalize-url "^3.0.0"
+ parse-json "^4.0.0"
+ read-pkg "^4.0.0"
+ registry-auth-token "^3.3.1"
+
+"@semantic-release/release-notes-generator@^6.0.0":
+ version "6.0.12"
+ resolved "https://registry.yarnpkg.com/@semantic-release/release-notes-generator/-/release-notes-generator-6.0.12.tgz#f70d53e4f385ae3644ac0b943aa84a4b7f23ec23"
+ dependencies:
+ conventional-changelog-angular "^5.0.0"
+ conventional-changelog-writer "^4.0.0"
+ conventional-commits-parser "^3.0.0"
+ debug "^3.1.0"
+ get-stream "^3.0.0"
+ git-url-parse "^9.0.0"
+ import-from "^2.1.0"
+ into-stream "^3.1.0"
+ lodash "^4.17.4"
+
+"@sindresorhus/is@^0.7.0":
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd"
+
"@types/blob-util@1.3.3":
version "1.3.3"
resolved "https://registry.yarnpkg.com/@types/blob-util/-/blob-util-1.3.3.tgz#adba644ae34f88e1dd9a5864c66ad651caaf628a"
@@ -84,6 +178,13 @@
version "4.0.0"
resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-4.0.0.tgz#9a93ffa4ee1329e85166278a5ed99f81dc4c8362"
+JSONStream@^1.0.4:
+ version "1.3.3"
+ resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.3.tgz#27b4b8fbbfeab4e71bcf551e7f27be8d952239bf"
+ dependencies:
+ jsonparse "^1.2.0"
+ through ">=2.2.7 <3"
+
acorn-jsx@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b"
@@ -102,6 +203,19 @@ acorn@^5.5.0:
version "5.5.3"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9"
+agent-base@4, agent-base@^4.1.0:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9"
+ dependencies:
+ es6-promisify "^5.0.0"
+
+aggregate-error@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-1.0.0.tgz#888344dad0220a72e3af50906117f48771925fac"
+ dependencies:
+ clean-stack "^1.0.0"
+ indent-string "^3.0.0"
+
ajv-keywords@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762"
@@ -122,10 +236,28 @@ ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0:
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.3.0"
+align-text@^0.1.1, align-text@^0.1.3:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
+ dependencies:
+ kind-of "^3.0.2"
+ longest "^1.0.1"
+ repeat-string "^1.5.2"
+
alphanum-sort@^1.0.1, alphanum-sort@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
+amdefine@>=0.0.4:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
+
+ansi-align@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f"
+ dependencies:
+ string-width "^2.0.0"
+
ansi-escapes@^1.0.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
@@ -158,29 +290,53 @@ ansi-styles@^3.2.1:
dependencies:
color-convert "^1.9.0"
+ansicolors@~0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef"
+
argparse@^1.0.7:
version "1.0.9"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86"
dependencies:
sprintf-js "~1.0.2"
+argv-formatter@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/argv-formatter/-/argv-formatter-1.0.0.tgz#a0ca0cbc29a5b73e836eebe1cbf6c5e0e4eb82f9"
+
arr-diff@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
dependencies:
arr-flatten "^1.0.1"
-arr-flatten@^1.0.1:
+arr-diff@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
+
+arr-flatten@^1.0.1, arr-flatten@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
+arr-union@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
+
+array-find-index@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
+
+array-ify@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece"
+
array-union@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
dependencies:
array-uniq "^1.0.1"
-array-uniq@^1.0.1:
+array-uniq@^1.0.0, array-uniq@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
@@ -188,7 +344,11 @@ array-unique@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
-arrify@^1.0.0:
+array-unique@^0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
+
+arrify@^1.0.0, arrify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
@@ -208,13 +368,17 @@ assertion-error@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b"
+assign-symbols@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
+
async@2.1.4:
version "2.1.4"
resolved "https://registry.yarnpkg.com/async/-/async-2.1.4.tgz#2d2160c7788032e4dd6cbe2502f1f9a2c8f6cde4"
dependencies:
lodash "^4.14.0"
-async@^1.5.2:
+async@^1.4.0, async@^1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
@@ -222,6 +386,10 @@ asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
+atob@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.1.tgz#ae2d5a729477f289d60dd7f96a6314a22dd6c22a"
+
autoprefixer@^6.3.1:
version "6.7.7"
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014"
@@ -256,7 +424,7 @@ aws4@^1.2.1, aws4@^1.6.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289"
-babel-code-frame@^6.22.0:
+babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
dependencies:
@@ -264,13 +432,464 @@ babel-code-frame@^6.22.0:
esutils "^2.0.2"
js-tokens "^3.0.2"
-babel-runtime@^6.18.0, babel-runtime@^6.23.0:
+babel-core@^6.26.0:
+ version "6.26.3"
+ resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207"
+ dependencies:
+ babel-code-frame "^6.26.0"
+ babel-generator "^6.26.0"
+ babel-helpers "^6.24.1"
+ babel-messages "^6.23.0"
+ babel-register "^6.26.0"
+ babel-runtime "^6.26.0"
+ babel-template "^6.26.0"
+ babel-traverse "^6.26.0"
+ babel-types "^6.26.0"
+ babylon "^6.18.0"
+ convert-source-map "^1.5.1"
+ debug "^2.6.9"
+ json5 "^0.5.1"
+ lodash "^4.17.4"
+ minimatch "^3.0.4"
+ path-is-absolute "^1.0.1"
+ private "^0.1.8"
+ slash "^1.0.0"
+ source-map "^0.5.7"
+
+babel-generator@^6.26.0:
+ version "6.26.1"
+ resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90"
+ dependencies:
+ babel-messages "^6.23.0"
+ babel-runtime "^6.26.0"
+ babel-types "^6.26.0"
+ detect-indent "^4.0.0"
+ jsesc "^1.3.0"
+ lodash "^4.17.4"
+ source-map "^0.5.7"
+ trim-right "^1.0.1"
+
+babel-helper-builder-binary-assignment-operator-visitor@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664"
+ dependencies:
+ babel-helper-explode-assignable-expression "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-helper-call-delegate@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d"
+ dependencies:
+ babel-helper-hoist-variables "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
+babel-helper-define-map@^6.24.1:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f"
+ dependencies:
+ babel-helper-function-name "^6.24.1"
+ babel-runtime "^6.26.0"
+ babel-types "^6.26.0"
+ lodash "^4.17.4"
+
+babel-helper-explode-assignable-expression@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
+babel-helper-function-name@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9"
+ dependencies:
+ babel-helper-get-function-arity "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
+babel-helper-get-function-arity@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-helper-hoist-variables@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-helper-optimise-call-expression@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-helper-regex@^6.24.1:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72"
+ dependencies:
+ babel-runtime "^6.26.0"
+ babel-types "^6.26.0"
+ lodash "^4.17.4"
+
+babel-helper-remap-async-to-generator@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b"
+ dependencies:
+ babel-helper-function-name "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
+babel-helper-replace-supers@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a"
+ dependencies:
+ babel-helper-optimise-call-expression "^6.24.1"
+ babel-messages "^6.23.0"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
+babel-helpers@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+
+babel-messages@^6.23.0:
+ version "6.23.0"
+ resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-check-es2015-constants@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-syntax-async-functions@^6.8.0:
+ version "6.13.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95"
+
+babel-plugin-syntax-exponentiation-operator@^6.8.0:
+ version "6.13.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de"
+
+babel-plugin-syntax-trailing-function-commas@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3"
+
+babel-plugin-transform-async-to-generator@^6.22.0:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761"
+ dependencies:
+ babel-helper-remap-async-to-generator "^6.24.1"
+ babel-plugin-syntax-async-functions "^6.8.0"
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-arrow-functions@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-block-scoped-functions@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-block-scoping@^6.23.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f"
+ dependencies:
+ babel-runtime "^6.26.0"
+ babel-template "^6.26.0"
+ babel-traverse "^6.26.0"
+ babel-types "^6.26.0"
+ lodash "^4.17.4"
+
+babel-plugin-transform-es2015-classes@^6.23.0:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db"
+ dependencies:
+ babel-helper-define-map "^6.24.1"
+ babel-helper-function-name "^6.24.1"
+ babel-helper-optimise-call-expression "^6.24.1"
+ babel-helper-replace-supers "^6.24.1"
+ babel-messages "^6.23.0"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-computed-properties@^6.22.0:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+
+babel-plugin-transform-es2015-destructuring@^6.23.0:
+ version "6.23.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-duplicate-keys@^6.22.0:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-for-of@^6.23.0:
+ version "6.23.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-function-name@^6.22.0:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b"
+ dependencies:
+ babel-helper-function-name "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-literals@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154"
+ dependencies:
+ babel-plugin-transform-es2015-modules-commonjs "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+
+babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1:
+ version "6.26.2"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3"
+ dependencies:
+ babel-plugin-transform-strict-mode "^6.24.1"
+ babel-runtime "^6.26.0"
+ babel-template "^6.26.0"
+ babel-types "^6.26.0"
+
+babel-plugin-transform-es2015-modules-systemjs@^6.23.0:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23"
+ dependencies:
+ babel-helper-hoist-variables "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+
+babel-plugin-transform-es2015-modules-umd@^6.23.0:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468"
+ dependencies:
+ babel-plugin-transform-es2015-modules-amd "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+
+babel-plugin-transform-es2015-object-super@^6.22.0:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d"
+ dependencies:
+ babel-helper-replace-supers "^6.24.1"
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-parameters@^6.23.0:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b"
+ dependencies:
+ babel-helper-call-delegate "^6.24.1"
+ babel-helper-get-function-arity "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-shorthand-properties@^6.22.0:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-spread@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-sticky-regex@^6.22.0:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc"
+ dependencies:
+ babel-helper-regex "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-template-literals@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-typeof-symbol@^6.23.0:
+ version "6.23.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-unicode-regex@^6.22.0:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9"
+ dependencies:
+ babel-helper-regex "^6.24.1"
+ babel-runtime "^6.22.0"
+ regexpu-core "^2.0.0"
+
+babel-plugin-transform-exponentiation-operator@^6.22.0:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e"
+ dependencies:
+ babel-helper-builder-binary-assignment-operator-visitor "^6.24.1"
+ babel-plugin-syntax-exponentiation-operator "^6.8.0"
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-regenerator@^6.22.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f"
+ dependencies:
+ regenerator-transform "^0.10.0"
+
+babel-plugin-transform-strict-mode@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-polyfill@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153"
+ dependencies:
+ babel-runtime "^6.26.0"
+ core-js "^2.5.0"
+ regenerator-runtime "^0.10.5"
+
+babel-preset-env@^1.6.1:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a"
+ dependencies:
+ babel-plugin-check-es2015-constants "^6.22.0"
+ babel-plugin-syntax-trailing-function-commas "^6.22.0"
+ babel-plugin-transform-async-to-generator "^6.22.0"
+ babel-plugin-transform-es2015-arrow-functions "^6.22.0"
+ babel-plugin-transform-es2015-block-scoped-functions "^6.22.0"
+ babel-plugin-transform-es2015-block-scoping "^6.23.0"
+ babel-plugin-transform-es2015-classes "^6.23.0"
+ babel-plugin-transform-es2015-computed-properties "^6.22.0"
+ babel-plugin-transform-es2015-destructuring "^6.23.0"
+ babel-plugin-transform-es2015-duplicate-keys "^6.22.0"
+ babel-plugin-transform-es2015-for-of "^6.23.0"
+ babel-plugin-transform-es2015-function-name "^6.22.0"
+ babel-plugin-transform-es2015-literals "^6.22.0"
+ babel-plugin-transform-es2015-modules-amd "^6.22.0"
+ babel-plugin-transform-es2015-modules-commonjs "^6.23.0"
+ babel-plugin-transform-es2015-modules-systemjs "^6.23.0"
+ babel-plugin-transform-es2015-modules-umd "^6.23.0"
+ babel-plugin-transform-es2015-object-super "^6.22.0"
+ babel-plugin-transform-es2015-parameters "^6.23.0"
+ babel-plugin-transform-es2015-shorthand-properties "^6.22.0"
+ babel-plugin-transform-es2015-spread "^6.22.0"
+ babel-plugin-transform-es2015-sticky-regex "^6.22.0"
+ babel-plugin-transform-es2015-template-literals "^6.22.0"
+ babel-plugin-transform-es2015-typeof-symbol "^6.23.0"
+ babel-plugin-transform-es2015-unicode-regex "^6.22.0"
+ babel-plugin-transform-exponentiation-operator "^6.22.0"
+ babel-plugin-transform-regenerator "^6.22.0"
+ browserslist "^3.2.6"
+ invariant "^2.2.2"
+ semver "^5.3.0"
+
+babel-register@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071"
+ dependencies:
+ babel-core "^6.26.0"
+ babel-runtime "^6.26.0"
+ core-js "^2.5.0"
+ home-or-tmp "^2.0.0"
+ lodash "^4.17.4"
+ mkdirp "^0.5.1"
+ source-map-support "^0.4.15"
+
+babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
dependencies:
core-js "^2.4.0"
regenerator-runtime "^0.11.0"
+babel-template@^6.24.1, babel-template@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02"
+ dependencies:
+ babel-runtime "^6.26.0"
+ babel-traverse "^6.26.0"
+ babel-types "^6.26.0"
+ babylon "^6.18.0"
+ lodash "^4.17.4"
+
+babel-traverse@^6.24.1, babel-traverse@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee"
+ dependencies:
+ babel-code-frame "^6.26.0"
+ babel-messages "^6.23.0"
+ babel-runtime "^6.26.0"
+ babel-types "^6.26.0"
+ babylon "^6.18.0"
+ debug "^2.6.8"
+ globals "^9.18.0"
+ invariant "^2.2.2"
+ lodash "^4.17.4"
+
+babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497"
+ dependencies:
+ babel-runtime "^6.26.0"
+ esutils "^2.0.2"
+ lodash "^4.17.4"
+ to-fast-properties "^1.0.3"
+
+babylon@^6.18.0:
+ version "6.18.0"
+ resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3"
+
balanced-match@0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.1.0.tgz#b504bd05869b39259dd0c5efc35d843176dccc4a"
@@ -283,12 +902,28 @@ balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+base@^0.11.1:
+ version "0.11.2"
+ resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
+ dependencies:
+ cache-base "^1.0.1"
+ class-utils "^0.3.5"
+ component-emitter "^1.2.1"
+ define-property "^1.0.0"
+ isobject "^3.0.1"
+ mixin-deep "^1.2.0"
+ pascalcase "^0.1.1"
+
bcrypt-pbkdf@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d"
dependencies:
tweetnacl "^0.14.3"
+before-after-hook@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-1.1.0.tgz#83165e15a59460d13702cb8febd6a1807896db5a"
+
big.js@^3.1.3:
version "3.2.0"
resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e"
@@ -307,6 +942,22 @@ boom@2.x.x:
dependencies:
hoek "2.x.x"
+bottleneck@^2.0.1:
+ version "2.5.1"
+ resolved "https://registry.yarnpkg.com/bottleneck/-/bottleneck-2.5.1.tgz#ef3bc13fd7e85e7a20d05f7e839642b399c32b72"
+
+boxen@^1.2.1:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b"
+ dependencies:
+ ansi-align "^2.0.0"
+ camelcase "^4.0.0"
+ chalk "^2.0.1"
+ cli-boxes "^1.0.0"
+ string-width "^2.0.0"
+ term-size "^1.2.0"
+ widest-line "^2.0.0"
+
brace-expansion@^1.1.7:
version "1.1.8"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
@@ -322,6 +973,21 @@ braces@^1.8.2:
preserve "^0.2.0"
repeat-element "^1.1.2"
+braces@^2.3.1:
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729"
+ dependencies:
+ arr-flatten "^1.1.0"
+ array-unique "^0.3.2"
+ extend-shallow "^2.0.1"
+ fill-range "^4.0.0"
+ isobject "^3.0.1"
+ repeat-element "^1.1.2"
+ snapdragon "^0.8.1"
+ snapdragon-node "^2.0.1"
+ split-string "^3.0.2"
+ to-regex "^3.0.1"
+
browser-stdout@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f"
@@ -340,6 +1006,17 @@ browserslist@^2.0.0, browserslist@^2.11.3:
caniuse-lite "^1.0.30000792"
electron-to-chromium "^1.3.30"
+browserslist@^3.2.6:
+ version "3.2.8"
+ resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6"
+ dependencies:
+ caniuse-lite "^1.0.30000844"
+ electron-to-chromium "^1.3.47"
+
+btoa-lite@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337"
+
buffer-crc32@~0.2.3:
version "0.2.13"
resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
@@ -352,12 +1029,42 @@ builtin-modules@^1.0.0, builtin-modules@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
+cache-base@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
+ dependencies:
+ collection-visit "^1.0.0"
+ component-emitter "^1.2.1"
+ get-value "^2.0.6"
+ has-value "^1.0.0"
+ isobject "^3.0.1"
+ set-value "^2.0.0"
+ to-object-path "^0.3.0"
+ union-value "^1.0.0"
+ unset-value "^1.0.0"
+
+cacheable-request@^2.1.1:
+ version "2.1.4"
+ resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d"
+ dependencies:
+ clone-response "1.0.2"
+ get-stream "3.0.0"
+ http-cache-semantics "3.8.1"
+ keyv "3.0.0"
+ lowercase-keys "1.0.0"
+ normalize-url "2.0.1"
+ responselike "1.0.2"
+
cachedir@1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/cachedir/-/cachedir-1.2.0.tgz#e9a0a25bb21a2b7a0f766f07c41eb7a311919b97"
dependencies:
os-homedir "^1.0.1"
+call-me-maybe@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b"
+
caller-path@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f"
@@ -368,6 +1075,22 @@ callsites@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca"
+camelcase-keys@^4.0.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-4.2.0.tgz#a2aa5fb1af688758259c32c141426d78923b9b77"
+ dependencies:
+ camelcase "^4.1.0"
+ map-obj "^2.0.0"
+ quick-lru "^1.0.0"
+
+camelcase@^1.0.2:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
+
+camelcase@^4.0.0, camelcase@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd"
+
caniuse-api@^1.5.2:
version "1.6.1"
resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c"
@@ -394,10 +1117,32 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000792, caniuse-lite@^1.0.30000805:
version "1.0.30000808"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000808.tgz#7d759b5518529ea08b6705a19e70dbf401628ffc"
+caniuse-lite@^1.0.30000844:
+ version "1.0.30000864"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000864.tgz#7a08c78da670f23c06f11aa918831b8f2dd60ddc"
+
+capture-stack-trace@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz#4a6fa07399c26bba47f0b2496b4d0fb408c5550d"
+
+cardinal@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-1.0.0.tgz#50e21c1b0aa37729f9377def196b5a9cec932ee9"
+ dependencies:
+ ansicolors "~0.2.1"
+ redeyed "~1.0.0"
+
caseless@~0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
+center-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
+ dependencies:
+ align-text "^0.1.3"
+ lazy-cache "^1.0.3"
+
chai@3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
@@ -406,6 +1151,17 @@ chai@3.5.0:
deep-eql "^0.1.3"
type-detect "^1.0.0"
+chai@^4.1.2:
+ version "4.1.2"
+ resolved "https://registry.yarnpkg.com/chai/-/chai-4.1.2.tgz#0f64584ba642f0f2ace2806279f4f06ca23ad73c"
+ dependencies:
+ assertion-error "^1.0.1"
+ check-error "^1.0.1"
+ deep-eql "^3.0.0"
+ get-func-name "^2.0.0"
+ pathval "^1.0.0"
+ type-detect "^4.0.0"
+
chalk@2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
@@ -452,6 +1208,10 @@ chardet@^0.4.0:
version "0.4.2"
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2"
+check-error@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
+
check-more-types@2.24.0:
version "2.24.0"
resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600"
@@ -470,6 +1230,23 @@ clap@^1.0.9:
dependencies:
chalk "^1.1.3"
+class-utils@^0.3.5:
+ version "0.3.6"
+ resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
+ dependencies:
+ arr-union "^3.1.0"
+ define-property "^0.2.5"
+ isobject "^3.0.0"
+ static-extend "^0.1.1"
+
+clean-stack@^1.0.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-1.3.0.tgz#9e821501ae979986c46b1d66d2d432db2fd4ae31"
+
+cli-boxes@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143"
+
cli-cursor@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987"
@@ -486,6 +1263,12 @@ cli-spinners@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c"
+cli-table@^0.3.1:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23"
+ dependencies:
+ colors "1.0.3"
+
cli-truncate@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574"
@@ -497,6 +1280,28 @@ cli-width@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
+cliui@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
+ dependencies:
+ center-align "^0.1.1"
+ right-align "^0.1.1"
+ wordwrap "0.0.2"
+
+cliui@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49"
+ dependencies:
+ string-width "^2.1.1"
+ strip-ansi "^4.0.0"
+ wrap-ansi "^2.0.0"
+
+clone-response@1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b"
+ dependencies:
+ mimic-response "^1.0.0"
+
clone@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.3.tgz#298d7e2231660f40c003c2ed3140decf3f53085f"
@@ -519,6 +1324,13 @@ code-point-at@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
+collection-visit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
+ dependencies:
+ map-visit "^1.0.0"
+ object-visit "^1.0.0"
+
color-convert@^1.3.0, color-convert@^1.8.2, color-convert@^1.9.0, color-convert@^1.9.1:
version "1.9.1"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed"
@@ -602,6 +1414,17 @@ common-tags@1.4.0:
dependencies:
babel-runtime "^6.18.0"
+compare-func@^1.3.1:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648"
+ dependencies:
+ array-ify "^1.0.0"
+ dot-prop "^3.0.0"
+
+component-emitter@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6"
+
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
@@ -629,15 +1452,79 @@ concat-with-sourcemaps@^1.0.5:
dependencies:
source-map "^0.6.1"
+configstore@^3.0.0:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.2.tgz#c6f25defaeef26df12dd33414b001fe81a543f8f"
+ dependencies:
+ dot-prop "^4.1.0"
+ graceful-fs "^4.1.2"
+ make-dir "^1.0.0"
+ unique-string "^1.0.0"
+ write-file-atomic "^2.0.0"
+ xdg-basedir "^3.0.0"
+
contains-path@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a"
+conventional-changelog-angular@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.0.tgz#6b37f957984f4d567b83cb29473fed60bd94679e"
+ dependencies:
+ compare-func "^1.3.1"
+ q "^1.5.1"
+
+conventional-changelog-writer@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.0.tgz#3ed983c8ef6a3aa51fe44e82c9c75e86f1b5aa42"
+ dependencies:
+ compare-func "^1.3.1"
+ conventional-commits-filter "^2.0.0"
+ dateformat "^3.0.0"
+ handlebars "^4.0.2"
+ json-stringify-safe "^5.0.1"
+ lodash "^4.2.1"
+ meow "^4.0.0"
+ semver "^5.5.0"
+ split "^1.0.0"
+ through2 "^2.0.0"
+
+conventional-commit-types@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/conventional-commit-types/-/conventional-commit-types-2.2.0.tgz#5db95739d6c212acbe7b6f656a11b940baa68946"
+
+conventional-commits-filter@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.0.tgz#a0ce1d1ff7a1dd7fab36bee8e8256d348d135651"
+ dependencies:
+ is-subset "^0.1.1"
+ modify-values "^1.0.0"
+
+conventional-commits-parser@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.0.tgz#7f604549a50bd8f60443fbe515484b1c2f06a5c4"
+ dependencies:
+ JSONStream "^1.0.4"
+ is-text-path "^1.0.0"
+ lodash "^4.2.1"
+ meow "^4.0.0"
+ split2 "^2.0.0"
+ through2 "^2.0.0"
+ trim-off-newlines "^1.0.0"
+
+convert-source-map@^1.5.1:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5"
+
+copy-descriptor@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
+
core-js@^2.4.0:
version "2.5.3"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e"
-core-js@^2.4.1:
+core-js@^2.4.1, core-js@^2.5.0:
version "2.5.7"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e"
@@ -661,7 +1548,21 @@ cosmiconfig@^2.1.0, cosmiconfig@^2.1.1:
parse-json "^2.2.0"
require-from-string "^1.1.0"
-cross-spawn@^5.1.0:
+cosmiconfig@^5.0.1:
+ version "5.0.5"
+ resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.0.5.tgz#a809e3c2306891ce17ab70359dc8bdf661fe2cd0"
+ dependencies:
+ is-directory "^0.3.1"
+ js-yaml "^3.9.0"
+ parse-json "^4.0.0"
+
+create-error-class@^3.0.0:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6"
+ dependencies:
+ capture-stack-trace "^1.0.0"
+
+cross-spawn@^5.0.1, cross-spawn@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
dependencies:
@@ -685,6 +1586,10 @@ cryptiles@2.x.x:
dependencies:
boom "2.x.x"
+crypto-random-string@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e"
+
css-color-function@~1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/css-color-function/-/css-color-function-1.3.3.tgz#8ed24c2c0205073339fafa004bc8c141fccb282e"
@@ -769,6 +1674,12 @@ csso@~2.3.1:
clap "^1.0.9"
source-map "^0.5.3"
+currently-unhandled@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea"
+ dependencies:
+ array-find-index "^1.0.1"
+
cypress@3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-3.0.1.tgz#6a8938ce8a551e4ae1bd5fb2ceab038d4ad39c4d"
@@ -813,6 +1724,16 @@ cypress@3.0.1:
url "0.11.0"
yauzl "2.8.0"
+cz-conventional-changelog@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/cz-conventional-changelog/-/cz-conventional-changelog-2.1.0.tgz#2f4bc7390e3244e4df293e6ba351e4c740a7c764"
+ dependencies:
+ conventional-commit-types "^2.0.0"
+ lodash.map "^4.5.1"
+ longest "^1.0.1"
+ right-pad "^1.0.1"
+ word-wrap "^1.0.3"
+
dashdash@^1.12.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
@@ -823,13 +1744,17 @@ date-fns@^1.27.2:
version "1.29.0"
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6"
+dateformat@^3.0.0:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
+
debug@2.6.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b"
dependencies:
ms "0.7.2"
-debug@2.6.9, debug@^2.2.0, debug@^2.6.8, debug@^2.6.9:
+debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
dependencies:
@@ -841,16 +1766,49 @@ debug@3.1.0, debug@^3.1.0:
dependencies:
ms "2.0.0"
-decamelize@^1.1.2:
+decamelize-keys@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9"
+ dependencies:
+ decamelize "^1.1.0"
+ map-obj "^1.0.0"
+
+decamelize@^1.0.0, decamelize@^1.1.0, decamelize@^1.1.2:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
+decamelize@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-2.0.0.tgz#656d7bbc8094c4c788ea53c5840908c9c7d063c7"
+ dependencies:
+ xregexp "4.0.0"
+
+decode-uri-component@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
+
+decompress-response@^3.3.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3"
+ dependencies:
+ mimic-response "^1.0.0"
+
deep-eql@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2"
dependencies:
type-detect "0.1.1"
+deep-eql@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df"
+ dependencies:
+ type-detect "^4.0.0"
+
+deep-extend@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
+
deep-is@~0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
@@ -859,6 +1817,25 @@ deepmerge@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.0.1.tgz#25c1c24f110fb914f80001b925264dd77f3f4312"
+define-property@^0.2.5:
+ version "0.2.5"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
+ dependencies:
+ is-descriptor "^0.1.0"
+
+define-property@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6"
+ dependencies:
+ is-descriptor "^1.0.0"
+
+define-property@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d"
+ dependencies:
+ is-descriptor "^1.0.2"
+ isobject "^3.0.1"
+
defined@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693"
@@ -879,10 +1856,35 @@ delayed-stream@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
+detect-indent@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208"
+ dependencies:
+ repeating "^2.0.0"
+
+detect-indent@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d"
+
+detect-newline@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2"
+
diff@3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9"
+diff@3.3.1:
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75"
+
+dir-glob@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034"
+ dependencies:
+ arrify "^1.0.1"
+ path-type "^3.0.0"
+
doctrine@1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa"
@@ -896,12 +1898,28 @@ doctrine@^2.1.0:
dependencies:
esutils "^2.0.2"
-dot-prop@^4.1.1:
+dot-prop@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177"
+ dependencies:
+ is-obj "^1.0.0"
+
+dot-prop@^4.1.0, dot-prop@^4.1.1:
version "4.2.0"
resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57"
dependencies:
is-obj "^1.0.0"
+duplexer2@~0.1.0:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1"
+ dependencies:
+ readable-stream "^2.0.2"
+
+duplexer3@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
+
duplexer@~0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"
@@ -925,6 +1943,10 @@ electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30:
version "1.3.33"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.33.tgz#bf00703d62a7c65238136578c352d6c5c042a545"
+electron-to-chromium@^1.3.47:
+ version "1.3.51"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.51.tgz#6a42b49daaf7f22a5b37b991daf949f34dbdb9b5"
+
elegant-spinner@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e"
@@ -933,12 +1955,35 @@ emojis-list@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"
+env-ci@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/env-ci/-/env-ci-2.1.1.tgz#73c42c0f3ee4813457210a8440a2ee1bbea0102a"
+ dependencies:
+ execa "^0.10.0"
+ java-properties "^0.2.9"
+
error-ex@^1.2.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc"
dependencies:
is-arrayish "^0.2.1"
+error-ex@^1.3.1:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
+ dependencies:
+ is-arrayish "^0.2.1"
+
+es6-promise@^4.0.3:
+ version "4.2.4"
+ resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29"
+
+es6-promisify@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203"
+ dependencies:
+ es6-promise "^4.0.3"
+
escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
@@ -1057,6 +2102,10 @@ esprima@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
+esprima@~3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.0.0.tgz#53cf247acda77313e551c3aa2e73342d3fb4f7d9"
+
esquery@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708"
@@ -1101,7 +2150,7 @@ eventemitter3@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163"
-execa@0.10.0:
+execa@0.10.0, execa@^0.10.0:
version "0.10.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50"
dependencies:
@@ -1113,6 +2162,18 @@ execa@0.10.0:
signal-exit "^3.0.0"
strip-eof "^1.0.0"
+execa@^0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
+ dependencies:
+ cross-spawn "^5.0.1"
+ get-stream "^3.0.0"
+ is-stream "^1.1.0"
+ npm-run-path "^2.0.0"
+ p-finally "^1.0.0"
+ signal-exit "^3.0.0"
+ strip-eof "^1.0.0"
+
executable@4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/executable/-/executable-4.1.1.tgz#41532bff361d3e57af4d763b70582db18f5d133c"
@@ -1129,12 +2190,37 @@ expand-brackets@^0.1.4:
dependencies:
is-posix-bracket "^0.1.0"
+expand-brackets@^2.1.4:
+ version "2.1.4"
+ resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
+ dependencies:
+ debug "^2.3.3"
+ define-property "^0.2.5"
+ extend-shallow "^2.0.1"
+ posix-character-classes "^0.1.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
expand-range@^1.8.1:
version "1.8.2"
resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
dependencies:
fill-range "^2.1.0"
+extend-shallow@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
+ dependencies:
+ is-extendable "^0.1.0"
+
+extend-shallow@^3.0.0, extend-shallow@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8"
+ dependencies:
+ assign-symbols "^1.0.0"
+ is-extendable "^1.0.1"
+
extend@~3.0.0, extend@~3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444"
@@ -1153,6 +2239,19 @@ extglob@^0.3.1:
dependencies:
is-extglob "^1.0.0"
+extglob@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543"
+ dependencies:
+ array-unique "^0.3.2"
+ define-property "^1.0.0"
+ expand-brackets "^2.1.4"
+ extend-shallow "^2.0.1"
+ fragment-cache "^0.2.1"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
extract-zip@1.6.6:
version "1.6.6"
resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.6.6.tgz#1290ede8d20d0872b429fd3f351ca128ec5ef85c"
@@ -1174,6 +2273,17 @@ fast-deep-equal@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
+fast-glob@^2.0.2:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.2.tgz#71723338ac9b4e0e2fff1d6748a2a13d5ed352bf"
+ dependencies:
+ "@mrmlnc/readdir-enhanced" "^2.2.1"
+ "@nodelib/fs.stat" "^1.0.1"
+ glob-parent "^3.1.0"
+ is-glob "^4.0.0"
+ merge2 "^1.2.1"
+ micromatch "^3.1.10"
+
fast-json-stable-stringify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
@@ -1226,6 +2336,15 @@ fill-range@^2.1.0:
repeat-element "^1.1.2"
repeat-string "^1.5.2"
+fill-range@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-number "^3.0.0"
+ repeat-string "^1.6.1"
+ to-regex-range "^2.1.0"
+
find-up@^1.0.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
@@ -1239,6 +2358,19 @@ find-up@^2.0.0:
dependencies:
locate-path "^2.0.0"
+find-up@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73"
+ dependencies:
+ locate-path "^3.0.0"
+
+find-versions@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-2.0.0.tgz#2ad90d490f6828c1aa40292cf709ac3318210c3c"
+ dependencies:
+ array-uniq "^1.0.0"
+ semver-regex "^1.0.0"
+
flat-cache@^1.2.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481"
@@ -1258,7 +2390,7 @@ follow-redirects@^1.0.0:
dependencies:
debug "^3.1.0"
-for-in@^1.0.1:
+for-in@^1.0.1, for-in@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
@@ -1288,10 +2420,27 @@ form-data@~2.3.1:
combined-stream "1.0.6"
mime-types "^2.1.12"
+fragment-cache@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
+ dependencies:
+ map-cache "^0.2.2"
+
+from2@^2.1.1:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af"
+ dependencies:
+ inherits "^2.0.1"
+ readable-stream "^2.0.0"
+
from@~0:
version "0.1.7"
resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe"
+fs-copy-file-sync@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/fs-copy-file-sync/-/fs-copy-file-sync-1.1.1.tgz#11bf32c096c10d126e5f6b36d06eece776062918"
+
fs-extra@4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.1.tgz#7fc0c6c8957f983f57f306a24e5b9ddd8d0dd880"
@@ -1308,6 +2457,14 @@ fs-extra@^5.0.0:
jsonfile "^4.0.0"
universalify "^0.1.0"
+fs-extra@^6.0.0:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-6.0.1.tgz#8abc128f7946e310135ddc93b98bddb410e7a34b"
+ dependencies:
+ graceful-fs "^4.1.2"
+ jsonfile "^4.0.0"
+ universalify "^0.1.0"
+
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
@@ -1326,10 +2483,22 @@ generic-names@^1.0.2:
dependencies:
loader-utils "^0.2.16"
-get-stream@^3.0.0:
+get-caller-file@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5"
+
+get-func-name@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"
+
+get-stream@3.0.0, get-stream@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
+get-value@^2.0.3, get-value@^2.0.6:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
+
getos@2.8.4:
version "2.8.4"
resolved "https://registry.yarnpkg.com/getos/-/getos-2.8.4.tgz#7b8603d3619c28e38cb0fe7a4f63c3acb80d5163"
@@ -1342,6 +2511,31 @@ getpass@^0.1.1:
dependencies:
assert-plus "^1.0.0"
+git-log-parser@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/git-log-parser/-/git-log-parser-1.2.0.tgz#2e6a4c1b13fc00028207ba795a7ac31667b9fd4a"
+ dependencies:
+ argv-formatter "~1.0.0"
+ spawn-error-forwarder "~1.0.0"
+ split2 "~1.0.0"
+ stream-combiner2 "~1.1.1"
+ through2 "~2.0.0"
+ traverse "~0.6.6"
+
+git-up@^2.0.0:
+ version "2.0.10"
+ resolved "https://registry.yarnpkg.com/git-up/-/git-up-2.0.10.tgz#20fe6bafbef4384cae253dc4f463c49a0c3bd2ec"
+ dependencies:
+ is-ssh "^1.3.0"
+ parse-url "^1.3.0"
+
+git-url-parse@^9.0.0:
+ version "9.0.1"
+ resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-9.0.1.tgz#2905b897a3db6e5cb9e10819f0fac2e740b4481b"
+ dependencies:
+ git-up "^2.0.0"
+ parse-domain "^2.0.0"
+
glob-base@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
@@ -1355,6 +2549,17 @@ glob-parent@^2.0.0:
dependencies:
is-glob "^2.0.0"
+glob-parent@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"
+ dependencies:
+ is-glob "^3.1.0"
+ path-dirname "^1.0.0"
+
+glob-to-regexp@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab"
+
glob@7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
@@ -1387,6 +2592,10 @@ globals@^11.0.1:
version "11.4.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.4.0.tgz#b85c793349561c16076a3c13549238a27945f1bc"
+globals@^9.18.0:
+ version "9.18.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
+
globby@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d"
@@ -1398,7 +2607,57 @@ globby@^5.0.0:
pify "^2.0.0"
pinkie-promise "^2.0.0"
-graceful-fs@^4.1.2, graceful-fs@^4.1.6:
+globby@^8.0.0:
+ version "8.0.1"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.1.tgz#b5ad48b8aa80b35b814fc1281ecc851f1d2b5b50"
+ dependencies:
+ array-union "^1.0.1"
+ dir-glob "^2.0.0"
+ fast-glob "^2.0.2"
+ glob "^7.1.2"
+ ignore "^3.3.5"
+ pify "^3.0.0"
+ slash "^1.0.0"
+
+got@^6.7.1:
+ version "6.7.1"
+ resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0"
+ dependencies:
+ create-error-class "^3.0.0"
+ duplexer3 "^0.1.4"
+ get-stream "^3.0.0"
+ is-redirect "^1.0.0"
+ is-retry-allowed "^1.0.0"
+ is-stream "^1.0.0"
+ lowercase-keys "^1.0.0"
+ safe-buffer "^5.0.1"
+ timed-out "^4.0.0"
+ unzip-response "^2.0.1"
+ url-parse-lax "^1.0.0"
+
+got@^8.0.1:
+ version "8.3.2"
+ resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937"
+ dependencies:
+ "@sindresorhus/is" "^0.7.0"
+ cacheable-request "^2.1.1"
+ decompress-response "^3.3.0"
+ duplexer3 "^0.1.4"
+ get-stream "^3.0.0"
+ into-stream "^3.1.0"
+ is-retry-allowed "^1.1.0"
+ isurl "^1.0.0-alpha5"
+ lowercase-keys "^1.0.0"
+ mimic-response "^1.0.0"
+ p-cancelable "^0.4.0"
+ p-timeout "^2.0.1"
+ pify "^3.0.0"
+ safe-buffer "^5.1.1"
+ timed-out "^4.0.1"
+ url-parse-lax "^3.0.0"
+ url-to-options "^1.0.1"
+
+graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6:
version "4.1.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
@@ -1406,10 +2665,24 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6:
version "1.0.1"
resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
+growl@1.10.3:
+ version "1.10.3"
+ resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.3.tgz#1926ba90cf3edfe2adb4927f5880bc22c66c790f"
+
growl@1.9.2:
version "1.9.2"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f"
+handlebars@^4.0.2:
+ version "4.0.11"
+ resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc"
+ dependencies:
+ async "^1.4.0"
+ optimist "^0.6.1"
+ source-map "^0.4.4"
+ optionalDependencies:
+ uglify-js "^2.6"
+
har-schema@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e"
@@ -1450,6 +2723,43 @@ has-flag@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
+has-symbol-support-x@^1.4.1:
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455"
+
+has-to-string-tag-x@^1.2.0:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d"
+ dependencies:
+ has-symbol-support-x "^1.4.1"
+
+has-value@^0.3.1:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
+ dependencies:
+ get-value "^2.0.3"
+ has-values "^0.1.4"
+ isobject "^2.0.0"
+
+has-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177"
+ dependencies:
+ get-value "^2.0.6"
+ has-values "^1.0.0"
+ isobject "^3.0.0"
+
+has-values@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771"
+
+has-values@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f"
+ dependencies:
+ is-number "^3.0.0"
+ kind-of "^4.0.0"
+
has@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28"
@@ -1465,7 +2775,7 @@ hawk@~3.1.3:
hoek "2.x.x"
sntp "1.x.x"
-he@^1.1.1:
+he@1.1.1, he@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"
@@ -1477,14 +2787,40 @@ hoek@4.x.x:
version "4.2.1"
resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb"
+home-or-tmp@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
+ dependencies:
+ os-homedir "^1.0.0"
+ os-tmpdir "^1.0.1"
+
+hook-std@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/hook-std/-/hook-std-1.0.1.tgz#fc91e6836c5b174f405dc4b57aa2228e4c599981"
+
hosted-git-info@^2.1.4:
version "2.6.0"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.0.tgz#23235b29ab230c576aab0d4f13fc046b0b038222"
+hosted-git-info@^2.6.0:
+ version "2.7.1"
+ resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047"
+
html-comment-regex@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e"
+http-cache-semantics@3.8.1:
+ version "3.8.1"
+ resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2"
+
+http-proxy-agent@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405"
+ dependencies:
+ agent-base "4"
+ debug "3.1.0"
+
http-proxy@^1.8.1:
version "1.17.0"
resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.17.0.tgz#7ad38494658f84605e2f6db4436df410f4e5be9a"
@@ -1522,6 +2858,13 @@ http-signature@~1.2.0:
jsprim "^1.2.2"
sshpk "^1.7.0"
+https-proxy-agent@^2.2.0, https-proxy-agent@^2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0"
+ dependencies:
+ agent-base "^4.1.0"
+ debug "^3.1.0"
+
iconv-lite@^0.4.17:
version "0.4.21"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.21.tgz#c47f8733d02171189ebc4a400f3218d348094798"
@@ -1536,6 +2879,20 @@ ignore@^3.3.3:
version "3.3.7"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021"
+ignore@^3.3.5:
+ version "3.3.10"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
+
+import-from@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/import-from/-/import-from-2.1.0.tgz#335db7f2a7affd53aaa471d4b8021dee36b7f3b1"
+ dependencies:
+ resolve-from "^3.0.0"
+
+import-lazy@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43"
+
imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
@@ -1561,11 +2918,11 @@ inflight@^1.0.4:
once "^1.3.0"
wrappy "1"
-inherits@2, inherits@^2.0.3, inherits@~2.0.3:
+inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
-ini@^1.3.4:
+ini@^1.3.4, ini@~1.3.0:
version "1.3.5"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
@@ -1588,10 +2945,39 @@ inquirer@^3.0.6:
strip-ansi "^4.0.0"
through "^2.3.6"
+into-stream@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6"
+ dependencies:
+ from2 "^2.1.1"
+ p-is-promise "^1.1.0"
+
+invariant@^2.2.2:
+ version "2.2.4"
+ resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
+ dependencies:
+ loose-envify "^1.0.0"
+
+invert-kv@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
+
is-absolute-url@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6"
+is-accessor-descriptor@^0.1.6:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
+ dependencies:
+ kind-of "^3.0.2"
+
+is-accessor-descriptor@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656"
+ dependencies:
+ kind-of "^6.0.0"
+
is-arrayish@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
@@ -1616,6 +3002,40 @@ is-ci@1.0.10:
dependencies:
ci-info "^1.0.0"
+is-ci@^1.0.10:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5"
+ dependencies:
+ ci-info "^1.0.0"
+
+is-data-descriptor@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
+ dependencies:
+ kind-of "^3.0.2"
+
+is-data-descriptor@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7"
+ dependencies:
+ kind-of "^6.0.0"
+
+is-descriptor@^0.1.0:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
+ dependencies:
+ is-accessor-descriptor "^0.1.6"
+ is-data-descriptor "^0.1.4"
+ kind-of "^5.0.0"
+
+is-descriptor@^1.0.0, is-descriptor@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec"
+ dependencies:
+ is-accessor-descriptor "^1.0.0"
+ is-data-descriptor "^1.0.0"
+ kind-of "^6.0.2"
+
is-directory@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1"
@@ -1630,14 +3050,24 @@ is-equal-shallow@^0.1.3:
dependencies:
is-primitive "^2.0.0"
-is-extendable@^0.1.1:
+is-extendable@^0.1.0, is-extendable@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
+is-extendable@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4"
+ dependencies:
+ is-plain-object "^2.0.4"
+
is-extglob@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
+is-extglob@^2.1.0, is-extglob@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
+
is-finite@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa"
@@ -1660,7 +3090,19 @@ is-glob@^2.0.0, is-glob@^2.0.1:
dependencies:
is-extglob "^1.0.0"
-is-installed-globally@0.1.0:
+is-glob@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a"
+ dependencies:
+ is-extglob "^2.1.0"
+
+is-glob@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0"
+ dependencies:
+ is-extglob "^2.1.1"
+
+is-installed-globally@0.1.0, is-installed-globally@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80"
dependencies:
@@ -1671,6 +3113,10 @@ is-module@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591"
+is-npm@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4"
+
is-number@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
@@ -1687,6 +3133,10 @@ is-obj@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f"
+is-object@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470"
+
is-path-cwd@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
@@ -1703,10 +3153,16 @@ is-path-inside@^1.0.0:
dependencies:
path-is-inside "^1.0.1"
-is-plain-obj@^1.0.0:
+is-plain-obj@^1.0.0, is-plain-obj@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
+is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
+ dependencies:
+ isobject "^3.0.1"
+
is-posix-bracket@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
@@ -1719,24 +3175,52 @@ is-promise@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
+is-redirect@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24"
+
is-resolvable@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88"
-is-stream@^1.1.0:
+is-retry-allowed@^1.0.0, is-retry-allowed@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34"
+
+is-ssh@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.3.0.tgz#ebea1169a2614da392a63740366c3ce049d8dff6"
+ dependencies:
+ protocols "^1.1.0"
+
+is-stream@^1.0.0, is-stream@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
+is-subset@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6"
+
is-svg@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9"
dependencies:
html-comment-regex "^1.1.0"
+is-text-path@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e"
+ dependencies:
+ text-extensions "^1.0.0"
+
is-typedarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
+is-windows@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
+
isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
@@ -1759,14 +3243,35 @@ isobject@^2.0.0:
dependencies:
isarray "1.0.0"
+isobject@^3.0.0, isobject@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
+
isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
+issue-parser@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/issue-parser/-/issue-parser-2.0.1.tgz#251cb2d2736dee9e7d428536b1fb762297bbe154"
+ dependencies:
+ lodash "^4.17.4"
+
+isurl@^1.0.0-alpha5:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67"
+ dependencies:
+ has-to-string-tag-x "^1.2.0"
+ is-object "^1.0.1"
+
items@2.x.x:
version "2.1.1"
resolved "https://registry.yarnpkg.com/items/-/items-2.1.1.tgz#8bd16d9c83b19529de5aea321acaada78364a198"
+java-properties@^0.2.9:
+ version "0.2.10"
+ resolved "https://registry.yarnpkg.com/java-properties/-/java-properties-0.2.10.tgz#2551560c25fa1ad94d998218178f233ad9b18f60"
+
joi@^9.2.0:
version "9.2.0"
resolved "https://registry.yarnpkg.com/joi/-/joi-9.2.0.tgz#3385ac790192130cbe230e802ec02c9215bbfeda"
@@ -1781,7 +3286,7 @@ js-base64@^2.1.9:
version "2.4.3"
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.3.tgz#2e545ec2b0f2957f41356510205214e98fad6582"
-js-tokens@^3.0.2:
+js-tokens@^3.0.0, js-tokens@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
@@ -1792,6 +3297,13 @@ js-yaml@^3.4.3:
argparse "^1.0.7"
esprima "^4.0.0"
+js-yaml@^3.9.0:
+ version "3.12.0"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1"
+ dependencies:
+ argparse "^1.0.7"
+ esprima "^4.0.0"
+
js-yaml@^3.9.1:
version "3.11.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef"
@@ -1810,10 +3322,22 @@ jsbn@~0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
+jsesc@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
+
jsesc@~0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
+json-buffer@3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898"
+
+json-parse-better-errors@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
+
json-schema-traverse@^0.3.0:
version "0.3.1"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340"
@@ -1832,7 +3356,7 @@ json-stable-stringify@^1.0.1:
dependencies:
jsonify "~0.0.0"
-json-stringify-safe@~5.0.1:
+json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
@@ -1840,7 +3364,7 @@ json3@3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1"
-json5@^0.5.0:
+json5@^0.5.0, json5@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
@@ -1860,6 +3384,10 @@ jsonify@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
+jsonparse@^1.2.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280"
+
jsprim@^1.2.2:
version "1.4.1"
resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
@@ -1869,7 +3397,13 @@ jsprim@^1.2.2:
json-schema "0.2.3"
verror "1.10.0"
-kind-of@^3.0.2:
+keyv@3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373"
+ dependencies:
+ json-buffer "3.0.0"
+
+kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
version "3.2.2"
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
dependencies:
@@ -1881,10 +3415,34 @@ kind-of@^4.0.0:
dependencies:
is-buffer "^1.1.5"
+kind-of@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d"
+
+kind-of@^6.0.0, kind-of@^6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
+
+latest-version@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15"
+ dependencies:
+ package-json "^4.0.0"
+
lazy-ass@1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513"
+lazy-cache@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
+
+lcid@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
+ dependencies:
+ invert-kv "^1.0.0"
+
levn@^0.3.0, levn@~0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
@@ -1948,6 +3506,15 @@ load-json-file@^2.0.0:
pify "^2.0.0"
strip-bom "^3.0.0"
+load-json-file@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b"
+ dependencies:
+ graceful-fs "^4.1.2"
+ parse-json "^4.0.0"
+ pify "^3.0.0"
+ strip-bom "^3.0.0"
+
loader-utils@^0.2.16:
version "0.2.17"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348"
@@ -1964,6 +3531,13 @@ locate-path@^2.0.0:
p-locate "^2.0.0"
path-exists "^3.0.0"
+locate-path@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e"
+ dependencies:
+ p-locate "^3.0.0"
+ path-exists "^3.0.0"
+
lodash._baseassign@^3.0.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e"
@@ -1991,6 +3565,10 @@ lodash._reinterpolate@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
+lodash.assign@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7"
+
lodash.create@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7"
@@ -2015,6 +3593,10 @@ lodash.keys@^3.0.0:
lodash.isarguments "^3.0.0"
lodash.isarray "^3.0.0"
+lodash.map@^4.5.1:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3"
+
lodash.memoize@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
@@ -2036,6 +3618,10 @@ lodash.templatesettings@^4.0.0:
dependencies:
lodash._reinterpolate "~3.0.0"
+lodash.toarray@^4.4.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561"
+
lodash.uniq@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
@@ -2044,7 +3630,7 @@ lodash@4.17.4:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
-lodash@^4.14.0:
+lodash@^4.14.0, lodash@^4.2.1:
version "4.17.10"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
@@ -2071,6 +3657,31 @@ log-update@^1.0.2:
ansi-escapes "^1.0.0"
cli-cursor "^1.0.2"
+longest@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
+
+loose-envify@^1.0.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848"
+ dependencies:
+ js-tokens "^3.0.0"
+
+loud-rejection@^1.0.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f"
+ dependencies:
+ currently-unhandled "^0.4.1"
+ signal-exit "^3.0.0"
+
+lowercase-keys@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306"
+
+lowercase-keys@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f"
+
lru-cache@^4.0.1:
version "4.1.2"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.2.tgz#45234b2e6e2f2b33da125624c4664929a0224c3f"
@@ -2088,14 +3699,76 @@ magic-string@^0.22.4:
dependencies:
vlq "^0.2.1"
+make-dir@^1.0.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c"
+ dependencies:
+ pify "^3.0.0"
+
+map-cache@^0.2.2:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
+
+map-obj@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
+
+map-obj@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9"
+
map-stream@~0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194"
+map-visit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
+ dependencies:
+ object-visit "^1.0.0"
+
+marked-terminal@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-3.0.0.tgz#01758f657977a0e72ebd2a339f8ac100c1d04240"
+ dependencies:
+ cardinal "^1.0.0"
+ chalk "^1.1.3"
+ cli-table "^0.3.1"
+ lodash.assign "^4.2.0"
+ node-emoji "^1.4.1"
+
+marked@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/marked/-/marked-0.4.0.tgz#9ad2c2a7a1791f10a852e0112f77b571dce10c66"
+
math-expression-evaluator@^1.2.14:
version "1.2.17"
resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac"
+mem@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76"
+ dependencies:
+ mimic-fn "^1.0.0"
+
+meow@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/meow/-/meow-4.0.1.tgz#d48598f6f4b1472f35bf6317a95945ace347f975"
+ dependencies:
+ camelcase-keys "^4.0.0"
+ decamelize-keys "^1.0.0"
+ loud-rejection "^1.0.0"
+ minimist "^1.1.3"
+ minimist-options "^3.0.1"
+ normalize-package-data "^2.3.4"
+ read-pkg-up "^3.0.0"
+ redent "^2.0.0"
+ trim-newlines "^2.0.0"
+
+merge2@^1.2.1:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.2.tgz#03212e3da8d86c4d8523cebd6318193414f94e34"
+
micromatch@^2.3.11:
version "2.3.11"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
@@ -2114,6 +3787,24 @@ micromatch@^2.3.11:
parse-glob "^3.0.4"
regex-cache "^0.4.2"
+micromatch@^3.1.10:
+ version "3.1.10"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
+ dependencies:
+ arr-diff "^4.0.0"
+ array-unique "^0.3.2"
+ braces "^2.3.1"
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ extglob "^2.0.4"
+ fragment-cache "^0.2.1"
+ kind-of "^6.0.2"
+ nanomatch "^1.2.9"
+ object.pick "^1.3.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.2"
+
mime-db@~1.33.0:
version "1.33.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db"
@@ -2128,21 +3819,36 @@ mime@^1.4.1:
version "1.6.0"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
+mime@^2.0.3:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369"
+
mimic-fn@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
+mimic-response@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.0.tgz#df3d3652a73fded6b9b0b24146e6fd052353458e"
+
minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
dependencies:
brace-expansion "^1.1.7"
+minimist-options@^3.0.1:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954"
+ dependencies:
+ arrify "^1.0.1"
+ is-plain-obj "^1.1.0"
+
minimist@0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
-minimist@1.2.0, minimist@^1.1.0, minimist@^1.2.0:
+minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
@@ -2150,6 +3856,13 @@ minimist@~0.0.1:
version "0.0.10"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
+mixin-deep@^1.2.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe"
+ dependencies:
+ for-in "^1.0.2"
+ is-extendable "^1.0.1"
+
mkdirp@0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12"
@@ -2178,6 +3891,25 @@ mocha@3.3.0:
mkdirp "0.5.1"
supports-color "3.1.2"
+mocha@^4.0.1:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/mocha/-/mocha-4.1.0.tgz#7d86cfbcf35cb829e2754c32e17355ec05338794"
+ dependencies:
+ browser-stdout "1.3.0"
+ commander "2.11.0"
+ debug "3.1.0"
+ diff "3.3.1"
+ escape-string-regexp "1.0.5"
+ glob "7.1.2"
+ growl "1.10.3"
+ he "1.1.1"
+ mkdirp "0.5.1"
+ supports-color "4.4.0"
+
+modify-values@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022"
+
moment@2.x.x:
version "2.22.1"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.1.tgz#529a2e9bf973f259c9643d237fda84de3a26e8ad"
@@ -2194,15 +3926,45 @@ mute-stream@0.0.7:
version "0.0.7"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
+nanomatch@^1.2.9:
+ version "1.2.13"
+ resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
+ dependencies:
+ arr-diff "^4.0.0"
+ array-unique "^0.3.2"
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ fragment-cache "^0.2.1"
+ is-windows "^1.0.2"
+ kind-of "^6.0.2"
+ object.pick "^1.3.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
+nerf-dart@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/nerf-dart/-/nerf-dart-1.0.0.tgz#e6dab7febf5ad816ea81cf5c629c5a0ebde72c1a"
+
nice-try@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4"
-normalize-package-data@^2.3.2:
+node-emoji@^1.4.1:
+ version "1.8.1"
+ resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.8.1.tgz#6eec6bfb07421e2148c75c6bba72421f8530a826"
+ dependencies:
+ lodash.toarray "^4.4.0"
+
+node-fetch@^2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5"
+
+normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
version "2.4.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f"
dependencies:
@@ -2221,6 +3983,14 @@ normalize-range@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
+normalize-url@2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6"
+ dependencies:
+ prepend-http "^2.0.0"
+ query-string "^5.0.1"
+ sort-keys "^2.0.0"
+
normalize-url@^1.4.0:
version "1.9.1"
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c"
@@ -2230,6 +4000,10 @@ normalize-url@^1.4.0:
query-string "^4.1.0"
sort-keys "^1.0.0"
+normalize-url@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.1.0.tgz#c3cbb2b09fbf1485e92935d603d9ee7156c61937"
+
npm-run-path@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
@@ -2252,6 +4026,20 @@ object-assign@^4.0.1, object-assign@^4.1.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
+object-copy@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c"
+ dependencies:
+ copy-descriptor "^0.1.0"
+ define-property "^0.2.5"
+ kind-of "^3.0.3"
+
+object-visit@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb"
+ dependencies:
+ isobject "^3.0.0"
+
object.omit@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
@@ -2259,6 +4047,12 @@ object.omit@^2.0.0:
for-own "^0.1.4"
is-extendable "^0.1.1"
+object.pick@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
+ dependencies:
+ isobject "^3.0.1"
+
once@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
@@ -2283,7 +4077,7 @@ opener@~1.4.0:
version "1.4.3"
resolved "https://registry.yarnpkg.com/opener/-/opener-1.4.3.tgz#5c6da2c5d7e5831e8ffa3964950f8d6674ac90b8"
-optimist@0.6.x:
+optimist@0.6.x, optimist@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
dependencies:
@@ -2310,38 +4104,115 @@ ora@^0.2.3:
cli-spinners "^0.1.2"
object-assign "^4.0.1"
-os-homedir@^1.0.1:
+os-homedir@^1.0.0, os-homedir@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
-os-tmpdir@~1.0.1, os-tmpdir@~1.0.2:
+os-locale@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2"
+ dependencies:
+ execa "^0.7.0"
+ lcid "^1.0.0"
+ mem "^1.1.0"
+
+os-tmpdir@^1.0.1, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
+p-cancelable@^0.4.0:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0"
+
+p-filter@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-filter/-/p-filter-1.0.0.tgz#629d317150209c8fd508ba137713ef4bb920e9db"
+ dependencies:
+ p-map "^1.0.0"
+
p-finally@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
+p-is-promise@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e"
+
p-limit@^1.1.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c"
dependencies:
p-try "^1.0.0"
+p-limit@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.0.0.tgz#e624ed54ee8c460a778b3c9f3670496ff8a57aec"
+ dependencies:
+ p-try "^2.0.0"
+
p-locate@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
dependencies:
p-limit "^1.1.0"
-p-map@^1.1.1:
+p-locate@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4"
+ dependencies:
+ p-limit "^2.0.0"
+
+p-map@^1.0.0, p-map@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b"
+p-reduce@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa"
+
+p-retry@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-2.0.0.tgz#b97f1f4d6d81a3c065b2b40107b811e995c1bfba"
+ dependencies:
+ retry "^0.12.0"
+
+p-timeout@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038"
+ dependencies:
+ p-finally "^1.0.0"
+
p-try@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
+p-try@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1"
+
+package-json@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed"
+ dependencies:
+ got "^6.7.1"
+ registry-auth-token "^3.0.1"
+ registry-url "^3.0.3"
+ semver "^5.1.0"
+
+parse-domain@^2.0.0:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/parse-domain/-/parse-domain-2.1.2.tgz#8c536bdecf7a9af01bb6d7ad30eb794791d6c2c7"
+ dependencies:
+ chai "^4.1.2"
+ fs-copy-file-sync "^1.1.1"
+ got "^8.0.1"
+ mkdirp "^0.5.1"
+ mocha "^4.0.1"
+
+parse-github-url@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/parse-github-url/-/parse-github-url-1.0.2.tgz#242d3b65cbcdda14bb50439e3242acf6971db395"
+
parse-glob@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
@@ -2357,6 +4228,28 @@ parse-json@^2.2.0:
dependencies:
error-ex "^1.2.0"
+parse-json@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0"
+ dependencies:
+ error-ex "^1.3.1"
+ json-parse-better-errors "^1.0.1"
+
+parse-url@^1.3.0:
+ version "1.3.11"
+ resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-1.3.11.tgz#57c15428ab8a892b1f43869645c711d0e144b554"
+ dependencies:
+ is-ssh "^1.3.0"
+ protocols "^1.4.0"
+
+pascalcase@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
+
+path-dirname@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0"
+
path-exists@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b"
@@ -2367,7 +4260,7 @@ path-exists@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
-path-is-absolute@^1.0.0:
+path-is-absolute@^1.0.0, path-is-absolute@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
@@ -2389,6 +4282,16 @@ path-type@^2.0.0:
dependencies:
pify "^2.0.0"
+path-type@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f"
+ dependencies:
+ pify "^3.0.0"
+
+pathval@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0"
+
pause-stream@0.0.11:
version "0.0.11"
resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445"
@@ -2458,6 +4361,10 @@ portfinder@^1.0.13:
debug "^2.2.0"
mkdirp "0.5.x"
+posix-character-classes@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
+
postcss-apply@^0.8.0:
version "0.8.0"
resolved "https://registry.yarnpkg.com/postcss-apply/-/postcss-apply-0.8.0.tgz#14e544bbb5cb6f1c1e048857965d79ae066b1343"
@@ -2991,14 +4898,22 @@ prelude-ls@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
-prepend-http@^1.0.0:
+prepend-http@^1.0.0, prepend-http@^1.0.1:
version "1.0.4"
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
+prepend-http@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
+
preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
+private@^0.1.6, private@^0.1.8:
+ version "0.1.8"
+ resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
+
process-nextick-args@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
@@ -3015,6 +4930,10 @@ promise.series@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/promise.series/-/promise.series-0.2.0.tgz#2cc7ebe959fc3a6619c04ab4dbdc9e452d864bbd"
+protocols@^1.1.0, protocols@^1.4.0:
+ version "1.4.6"
+ resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.6.tgz#f8bb263ea1b5fd7a7604d26b8be39bd77678bf8a"
+
ps-tree@1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.1.0.tgz#b421b24140d6203f1ed3c76996b4427b08e8c014"
@@ -3033,7 +4952,7 @@ punycode@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
-q@^1.1.2:
+q@^1.1.2, q@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
@@ -3056,10 +4975,22 @@ query-string@^4.1.0:
object-assign "^4.1.0"
strict-uri-encode "^1.0.0"
+query-string@^5.0.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb"
+ dependencies:
+ decode-uri-component "^0.2.0"
+ object-assign "^4.1.0"
+ strict-uri-encode "^1.0.0"
+
querystring@0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620"
+quick-lru@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8"
+
ramda@0.24.1:
version "0.24.1"
resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.24.1.tgz#c3b7755197f35b8dc3502228262c4c91ddb6b857"
@@ -3071,6 +5002,15 @@ randomatic@^1.1.3:
is-number "^3.0.0"
kind-of "^4.0.0"
+rc@^1.0.1, rc@^1.1.6:
+ version "1.2.8"
+ resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
+ dependencies:
+ deep-extend "^0.6.0"
+ ini "~1.3.0"
+ minimist "^1.2.0"
+ strip-json-comments "~2.0.1"
+
read-pkg-up@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be"
@@ -3078,6 +5018,20 @@ read-pkg-up@^2.0.0:
find-up "^2.0.0"
read-pkg "^2.0.0"
+read-pkg-up@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07"
+ dependencies:
+ find-up "^2.0.0"
+ read-pkg "^3.0.0"
+
+read-pkg-up@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978"
+ dependencies:
+ find-up "^3.0.0"
+ read-pkg "^3.0.0"
+
read-pkg@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8"
@@ -3086,7 +5040,23 @@ read-pkg@^2.0.0:
normalize-package-data "^2.3.2"
path-type "^2.0.0"
-readable-stream@^2.2.2:
+read-pkg@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389"
+ dependencies:
+ load-json-file "^4.0.0"
+ normalize-package-data "^2.3.2"
+ path-type "^3.0.0"
+
+read-pkg@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-4.0.1.tgz#963625378f3e1c4d48c85872b5a6ec7d5d093237"
+ dependencies:
+ normalize-package-data "^2.3.2"
+ parse-json "^4.0.0"
+ pify "^3.0.0"
+
+readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2:
version "2.3.6"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
dependencies:
@@ -3098,6 +5068,19 @@ readable-stream@^2.2.2:
string_decoder "~1.1.1"
util-deprecate "~1.0.1"
+redent@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa"
+ dependencies:
+ indent-string "^3.0.0"
+ strip-indent "^2.0.0"
+
+redeyed@~1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-1.0.1.tgz#e96c193b40c0816b00aec842698e61185e55498a"
+ dependencies:
+ esprima "~3.0.0"
+
reduce-css-calc@^1.2.6, reduce-css-calc@^1.2.7:
version "1.3.0"
resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716"
@@ -3123,16 +5106,35 @@ regenerate@^1.2.1:
version "1.3.3"
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f"
+regenerator-runtime@^0.10.5:
+ version "0.10.5"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658"
+
regenerator-runtime@^0.11.0:
version "0.11.1"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
+regenerator-transform@^0.10.0:
+ version "0.10.1"
+ resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd"
+ dependencies:
+ babel-runtime "^6.18.0"
+ babel-types "^6.19.0"
+ private "^0.1.6"
+
regex-cache@^0.4.2:
version "0.4.4"
resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd"
dependencies:
is-equal-shallow "^0.1.3"
+regex-not@^1.0.0, regex-not@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
+ dependencies:
+ extend-shallow "^3.0.2"
+ safe-regex "^1.1.0"
+
regexpp@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab"
@@ -3145,6 +5147,27 @@ regexpu-core@^1.0.0:
regjsgen "^0.2.0"
regjsparser "^0.1.4"
+regexpu-core@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240"
+ dependencies:
+ regenerate "^1.2.1"
+ regjsgen "^0.2.0"
+ regjsparser "^0.1.4"
+
+registry-auth-token@^3.0.1, registry-auth-token@^3.3.1:
+ version "3.3.2"
+ resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20"
+ dependencies:
+ rc "^1.1.6"
+ safe-buffer "^5.0.1"
+
+registry-url@^3.0.3:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942"
+ dependencies:
+ rc "^1.0.1"
+
regjsgen@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7"
@@ -3163,7 +5186,7 @@ repeat-element@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a"
-repeat-string@^1.5.2:
+repeat-string@^1.5.2, repeat-string@^1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
@@ -3231,10 +5254,18 @@ request@^2.78.0:
tunnel-agent "^0.6.0"
uuid "^3.1.0"
+require-directory@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
+
require-from-string@^1.1.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418"
+require-main-filename@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
+
require-uncached@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3"
@@ -3254,6 +5285,18 @@ resolve-from@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226"
+resolve-from@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748"
+
+resolve-from@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
+
+resolve-url@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
+
resolve@^1.1.6, resolve@^1.4.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36"
@@ -3266,6 +5309,12 @@ resolve@^1.5.0, resolve@^1.6.0:
dependencies:
path-parse "^1.0.5"
+responselike@1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
+ dependencies:
+ lowercase-keys "^1.0.0"
+
restore-cursor@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541"
@@ -3280,6 +5329,14 @@ restore-cursor@^2.0.0:
onetime "^2.0.0"
signal-exit "^3.0.2"
+ret@~0.1.10:
+ version "0.1.15"
+ resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
+
+retry@^0.12.0:
+ version "0.12.0"
+ resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b"
+
rgb-hex@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/rgb-hex/-/rgb-hex-2.1.0.tgz#c773c5fe2268a25578d92539a82a7a5ce53beda6"
@@ -3288,6 +5345,16 @@ rgb@~0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/rgb/-/rgb-0.1.0.tgz#be27b291e8feffeac1bd99729721bfa40fc037b5"
+right-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
+ dependencies:
+ align-text "^0.1.1"
+
+right-pad@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/right-pad/-/right-pad-1.0.1.tgz#8ca08c2cbb5b55e74dafa96bf7fd1a27d568c8d0"
+
rimraf@^2.2.8:
version "2.6.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
@@ -3396,6 +5463,12 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
+safe-regex@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
+ dependencies:
+ ret "~0.1.10"
+
safer-buffer@^2.1.0:
version "2.1.2"
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
@@ -3404,10 +5477,73 @@ sax@~1.2.1:
version "1.2.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
-"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0:
+semantic-release@^15.6.3:
+ version "15.6.3"
+ resolved "https://registry.yarnpkg.com/semantic-release/-/semantic-release-15.6.3.tgz#3e336f421b7f7595c991609d6de3ee7f53918f2a"
+ dependencies:
+ "@semantic-release/commit-analyzer" "^5.0.0"
+ "@semantic-release/error" "^2.2.0"
+ "@semantic-release/github" "^4.1.0"
+ "@semantic-release/npm" "^3.2.0"
+ "@semantic-release/release-notes-generator" "^6.0.0"
+ aggregate-error "^1.0.0"
+ chalk "^2.3.0"
+ cosmiconfig "^5.0.1"
+ debug "^3.1.0"
+ env-ci "^2.0.0"
+ execa "^0.10.0"
+ find-versions "^2.0.0"
+ get-stream "^3.0.0"
+ git-log-parser "^1.2.0"
+ git-url-parse "^9.0.0"
+ hook-std "^1.0.1"
+ hosted-git-info "^2.6.0"
+ lodash "^4.17.4"
+ marked "^0.4.0"
+ marked-terminal "^3.0.0"
+ p-locate "^3.0.0"
+ p-reduce "^1.0.0"
+ read-pkg-up "^4.0.0"
+ resolve-from "^4.0.0"
+ semver "^5.4.1"
+ yargs "^12.0.0"
+
+semver-diff@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36"
+ dependencies:
+ semver "^5.0.3"
+
+semver-regex@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-1.0.0.tgz#92a4969065f9c70c694753d55248fc68f8f652c9"
+
+"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
+set-blocking@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
+
+set-value@^0.4.3:
+ version "0.4.3"
+ resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1"
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-extendable "^0.1.1"
+ is-plain-object "^2.0.1"
+ to-object-path "^0.3.0"
+
+set-value@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274"
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-extendable "^0.1.1"
+ is-plain-object "^2.0.3"
+ split-string "^3.0.1"
+
shebang-command@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
@@ -3428,6 +5564,10 @@ simple-swizzle@^0.2.2:
dependencies:
is-arrayish "^0.3.1"
+slash@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
+
slice-ansi@0.0.4:
version "0.0.4"
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35"
@@ -3438,6 +5578,33 @@ slice-ansi@1.0.0:
dependencies:
is-fullwidth-code-point "^2.0.0"
+snapdragon-node@^2.0.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
+ dependencies:
+ define-property "^1.0.0"
+ isobject "^3.0.0"
+ snapdragon-util "^3.0.1"
+
+snapdragon-util@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2"
+ dependencies:
+ kind-of "^3.2.0"
+
+snapdragon@^0.8.1:
+ version "0.8.2"
+ resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d"
+ dependencies:
+ base "^0.11.1"
+ debug "^2.2.0"
+ define-property "^0.2.5"
+ extend-shallow "^2.0.1"
+ map-cache "^0.2.2"
+ source-map "^0.5.6"
+ source-map-resolve "^0.5.0"
+ use "^3.1.0"
+
sntp@1.x.x:
version "1.0.9"
resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198"
@@ -3450,11 +5617,43 @@ sort-keys@^1.0.0:
dependencies:
is-plain-obj "^1.0.0"
+sort-keys@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128"
+ dependencies:
+ is-plain-obj "^1.0.0"
+
sortablejs@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/sortablejs/-/sortablejs-1.7.0.tgz#80a2b2370abd568e1cec8c271131ef30a904fa28"
-source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1:
+source-map-resolve@^0.5.0:
+ version "0.5.2"
+ resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259"
+ dependencies:
+ atob "^2.1.1"
+ decode-uri-component "^0.2.0"
+ resolve-url "^0.2.1"
+ source-map-url "^0.4.0"
+ urix "^0.1.0"
+
+source-map-support@^0.4.15:
+ version "0.4.18"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f"
+ dependencies:
+ source-map "^0.5.6"
+
+source-map-url@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
+
+source-map@^0.4.4:
+ version "0.4.4"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
+ dependencies:
+ amdefine ">=0.0.4"
+
+source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1:
version "0.5.7"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
@@ -3462,6 +5661,10 @@ source-map@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
+spawn-error-forwarder@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/spawn-error-forwarder/-/spawn-error-forwarder-1.0.0.tgz#1afd94738e999b0346d7b9fc373be55e07577029"
+
spdx-correct@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82"
@@ -3484,12 +5687,36 @@ spdx-license-ids@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87"
+split-string@^3.0.1, split-string@^3.0.2:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
+ dependencies:
+ extend-shallow "^3.0.0"
+
+split2@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/split2/-/split2-2.2.0.tgz#186b2575bcf83e85b7d18465756238ee4ee42493"
+ dependencies:
+ through2 "^2.0.2"
+
+split2@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/split2/-/split2-1.0.0.tgz#52e2e221d88c75f9a73f90556e263ff96772b314"
+ dependencies:
+ through2 "~2.0.0"
+
split@0.3:
version "0.3.3"
resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f"
dependencies:
through "2"
+split@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9"
+ dependencies:
+ through "2"
+
sprintf-js@~1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
@@ -3520,6 +5747,20 @@ start-server-and-test@^1.4.1:
ps-tree "1.1.0"
wait-on "2.1.0"
+static-extend@^0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
+ dependencies:
+ define-property "^0.2.5"
+ object-copy "^0.1.0"
+
+stream-combiner2@~1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe"
+ dependencies:
+ duplexer2 "~0.1.0"
+ readable-stream "^2.0.2"
+
stream-combiner@~0.0.4:
version "0.0.4"
resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14"
@@ -3546,7 +5787,7 @@ string-width@^1.0.1:
is-fullwidth-code-point "^1.0.0"
strip-ansi "^3.0.0"
-string-width@^2.1.0, string-width@^2.1.1:
+string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
dependencies:
@@ -3583,6 +5824,10 @@ strip-eof@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
+strip-indent@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68"
+
strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
@@ -3597,6 +5842,12 @@ supports-color@3.1.2:
dependencies:
has-flag "^1.0.0"
+supports-color@4.4.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e"
+ dependencies:
+ has-flag "^2.0.0"
+
supports-color@5.1.0, supports-color@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.1.0.tgz#058a021d1b619f7ddf3980d712ea3590ce7de3d5"
@@ -3658,6 +5909,16 @@ table@4.0.2:
slice-ansi "1.0.0"
string-width "^2.1.1"
+term-size@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69"
+ dependencies:
+ execa "^0.7.0"
+
+text-extensions@^1.0.0:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.7.0.tgz#faaaba2625ed746d568a23e4d0aacd9bf08a8b39"
+
text-table@~0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
@@ -3666,10 +5927,21 @@ throttleit@~0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-0.0.2.tgz#cfedf88e60c00dd9697b61fdd2a8343a9b680eaf"
-through@2, through@^2.3.6, through@~2.3, through@~2.3.1:
+through2@^2.0.0, through2@^2.0.2, through2@~2.0.0:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
+ dependencies:
+ readable-stream "^2.1.5"
+ xtend "~4.0.1"
+
+through@2, "through@>=2.2.7 <3", through@^2.3.6, through@~2.3, through@~2.3.1:
version "2.3.8"
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
+timed-out@^4.0.0, timed-out@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f"
+
tmp@0.0.31:
version "0.0.31"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7"
@@ -3682,6 +5954,32 @@ tmp@^0.0.33:
dependencies:
os-tmpdir "~1.0.2"
+to-fast-properties@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47"
+
+to-object-path@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
+ dependencies:
+ kind-of "^3.0.2"
+
+to-regex-range@^2.1.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38"
+ dependencies:
+ is-number "^3.0.0"
+ repeat-string "^1.6.1"
+
+to-regex@^3.0.1, to-regex@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce"
+ dependencies:
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ regex-not "^1.0.2"
+ safe-regex "^1.1.0"
+
topo@2.x.x:
version "2.0.2"
resolved "https://registry.yarnpkg.com/topo/-/topo-2.0.2.tgz#cd5615752539057c0dc0491a621c3bc6fbe1d182"
@@ -3694,6 +5992,38 @@ tough-cookie@~2.3.0, tough-cookie@~2.3.3:
dependencies:
punycode "^1.4.1"
+traverse@~0.6.6:
+ version "0.6.6"
+ resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137"
+
+travis-deploy-once@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/travis-deploy-once/-/travis-deploy-once-5.0.1.tgz#373c9987a1af5c5a5106ee3d6e042dce2029b02d"
+ dependencies:
+ babel-polyfill "^6.26.0"
+ babel-preset-env "^1.6.1"
+ babel-register "^6.26.0"
+ chalk "^2.1.0"
+ execa "^0.10.0"
+ got "^8.0.1"
+ p-retry "^2.0.0"
+ semver "^5.4.1"
+ update-notifier "^2.3.0"
+ url-join "^4.0.0"
+ yargs "^12.0.1"
+
+trim-newlines@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20"
+
+trim-off-newlines@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3"
+
+trim-right@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
+
tunnel-agent@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
@@ -3718,6 +6048,10 @@ type-detect@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
+type-detect@^4.0.0:
+ version "4.0.8"
+ resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
+
typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
@@ -3731,10 +6065,28 @@ uglify-es@3.0.3:
optionalDependencies:
uglify-to-browserify "~1.0.0"
+uglify-js@^2.6:
+ version "2.8.29"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
+ dependencies:
+ source-map "~0.5.1"
+ yargs "~3.10.0"
+ optionalDependencies:
+ uglify-to-browserify "~1.0.0"
+
uglify-to-browserify@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
+union-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4"
+ dependencies:
+ arr-union "^3.1.0"
+ get-value "^2.0.6"
+ is-extendable "^0.1.1"
+ set-value "^0.4.3"
+
union@~0.4.3:
version "0.4.6"
resolved "https://registry.yarnpkg.com/union/-/union-0.4.6.tgz#198fbdaeba254e788b0efcb630bc11f24a2959e0"
@@ -3755,6 +6107,12 @@ uniqs@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02"
+unique-string@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a"
+ dependencies:
+ crypto-random-string "^1.0.0"
+
units-css@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/units-css/-/units-css-0.4.0.tgz#d6228653a51983d7c16ff28f8b9dc3b1ffed3a07"
@@ -3766,10 +6124,64 @@ universalify@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"
+unset-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
+ dependencies:
+ has-value "^0.3.1"
+ isobject "^3.0.0"
+
+unzip-response@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97"
+
+update-notifier@^2.3.0:
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6"
+ dependencies:
+ boxen "^1.2.1"
+ chalk "^2.0.1"
+ configstore "^3.0.0"
+ import-lazy "^2.1.0"
+ is-ci "^1.0.10"
+ is-installed-globally "^0.1.0"
+ is-npm "^1.0.0"
+ latest-version "^3.0.0"
+ semver-diff "^2.0.0"
+ xdg-basedir "^3.0.0"
+
+urix@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
+
url-join@^2.0.2:
version "2.0.5"
resolved "https://registry.yarnpkg.com/url-join/-/url-join-2.0.5.tgz#5af22f18c052a000a48d7b82c5e9c2e2feeda728"
+url-join@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.0.tgz#4d3340e807d3773bda9991f8305acdcc2a665d2a"
+
+url-parse-lax@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73"
+ dependencies:
+ prepend-http "^1.0.1"
+
+url-parse-lax@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c"
+ dependencies:
+ prepend-http "^2.0.0"
+
+url-template@^2.0.8:
+ version "2.0.8"
+ resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21"
+
+url-to-options@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9"
+
url@0.11.0:
version "0.11.0"
resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"
@@ -3777,6 +6189,12 @@ url@0.11.0:
punycode "1.3.2"
querystring "0.2.0"
+use@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/use/-/use-3.1.0.tgz#14716bf03fdfefd03040aef58d8b4b85f3a7c544"
+ dependencies:
+ kind-of "^6.0.2"
+
util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
@@ -3826,12 +6244,34 @@ whet.extend@~0.9.9:
version "0.9.9"
resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1"
+which-module@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
+
which@^1.2.9:
version "1.3.0"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"
dependencies:
isexe "^2.0.0"
+widest-line@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.0.tgz#0142a4e8a243f8882c0233aa0e0281aa76152273"
+ dependencies:
+ string-width "^2.1.1"
+
+window-size@0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
+
+word-wrap@^1.0.3:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
+
+wordwrap@0.0.2:
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
+
wordwrap@~0.0.2:
version "0.0.3"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
@@ -3840,20 +6280,83 @@ wordwrap@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
+wrap-ansi@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"
+ dependencies:
+ string-width "^1.0.1"
+ strip-ansi "^3.0.1"
+
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+write-file-atomic@^2.0.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab"
+ dependencies:
+ graceful-fs "^4.1.11"
+ imurmurhash "^0.1.4"
+ signal-exit "^3.0.2"
+
write@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757"
dependencies:
mkdirp "^0.5.1"
+xdg-basedir@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4"
+
+xregexp@4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.0.0.tgz#e698189de49dd2a18cc5687b05e17c8e43943020"
+
+xtend@~4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
+
+"y18n@^3.2.1 || ^4.0.0":
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"
+
yallist@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
+yargs-parser@^10.1.0:
+ version "10.1.0"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8"
+ dependencies:
+ camelcase "^4.1.0"
+
+yargs@^12.0.0, yargs@^12.0.1:
+ version "12.0.1"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.1.tgz#6432e56123bb4e7c3562115401e98374060261c2"
+ dependencies:
+ cliui "^4.0.0"
+ decamelize "^2.0.0"
+ find-up "^3.0.0"
+ get-caller-file "^1.0.1"
+ os-locale "^2.0.0"
+ require-directory "^2.1.1"
+ require-main-filename "^1.0.1"
+ set-blocking "^2.0.0"
+ string-width "^2.0.0"
+ which-module "^2.0.0"
+ y18n "^3.2.1 || ^4.0.0"
+ yargs-parser "^10.1.0"
+
+yargs@~3.10.0:
+ version "3.10.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
+ dependencies:
+ camelcase "^1.0.2"
+ cliui "^2.1.0"
+ decamelize "^1.0.0"
+ window-size "0.1.0"
+
yauzl@2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005"