diff --git a/docs/management/advanced-options.asciidoc b/docs/management/advanced-options.asciidoc index c2306b80734d8..bf4f7d9d82704 100644 --- a/docs/management/advanced-options.asciidoc +++ b/docs/management/advanced-options.asciidoc @@ -134,11 +134,6 @@ The maximum numbers of buckets that a single data source can return. This might arise when the user selects a short interval (for example, 1s) for a long time period (1 year). -[[pagenavigation]]`pageNavigation`:: -The style of navigation menu for Kibana. Choices are Legacy, the legacy style -where every plugin is represented in the nav, and Modern, a new format that -bundles related plugins together in flyaway nested navigation. - [[query-allowleadingwildcards]]`query:allowLeadingWildcards`:: Allows a wildcard (*) as the first character in a query clause. Only applies when experimental query features are enabled in the query bar. To disallow diff --git a/docs/management/index-patterns.asciidoc b/docs/management/index-patterns.asciidoc index d83f2571ad26f..28dbacc628ce9 100644 --- a/docs/management/index-patterns.asciidoc +++ b/docs/management/index-patterns.asciidoc @@ -158,10 +158,13 @@ date values in {es}, you can use a {kib} field formatter to change the display t <>, and <>. +To customize the displayed field name provided by {es}, you can +use *Custom Label* . + A popularity counter keeps track of the fields you use most often. The top five most popular fields and their values are displayed in <>. -To edit the field format and popularity counter, click the edit icon +To edit the field display, click the edit icon (image:management/index-patterns/images/edit_icon.png[]) in the index pattern detail view. [role="screenshot"] diff --git a/docs/management/index-patterns/images/edit-field-format.png b/docs/management/index-patterns/images/edit-field-format.png old mode 100755 new mode 100644 index 15ab0c5bf8763..1ad29d82d2590 Binary files a/docs/management/index-patterns/images/edit-field-format.png and b/docs/management/index-patterns/images/edit-field-format.png differ diff --git a/docs/management/managing-fields.asciidoc b/docs/management/managing-fields.asciidoc index 1b9d22699d359..97cd184a4db88 100644 --- a/docs/management/managing-fields.asciidoc +++ b/docs/management/managing-fields.asciidoc @@ -18,6 +18,7 @@ To format a field: . Open the main menu, and click *Stack Management > Index Patterns*. . Click the index pattern that contains the field you want to format. . Find the field you want to format and click the edit icon (image:management/index-patterns/images/edit_icon.png[]). +. Enter a custom label for the field, if needed. . Select a format and fill in the details. + [role="screenshot"] diff --git a/docs/maps/index.asciidoc b/docs/maps/index.asciidoc index 59b592ba1ec59..8f55697249fb2 100644 --- a/docs/maps/index.asciidoc +++ b/docs/maps/index.asciidoc @@ -9,28 +9,40 @@ [partintro] -- -Maps enables you to parse through your geographical data at scale, with speed, and in real time. With features like multiple layers and indices in a map, plotting of raw documents, dynamic client-side styling, and global search across multiple layers, you can understand and monitor your data with ease. +Create beautiful maps from your geographical data. With **Maps**, you can: -With Maps, you can: - -* Create maps with multiple layers and indices. -* Upload GeoJSON files into Elasticsearch. +* Build maps with multiple layers and indices. +* Upload GeoJSON. * Embed your map in dashboards. * Symbolize features using data values. -* Focus in on just the data you want. - -*Ready to get started?* Start your tour of Maps with the <>. +* Focus on only the data that’s important to you. + +*Ready to get started?* Watch the https://videos.elastic.co/watch/BYzRDtH4u7RSD8wKhuEW1b[video], and then start your tour of **Maps** with the <>. + +++++ + + +
+++++ [float] -=== Create maps with multiple layers and indices -You can use multiple layers and indices to show all your data in a single map. This enables your map to show how data sits relative to physical features like weather patterns, human-made features like international borders, and business-specific features like sales regions. You can plot individual documents or use aggregations to plot any data set, no matter how large. +=== Build maps with multiple layers and indices +Use multiple layers and indices to show all your data in a single map. Show how data sits relative to physical features like weather patterns, human-made features like international borders, and business-specific features like sales regions. Plot individual documents or use aggregations to plot any data set, no matter how large. [role="screenshot"] image::maps/images/sample_data_ecommerce.png[] [float] -=== Upload GeoJSON files into Elasticsearch -Maps makes it easy to import geospatial data into the Elastic Stack. Using the GeoJSON Upload feature, you can drag and drop your point and shape data files directly into Elasticsearch, and then use them as layers in the map. +=== Upload GeoJSON +Use **Maps** to drag and drop your GeoJSON points, lines, and polygons into Elasticsearch, and then use them as layers in your map. [float] === Embed your map in dashboards @@ -43,11 +55,11 @@ image::maps/images/embed_in_dashboard.jpeg[] [float] === Symbolize features using data values -You can customize each layer to highlight meaningful dimensions in your data. For example, you can use dark colors to symbolize areas with more web log traffic, and lighter colors to symbolize areas with less traffic. +Customize each layer to highlight meaningful dimensions in your data. For example, use dark colors to symbolize areas with more web log traffic, and lighter colors to symbolize areas with less traffic. [float] -=== Focus in on just the data you want -You can search across your Elasticsearch layers to focus in on just the data you want. Draw a polygon on the map or use the shape from features to create spatial filters to narrow search results to documents that either intersect with, are within, or do not intersect with the specified geometry. Filter individual layers to compares facets. +=== Focus on only the data that’s important to you +Search across your Elasticsearch layers to focus in on just the data you want. Combine free text search with field-based search using the <>. Set the time filter to restrict layers by time. Draw a polygon on the map or use the shape from features to create spatial filters. Filter individual layers to compares facets. -- diff --git a/package.json b/package.json index dac83dacf6fbf..d14c5b0a7dc5f 100644 --- a/package.json +++ b/package.json @@ -93,8 +93,8 @@ "yarn": "^1.21.1" }, "dependencies": { - "@babel/core": "^7.11.6", - "@babel/runtime": "^7.11.2", + "@babel/core": "^7.12.10", + "@babel/runtime": "^7.12.5", "@elastic/datemath": "link:packages/elastic-datemath", "@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary", "@elastic/ems-client": "7.11.0", @@ -330,22 +330,22 @@ "yauzl": "^2.10.0" }, "devDependencies": { - "@babel/cli": "^7.10.5", - "@babel/parser": "^7.11.2", - "@babel/plugin-proposal-class-properties": "^7.10.4", - "@babel/plugin-proposal-export-namespace-from": "^7.10.4", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.4", - "@babel/plugin-proposal-object-rest-spread": "^7.11.0", - "@babel/plugin-proposal-optional-chaining": "^7.11.0", - "@babel/plugin-proposal-private-methods": "^7.10.4", - "@babel/plugin-transform-modules-commonjs": "^7.10.4", - "@babel/plugin-transform-runtime": "^7.11.0", - "@babel/preset-env": "^7.11.0", - "@babel/preset-react": "^7.10.4", - "@babel/preset-typescript": "^7.10.4", - "@babel/register": "^7.10.5", - "@babel/traverse": "^7.11.5", - "@babel/types": "^7.11.0", + "@babel/cli": "^7.12.10", + "@babel/parser": "^7.12.11", + "@babel/plugin-proposal-class-properties": "^7.12.1", + "@babel/plugin-proposal-export-namespace-from": "^7.12.1", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", + "@babel/plugin-proposal-object-rest-spread": "^7.12.1", + "@babel/plugin-proposal-optional-chaining": "^7.12.7", + "@babel/plugin-proposal-private-methods": "^7.12.1", + "@babel/plugin-transform-modules-commonjs": "^7.12.1", + "@babel/plugin-transform-runtime": "^7.12.10", + "@babel/preset-env": "^7.12.11", + "@babel/preset-react": "^7.12.10", + "@babel/preset-typescript": "^7.12.7", + "@babel/register": "^7.12.10", + "@babel/traverse": "^7.12.12", + "@babel/types": "^7.12.12", "@cypress/snapshot": "^2.1.7", "@cypress/webpack-preprocessor": "^5.5.0", "@elastic/apm-rum": "^5.6.1", @@ -407,7 +407,7 @@ "@types/angular": "^1.6.56", "@types/angular-mocks": "^1.7.0", "@types/archiver": "^5.1.0", - "@types/babel__core": "^7.1.10", + "@types/babel__core": "^7.1.12", "@types/base64-js": "^1.2.5", "@types/bluebird": "^3.1.1", "@types/chance": "^1.0.0", @@ -580,10 +580,10 @@ "argsplit": "^1.0.5", "autoprefixer": "^9.7.4", "axe-core": "^4.0.2", - "babel-eslint": "^10.0.3", - "babel-jest": "^26.3.0", - "babel-loader": "^8.0.6", - "babel-plugin-add-module-exports": "^1.0.2", + "babel-eslint": "^10.1.0", + "babel-jest": "^26.6.3", + "babel-loader": "^8.2.2", + "babel-plugin-add-module-exports": "^1.0.4", "babel-plugin-istanbul": "^6.0.0", "babel-plugin-require-context-hook": "^1.0.0", "babel-plugin-styled-components": "^1.10.7", @@ -629,7 +629,7 @@ "eslint-import-resolver-node": "0.3.2", "eslint-import-resolver-webpack": "0.11.1", "eslint-module-utils": "2.5.0", - "eslint-plugin-babel": "^5.3.0", + "eslint-plugin-babel": "^5.3.1", "eslint-plugin-ban": "^1.4.0", "eslint-plugin-cypress": "^2.11.2", "eslint-plugin-eslint-comments": "^3.2.0", diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js index 0c74315d0f3fb..09995a9be30a6 100644 --- a/packages/kbn-pm/dist/index.js +++ b/packages/kbn-pm/dist/index.js @@ -59381,11 +59381,11 @@ const os = __webpack_require__(121); const pMap = __webpack_require__(513); const arrify = __webpack_require__(508); const globby = __webpack_require__(514); -const hasGlob = __webpack_require__(714); -const cpFile = __webpack_require__(716); -const junk = __webpack_require__(726); -const pFilter = __webpack_require__(727); -const CpyError = __webpack_require__(729); +const hasGlob = __webpack_require__(710); +const cpFile = __webpack_require__(712); +const junk = __webpack_require__(722); +const pFilter = __webpack_require__(723); +const CpyError = __webpack_require__(725); const defaultOptions = { ignoreJunk: true @@ -59633,8 +59633,8 @@ const fs = __webpack_require__(134); const arrayUnion = __webpack_require__(515); const glob = __webpack_require__(147); const fastGlob = __webpack_require__(517); -const dirGlob = __webpack_require__(707); -const gitignore = __webpack_require__(710); +const dirGlob = __webpack_require__(703); +const gitignore = __webpack_require__(706); const DEFAULT_FILTER = () => false; @@ -59885,11 +59885,11 @@ module.exports.generateTasks = pkg.generateTasks; Object.defineProperty(exports, "__esModule", { value: true }); var optionsManager = __webpack_require__(519); var taskManager = __webpack_require__(520); -var reader_async_1 = __webpack_require__(678); -var reader_stream_1 = __webpack_require__(702); -var reader_sync_1 = __webpack_require__(703); -var arrayUtils = __webpack_require__(705); -var streamUtils = __webpack_require__(706); +var reader_async_1 = __webpack_require__(674); +var reader_stream_1 = __webpack_require__(698); +var reader_sync_1 = __webpack_require__(699); +var arrayUtils = __webpack_require__(701); +var streamUtils = __webpack_require__(702); /** * Synchronous API. */ @@ -60470,16 +60470,16 @@ module.exports.win32 = win32; var util = __webpack_require__(112); var braces = __webpack_require__(526); var toRegex = __webpack_require__(527); -var extend = __webpack_require__(644); +var extend = __webpack_require__(640); /** * Local dependencies */ -var compilers = __webpack_require__(646); -var parsers = __webpack_require__(673); -var cache = __webpack_require__(674); -var utils = __webpack_require__(675); +var compilers = __webpack_require__(642); +var parsers = __webpack_require__(669); +var cache = __webpack_require__(670); +var utils = __webpack_require__(671); var MAX_LENGTH = 1024 * 64; /** @@ -61360,8 +61360,8 @@ var extend = __webpack_require__(550); */ var compilers = __webpack_require__(552); -var parsers = __webpack_require__(567); -var Braces = __webpack_require__(571); +var parsers = __webpack_require__(565); +var Braces = __webpack_require__(569); var utils = __webpack_require__(553); var MAX_LENGTH = 1024 * 64; var cache = {}; @@ -63801,7 +63801,7 @@ utils.extend = __webpack_require__(550); utils.flatten = __webpack_require__(557); utils.isObject = __webpack_require__(535); utils.fillRange = __webpack_require__(558); -utils.repeat = __webpack_require__(566); +utils.repeat = __webpack_require__(564); utils.unique = __webpack_require__(549); utils.define = function(obj, key, val) { @@ -64444,9 +64444,9 @@ function flat(arr, res) { var util = __webpack_require__(112); var isNumber = __webpack_require__(559); -var extend = __webpack_require__(562); -var repeat = __webpack_require__(564); -var toRegex = __webpack_require__(565); +var extend = __webpack_require__(550); +var repeat = __webpack_require__(562); +var toRegex = __webpack_require__(563); /** * Return a range of numbers or letters. @@ -64825,66 +64825,6 @@ function isSlowBuffer (obj) { /* 562 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -var isObject = __webpack_require__(563); - -module.exports = function extend(o/*, objects*/) { - if (!isObject(o)) { o = {}; } - - var len = arguments.length; - for (var i = 1; i < len; i++) { - var obj = arguments[i]; - - if (isObject(obj)) { - assign(o, obj); - } - } - return o; -}; - -function assign(a, b) { - for (var key in b) { - if (hasOwn(b, key)) { - a[key] = b[key]; - } - } -} - -/** - * Returns true if the given `key` is an own property of `obj`. - */ - -function hasOwn(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); -} - - -/***/ }), -/* 563 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*! - * is-extendable - * - * Copyright (c) 2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - - - -module.exports = function isExtendable(val) { - return typeof val !== 'undefined' && val !== null - && (typeof val === 'object' || typeof val === 'function'); -}; - - -/***/ }), -/* 564 */ -/***/ (function(module, exports, __webpack_require__) { - "use strict"; /*! * repeat-string @@ -64959,7 +64899,7 @@ function repeat(str, num) { /***/ }), -/* 565 */ +/* 563 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64972,7 +64912,7 @@ function repeat(str, num) { -var repeat = __webpack_require__(564); +var repeat = __webpack_require__(562); var isNumber = __webpack_require__(559); var cache = {}; @@ -65260,7 +65200,7 @@ module.exports = toRegexRange; /***/ }), -/* 566 */ +/* 564 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65285,13 +65225,13 @@ module.exports = function repeat(ele, num) { /***/ }), -/* 567 */ +/* 565 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var Node = __webpack_require__(568); +var Node = __webpack_require__(566); var utils = __webpack_require__(553); /** @@ -65652,15 +65592,15 @@ function concatNodes(pos, node, parent, options) { /***/ }), -/* 568 */ +/* 566 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var isObject = __webpack_require__(535); -var define = __webpack_require__(569); -var utils = __webpack_require__(570); +var define = __webpack_require__(567); +var utils = __webpack_require__(568); var ownNames; /** @@ -66151,7 +66091,7 @@ exports = module.exports = Node; /***/ }), -/* 569 */ +/* 567 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -66189,7 +66129,7 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 570 */ +/* 568 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67215,16 +67155,16 @@ function assert(val, message) { /***/ }), -/* 571 */ +/* 569 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var extend = __webpack_require__(550); -var Snapdragon = __webpack_require__(572); +var Snapdragon = __webpack_require__(570); var compilers = __webpack_require__(552); -var parsers = __webpack_require__(567); +var parsers = __webpack_require__(565); var utils = __webpack_require__(553); /** @@ -67326,17 +67266,17 @@ module.exports = Braces; /***/ }), -/* 572 */ +/* 570 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var Base = __webpack_require__(573); -var define = __webpack_require__(602); -var Compiler = __webpack_require__(612); -var Parser = __webpack_require__(641); -var utils = __webpack_require__(621); +var Base = __webpack_require__(571); +var define = __webpack_require__(598); +var Compiler = __webpack_require__(608); +var Parser = __webpack_require__(637); +var utils = __webpack_require__(617); var regexCache = {}; var cache = {}; @@ -67507,20 +67447,20 @@ module.exports.Parser = Parser; /***/ }), -/* 573 */ +/* 571 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(112); -var define = __webpack_require__(574); -var CacheBase = __webpack_require__(575); -var Emitter = __webpack_require__(576); +var define = __webpack_require__(572); +var CacheBase = __webpack_require__(573); +var Emitter = __webpack_require__(574); var isObject = __webpack_require__(535); -var merge = __webpack_require__(596); -var pascal = __webpack_require__(599); -var cu = __webpack_require__(600); +var merge = __webpack_require__(592); +var pascal = __webpack_require__(595); +var cu = __webpack_require__(596); /** * Optionally define a custom `cache` namespace to use. @@ -67949,7 +67889,7 @@ module.exports.namespace = namespace; /***/ }), -/* 574 */ +/* 572 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67987,21 +67927,21 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 575 */ +/* 573 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var isObject = __webpack_require__(535); -var Emitter = __webpack_require__(576); -var visit = __webpack_require__(577); -var toPath = __webpack_require__(580); -var union = __webpack_require__(581); -var del = __webpack_require__(587); -var get = __webpack_require__(584); -var has = __webpack_require__(592); -var set = __webpack_require__(595); +var Emitter = __webpack_require__(574); +var visit = __webpack_require__(575); +var toPath = __webpack_require__(578); +var union = __webpack_require__(579); +var del = __webpack_require__(583); +var get = __webpack_require__(581); +var has = __webpack_require__(588); +var set = __webpack_require__(591); /** * Create a `Cache` constructor that when instantiated will @@ -68255,7 +68195,7 @@ module.exports.namespace = namespace; /***/ }), -/* 576 */ +/* 574 */ /***/ (function(module, exports, __webpack_require__) { @@ -68424,7 +68364,7 @@ Emitter.prototype.hasListeners = function(event){ /***/ }), -/* 577 */ +/* 575 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68437,8 +68377,8 @@ Emitter.prototype.hasListeners = function(event){ -var visit = __webpack_require__(578); -var mapVisit = __webpack_require__(579); +var visit = __webpack_require__(576); +var mapVisit = __webpack_require__(577); module.exports = function(collection, method, val) { var result; @@ -68461,7 +68401,7 @@ module.exports = function(collection, method, val) { /***/ }), -/* 578 */ +/* 576 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68501,14 +68441,14 @@ module.exports = function visit(thisArg, method, target, val) { /***/ }), -/* 579 */ +/* 577 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(112); -var visit = __webpack_require__(578); +var visit = __webpack_require__(576); /** * Map `visit` over an array of objects. @@ -68545,7 +68485,7 @@ function isObject(val) { /***/ }), -/* 580 */ +/* 578 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68585,16 +68525,16 @@ function filter(arr) { /***/ }), -/* 581 */ +/* 579 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(582); -var union = __webpack_require__(583); -var get = __webpack_require__(584); -var set = __webpack_require__(585); +var isObject = __webpack_require__(551); +var union = __webpack_require__(580); +var get = __webpack_require__(581); +var set = __webpack_require__(582); module.exports = function unionValue(obj, prop, value) { if (!isObject(obj)) { @@ -68622,27 +68562,7 @@ function arrayify(val) { /***/ }), -/* 582 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*! - * is-extendable - * - * Copyright (c) 2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - - - -module.exports = function isExtendable(val) { - return typeof val !== 'undefined' && val !== null - && (typeof val === 'object' || typeof val === 'function'); -}; - - -/***/ }), -/* 583 */ +/* 580 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68678,7 +68598,7 @@ module.exports = function union(init) { /***/ }), -/* 584 */ +/* 581 */ /***/ (function(module, exports) { /*! @@ -68734,7 +68654,7 @@ function toString(val) { /***/ }), -/* 585 */ +/* 582 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68748,9 +68668,9 @@ function toString(val) { var split = __webpack_require__(554); -var extend = __webpack_require__(586); +var extend = __webpack_require__(550); var isPlainObject = __webpack_require__(544); -var isObject = __webpack_require__(582); +var isObject = __webpack_require__(551); module.exports = function(obj, prop, val) { if (!isObject(obj)) { @@ -68796,47 +68716,7 @@ function isValidKey(key) { /***/ }), -/* 586 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var isObject = __webpack_require__(582); - -module.exports = function extend(o/*, objects*/) { - if (!isObject(o)) { o = {}; } - - var len = arguments.length; - for (var i = 1; i < len; i++) { - var obj = arguments[i]; - - if (isObject(obj)) { - assign(o, obj); - } - } - return o; -}; - -function assign(a, b) { - for (var key in b) { - if (hasOwn(b, key)) { - a[key] = b[key]; - } - } -} - -/** - * Returns true if the given `key` is an own property of `obj`. - */ - -function hasOwn(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); -} - - -/***/ }), -/* 587 */ +/* 583 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68850,7 +68730,7 @@ function hasOwn(obj, key) { var isObject = __webpack_require__(535); -var has = __webpack_require__(588); +var has = __webpack_require__(584); module.exports = function unset(obj, prop) { if (!isObject(obj)) { @@ -68875,7 +68755,7 @@ module.exports = function unset(obj, prop) { /***/ }), -/* 588 */ +/* 584 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68888,9 +68768,9 @@ module.exports = function unset(obj, prop) { -var isObject = __webpack_require__(589); -var hasValues = __webpack_require__(591); -var get = __webpack_require__(584); +var isObject = __webpack_require__(585); +var hasValues = __webpack_require__(587); +var get = __webpack_require__(581); module.exports = function(obj, prop, noZero) { if (isObject(obj)) { @@ -68901,7 +68781,7 @@ module.exports = function(obj, prop, noZero) { /***/ }), -/* 589 */ +/* 585 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68914,7 +68794,7 @@ module.exports = function(obj, prop, noZero) { -var isArray = __webpack_require__(590); +var isArray = __webpack_require__(586); module.exports = function isObject(val) { return val != null && typeof val === 'object' && isArray(val) === false; @@ -68922,7 +68802,7 @@ module.exports = function isObject(val) { /***/ }), -/* 590 */ +/* 586 */ /***/ (function(module, exports) { var toString = {}.toString; @@ -68933,7 +68813,7 @@ module.exports = Array.isArray || function (arr) { /***/ }), -/* 591 */ +/* 587 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68976,7 +68856,7 @@ module.exports = function hasValue(o, noZero) { /***/ }), -/* 592 */ +/* 588 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68990,8 +68870,8 @@ module.exports = function hasValue(o, noZero) { var isObject = __webpack_require__(535); -var hasValues = __webpack_require__(593); -var get = __webpack_require__(584); +var hasValues = __webpack_require__(589); +var get = __webpack_require__(581); module.exports = function(val, prop) { return hasValues(isObject(val) && prop ? get(val, prop) : val); @@ -68999,7 +68879,7 @@ module.exports = function(val, prop) { /***/ }), -/* 593 */ +/* 589 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69012,7 +68892,7 @@ module.exports = function(val, prop) { -var typeOf = __webpack_require__(594); +var typeOf = __webpack_require__(590); var isNumber = __webpack_require__(559); module.exports = function hasValue(val) { @@ -69066,7 +68946,7 @@ module.exports = function hasValue(val) { /***/ }), -/* 594 */ +/* 590 */ /***/ (function(module, exports, __webpack_require__) { var isBuffer = __webpack_require__(561); @@ -69191,7 +69071,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 595 */ +/* 591 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69205,9 +69085,9 @@ module.exports = function kindOf(val) { var split = __webpack_require__(554); -var extend = __webpack_require__(586); +var extend = __webpack_require__(550); var isPlainObject = __webpack_require__(544); -var isObject = __webpack_require__(582); +var isObject = __webpack_require__(551); module.exports = function(obj, prop, val) { if (!isObject(obj)) { @@ -69253,14 +69133,14 @@ function isValidKey(key) { /***/ }), -/* 596 */ +/* 592 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(597); -var forIn = __webpack_require__(598); +var isExtendable = __webpack_require__(593); +var forIn = __webpack_require__(594); function mixinDeep(target, objects) { var len = arguments.length, i = 0; @@ -69324,7 +69204,7 @@ module.exports = mixinDeep; /***/ }), -/* 597 */ +/* 593 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69345,7 +69225,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 598 */ +/* 594 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69368,7 +69248,7 @@ module.exports = function forIn(obj, fn, thisArg) { /***/ }), -/* 599 */ +/* 595 */ /***/ (function(module, exports) { /*! @@ -69395,14 +69275,14 @@ module.exports = pascalcase; /***/ }), -/* 600 */ +/* 596 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(112); -var utils = __webpack_require__(601); +var utils = __webpack_require__(597); /** * Expose class utils @@ -69767,7 +69647,7 @@ cu.bubble = function(Parent, events) { /***/ }), -/* 601 */ +/* 597 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69781,10 +69661,10 @@ var utils = {}; * Lazily required module dependencies */ -utils.union = __webpack_require__(583); -utils.define = __webpack_require__(602); +utils.union = __webpack_require__(580); +utils.define = __webpack_require__(598); utils.isObj = __webpack_require__(535); -utils.staticExtend = __webpack_require__(609); +utils.staticExtend = __webpack_require__(605); /** @@ -69795,7 +69675,7 @@ module.exports = utils; /***/ }), -/* 602 */ +/* 598 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69808,7 +69688,7 @@ module.exports = utils; -var isDescriptor = __webpack_require__(603); +var isDescriptor = __webpack_require__(599); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -69833,7 +69713,7 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 603 */ +/* 599 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69846,9 +69726,9 @@ module.exports = function defineProperty(obj, prop, val) { -var typeOf = __webpack_require__(604); -var isAccessor = __webpack_require__(605); -var isData = __webpack_require__(607); +var typeOf = __webpack_require__(600); +var isAccessor = __webpack_require__(601); +var isData = __webpack_require__(603); module.exports = function isDescriptor(obj, key) { if (typeOf(obj) !== 'object') { @@ -69862,7 +69742,7 @@ module.exports = function isDescriptor(obj, key) { /***/ }), -/* 604 */ +/* 600 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -70015,7 +69895,7 @@ function isBuffer(val) { /***/ }), -/* 605 */ +/* 601 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70028,7 +69908,7 @@ function isBuffer(val) { -var typeOf = __webpack_require__(606); +var typeOf = __webpack_require__(602); // accessor descriptor properties var accessor = { @@ -70091,7 +69971,7 @@ module.exports = isAccessorDescriptor; /***/ }), -/* 606 */ +/* 602 */ /***/ (function(module, exports, __webpack_require__) { var isBuffer = __webpack_require__(561); @@ -70213,7 +70093,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 607 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70226,7 +70106,7 @@ module.exports = function kindOf(val) { -var typeOf = __webpack_require__(608); +var typeOf = __webpack_require__(604); // data descriptor properties var data = { @@ -70275,7 +70155,7 @@ module.exports = isDataDescriptor; /***/ }), -/* 608 */ +/* 604 */ /***/ (function(module, exports, __webpack_require__) { var isBuffer = __webpack_require__(561); @@ -70397,7 +70277,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 609 */ +/* 605 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70410,8 +70290,8 @@ module.exports = function kindOf(val) { -var copy = __webpack_require__(610); -var define = __webpack_require__(602); +var copy = __webpack_require__(606); +var define = __webpack_require__(598); var util = __webpack_require__(112); /** @@ -70494,15 +70374,15 @@ module.exports = extend; /***/ }), -/* 610 */ +/* 606 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var typeOf = __webpack_require__(560); -var copyDescriptor = __webpack_require__(611); -var define = __webpack_require__(602); +var copyDescriptor = __webpack_require__(607); +var define = __webpack_require__(598); /** * Copy static properties, prototype properties, and descriptors from one object to another. @@ -70675,7 +70555,7 @@ module.exports.has = has; /***/ }), -/* 611 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70763,16 +70643,16 @@ function isObject(val) { /***/ }), -/* 612 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var use = __webpack_require__(613); -var define = __webpack_require__(602); -var debug = __webpack_require__(615)('snapdragon:compiler'); -var utils = __webpack_require__(621); +var use = __webpack_require__(609); +var define = __webpack_require__(598); +var debug = __webpack_require__(611)('snapdragon:compiler'); +var utils = __webpack_require__(617); /** * Create a new `Compiler` with the given `options`. @@ -70926,7 +70806,7 @@ Compiler.prototype = { // source map support if (opts.sourcemap) { - var sourcemaps = __webpack_require__(640); + var sourcemaps = __webpack_require__(636); sourcemaps(this); this.mapVisit(this.ast.nodes); this.applySourceMaps(); @@ -70947,7 +70827,7 @@ module.exports = Compiler; /***/ }), -/* 613 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70960,7 +70840,7 @@ module.exports = Compiler; -var utils = __webpack_require__(614); +var utils = __webpack_require__(610); module.exports = function base(app, opts) { if (!utils.isObject(app) && typeof app !== 'function') { @@ -71075,7 +70955,7 @@ module.exports = function base(app, opts) { /***/ }), -/* 614 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71089,7 +70969,7 @@ var utils = {}; * Lazily required module dependencies */ -utils.define = __webpack_require__(602); +utils.define = __webpack_require__(598); utils.isObject = __webpack_require__(535); @@ -71105,7 +70985,7 @@ module.exports = utils; /***/ }), -/* 615 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71114,14 +70994,14 @@ module.exports = utils; */ if (typeof process !== 'undefined' && process.type === 'renderer') { - module.exports = __webpack_require__(616); + module.exports = __webpack_require__(612); } else { - module.exports = __webpack_require__(619); + module.exports = __webpack_require__(615); } /***/ }), -/* 616 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71130,7 +71010,7 @@ if (typeof process !== 'undefined' && process.type === 'renderer') { * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(617); +exports = module.exports = __webpack_require__(613); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; @@ -71312,7 +71192,7 @@ function localstorage() { /***/ }), -/* 617 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { @@ -71328,7 +71208,7 @@ exports.coerce = coerce; exports.disable = disable; exports.enable = enable; exports.enabled = enabled; -exports.humanize = __webpack_require__(618); +exports.humanize = __webpack_require__(614); /** * The currently active debug mode names, and names to skip. @@ -71520,7 +71400,7 @@ function coerce(val) { /***/ }), -/* 618 */ +/* 614 */ /***/ (function(module, exports) { /** @@ -71678,7 +71558,7 @@ function plural(ms, n, name) { /***/ }), -/* 619 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71694,7 +71574,7 @@ var util = __webpack_require__(112); * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(617); +exports = module.exports = __webpack_require__(613); exports.init = init; exports.log = log; exports.formatArgs = formatArgs; @@ -71873,7 +71753,7 @@ function createWritableStdioStream (fd) { case 'PIPE': case 'TCP': - var net = __webpack_require__(620); + var net = __webpack_require__(616); stream = new net.Socket({ fd: fd, readable: false, @@ -71932,13 +71812,13 @@ exports.enable(load()); /***/ }), -/* 620 */ +/* 616 */ /***/ (function(module, exports) { module.exports = require("net"); /***/ }), -/* 621 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71948,9 +71828,9 @@ module.exports = require("net"); * Module dependencies */ -exports.extend = __webpack_require__(586); -exports.SourceMap = __webpack_require__(622); -exports.sourceMapResolve = __webpack_require__(633); +exports.extend = __webpack_require__(550); +exports.SourceMap = __webpack_require__(618); +exports.sourceMapResolve = __webpack_require__(629); /** * Convert backslash in the given string to forward slashes @@ -71993,7 +71873,7 @@ exports.last = function(arr, n) { /***/ }), -/* 622 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { /* @@ -72001,13 +71881,13 @@ exports.last = function(arr, n) { * Licensed under the New BSD license. See LICENSE.txt or: * http://opensource.org/licenses/BSD-3-Clause */ -exports.SourceMapGenerator = __webpack_require__(623).SourceMapGenerator; -exports.SourceMapConsumer = __webpack_require__(629).SourceMapConsumer; -exports.SourceNode = __webpack_require__(632).SourceNode; +exports.SourceMapGenerator = __webpack_require__(619).SourceMapGenerator; +exports.SourceMapConsumer = __webpack_require__(625).SourceMapConsumer; +exports.SourceNode = __webpack_require__(628).SourceNode; /***/ }), -/* 623 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -72017,10 +71897,10 @@ exports.SourceNode = __webpack_require__(632).SourceNode; * http://opensource.org/licenses/BSD-3-Clause */ -var base64VLQ = __webpack_require__(624); -var util = __webpack_require__(626); -var ArraySet = __webpack_require__(627).ArraySet; -var MappingList = __webpack_require__(628).MappingList; +var base64VLQ = __webpack_require__(620); +var util = __webpack_require__(622); +var ArraySet = __webpack_require__(623).ArraySet; +var MappingList = __webpack_require__(624).MappingList; /** * An instance of the SourceMapGenerator represents a source map which is @@ -72429,7 +72309,7 @@ exports.SourceMapGenerator = SourceMapGenerator; /***/ }), -/* 624 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -72469,7 +72349,7 @@ exports.SourceMapGenerator = SourceMapGenerator; * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -var base64 = __webpack_require__(625); +var base64 = __webpack_require__(621); // A single base 64 digit can contain 6 bits of data. For the base 64 variable // length quantities we use in the source map spec, the first bit is the sign, @@ -72575,7 +72455,7 @@ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { /***/ }), -/* 625 */ +/* 621 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -72648,7 +72528,7 @@ exports.decode = function (charCode) { /***/ }), -/* 626 */ +/* 622 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -73071,7 +72951,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate /***/ }), -/* 627 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -73081,7 +72961,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(626); +var util = __webpack_require__(622); var has = Object.prototype.hasOwnProperty; var hasNativeMap = typeof Map !== "undefined"; @@ -73198,7 +73078,7 @@ exports.ArraySet = ArraySet; /***/ }), -/* 628 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -73208,7 +73088,7 @@ exports.ArraySet = ArraySet; * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(626); +var util = __webpack_require__(622); /** * Determine whether mappingB is after mappingA with respect to generated @@ -73283,7 +73163,7 @@ exports.MappingList = MappingList; /***/ }), -/* 629 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -73293,11 +73173,11 @@ exports.MappingList = MappingList; * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(626); -var binarySearch = __webpack_require__(630); -var ArraySet = __webpack_require__(627).ArraySet; -var base64VLQ = __webpack_require__(624); -var quickSort = __webpack_require__(631).quickSort; +var util = __webpack_require__(622); +var binarySearch = __webpack_require__(626); +var ArraySet = __webpack_require__(623).ArraySet; +var base64VLQ = __webpack_require__(620); +var quickSort = __webpack_require__(627).quickSort; function SourceMapConsumer(aSourceMap) { var sourceMap = aSourceMap; @@ -74371,7 +74251,7 @@ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; /***/ }), -/* 630 */ +/* 626 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -74488,7 +74368,7 @@ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { /***/ }), -/* 631 */ +/* 627 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -74608,7 +74488,7 @@ exports.quickSort = function (ary, comparator) { /***/ }), -/* 632 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -74618,8 +74498,8 @@ exports.quickSort = function (ary, comparator) { * http://opensource.org/licenses/BSD-3-Clause */ -var SourceMapGenerator = __webpack_require__(623).SourceMapGenerator; -var util = __webpack_require__(626); +var SourceMapGenerator = __webpack_require__(619).SourceMapGenerator; +var util = __webpack_require__(622); // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other // operating systems these days (capturing the result). @@ -75027,17 +74907,17 @@ exports.SourceNode = SourceNode; /***/ }), -/* 633 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014, 2015, 2016, 2017 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) -var sourceMappingURL = __webpack_require__(634) -var resolveUrl = __webpack_require__(635) -var decodeUriComponent = __webpack_require__(636) -var urix = __webpack_require__(638) -var atob = __webpack_require__(639) +var sourceMappingURL = __webpack_require__(630) +var resolveUrl = __webpack_require__(631) +var decodeUriComponent = __webpack_require__(632) +var urix = __webpack_require__(634) +var atob = __webpack_require__(635) @@ -75335,7 +75215,7 @@ module.exports = { /***/ }), -/* 634 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;// Copyright 2014 Simon Lydell @@ -75398,7 +75278,7 @@ void (function(root, factory) { /***/ }), -/* 635 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014 Simon Lydell @@ -75416,13 +75296,13 @@ module.exports = resolveUrl /***/ }), -/* 636 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2017 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) -var decodeUriComponent = __webpack_require__(637) +var decodeUriComponent = __webpack_require__(633) function customDecodeUriComponent(string) { // `decodeUriComponent` turns `+` into ` `, but that's not wanted. @@ -75433,7 +75313,7 @@ module.exports = customDecodeUriComponent /***/ }), -/* 637 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75534,7 +75414,7 @@ module.exports = function (encodedURI) { /***/ }), -/* 638 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014 Simon Lydell @@ -75557,7 +75437,7 @@ module.exports = urix /***/ }), -/* 639 */ +/* 635 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75571,7 +75451,7 @@ module.exports = atob.atob = atob; /***/ }), -/* 640 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75579,8 +75459,8 @@ module.exports = atob.atob = atob; var fs = __webpack_require__(134); var path = __webpack_require__(4); -var define = __webpack_require__(602); -var utils = __webpack_require__(621); +var define = __webpack_require__(598); +var utils = __webpack_require__(617); /** * Expose `mixin()`. @@ -75723,19 +75603,19 @@ exports.comment = function(node) { /***/ }), -/* 641 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var use = __webpack_require__(613); +var use = __webpack_require__(609); var util = __webpack_require__(112); -var Cache = __webpack_require__(642); -var define = __webpack_require__(602); -var debug = __webpack_require__(615)('snapdragon:parser'); -var Position = __webpack_require__(643); -var utils = __webpack_require__(621); +var Cache = __webpack_require__(638); +var define = __webpack_require__(598); +var debug = __webpack_require__(611)('snapdragon:parser'); +var Position = __webpack_require__(639); +var utils = __webpack_require__(617); /** * Create a new `Parser` with the given `input` and `options`. @@ -76263,7 +76143,7 @@ module.exports = Parser; /***/ }), -/* 642 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76370,13 +76250,13 @@ MapCache.prototype.del = function mapDelete(key) { /***/ }), -/* 643 */ +/* 639 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var define = __webpack_require__(602); +var define = __webpack_require__(598); /** * Store position for a node @@ -76391,13 +76271,13 @@ module.exports = function Position(start, parser) { /***/ }), -/* 644 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(645); +var isExtendable = __webpack_require__(641); var assignSymbols = __webpack_require__(545); module.exports = Object.assign || function(obj/*, objects*/) { @@ -76458,7 +76338,7 @@ function isEnum(obj, key) { /***/ }), -/* 645 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76479,14 +76359,14 @@ module.exports = function isExtendable(val) { /***/ }), -/* 646 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var nanomatch = __webpack_require__(647); -var extglob = __webpack_require__(662); +var nanomatch = __webpack_require__(643); +var extglob = __webpack_require__(658); module.exports = function(snapdragon) { var compilers = snapdragon.compiler.compilers; @@ -76563,7 +76443,7 @@ function escapeExtglobs(compiler) { /***/ }), -/* 647 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76575,16 +76455,16 @@ function escapeExtglobs(compiler) { var util = __webpack_require__(112); var toRegex = __webpack_require__(527); -var extend = __webpack_require__(648); +var extend = __webpack_require__(644); /** * Local dependencies */ -var compilers = __webpack_require__(650); -var parsers = __webpack_require__(651); -var cache = __webpack_require__(654); -var utils = __webpack_require__(656); +var compilers = __webpack_require__(646); +var parsers = __webpack_require__(647); +var cache = __webpack_require__(650); +var utils = __webpack_require__(652); var MAX_LENGTH = 1024 * 64; /** @@ -77408,13 +77288,13 @@ module.exports = nanomatch; /***/ }), -/* 648 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(649); +var isExtendable = __webpack_require__(645); var assignSymbols = __webpack_require__(545); module.exports = Object.assign || function(obj/*, objects*/) { @@ -77475,7 +77355,7 @@ function isEnum(obj, key) { /***/ }), -/* 649 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77496,7 +77376,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 650 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77842,7 +77722,7 @@ module.exports = function(nanomatch, options) { /***/ }), -/* 651 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77850,7 +77730,7 @@ module.exports = function(nanomatch, options) { var regexNot = __webpack_require__(546); var toRegex = __webpack_require__(527); -var isOdd = __webpack_require__(652); +var isOdd = __webpack_require__(648); /** * Characters to use in negation regex (we want to "not" match @@ -78236,7 +78116,7 @@ module.exports.not = NOT_REGEX; /***/ }), -/* 652 */ +/* 648 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78249,7 +78129,7 @@ module.exports.not = NOT_REGEX; -var isNumber = __webpack_require__(653); +var isNumber = __webpack_require__(649); module.exports = function isOdd(i) { if (!isNumber(i)) { @@ -78263,7 +78143,7 @@ module.exports = function isOdd(i) { /***/ }), -/* 653 */ +/* 649 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78291,14 +78171,14 @@ module.exports = function isNumber(num) { /***/ }), -/* 654 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = new (__webpack_require__(655))(); +module.exports = new (__webpack_require__(651))(); /***/ }), -/* 655 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78311,7 +78191,7 @@ module.exports = new (__webpack_require__(655))(); -var MapCache = __webpack_require__(642); +var MapCache = __webpack_require__(638); /** * Create a new `FragmentCache` with an optional object to use for `caches`. @@ -78433,7 +78313,7 @@ exports = module.exports = FragmentCache; /***/ }), -/* 656 */ +/* 652 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78446,13 +78326,13 @@ var path = __webpack_require__(4); * Module dependencies */ -var isWindows = __webpack_require__(657)(); -var Snapdragon = __webpack_require__(572); -utils.define = __webpack_require__(658); -utils.diff = __webpack_require__(659); -utils.extend = __webpack_require__(648); -utils.pick = __webpack_require__(660); -utils.typeOf = __webpack_require__(661); +var isWindows = __webpack_require__(653)(); +var Snapdragon = __webpack_require__(570); +utils.define = __webpack_require__(654); +utils.diff = __webpack_require__(655); +utils.extend = __webpack_require__(644); +utils.pick = __webpack_require__(656); +utils.typeOf = __webpack_require__(657); utils.unique = __webpack_require__(549); /** @@ -78819,7 +78699,7 @@ utils.unixify = function(options) { /***/ }), -/* 657 */ +/* 653 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! @@ -78847,7 +78727,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 658 */ +/* 654 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78892,7 +78772,7 @@ module.exports = function defineProperty(obj, key, val) { /***/ }), -/* 659 */ +/* 655 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78946,7 +78826,7 @@ function diffArray(one, two) { /***/ }), -/* 660 */ +/* 656 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78988,7 +78868,7 @@ module.exports = function pick(obj, keys) { /***/ }), -/* 661 */ +/* 657 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -79123,7 +79003,7 @@ function isBuffer(val) { /***/ }), -/* 662 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79133,7 +79013,7 @@ function isBuffer(val) { * Module dependencies */ -var extend = __webpack_require__(586); +var extend = __webpack_require__(550); var unique = __webpack_require__(549); var toRegex = __webpack_require__(527); @@ -79141,10 +79021,10 @@ var toRegex = __webpack_require__(527); * Local dependencies */ -var compilers = __webpack_require__(663); -var parsers = __webpack_require__(669); -var Extglob = __webpack_require__(672); -var utils = __webpack_require__(671); +var compilers = __webpack_require__(659); +var parsers = __webpack_require__(665); +var Extglob = __webpack_require__(668); +var utils = __webpack_require__(667); var MAX_LENGTH = 1024 * 64; /** @@ -79461,13 +79341,13 @@ module.exports = extglob; /***/ }), -/* 663 */ +/* 659 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var brackets = __webpack_require__(664); +var brackets = __webpack_require__(660); /** * Extglob compilers @@ -79637,7 +79517,7 @@ module.exports = function(extglob) { /***/ }), -/* 664 */ +/* 660 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79647,16 +79527,16 @@ module.exports = function(extglob) { * Local dependencies */ -var compilers = __webpack_require__(665); -var parsers = __webpack_require__(667); +var compilers = __webpack_require__(661); +var parsers = __webpack_require__(663); /** * Module dependencies */ -var debug = __webpack_require__(615)('expand-brackets'); -var extend = __webpack_require__(586); -var Snapdragon = __webpack_require__(572); +var debug = __webpack_require__(611)('expand-brackets'); +var extend = __webpack_require__(550); +var Snapdragon = __webpack_require__(570); var toRegex = __webpack_require__(527); /** @@ -79855,13 +79735,13 @@ module.exports = brackets; /***/ }), -/* 665 */ +/* 661 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var posix = __webpack_require__(666); +var posix = __webpack_require__(662); module.exports = function(brackets) { brackets.compiler @@ -79949,7 +79829,7 @@ module.exports = function(brackets) { /***/ }), -/* 666 */ +/* 662 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79978,14 +79858,14 @@ module.exports = { /***/ }), -/* 667 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var utils = __webpack_require__(668); -var define = __webpack_require__(602); +var utils = __webpack_require__(664); +var define = __webpack_require__(598); /** * Text regex @@ -80204,7 +80084,7 @@ module.exports.TEXT_REGEX = TEXT_REGEX; /***/ }), -/* 668 */ +/* 664 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -80245,15 +80125,15 @@ exports.createRegex = function(pattern, include) { /***/ }), -/* 669 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var brackets = __webpack_require__(664); -var define = __webpack_require__(670); -var utils = __webpack_require__(671); +var brackets = __webpack_require__(660); +var define = __webpack_require__(666); +var utils = __webpack_require__(667); /** * Characters to use in text regex (we want to "not" match @@ -80408,7 +80288,7 @@ module.exports = parsers; /***/ }), -/* 670 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -80446,14 +80326,14 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 671 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var regex = __webpack_require__(546); -var Cache = __webpack_require__(655); +var Cache = __webpack_require__(651); /** * Utils @@ -80522,7 +80402,7 @@ utils.createRegex = function(str) { /***/ }), -/* 672 */ +/* 668 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -80532,16 +80412,16 @@ utils.createRegex = function(str) { * Module dependencies */ -var Snapdragon = __webpack_require__(572); -var define = __webpack_require__(670); -var extend = __webpack_require__(586); +var Snapdragon = __webpack_require__(570); +var define = __webpack_require__(666); +var extend = __webpack_require__(550); /** * Local dependencies */ -var compilers = __webpack_require__(663); -var parsers = __webpack_require__(669); +var compilers = __webpack_require__(659); +var parsers = __webpack_require__(665); /** * Customize Snapdragon parser and renderer @@ -80607,14 +80487,14 @@ module.exports = Extglob; /***/ }), -/* 673 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extglob = __webpack_require__(662); -var nanomatch = __webpack_require__(647); +var extglob = __webpack_require__(658); +var nanomatch = __webpack_require__(643); var regexNot = __webpack_require__(546); var toRegex = __webpack_require__(527); var not; @@ -80697,14 +80577,14 @@ function textRegex(pattern) { /***/ }), -/* 674 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = new (__webpack_require__(655))(); +module.exports = new (__webpack_require__(651))(); /***/ }), -/* 675 */ +/* 671 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -80717,12 +80597,12 @@ var path = __webpack_require__(4); * Module dependencies */ -var Snapdragon = __webpack_require__(572); -utils.define = __webpack_require__(676); -utils.diff = __webpack_require__(659); -utils.extend = __webpack_require__(644); -utils.pick = __webpack_require__(660); -utils.typeOf = __webpack_require__(677); +var Snapdragon = __webpack_require__(570); +utils.define = __webpack_require__(672); +utils.diff = __webpack_require__(655); +utils.extend = __webpack_require__(640); +utils.pick = __webpack_require__(656); +utils.typeOf = __webpack_require__(673); utils.unique = __webpack_require__(549); /** @@ -81020,7 +80900,7 @@ utils.unixify = function(options) { /***/ }), -/* 676 */ +/* 672 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81065,7 +80945,7 @@ module.exports = function defineProperty(obj, key, val) { /***/ }), -/* 677 */ +/* 673 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -81200,7 +81080,7 @@ function isBuffer(val) { /***/ }), -/* 678 */ +/* 674 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81219,9 +81099,9 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var readdir = __webpack_require__(679); -var reader_1 = __webpack_require__(692); -var fs_stream_1 = __webpack_require__(696); +var readdir = __webpack_require__(675); +var reader_1 = __webpack_require__(688); +var fs_stream_1 = __webpack_require__(692); var ReaderAsync = /** @class */ (function (_super) { __extends(ReaderAsync, _super); function ReaderAsync() { @@ -81282,15 +81162,15 @@ exports.default = ReaderAsync; /***/ }), -/* 679 */ +/* 675 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const readdirSync = __webpack_require__(680); -const readdirAsync = __webpack_require__(688); -const readdirStream = __webpack_require__(691); +const readdirSync = __webpack_require__(676); +const readdirAsync = __webpack_require__(684); +const readdirStream = __webpack_require__(687); module.exports = exports = readdirAsyncPath; exports.readdir = exports.readdirAsync = exports.async = readdirAsyncPath; @@ -81374,7 +81254,7 @@ function readdirStreamStat (dir, options) { /***/ }), -/* 680 */ +/* 676 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81382,11 +81262,11 @@ function readdirStreamStat (dir, options) { module.exports = readdirSync; -const DirectoryReader = __webpack_require__(681); +const DirectoryReader = __webpack_require__(677); let syncFacade = { - fs: __webpack_require__(686), - forEach: __webpack_require__(687), + fs: __webpack_require__(682), + forEach: __webpack_require__(683), sync: true }; @@ -81415,7 +81295,7 @@ function readdirSync (dir, options, internalOptions) { /***/ }), -/* 681 */ +/* 677 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81424,9 +81304,9 @@ function readdirSync (dir, options, internalOptions) { const Readable = __webpack_require__(138).Readable; const EventEmitter = __webpack_require__(156).EventEmitter; const path = __webpack_require__(4); -const normalizeOptions = __webpack_require__(682); -const stat = __webpack_require__(684); -const call = __webpack_require__(685); +const normalizeOptions = __webpack_require__(678); +const stat = __webpack_require__(680); +const call = __webpack_require__(681); /** * Asynchronously reads the contents of a directory and streams the results @@ -81802,14 +81682,14 @@ module.exports = DirectoryReader; /***/ }), -/* 682 */ +/* 678 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(4); -const globToRegExp = __webpack_require__(683); +const globToRegExp = __webpack_require__(679); module.exports = normalizeOptions; @@ -81986,7 +81866,7 @@ function normalizeOptions (options, internalOptions) { /***/ }), -/* 683 */ +/* 679 */ /***/ (function(module, exports) { module.exports = function (glob, opts) { @@ -82123,13 +82003,13 @@ module.exports = function (glob, opts) { /***/ }), -/* 684 */ +/* 680 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const call = __webpack_require__(685); +const call = __webpack_require__(681); module.exports = stat; @@ -82204,7 +82084,7 @@ function symlinkStat (fs, path, lstats, callback) { /***/ }), -/* 685 */ +/* 681 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82265,14 +82145,14 @@ function callOnce (fn) { /***/ }), -/* 686 */ +/* 682 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(134); -const call = __webpack_require__(685); +const call = __webpack_require__(681); /** * A facade around {@link fs.readdirSync} that allows it to be called @@ -82336,7 +82216,7 @@ exports.lstat = function (path, callback) { /***/ }), -/* 687 */ +/* 683 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82365,7 +82245,7 @@ function syncForEach (array, iterator, done) { /***/ }), -/* 688 */ +/* 684 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82373,12 +82253,12 @@ function syncForEach (array, iterator, done) { module.exports = readdirAsync; -const maybe = __webpack_require__(689); -const DirectoryReader = __webpack_require__(681); +const maybe = __webpack_require__(685); +const DirectoryReader = __webpack_require__(677); let asyncFacade = { fs: __webpack_require__(134), - forEach: __webpack_require__(690), + forEach: __webpack_require__(686), async: true }; @@ -82420,7 +82300,7 @@ function readdirAsync (dir, options, callback, internalOptions) { /***/ }), -/* 689 */ +/* 685 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82447,7 +82327,7 @@ module.exports = function maybe (cb, promise) { /***/ }), -/* 690 */ +/* 686 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82483,7 +82363,7 @@ function asyncForEach (array, iterator, done) { /***/ }), -/* 691 */ +/* 687 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82491,11 +82371,11 @@ function asyncForEach (array, iterator, done) { module.exports = readdirStream; -const DirectoryReader = __webpack_require__(681); +const DirectoryReader = __webpack_require__(677); let streamFacade = { fs: __webpack_require__(134), - forEach: __webpack_require__(690), + forEach: __webpack_require__(686), async: true }; @@ -82515,16 +82395,16 @@ function readdirStream (dir, options, internalOptions) { /***/ }), -/* 692 */ +/* 688 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var path = __webpack_require__(4); -var deep_1 = __webpack_require__(693); -var entry_1 = __webpack_require__(695); -var pathUtil = __webpack_require__(694); +var deep_1 = __webpack_require__(689); +var entry_1 = __webpack_require__(691); +var pathUtil = __webpack_require__(690); var Reader = /** @class */ (function () { function Reader(options) { this.options = options; @@ -82590,13 +82470,13 @@ exports.default = Reader; /***/ }), -/* 693 */ +/* 689 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var pathUtils = __webpack_require__(694); +var pathUtils = __webpack_require__(690); var patternUtils = __webpack_require__(521); var DeepFilter = /** @class */ (function () { function DeepFilter(options, micromatchOptions) { @@ -82680,7 +82560,7 @@ exports.default = DeepFilter; /***/ }), -/* 694 */ +/* 690 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82711,13 +82591,13 @@ exports.makeAbsolute = makeAbsolute; /***/ }), -/* 695 */ +/* 691 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var pathUtils = __webpack_require__(694); +var pathUtils = __webpack_require__(690); var patternUtils = __webpack_require__(521); var EntryFilter = /** @class */ (function () { function EntryFilter(options, micromatchOptions) { @@ -82803,7 +82683,7 @@ exports.default = EntryFilter; /***/ }), -/* 696 */ +/* 692 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82823,8 +82703,8 @@ var __extends = (this && this.__extends) || (function () { })(); Object.defineProperty(exports, "__esModule", { value: true }); var stream = __webpack_require__(138); -var fsStat = __webpack_require__(697); -var fs_1 = __webpack_require__(701); +var fsStat = __webpack_require__(693); +var fs_1 = __webpack_require__(697); var FileSystemStream = /** @class */ (function (_super) { __extends(FileSystemStream, _super); function FileSystemStream() { @@ -82874,14 +82754,14 @@ exports.default = FileSystemStream; /***/ }), -/* 697 */ +/* 693 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const optionsManager = __webpack_require__(698); -const statProvider = __webpack_require__(700); +const optionsManager = __webpack_require__(694); +const statProvider = __webpack_require__(696); /** * Asynchronous API. */ @@ -82912,13 +82792,13 @@ exports.statSync = statSync; /***/ }), -/* 698 */ +/* 694 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fsAdapter = __webpack_require__(699); +const fsAdapter = __webpack_require__(695); function prepare(opts) { const options = Object.assign({ fs: fsAdapter.getFileSystemAdapter(opts ? opts.fs : undefined), @@ -82931,7 +82811,7 @@ exports.prepare = prepare; /***/ }), -/* 699 */ +/* 695 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82954,7 +82834,7 @@ exports.getFileSystemAdapter = getFileSystemAdapter; /***/ }), -/* 700 */ +/* 696 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83006,7 +82886,7 @@ exports.isFollowedSymlink = isFollowedSymlink; /***/ }), -/* 701 */ +/* 697 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83037,7 +82917,7 @@ exports.default = FileSystem; /***/ }), -/* 702 */ +/* 698 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83057,9 +82937,9 @@ var __extends = (this && this.__extends) || (function () { })(); Object.defineProperty(exports, "__esModule", { value: true }); var stream = __webpack_require__(138); -var readdir = __webpack_require__(679); -var reader_1 = __webpack_require__(692); -var fs_stream_1 = __webpack_require__(696); +var readdir = __webpack_require__(675); +var reader_1 = __webpack_require__(688); +var fs_stream_1 = __webpack_require__(692); var TransformStream = /** @class */ (function (_super) { __extends(TransformStream, _super); function TransformStream(reader) { @@ -83127,7 +83007,7 @@ exports.default = ReaderStream; /***/ }), -/* 703 */ +/* 699 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83146,9 +83026,9 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var readdir = __webpack_require__(679); -var reader_1 = __webpack_require__(692); -var fs_sync_1 = __webpack_require__(704); +var readdir = __webpack_require__(675); +var reader_1 = __webpack_require__(688); +var fs_sync_1 = __webpack_require__(700); var ReaderSync = /** @class */ (function (_super) { __extends(ReaderSync, _super); function ReaderSync() { @@ -83208,7 +83088,7 @@ exports.default = ReaderSync; /***/ }), -/* 704 */ +/* 700 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83227,8 +83107,8 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var fsStat = __webpack_require__(697); -var fs_1 = __webpack_require__(701); +var fsStat = __webpack_require__(693); +var fs_1 = __webpack_require__(697); var FileSystemSync = /** @class */ (function (_super) { __extends(FileSystemSync, _super); function FileSystemSync() { @@ -83274,7 +83154,7 @@ exports.default = FileSystemSync; /***/ }), -/* 705 */ +/* 701 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83290,7 +83170,7 @@ exports.flatten = flatten; /***/ }), -/* 706 */ +/* 702 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83311,13 +83191,13 @@ exports.merge = merge; /***/ }), -/* 707 */ +/* 703 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(4); -const pathType = __webpack_require__(708); +const pathType = __webpack_require__(704); const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0]; @@ -83383,13 +83263,13 @@ module.exports.sync = (input, opts) => { /***/ }), -/* 708 */ +/* 704 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(134); -const pify = __webpack_require__(709); +const pify = __webpack_require__(705); function type(fn, fn2, fp) { if (typeof fp !== 'string') { @@ -83432,7 +83312,7 @@ exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink'); /***/ }), -/* 709 */ +/* 705 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83523,7 +83403,7 @@ module.exports = (obj, opts) => { /***/ }), -/* 710 */ +/* 706 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83531,9 +83411,9 @@ module.exports = (obj, opts) => { const fs = __webpack_require__(134); const path = __webpack_require__(4); const fastGlob = __webpack_require__(517); -const gitIgnore = __webpack_require__(711); -const pify = __webpack_require__(712); -const slash = __webpack_require__(713); +const gitIgnore = __webpack_require__(707); +const pify = __webpack_require__(708); +const slash = __webpack_require__(709); const DEFAULT_IGNORE = [ '**/node_modules/**', @@ -83631,7 +83511,7 @@ module.exports.sync = options => { /***/ }), -/* 711 */ +/* 707 */ /***/ (function(module, exports) { // A simple implementation of make-array @@ -84100,7 +83980,7 @@ module.exports = options => new IgnoreBase(options) /***/ }), -/* 712 */ +/* 708 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84175,7 +84055,7 @@ module.exports = (input, options) => { /***/ }), -/* 713 */ +/* 709 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84193,7 +84073,7 @@ module.exports = input => { /***/ }), -/* 714 */ +/* 710 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84206,7 +84086,7 @@ module.exports = input => { -var isGlob = __webpack_require__(715); +var isGlob = __webpack_require__(711); module.exports = function hasGlob(val) { if (val == null) return false; @@ -84226,7 +84106,7 @@ module.exports = function hasGlob(val) { /***/ }), -/* 715 */ +/* 711 */ /***/ (function(module, exports, __webpack_require__) { /*! @@ -84257,17 +84137,17 @@ module.exports = function isGlob(str) { /***/ }), -/* 716 */ +/* 712 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(4); const {constants: fsConstants} = __webpack_require__(134); -const pEvent = __webpack_require__(717); -const CpFileError = __webpack_require__(720); -const fs = __webpack_require__(722); -const ProgressEmitter = __webpack_require__(725); +const pEvent = __webpack_require__(713); +const CpFileError = __webpack_require__(716); +const fs = __webpack_require__(718); +const ProgressEmitter = __webpack_require__(721); const cpFileAsync = async (source, destination, options, progressEmitter) => { let readError; @@ -84381,12 +84261,12 @@ module.exports.sync = (source, destination, options) => { /***/ }), -/* 717 */ +/* 713 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pTimeout = __webpack_require__(718); +const pTimeout = __webpack_require__(714); const symbolAsyncIterator = Symbol.asyncIterator || '@@asyncIterator'; @@ -84677,12 +84557,12 @@ module.exports.iterator = (emitter, event, options) => { /***/ }), -/* 718 */ +/* 714 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pFinally = __webpack_require__(719); +const pFinally = __webpack_require__(715); class TimeoutError extends Error { constructor(message) { @@ -84728,7 +84608,7 @@ module.exports.TimeoutError = TimeoutError; /***/ }), -/* 719 */ +/* 715 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84750,12 +84630,12 @@ module.exports = (promise, onFinally) => { /***/ }), -/* 720 */ +/* 716 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const NestedError = __webpack_require__(721); +const NestedError = __webpack_require__(717); class CpFileError extends NestedError { constructor(message, nested) { @@ -84769,7 +84649,7 @@ module.exports = CpFileError; /***/ }), -/* 721 */ +/* 717 */ /***/ (function(module, exports, __webpack_require__) { var inherits = __webpack_require__(112).inherits; @@ -84825,16 +84705,16 @@ module.exports = NestedError; /***/ }), -/* 722 */ +/* 718 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const {promisify} = __webpack_require__(112); const fs = __webpack_require__(133); -const makeDir = __webpack_require__(723); -const pEvent = __webpack_require__(717); -const CpFileError = __webpack_require__(720); +const makeDir = __webpack_require__(719); +const pEvent = __webpack_require__(713); +const CpFileError = __webpack_require__(716); const stat = promisify(fs.stat); const lstat = promisify(fs.lstat); @@ -84931,7 +84811,7 @@ exports.copyFileSync = (source, destination, flags) => { /***/ }), -/* 723 */ +/* 719 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84939,7 +84819,7 @@ exports.copyFileSync = (source, destination, flags) => { const fs = __webpack_require__(134); const path = __webpack_require__(4); const {promisify} = __webpack_require__(112); -const semver = __webpack_require__(724); +const semver = __webpack_require__(720); const useNativeRecursiveOption = semver.satisfies(process.version, '>=10.12.0'); @@ -85094,7 +84974,7 @@ module.exports.sync = (input, options) => { /***/ }), -/* 724 */ +/* 720 */ /***/ (function(module, exports) { exports = module.exports = SemVer @@ -86696,7 +86576,7 @@ function coerce (version, options) { /***/ }), -/* 725 */ +/* 721 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86737,7 +86617,7 @@ module.exports = ProgressEmitter; /***/ }), -/* 726 */ +/* 722 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86783,12 +86663,12 @@ exports.default = module.exports; /***/ }), -/* 727 */ +/* 723 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pMap = __webpack_require__(728); +const pMap = __webpack_require__(724); const pFilter = async (iterable, filterer, options) => { const values = await pMap( @@ -86805,7 +86685,7 @@ module.exports.default = pFilter; /***/ }), -/* 728 */ +/* 724 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86884,12 +86764,12 @@ module.exports.default = pMap; /***/ }), -/* 729 */ +/* 725 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const NestedError = __webpack_require__(721); +const NestedError = __webpack_require__(717); class CpyError extends NestedError { constructor(message, nested) { diff --git a/src/core/server/saved_objects/migrations/core/call_cluster.ts b/src/core/server/saved_objects/migrations/core/call_cluster.ts index ba6027f711b62..2cb1656833728 100644 --- a/src/core/server/saved_objects/migrations/core/call_cluster.ts +++ b/src/core/server/saved_objects/migrations/core/call_cluster.ts @@ -18,7 +18,7 @@ export interface CallCluster { (path: 'bulk', opts: { body: object[] }): Promise; (path: 'count', opts: CountOpts): Promise<{ count: number; _shards: ShardsInfo }>; (path: 'clearScroll', opts: { scrollId: string }): Promise; - (path: 'indices.create' | 'indices.delete', opts: IndexCreationOpts): Promise; + (path: 'indices.create', opts: IndexCreationOpts): Promise; (path: 'indices.exists', opts: IndexOpts): Promise; (path: 'indices.existsAlias', opts: { name: string }): Promise; (path: 'indices.get', opts: IndexOpts & Ignorable): Promise; diff --git a/src/core/server/saved_objects/migrations/core/elastic_index.test.ts b/src/core/server/saved_objects/migrations/core/elastic_index.test.ts index 32ecea94826ff..4b35b017a7063 100644 --- a/src/core/server/saved_objects/migrations/core/elastic_index.test.ts +++ b/src/core/server/saved_objects/migrations/core/elastic_index.test.ts @@ -107,17 +107,6 @@ describe('ElasticIndex', () => { }); }); - describe('deleteIndex', () => { - test('calls indices.delete', async () => { - await Index.deleteIndex(client, '.lotr'); - - expect(client.indices.delete).toHaveBeenCalledTimes(1); - expect(client.indices.delete).toHaveBeenCalledWith({ - index: '.lotr', - }); - }); - }); - describe('claimAlias', () => { test('handles unaliased indices', async () => { client.indices.getAlias.mockResolvedValue( diff --git a/src/core/server/saved_objects/migrations/core/elastic_index.ts b/src/core/server/saved_objects/migrations/core/elastic_index.ts index 9cdec926a56ba..aa7802320dfb7 100644 --- a/src/core/server/saved_objects/migrations/core/elastic_index.ts +++ b/src/core/server/saved_objects/migrations/core/elastic_index.ts @@ -221,10 +221,6 @@ export async function createIndex( }); } -export async function deleteIndex(client: MigrationEsClient, index: string) { - await client.indices.delete({ index }); -} - /** * Converts an index to an alias. The `alias` parameter is the desired alias name which currently * is a concrete index. This function will reindex `alias` into a new index, delete the `alias` diff --git a/src/core/server/saved_objects/migrations/core/migration_es_client.ts b/src/core/server/saved_objects/migrations/core/migration_es_client.ts index 2653e96e1b8d5..c4bb19d8223ff 100644 --- a/src/core/server/saved_objects/migrations/core/migration_es_client.ts +++ b/src/core/server/saved_objects/migrations/core/migration_es_client.ts @@ -20,7 +20,6 @@ const methods = [ 'clearScroll', 'count', 'indices.create', - 'indices.delete', 'indices.deleteTemplate', 'indices.get', 'indices.getAlias', diff --git a/src/core/server/ui_settings/integration_tests/routes.test.ts b/src/core/server/ui_settings/integration_tests/routes.test.ts index 89f5b6732a8fb..2f0a5ebc139e6 100644 --- a/src/core/server/ui_settings/integration_tests/routes.test.ts +++ b/src/core/server/ui_settings/integration_tests/routes.test.ts @@ -9,7 +9,8 @@ import { schema } from '@kbn/config-schema'; import * as kbnTestServer from '../../../test_helpers/kbn_server'; -describe('ui settings service', () => { +// FLAKY: https://github.com/elastic/kibana/issues/89191 +describe.skip('ui settings service', () => { describe('routes', () => { let root: ReturnType; beforeAll(async () => { diff --git a/src/core/server/ui_settings/settings/navigation.test.ts b/src/core/server/ui_settings/settings/navigation.test.ts index 1ba81b4e79f46..0e6fbdfdbdb6e 100644 --- a/src/core/server/ui_settings/settings/navigation.test.ts +++ b/src/core/server/ui_settings/settings/navigation.test.ts @@ -28,18 +28,4 @@ describe('navigation settings', () => { ); }); }); - - describe('pageNavigation', () => { - const validate = getValidationFn(navigationSettings.pageNavigation); - - it('should only accept valid values', () => { - expect(() => validate('modern')).not.toThrow(); - expect(() => validate('legacy')).not.toThrow(); - expect(() => validate('invalid')).toThrowErrorMatchingInlineSnapshot(` -"types that failed validation: -- [0]: expected value to equal [modern] -- [1]: expected value to equal [legacy]" -`); - }); - }); }); diff --git a/src/core/server/ui_settings/settings/navigation.ts b/src/core/server/ui_settings/settings/navigation.ts index 38064db9e9388..937af4bb9aad1 100644 --- a/src/core/server/ui_settings/settings/navigation.ts +++ b/src/core/server/ui_settings/settings/navigation.ts @@ -37,25 +37,5 @@ export const getNavigationSettings = (): Record => { 'The route must be a relative URL.', }), }, - pageNavigation: { - name: i18n.translate('core.ui_settings.params.pageNavigationName', { - defaultMessage: 'Side nav style', - }), - value: 'modern', - description: i18n.translate('core.ui_settings.params.pageNavigationDesc', { - defaultMessage: 'Change the style of navigation', - }), - type: 'select', - options: ['modern', 'legacy'], - optionLabels: { - modern: i18n.translate('core.ui_settings.params.pageNavigationModern', { - defaultMessage: 'Modern', - }), - legacy: i18n.translate('core.ui_settings.params.pageNavigationLegacy', { - defaultMessage: 'Legacy', - }), - }, - schema: schema.oneOf([schema.literal('modern'), schema.literal('legacy')]), - }, }; }; diff --git a/src/plugins/input_control_vis/public/components/editor/controls_tab.test.tsx b/src/plugins/input_control_vis/public/components/editor/controls_tab.test.tsx index ec9b5ee7e43da..4d82571995d58 100644 --- a/src/plugins/input_control_vis/public/components/editor/controls_tab.test.tsx +++ b/src/plugins/input_control_vis/public/components/editor/controls_tab.test.tsx @@ -29,8 +29,6 @@ beforeEach(() => { name: 'test', title: 'test', visualization: null, - requestHandler: 'test', - responseHandler: 'test', stage: 'beta', requiresSearch: false, hidden: false, diff --git a/src/plugins/input_control_vis/public/components/editor/controls_tab.tsx b/src/plugins/input_control_vis/public/components/editor/controls_tab.tsx index a2ae1e6851a6b..5e432d81ebefb 100644 --- a/src/plugins/input_control_vis/public/components/editor/controls_tab.tsx +++ b/src/plugins/input_control_vis/public/components/editor/controls_tab.tsx @@ -19,7 +19,7 @@ import { EuiSelect, } from '@elastic/eui'; -import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; import { IIndexPattern } from 'src/plugins/data/public'; import { ControlEditor } from './control_editor'; import { @@ -40,7 +40,7 @@ interface ControlsTabUiState { type: CONTROL_TYPES; } -export type ControlsTabProps = VisOptionsProps & { +export type ControlsTabProps = VisEditorOptionsProps & { deps: InputControlVisDependencies; }; diff --git a/src/plugins/input_control_vis/public/components/editor/index.tsx b/src/plugins/input_control_vis/public/components/editor/index.tsx index 15b1039a8cb3c..ee457a47a3b6d 100644 --- a/src/plugins/input_control_vis/public/components/editor/index.tsx +++ b/src/plugins/input_control_vis/public/components/editor/index.tsx @@ -7,7 +7,7 @@ */ import React, { lazy } from 'react'; -import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; import { InputControlVisDependencies } from '../../plugin'; import { InputControlVisParams } from '../../types'; @@ -15,9 +15,9 @@ const ControlsTab = lazy(() => import('./controls_tab')); const OptionsTab = lazy(() => import('./options_tab')); export const getControlsTab = (deps: InputControlVisDependencies) => ( - props: VisOptionsProps + props: VisEditorOptionsProps ) => ; -export const OptionsTabLazy = (props: VisOptionsProps) => ( +export const OptionsTabLazy = (props: VisEditorOptionsProps) => ( ); diff --git a/src/plugins/input_control_vis/public/components/editor/options_tab.tsx b/src/plugins/input_control_vis/public/components/editor/options_tab.tsx index fa995be0840ce..9a7eaa71c3324 100644 --- a/src/plugins/input_control_vis/public/components/editor/options_tab.tsx +++ b/src/plugins/input_control_vis/public/components/editor/options_tab.tsx @@ -12,10 +12,10 @@ import { EuiForm, EuiFormRow, EuiSwitch } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiSwitchEvent } from '@elastic/eui'; -import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; import { InputControlVisParams } from '../../types'; -export type OptionsTabProps = VisOptionsProps; +export type OptionsTabProps = VisEditorOptionsProps; class OptionsTab extends PureComponent { handleUpdateFiltersChange = (event: EuiSwitchEvent) => { diff --git a/src/plugins/input_control_vis/public/input_control_vis_type.ts b/src/plugins/input_control_vis/public/input_control_vis_type.ts index 8d8fdf2cfc568..00e680aa5d328 100644 --- a/src/plugins/input_control_vis/public/input_control_vis_type.ts +++ b/src/plugins/input_control_vis/public/input_control_vis_type.ts @@ -7,7 +7,7 @@ */ import { i18n } from '@kbn/i18n'; -import { VisGroups, BaseVisTypeOptions } from '../../visualizations/public'; +import { VisGroups, VisTypeDefinition } from '../../visualizations/public'; import { getControlsTab, OptionsTabLazy } from './components/editor'; import { InputControlVisDependencies } from './plugin'; import { toExpressionAst } from './to_ast'; @@ -15,7 +15,7 @@ import { InputControlVisParams } from './types'; export function createInputControlVisTypeDefinition( deps: InputControlVisDependencies -): BaseVisTypeOptions { +): VisTypeDefinition { const ControlsTab = getControlsTab(deps); return { @@ -56,7 +56,6 @@ export function createInputControlVisTypeDefinition( ], }, inspectorAdapters: {}, - requestHandler: 'none', toExpressionAst, }; } diff --git a/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts b/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts index d75b2981035f4..28eeb461f7a86 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts @@ -77,7 +77,6 @@ export const stackManagementSchema: MakeSchemaFrom = { 'sort:options': { type: 'keyword' }, 'savedObjects:listingLimit': { type: 'long' }, 'query:queryString:options': { type: 'keyword' }, - pageNavigation: { type: 'keyword' }, 'metrics:max_buckets': { type: 'long' }, 'query:allowLeadingWildcards': { type: 'boolean' }, metaFields: { type: 'keyword' }, // it's an array diff --git a/src/plugins/region_map/public/components/index.tsx b/src/plugins/region_map/public/components/index.tsx index 2ad3c0ffec3f4..187c36f9cc46d 100644 --- a/src/plugins/region_map/public/components/index.tsx +++ b/src/plugins/region_map/public/components/index.tsx @@ -8,11 +8,11 @@ import React, { lazy } from 'react'; import { IServiceSettings } from 'src/plugins/maps_legacy/public'; -import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; import { RegionMapVisParams } from '../region_map_types'; const RegionMapOptions = lazy(() => import('./region_map_options')); export const createRegionMapOptions = (getServiceSettings: () => Promise) => ( - props: VisOptionsProps + props: VisEditorOptionsProps ) => ; diff --git a/src/plugins/region_map/public/components/region_map_options.tsx b/src/plugins/region_map/public/components/region_map_options.tsx index 0b11e1c5164d3..43bb15a547435 100644 --- a/src/plugins/region_map/public/components/region_map_options.tsx +++ b/src/plugins/region_map/public/components/region_map_options.tsx @@ -10,7 +10,7 @@ import React, { useCallback, useMemo } from 'react'; import { EuiIcon, EuiLink, EuiPanel, EuiSpacer, EuiText, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; import { FileLayerField, VectorLayer, IServiceSettings } from '../../../maps_legacy/public'; import { SelectOption, SwitchOption, NumberInputOption } from '../../../vis_default_editor/public'; import { WmsOptions } from '../../../maps_legacy/public'; @@ -28,7 +28,7 @@ const mapFieldForOption = ({ description, name }: FileLayerField) => ({ export type RegionMapOptionsProps = { getServiceSettings: () => Promise; -} & VisOptionsProps; +} & VisEditorOptionsProps; function RegionMapOptions(props: RegionMapOptionsProps) { const { getServiceSettings, stateParams, vis, setValue } = props; diff --git a/src/plugins/region_map/public/region_map_type.ts b/src/plugins/region_map/public/region_map_type.ts index bda478389faa1..c1d46cd603f0b 100644 --- a/src/plugins/region_map/public/region_map_type.ts +++ b/src/plugins/region_map/public/region_map_type.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; -import { BaseVisTypeOptions } from '../../visualizations/public'; +import { VisTypeDefinition } from '../../visualizations/public'; import { truncatedColorSchemas } from '../../charts/public'; import { ORIGIN } from '../../maps_legacy/public'; @@ -23,7 +23,7 @@ export function createRegionMapTypeDefinition({ uiSettings, regionmapsConfig, getServiceSettings, -}: RegionMapVisualizationDependencies): BaseVisTypeOptions { +}: RegionMapVisualizationDependencies): VisTypeDefinition { return { name: 'region_map', getInfoMessage: getDeprecationMessage, @@ -139,5 +139,6 @@ provided base maps, or add your own. Darker colors represent higher values.', return vis; }, + requiresSearch: true, }; } diff --git a/src/plugins/region_map/public/to_ast.ts b/src/plugins/region_map/public/to_ast.ts index 7c81b8fa9ecbb..77aaf18f0f697 100644 --- a/src/plugins/region_map/public/to_ast.ts +++ b/src/plugins/region_map/public/to_ast.ts @@ -11,11 +11,11 @@ import { IndexPatternLoadExpressionFunctionDefinition, } from '../../data/public'; import { buildExpression, buildExpressionFunction } from '../../expressions/public'; -import { getVisSchemas, Vis, BuildPipelineParams } from '../../visualizations/public'; +import { getVisSchemas, VisToExpressionAst } from '../../visualizations/public'; import { RegionMapExpressionFunctionDefinition } from './region_map_fn'; import { RegionMapVisConfig, RegionMapVisParams } from './region_map_types'; -export const toExpressionAst = (vis: Vis, params: BuildPipelineParams) => { +export const toExpressionAst: VisToExpressionAst = (vis, params) => { const esaggs = buildExpressionFunction('esaggs', { index: buildExpression([ buildExpressionFunction('indexPatternLoad', { diff --git a/src/plugins/telemetry/schema/oss_plugins.json b/src/plugins/telemetry/schema/oss_plugins.json index 27d9b5ce83203..7bac6a809eca3 100644 --- a/src/plugins/telemetry/schema/oss_plugins.json +++ b/src/plugins/telemetry/schema/oss_plugins.json @@ -4268,9 +4268,6 @@ "query:queryString:options": { "type": "keyword" }, - "pageNavigation": { - "type": "keyword" - }, "metrics:max_buckets": { "type": "long" }, diff --git a/src/plugins/tile_map/public/components/tile_map_options.tsx b/src/plugins/tile_map/public/components/tile_map_options.tsx index c30d314d166bb..d6155dbfec877 100644 --- a/src/plugins/tile_map/public/components/tile_map_options.tsx +++ b/src/plugins/tile_map/public/components/tile_map_options.tsx @@ -10,8 +10,8 @@ import React, { useEffect } from 'react'; import { EuiPanel, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; import { - VisOptionsProps, BasicOptions, SelectOption, SwitchOption, @@ -21,7 +21,7 @@ import { WmsOptions } from '../../../maps_legacy/public'; import { TileMapVisParams } from '../types'; import { MapTypes } from '../utils/map_types'; -export type TileMapOptionsProps = VisOptionsProps; +export type TileMapOptionsProps = VisEditorOptionsProps; function TileMapOptions(props: TileMapOptionsProps) { const { stateParams, setValue, vis } = props; diff --git a/src/plugins/tile_map/public/tile_map_type.ts b/src/plugins/tile_map/public/tile_map_type.ts index 7356da0cf8bcb..ceb9c138f043c 100644 --- a/src/plugins/tile_map/public/tile_map_type.ts +++ b/src/plugins/tile_map/public/tile_map_type.ts @@ -7,7 +7,7 @@ */ import { i18n } from '@kbn/i18n'; -import { BaseVisTypeOptions } from 'src/plugins/visualizations/public'; +import { VisTypeDefinition } from 'src/plugins/visualizations/public'; import { truncatedColorSchemas } from '../../charts/public'; // @ts-expect-error @@ -21,7 +21,7 @@ import { MapTypes } from './utils/map_types'; export function createTileMapTypeDefinition( dependencies: TileMapVisualizationDependencies -): BaseVisTypeOptions { +): VisTypeDefinition { const { uiSettings, getServiceSettings } = dependencies; return { @@ -147,5 +147,6 @@ export function createTileMapTypeDefinition( } return vis; }, + requiresSearch: true, }; } diff --git a/src/plugins/tile_map/public/to_ast.ts b/src/plugins/tile_map/public/to_ast.ts index f5a964d257431..8130b7df25276 100644 --- a/src/plugins/tile_map/public/to_ast.ts +++ b/src/plugins/tile_map/public/to_ast.ts @@ -11,11 +11,11 @@ import { IndexPatternLoadExpressionFunctionDefinition, } from '../../data/public'; import { buildExpression, buildExpressionFunction } from '../../expressions/public'; -import { getVisSchemas, Vis, BuildPipelineParams } from '../../visualizations/public'; +import { getVisSchemas, VisToExpressionAst } from '../../visualizations/public'; import { TileMapExpressionFunctionDefinition } from './tile_map_fn'; import { TileMapVisConfig, TileMapVisParams } from './types'; -export const toExpressionAst = (vis: Vis, params: BuildPipelineParams) => { +export const toExpressionAst: VisToExpressionAst = (vis, params) => { const esaggs = buildExpressionFunction('esaggs', { index: buildExpression([ buildExpressionFunction('indexPatternLoad', { diff --git a/src/plugins/vis_default_editor/public/components/agg_group_helper.test.ts b/src/plugins/vis_default_editor/public/components/agg_group_helper.test.ts index 131edb4601546..fb41d610d2175 100644 --- a/src/plugins/vis_default_editor/public/components/agg_group_helper.test.ts +++ b/src/plugins/vis_default_editor/public/components/agg_group_helper.test.ts @@ -50,7 +50,6 @@ describe('DefaultEditorGroup helpers', () => { min: 0, max: 3, aggFilter: [], - editor: false, params: [], defaults: null, mustBeFirst: true, @@ -62,7 +61,6 @@ describe('DefaultEditorGroup helpers', () => { min: 2, max: 3, aggFilter: [], - editor: false, params: [], defaults: null, }, diff --git a/src/plugins/vis_default_editor/public/components/options/basic_options.tsx b/src/plugins/vis_default_editor/public/components/options/basic_options.tsx index 4edfd9982ffbd..85a94e1228a3e 100644 --- a/src/plugins/vis_default_editor/public/components/options/basic_options.tsx +++ b/src/plugins/vis_default_editor/public/components/options/basic_options.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import { VisOptionsProps } from '../../vis_options_props'; +import { VisEditorOptionsProps } from '../../../../visualizations/public'; import { SwitchOption } from './switch'; import { SelectOption } from './select'; @@ -23,7 +23,7 @@ function BasicOptions({ stateParams, setValue, vis, -}: VisOptionsProps) { +}: VisEditorOptionsProps) { return ( <> ( interface ColorSchemaOptionsProps extends ColorSchemaParams { disabled?: boolean; colorSchemas: ColorSchema[]; - uiState: VisOptionsProps['uiState']; + uiState: VisEditorOptionsProps['uiState']; setValue: SetColorSchemaOptionsValue; showHelpText?: boolean; } diff --git a/src/plugins/vis_default_editor/public/components/sidebar/use_option_tabs.ts b/src/plugins/vis_default_editor/public/components/sidebar/use_option_tabs.ts index fbec23fd199f5..be0e4dd9a8c20 100644 --- a/src/plugins/vis_default_editor/public/components/sidebar/use_option_tabs.ts +++ b/src/plugins/vis_default_editor/public/components/sidebar/use_option_tabs.ts @@ -9,13 +9,12 @@ import { useCallback, useState } from 'react'; import { i18n } from '@kbn/i18n'; -import { Vis } from '../../../../visualizations/public'; +import { Vis, VisEditorOptionsProps } from '../../../../visualizations/public'; -import { VisOptionsProps } from '../../vis_options_props'; import { DefaultEditorDataTab, DefaultEditorDataTabProps } from './data_tab'; export interface OptionTab { - editor: React.ComponentType; + editor: React.ComponentType; name: string; title: string; isSelected?: boolean; diff --git a/src/plugins/vis_default_editor/public/index.ts b/src/plugins/vis_default_editor/public/index.ts index a4c94dd664968..9d315f1a94ce7 100644 --- a/src/plugins/vis_default_editor/public/index.ts +++ b/src/plugins/vis_default_editor/public/index.ts @@ -16,7 +16,6 @@ export { PalettePicker } from './components/controls/palette_picker'; export * from './components/options'; export { RangesParamEditor, RangeValues } from './components/controls/ranges'; export * from './editor_size'; -export * from './vis_options_props'; export * from './utils'; export const plugin = (context: PluginInitializerContext) => { diff --git a/src/plugins/vis_default_editor/public/vis_options_props.tsx b/src/plugins/vis_default_editor/public/vis_options_props.tsx deleted file mode 100644 index 6180686b6996d..0000000000000 --- a/src/plugins/vis_default_editor/public/vis_options_props.tsx +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * and the Server Side Public License, v 1; you may not use this file except in - * compliance with, at your election, the Elastic License or the Server Side - * Public License, v 1. - */ - -import { Vis, PersistedState } from 'src/plugins/visualizations/public'; -import { IAggConfigs } from 'src/plugins/data/public'; - -export interface VisOptionsProps { - aggs: IAggConfigs; - hasHistogramAgg: boolean; - isTabSelected: boolean; - stateParams: VisParamType; - vis: Vis; - uiState: PersistedState; - setValue(paramName: T, value: VisParamType[T]): void; - setValidity(isValid: boolean): void; - setTouched(isTouched: boolean): void; -} diff --git a/src/plugins/vis_type_markdown/public/markdown_options.test.tsx b/src/plugins/vis_type_markdown/public/markdown_options.test.tsx index cf27118ac71e4..9d464cf9e2063 100644 --- a/src/plugins/vis_type_markdown/public/markdown_options.test.tsx +++ b/src/plugins/vis_type_markdown/public/markdown_options.test.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; import { MarkdownVisParams } from './types'; import { MarkdownOptions } from './markdown_options'; @@ -21,7 +21,7 @@ describe('MarkdownOptions', () => { openLinksInNewTab: false, }, setValue: jest.fn(), - } as unknown) as VisOptionsProps; + } as unknown) as VisEditorOptionsProps; it('should match snapshot', () => { const comp = shallow(); diff --git a/src/plugins/vis_type_markdown/public/markdown_options.tsx b/src/plugins/vis_type_markdown/public/markdown_options.tsx index 72e4aaf8758b2..79d850b8c1fd8 100644 --- a/src/plugins/vis_type_markdown/public/markdown_options.tsx +++ b/src/plugins/vis_type_markdown/public/markdown_options.tsx @@ -18,10 +18,10 @@ import { } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; import { MarkdownVisParams } from './types'; -function MarkdownOptions({ stateParams, setValue }: VisOptionsProps) { +function MarkdownOptions({ stateParams, setValue }: VisEditorOptionsProps) { const onMarkdownUpdate = useCallback( ({ target: { value } }: React.ChangeEvent) => setValue('markdown', value), [setValue] diff --git a/src/plugins/vis_type_markdown/public/markdown_vis.ts b/src/plugins/vis_type_markdown/public/markdown_vis.ts index e698316dc8e70..adfdb811cc28c 100644 --- a/src/plugins/vis_type_markdown/public/markdown_vis.ts +++ b/src/plugins/vis_type_markdown/public/markdown_vis.ts @@ -11,10 +11,11 @@ import { i18n } from '@kbn/i18n'; import { MarkdownOptions } from './markdown_options'; import { SettingsOptions } from './settings_options_lazy'; import { DefaultEditorSize } from '../../vis_default_editor/public'; -import { VisGroups } from '../../visualizations/public'; +import { VisGroups, VisTypeDefinition } from '../../visualizations/public'; import { toExpressionAst } from './to_ast'; +import { MarkdownVisParams } from './types'; -export const markdownVisDefinition = { +export const markdownVisDefinition: VisTypeDefinition = { name: 'markdown', title: 'Markdown', isAccessible: true, @@ -58,7 +59,5 @@ export const markdownVisDefinition = { showTimePicker: false, showFilterBar: false, }, - requestHandler: 'none', - responseHandler: 'none', inspectorAdapters: {}, }; diff --git a/src/plugins/vis_type_markdown/public/settings_options.tsx b/src/plugins/vis_type_markdown/public/settings_options.tsx index 4ebcc88a8c04f..c18f1305d778a 100644 --- a/src/plugins/vis_type_markdown/public/settings_options.tsx +++ b/src/plugins/vis_type_markdown/public/settings_options.tsx @@ -10,10 +10,11 @@ import React from 'react'; import { EuiPanel } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { VisOptionsProps, SwitchOption, RangeOption } from '../../vis_default_editor/public'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; +import { SwitchOption, RangeOption } from '../../vis_default_editor/public'; import { MarkdownVisParams } from './types'; -function SettingsOptions({ stateParams, setValue }: VisOptionsProps) { +function SettingsOptions({ stateParams, setValue }: VisEditorOptionsProps) { return ( { +export const toExpressionAst: VisToExpressionAst = (vis) => { const { markdown, fontSize, openLinksInNewTab } = vis.params; const markdownVis = buildExpressionFunction( diff --git a/src/plugins/vis_type_metric/public/__snapshots__/metric_vis_fn.test.ts.snap b/src/plugins/vis_type_metric/public/__snapshots__/metric_vis_fn.test.ts.snap index fd8f3a712d8ae..a212cec2d8827 100644 --- a/src/plugins/vis_type_metric/public/__snapshots__/metric_vis_fn.test.ts.snap +++ b/src/plugins/vis_type_metric/public/__snapshots__/metric_vis_fn.test.ts.snap @@ -5,9 +5,6 @@ Object { "as": "metric_vis", "type": "render", "value": Object { - "params": Object { - "listenOnChange": true, - }, "visConfig": Object { "dimensions": Object { "metrics": undefined, diff --git a/src/plugins/vis_type_metric/public/__snapshots__/to_ast.test.ts.snap b/src/plugins/vis_type_metric/public/__snapshots__/to_ast.test.ts.snap index a89f41737d7bc..46e86c4c25de1 100644 --- a/src/plugins/vis_type_metric/public/__snapshots__/to_ast.test.ts.snap +++ b/src/plugins/vis_type_metric/public/__snapshots__/to_ast.test.ts.snap @@ -37,6 +37,9 @@ Object { "percentageMode": Array [ true, ], + "showLabels": Array [ + false, + ], }, "function": "metricVis", "type": "function", @@ -79,7 +82,11 @@ Object { "type": "function", }, Object { - "arguments": Object {}, + "arguments": Object { + "showLabels": Array [ + false, + ], + }, "function": "metricVis", "type": "function", }, diff --git a/src/plugins/vis_type_metric/public/components/metric_vis_options.tsx b/src/plugins/vis_type_metric/public/components/metric_vis_options.tsx index c8448ae68c074..069690b58e2a0 100644 --- a/src/plugins/vis_type_metric/public/components/metric_vis_options.tsx +++ b/src/plugins/vis_type_metric/public/components/metric_vis_options.tsx @@ -18,10 +18,10 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; import { ColorRanges, SetColorRangeValue, - VisOptionsProps, SwitchOption, SetColorSchemaOptionsValue, ColorSchemaOptions, @@ -37,7 +37,7 @@ function MetricVisOptions({ setTouched, vis, uiState, -}: VisOptionsProps) { +}: VisEditorOptionsProps) { const setMetricValue: ( paramName: T, value: MetricVisParam[T] diff --git a/src/plugins/vis_type_metric/public/metric_vis_fn.ts b/src/plugins/vis_type_metric/public/metric_vis_fn.ts index 892523493fb78..083d0413161b2 100644 --- a/src/plugins/vis_type_metric/public/metric_vis_fn.ts +++ b/src/plugins/vis_type_metric/public/metric_vis_fn.ts @@ -39,7 +39,6 @@ export interface MetricVisRenderValue { visType: typeof visType; visData: Input; visConfig: Pick; - params: any; } export type MetricVisExpressionFunctionDefinition = ExpressionFunctionDefinition< @@ -194,9 +193,6 @@ export const createMetricVisFn = (): MetricVisExpressionFunctionDefinition => ({ }, dimensions, }, - params: { - listenOnChange: true, - }, }, }; }, diff --git a/src/plugins/vis_type_metric/public/metric_vis_type.ts b/src/plugins/vis_type_metric/public/metric_vis_type.ts index cd4357574950d..e81d8f071c4f0 100644 --- a/src/plugins/vis_type_metric/public/metric_vis_type.ts +++ b/src/plugins/vis_type_metric/public/metric_vis_type.ts @@ -9,11 +9,12 @@ import { i18n } from '@kbn/i18n'; import { MetricVisOptions } from './components/metric_vis_options'; import { ColorSchemas, colorSchemas, ColorMode } from '../../charts/public'; -import { BaseVisTypeOptions } from '../../visualizations/public'; +import { VisTypeDefinition } from '../../visualizations/public'; import { AggGroupNames } from '../../data/public'; import { toExpressionAst } from './to_ast'; +import { VisParams } from './types'; -export const createMetricVisTypeDefinition = (): BaseVisTypeOptions => ({ +export const createMetricVisTypeDefinition = (): VisTypeDefinition => ({ name: 'metric', title: i18n.translate('visTypeMetric.metricTitle', { defaultMessage: 'Metric' }), icon: 'visMetric', @@ -110,4 +111,5 @@ export const createMetricVisTypeDefinition = (): BaseVisTypeOptions => ({ }, ], }, + requiresSearch: true, }); diff --git a/src/plugins/vis_type_metric/public/to_ast.test.ts b/src/plugins/vis_type_metric/public/to_ast.test.ts index fb90b27391c83..871b2ca0dc379 100644 --- a/src/plugins/vis_type_metric/public/to_ast.test.ts +++ b/src/plugins/vis_type_metric/public/to_ast.test.ts @@ -6,14 +6,17 @@ * Public License, v 1. */ +import { TimefilterContract } from 'src/plugins/data/public'; +import { Vis } from 'src/plugins/visualizations/public'; + import { toExpressionAst } from './to_ast'; -import { Vis } from '../../visualizations/public'; +import { VisParams } from './types'; describe('metric vis toExpressionAst function', () => { - let vis: Vis; + let vis: Vis; beforeEach(() => { - vis = { + vis = ({ isHierarchical: () => false, type: {}, params: { @@ -26,18 +29,22 @@ describe('metric vis toExpressionAst function', () => { aggs: [], } as any, }, - } as any; + } as unknown) as Vis; }); it('without params', () => { - vis.params = { metric: {} }; - const actual = toExpressionAst(vis, {}); + vis.params = { metric: {} } as VisParams; + const actual = toExpressionAst(vis, { + timefilter: {} as TimefilterContract, + }); expect(actual).toMatchSnapshot(); }); it('with percentage mode should have percentage format', () => { - vis.params = { metric: { percentageMode: true } }; - const actual = toExpressionAst(vis, {}); + vis.params = { metric: { percentageMode: true } } as VisParams; + const actual = toExpressionAst(vis, { + timefilter: {} as TimefilterContract, + }); expect(actual).toMatchSnapshot(); }); }); diff --git a/src/plugins/vis_type_metric/public/to_ast.ts b/src/plugins/vis_type_metric/public/to_ast.ts index 3b95b0c841016..3addce7610f2e 100644 --- a/src/plugins/vis_type_metric/public/to_ast.ts +++ b/src/plugins/vis_type_metric/public/to_ast.ts @@ -7,13 +7,14 @@ */ import { get } from 'lodash'; -import { getVisSchemas, SchemaConfig, Vis } from '../../visualizations/public'; +import { getVisSchemas, SchemaConfig, VisToExpressionAst } from '../../visualizations/public'; import { buildExpression, buildExpressionFunction } from '../../expressions/public'; import { MetricVisExpressionFunctionDefinition } from './metric_vis_fn'; import { EsaggsExpressionFunctionDefinition, IndexPatternLoadExpressionFunctionDefinition, } from '../../data/public'; +import { VisParams } from './types'; const prepareDimension = (params: SchemaConfig) => { const visdimension = buildExpressionFunction('visdimension', { accessor: params.accessor }); @@ -26,7 +27,7 @@ const prepareDimension = (params: SchemaConfig) => { return buildExpression([visdimension]); }; -export const toExpressionAst = (vis: Vis, params: any) => { +export const toExpressionAst: VisToExpressionAst = (vis, params) => { const esaggs = buildExpressionFunction('esaggs', { index: buildExpression([ buildExpressionFunction('indexPatternLoad', { @@ -34,7 +35,7 @@ export const toExpressionAst = (vis: Vis, params: any) => { }), ]), metricsAtAllLevels: vis.isHierarchical(), - partialRows: vis.params.showPartialRows || false, + partialRows: false, aggs: vis.data.aggs!.aggs.map((agg) => buildExpression(agg.toExpressionAst())), }); @@ -65,7 +66,7 @@ export const toExpressionAst = (vis: Vis, params: any) => { colorMode: metricColorMode, useRanges, invertColors, - showLabels: labels && labels.show, + showLabels: labels?.show ?? false, }); if (style) { diff --git a/src/plugins/vis_type_table/public/components/table_vis_options.tsx b/src/plugins/vis_type_table/public/components/table_vis_options.tsx index a70ecb43f1be7..163dae7ddc1c6 100644 --- a/src/plugins/vis_type_table/public/components/table_vis_options.tsx +++ b/src/plugins/vis_type_table/public/components/table_vis_options.tsx @@ -12,13 +12,9 @@ import { EuiIconTip, EuiPanel } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; import { search } from '../../../data/public'; -import { - SwitchOption, - SelectOption, - NumberInputOption, - VisOptionsProps, -} from '../../../vis_default_editor/public'; +import { SwitchOption, SelectOption, NumberInputOption } from '../../../vis_default_editor/public'; import { TableVisParams } from '../../common'; import { totalAggregations } from './utils'; @@ -29,7 +25,7 @@ function TableOptions({ stateParams, setValidity, setValue, -}: VisOptionsProps) { +}: VisEditorOptionsProps) { const percentageColumns = useMemo( () => [ { diff --git a/src/plugins/vis_type_table/public/components/table_vis_options_lazy.tsx b/src/plugins/vis_type_table/public/components/table_vis_options_lazy.tsx index 716b77e9c91d2..2f7369996634a 100644 --- a/src/plugins/vis_type_table/public/components/table_vis_options_lazy.tsx +++ b/src/plugins/vis_type_table/public/components/table_vis_options_lazy.tsx @@ -8,12 +8,13 @@ import React, { lazy, Suspense } from 'react'; import { EuiLoadingSpinner } from '@elastic/eui'; -import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; + +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; import { TableVisParams } from '../../common'; const TableOptionsComponent = lazy(() => import('./table_vis_options')); -export const TableOptions = (props: VisOptionsProps) => ( +export const TableOptions = (props: VisEditorOptionsProps) => ( }> diff --git a/src/plugins/vis_type_table/public/legacy/table_vis_legacy_type.ts b/src/plugins/vis_type_table/public/legacy/table_vis_legacy_type.ts index 3e1140275593d..53ad67ab4dd94 100644 --- a/src/plugins/vis_type_table/public/legacy/table_vis_legacy_type.ts +++ b/src/plugins/vis_type_table/public/legacy/table_vis_legacy_type.ts @@ -8,14 +8,14 @@ import { i18n } from '@kbn/i18n'; import { AggGroupNames } from '../../../data/public'; -import { BaseVisTypeOptions } from '../../../visualizations/public'; +import { VisTypeDefinition } from '../../../visualizations/public'; import { TableOptions } from '../components/table_vis_options_lazy'; import { VIS_EVENT_TO_TRIGGER } from '../../../visualizations/public'; import { TableVisParams, VIS_TYPE_TABLE } from '../../common'; import { toExpressionAst } from '../to_ast'; -export const tableVisLegacyTypeDefinition: BaseVisTypeOptions = { +export const tableVisLegacyTypeDefinition: VisTypeDefinition = { name: VIS_TYPE_TABLE, title: i18n.translate('visTypeTable.tableVisTitle', { defaultMessage: 'Data table', @@ -81,4 +81,5 @@ export const tableVisLegacyTypeDefinition: BaseVisTypeOptions = }, toExpressionAst, hierarchicalData: (vis) => vis.params.showPartialRows || vis.params.showMetricsAtAllLevels, + requiresSearch: true, }; diff --git a/src/plugins/vis_type_table/public/table_vis_type.ts b/src/plugins/vis_type_table/public/table_vis_type.ts index ef6d85db103b3..92148a5f085b0 100644 --- a/src/plugins/vis_type_table/public/table_vis_type.ts +++ b/src/plugins/vis_type_table/public/table_vis_type.ts @@ -7,15 +7,14 @@ */ import { i18n } from '@kbn/i18n'; -import { AggGroupNames } from '../../data/public'; -import { BaseVisTypeOptions } from '../../visualizations/public'; +import { AggGroupNames } from '../../data/public'; +import { VIS_EVENT_TO_TRIGGER, VisTypeDefinition } from '../../visualizations/public'; import { TableVisParams, VIS_TYPE_TABLE } from '../common'; import { TableOptions } from './components/table_vis_options_lazy'; -import { VIS_EVENT_TO_TRIGGER } from '../../../plugins/visualizations/public'; import { toExpressionAst } from './to_ast'; -export const tableVisTypeDefinition: BaseVisTypeOptions = { +export const tableVisTypeDefinition: VisTypeDefinition = { name: VIS_TYPE_TABLE, title: i18n.translate('visTypeTable.tableVisTitle', { defaultMessage: 'Data table', @@ -78,4 +77,5 @@ export const tableVisTypeDefinition: BaseVisTypeOptions = { }, toExpressionAst, hierarchicalData: (vis) => vis.params.showPartialRows || vis.params.showMetricsAtAllLevels, + requiresSearch: true, }; diff --git a/src/plugins/vis_type_table/public/to_ast.ts b/src/plugins/vis_type_table/public/to_ast.ts index 1cbe9832e4c98..ba79d82947d06 100644 --- a/src/plugins/vis_type_table/public/to_ast.ts +++ b/src/plugins/vis_type_table/public/to_ast.ts @@ -11,7 +11,7 @@ import { IndexPatternLoadExpressionFunctionDefinition, } from '../../data/public'; import { buildExpression, buildExpressionFunction } from '../../expressions/public'; -import { getVisSchemas, Vis, BuildPipelineParams } from '../../visualizations/public'; +import { getVisSchemas, VisToExpressionAst } from '../../visualizations/public'; import { TableVisParams } from '../common'; import { TableExpressionFunctionDefinition } from './table_vis_fn'; import { TableVisConfig } from './types'; @@ -41,7 +41,7 @@ const buildTableVisConfig = ( return visConfig; }; -export const toExpressionAst = (vis: Vis, params: BuildPipelineParams) => { +export const toExpressionAst: VisToExpressionAst = (vis, params) => { const esaggs = buildExpressionFunction('esaggs', { index: buildExpression([ buildExpressionFunction('indexPatternLoad', { diff --git a/src/plugins/vis_type_tagcloud/public/components/tag_cloud_options.tsx b/src/plugins/vis_type_tagcloud/public/components/tag_cloud_options.tsx index 2bcae41fae566..d15772b3fdb18 100644 --- a/src/plugins/vis_type_tagcloud/public/components/tag_cloud_options.tsx +++ b/src/plugins/vis_type_tagcloud/public/components/tag_cloud_options.tsx @@ -9,11 +9,12 @@ import React from 'react'; import { EuiPanel } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { VisOptionsProps, SelectOption, SwitchOption } from '../../../vis_default_editor/public'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; +import { SelectOption, SwitchOption } from '../../../vis_default_editor/public'; import { ValidatedDualRange } from '../../../kibana_react/public'; import { TagCloudVisParams } from '../types'; -function TagCloudOptions({ stateParams, setValue, vis }: VisOptionsProps) { +function TagCloudOptions({ stateParams, setValue, vis }: VisEditorOptionsProps) { const handleFontSizeChange = ([minFontSize, maxFontSize]: [string | number, string | number]) => { setValue('minFontSize', Number(minFontSize)); setValue('maxFontSize', Number(maxFontSize)); diff --git a/src/plugins/vis_type_tagcloud/public/tag_cloud_type.ts b/src/plugins/vis_type_tagcloud/public/tag_cloud_type.ts index 8159192b3491a..ebfa8db41944c 100644 --- a/src/plugins/vis_type_tagcloud/public/tag_cloud_type.ts +++ b/src/plugins/vis_type_tagcloud/public/tag_cloud_type.ts @@ -7,6 +7,7 @@ */ import { i18n } from '@kbn/i18n'; +import { AggGroupNames } from '../../data/public'; import { VIS_EVENT_TO_TRIGGER } from '../../visualizations/public'; import { TagCloudOptions } from './components/tag_cloud_options'; @@ -78,7 +79,7 @@ export const tagCloudVisTypeDefinition = { optionsTemplate: TagCloudOptions, schemas: [ { - group: 'metrics', + group: AggGroupNames.Metrics, name: 'metric', title: i18n.translate('visTypeTagCloud.vis.schemas.metricTitle', { defaultMessage: 'Tag size', @@ -96,7 +97,7 @@ export const tagCloudVisTypeDefinition = { defaults: [{ schema: 'metric', type: 'count' }], }, { - group: 'buckets', + group: AggGroupNames.Buckets, name: 'segment', title: i18n.translate('visTypeTagCloud.vis.schemas.segmentTitle', { defaultMessage: 'Tags', @@ -107,4 +108,5 @@ export const tagCloudVisTypeDefinition = { }, ], }, + requiresSearch: true, }; diff --git a/src/plugins/vis_type_tagcloud/public/to_ast.ts b/src/plugins/vis_type_tagcloud/public/to_ast.ts index adde82dd0dda9..1d9b24235b7ff 100644 --- a/src/plugins/vis_type_tagcloud/public/to_ast.ts +++ b/src/plugins/vis_type_tagcloud/public/to_ast.ts @@ -11,7 +11,7 @@ import { IndexPatternLoadExpressionFunctionDefinition, } from '../../data/public'; import { buildExpression, buildExpressionFunction } from '../../expressions/public'; -import { getVisSchemas, SchemaConfig, Vis, BuildPipelineParams } from '../../visualizations/public'; +import { getVisSchemas, SchemaConfig, VisToExpressionAst } from '../../visualizations/public'; import { TagcloudExpressionFunctionDefinition } from './tag_cloud_fn'; import { TagCloudVisParams } from './types'; @@ -26,7 +26,7 @@ const prepareDimension = (params: SchemaConfig) => { return buildExpression([visdimension]); }; -export const toExpressionAst = (vis: Vis, params: BuildPipelineParams) => { +export const toExpressionAst: VisToExpressionAst = (vis, params) => { const esaggs = buildExpressionFunction('esaggs', { index: buildExpression([ buildExpressionFunction('indexPatternLoad', { diff --git a/src/plugins/vis_type_timelion/public/timelion_options.tsx b/src/plugins/vis_type_timelion/public/timelion_options.tsx index 4627a5d5c8657..e366ec98f4be0 100644 --- a/src/plugins/vis_type_timelion/public/timelion_options.tsx +++ b/src/plugins/vis_type_timelion/public/timelion_options.tsx @@ -9,7 +9,7 @@ import React, { useCallback } from 'react'; import { EuiPanel } from '@elastic/eui'; -import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; import { KibanaContextProvider } from '../../kibana_react/public'; import { TimelionVisParams } from './timelion_vis_fn'; @@ -18,7 +18,7 @@ import { TimelionVisDependencies } from './plugin'; import './timelion_options.scss'; -export type TimelionOptionsProps = VisOptionsProps; +export type TimelionOptionsProps = VisEditorOptionsProps; function TimelionOptions({ services, diff --git a/src/plugins/vis_type_timelion/public/timelion_vis_type.tsx b/src/plugins/vis_type_timelion/public/timelion_vis_type.tsx index 21344fc794c98..c9780ec6bcd1c 100644 --- a/src/plugins/vis_type_timelion/public/timelion_vis_type.tsx +++ b/src/plugins/vis_type_timelion/public/timelion_vis_type.tsx @@ -10,7 +10,6 @@ import React, { lazy } from 'react'; import { i18n } from '@kbn/i18n'; import { DefaultEditorSize } from '../../vis_default_editor/public'; -import { getTimelionRequestHandler } from './helpers/timelion_request_handler'; import { TimelionOptionsProps } from './timelion_options'; import { TimelionVisDependencies } from './plugin'; import { toExpressionAst } from './to_ast'; @@ -22,8 +21,6 @@ const TimelionOptions = lazy(() => import('./timelion_options')); export const TIMELION_VIS_NAME = 'timelion'; export function getTimelionVisDefinition(dependencies: TimelionVisDependencies) { - const timelionRequestHandler = getTimelionRequestHandler(dependencies); - // return the visType object, which kibana will use to display and configure new // Vis object of this type. return { @@ -45,9 +42,7 @@ export function getTimelionVisDefinition(dependencies: TimelionVisDependencies) ), defaultSize: DefaultEditorSize.MEDIUM, }, - requestHandler: timelionRequestHandler, toExpressionAst, - responseHandler: 'none', inspectorAdapters: {}, getSupportedTriggers: () => { return [VIS_EVENT_TO_TRIGGER.applyFilter]; @@ -57,5 +52,6 @@ export function getTimelionVisDefinition(dependencies: TimelionVisDependencies) showQueryBar: false, showFilterBar: false, }, + requiresSearch: true, }; } diff --git a/src/plugins/vis_type_vega/public/components/vega_vis_editor.tsx b/src/plugins/vis_type_vega/public/components/vega_vis_editor.tsx index 7afc01adec385..0a54a74b6b68c 100644 --- a/src/plugins/vis_type_vega/public/components/vega_vis_editor.tsx +++ b/src/plugins/vis_type_vega/public/components/vega_vis_editor.tsx @@ -13,7 +13,7 @@ import hjson from 'hjson'; import 'brace/mode/hjson'; import { i18n } from '@kbn/i18n'; -import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; import { getNotifications } from '../services'; import { VisParams } from '../vega_fn'; import { VegaHelpMenu } from './vega_help_menu'; @@ -55,7 +55,7 @@ function format( } } -function VegaVisEditor({ stateParams, setValue }: VisOptionsProps) { +function VegaVisEditor({ stateParams, setValue }: VisEditorOptionsProps) { const onChange = useCallback( (value: string) => { setValue('spec', value); diff --git a/src/plugins/vis_type_vega/public/components/vega_vis_editor_lazy.tsx b/src/plugins/vis_type_vega/public/components/vega_vis_editor_lazy.tsx index 875f13453cf6d..bd26424552038 100644 --- a/src/plugins/vis_type_vega/public/components/vega_vis_editor_lazy.tsx +++ b/src/plugins/vis_type_vega/public/components/vega_vis_editor_lazy.tsx @@ -8,11 +8,11 @@ import React, { lazy } from 'react'; -import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; import { VisParams } from '../vega_fn'; const VegaVisEditor = lazy(() => import('./vega_vis_editor')); -export const VegaVisEditorComponent = (props: VisOptionsProps) => ( +export const VegaVisEditorComponent = (props: VisEditorOptionsProps) => ( ); diff --git a/src/plugins/vis_type_vega/public/plugin.ts b/src/plugins/vis_type_vega/public/plugin.ts index b74b686500e6d..376ef84de23c3 100644 --- a/src/plugins/vis_type_vega/public/plugin.ts +++ b/src/plugins/vis_type_vega/public/plugin.ts @@ -84,7 +84,7 @@ export class VegaPlugin implements Plugin, void> { expressions.registerFunction(() => createVegaFn(visualizationDependencies)); expressions.registerRenderer(getVegaVisRenderer(visualizationDependencies)); - visualizations.createBaseVisualization(createVegaTypeDefinition(visualizationDependencies)); + visualizations.createBaseVisualization(createVegaTypeDefinition()); } public start(core: CoreStart, { data }: VegaPluginStartDependencies) { diff --git a/src/plugins/vis_type_vega/public/vega_type.ts b/src/plugins/vis_type_vega/public/vega_type.ts index 66e4b8b98056f..4b2ec65850030 100644 --- a/src/plugins/vis_type_vega/public/vega_type.ts +++ b/src/plugins/vis_type_vega/public/vega_type.ts @@ -8,16 +8,13 @@ import { i18n } from '@kbn/i18n'; import { parse } from 'hjson'; -import type { BaseVisTypeOptions } from 'src/plugins/visualizations/public'; import { DefaultEditorSize } from '../../vis_default_editor/public'; -import type { VegaVisualizationDependencies } from './plugin'; +import { VIS_EVENT_TO_TRIGGER, VisGroups, VisTypeDefinition } from '../../visualizations/public'; -import { createVegaRequestHandler } from './vega_request_handler'; import { getDefaultSpec } from './default_spec'; import { extractIndexPatternsFromSpec } from './lib/extract_index_pattern'; import { createInspectorAdapters } from './vega_inspector'; -import { VIS_EVENT_TO_TRIGGER, VisGroups } from '../../visualizations/public'; import { toExpressionAst } from './to_ast'; import { getInfoMessage } from './components/experimental_map_vis_info'; import { VegaVisEditorComponent } from './components/vega_vis_editor_lazy'; @@ -25,11 +22,7 @@ import { VegaVisEditorComponent } from './components/vega_vis_editor_lazy'; import type { VegaSpec } from './data_model/types'; import type { VisParams } from './vega_fn'; -export const createVegaTypeDefinition = ( - dependencies: VegaVisualizationDependencies -): BaseVisTypeOptions => { - const requestHandler = createVegaRequestHandler(dependencies); - +export const createVegaTypeDefinition = (): VisTypeDefinition => { return { name: 'vega', title: 'Vega', @@ -52,7 +45,6 @@ export const createVegaTypeDefinition = ( enableAutoApply: true, defaultSize: DefaultEditorSize.MEDIUM, }, - requestHandler, toExpressionAst, options: { showIndexSelection: false, @@ -73,5 +65,9 @@ export const createVegaTypeDefinition = ( return []; }, inspectorAdapters: createInspectorAdapters, + /** + * This is necessary for showing actions bar in top of vega editor + */ + requiresSearch: true, }; }; diff --git a/src/plugins/vis_type_vislib/public/area.ts b/src/plugins/vis_type_vislib/public/area.ts index 7458d0a44ecae..cbb705f4cce5d 100644 --- a/src/plugins/vis_type_vislib/public/area.ts +++ b/src/plugins/vis_type_vislib/public/area.ts @@ -7,13 +7,12 @@ */ import { xyVisTypes } from '../../vis_type_xy/public'; -import { BaseVisTypeOptions } from '../../visualizations/public'; +import { VisTypeDefinition } from '../../visualizations/public'; import { toExpressionAst } from './to_ast'; import { BasicVislibParams } from './types'; -export const areaVisTypeDefinition: BaseVisTypeOptions = { - ...(xyVisTypes.area() as BaseVisTypeOptions), +export const areaVisTypeDefinition = { + ...xyVisTypes.area(), toExpressionAst, - visualization: undefined, -}; +} as VisTypeDefinition; diff --git a/src/plugins/vis_type_vislib/public/editor/components/gauge/index.tsx b/src/plugins/vis_type_vislib/public/editor/components/gauge/index.tsx index fa0091b2082b7..e9651954ed302 100644 --- a/src/plugins/vis_type_vislib/public/editor/components/gauge/index.tsx +++ b/src/plugins/vis_type_vislib/public/editor/components/gauge/index.tsx @@ -9,20 +9,20 @@ import React, { useCallback } from 'react'; import { EuiSpacer } from '@elastic/eui'; -import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; import { GaugeVisParams } from '../../../gauge'; import { RangesPanel } from './ranges_panel'; import { StylePanel } from './style_panel'; import { LabelsPanel } from './labels_panel'; -export type GaugeOptionsInternalProps = VisOptionsProps & { +export type GaugeOptionsInternalProps = VisEditorOptionsProps & { setGaugeValue: ( paramName: T, value: GaugeVisParams['gauge'][T] ) => void; }; -function GaugeOptions(props: VisOptionsProps) { +function GaugeOptions(props: VisEditorOptionsProps) { const { stateParams, setValue } = props; const setGaugeValue: GaugeOptionsInternalProps['setGaugeValue'] = useCallback( diff --git a/src/plugins/vis_type_vislib/public/editor/components/heatmap/index.tsx b/src/plugins/vis_type_vislib/public/editor/components/heatmap/index.tsx index 7092615d9fcaf..2dd4b06a52288 100644 --- a/src/plugins/vis_type_vislib/public/editor/components/heatmap/index.tsx +++ b/src/plugins/vis_type_vislib/public/editor/components/heatmap/index.tsx @@ -12,9 +12,9 @@ import { EuiPanel, EuiSpacer, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; import { ValueAxis } from '../../../../../vis_type_xy/public'; import { - VisOptionsProps, BasicOptions, SelectOption, SwitchOption, @@ -28,7 +28,7 @@ import { import { HeatmapVisParams } from '../../../heatmap'; import { LabelsPanel } from './labels_panel'; -function HeatmapOptions(props: VisOptionsProps) { +function HeatmapOptions(props: VisEditorOptionsProps) { const { stateParams, vis, uiState, setValue, setValidity, setTouched } = props; const [valueAxis] = stateParams.valueAxes; const isColorsNumberInvalid = stateParams.colorsNumber < 2 || stateParams.colorsNumber > 10; diff --git a/src/plugins/vis_type_vislib/public/editor/components/heatmap/labels_panel.tsx b/src/plugins/vis_type_vislib/public/editor/components/heatmap/labels_panel.tsx index cc224f8e1c6aa..ff98a494ad906 100644 --- a/src/plugins/vis_type_vislib/public/editor/components/heatmap/labels_panel.tsx +++ b/src/plugins/vis_type_vislib/public/editor/components/heatmap/labels_panel.tsx @@ -12,7 +12,8 @@ import { EuiColorPicker, EuiFormRow, EuiPanel, EuiSpacer, EuiTitle } from '@elas import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { VisOptionsProps, SwitchOption } from '../../../../../vis_default_editor/public'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; +import { SwitchOption } from '../../../../../vis_default_editor/public'; import { ValueAxis } from '../../../../../vis_type_xy/public'; import { HeatmapVisParams } from '../../../heatmap'; @@ -21,7 +22,7 @@ const VERTICAL_ROTATION = 270; interface LabelsPanelProps { valueAxis: ValueAxis; - setValue: VisOptionsProps['setValue']; + setValue: VisEditorOptionsProps['setValue']; } function LabelsPanel({ valueAxis, setValue }: LabelsPanelProps) { diff --git a/src/plugins/vis_type_vislib/public/editor/components/index.tsx b/src/plugins/vis_type_vislib/public/editor/components/index.tsx index 264c3066f13fe..6c6181246d6db 100644 --- a/src/plugins/vis_type_vislib/public/editor/components/index.tsx +++ b/src/plugins/vis_type_vislib/public/editor/components/index.tsx @@ -8,8 +8,7 @@ import React, { lazy } from 'react'; -import { VisOptionsProps } from '../../../../vis_default_editor/public'; - +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; import { GaugeVisParams } from '../../gauge'; import { PieVisParams } from '../../pie'; import { HeatmapVisParams } from '../../heatmap'; @@ -18,12 +17,14 @@ const GaugeOptionsLazy = lazy(() => import('./gauge')); const PieOptionsLazy = lazy(() => import('./pie')); const HeatmapOptionsLazy = lazy(() => import('./heatmap')); -export const GaugeOptions = (props: VisOptionsProps) => ( +export const GaugeOptions = (props: VisEditorOptionsProps) => ( ); -export const PieOptions = (props: VisOptionsProps) => ; +export const PieOptions = (props: VisEditorOptionsProps) => ( + +); -export const HeatmapOptions = (props: VisOptionsProps) => ( +export const HeatmapOptions = (props: VisEditorOptionsProps) => ( ); diff --git a/src/plugins/vis_type_vislib/public/editor/components/pie.tsx b/src/plugins/vis_type_vislib/public/editor/components/pie.tsx index 863b11c6a3fcf..e0ea1fcee4881 100644 --- a/src/plugins/vis_type_vislib/public/editor/components/pie.tsx +++ b/src/plugins/vis_type_vislib/public/editor/components/pie.tsx @@ -12,12 +12,13 @@ import { EuiPanel, EuiTitle, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { BasicOptions, SwitchOption, VisOptionsProps } from '../../../../vis_default_editor/public'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; +import { BasicOptions, SwitchOption } from '../../../../vis_default_editor/public'; import { TruncateLabelsOption } from '../../../../vis_type_xy/public'; import { PieVisParams } from '../../pie'; -function PieOptions(props: VisOptionsProps) { +function PieOptions(props: VisEditorOptionsProps) { const { stateParams, setValue } = props; const setLabels = ( paramName: T, diff --git a/src/plugins/vis_type_vislib/public/gauge.ts b/src/plugins/vis_type_vislib/public/gauge.ts index 5dc59f62edffd..e0c63fd15e3d7 100644 --- a/src/plugins/vis_type_vislib/public/gauge.ts +++ b/src/plugins/vis_type_vislib/public/gauge.ts @@ -11,9 +11,9 @@ import { i18n } from '@kbn/i18n'; import { ColorMode, ColorSchemas, ColorSchemaParams, Labels, Style } from '../../charts/public'; import { RangeValues } from '../../vis_default_editor/public'; import { AggGroupNames } from '../../data/public'; -import { BaseVisTypeOptions, VIS_EVENT_TO_TRIGGER } from '../../visualizations/public'; +import { VisTypeDefinition, VIS_EVENT_TO_TRIGGER } from '../../visualizations/public'; -import { Alignment, GaugeType, BasicVislibParams, VislibChartType } from './types'; +import { Alignment, GaugeType, VislibChartType } from './types'; import { getGaugeCollections } from './editor'; import { toExpressionAst } from './to_ast'; import { GaugeOptions } from './editor/components'; @@ -46,7 +46,7 @@ export interface GaugeVisParams { gauge: Gauge; } -export const gaugeVisTypeDefinition: BaseVisTypeOptions = { +export const gaugeVisTypeDefinition: VisTypeDefinition = { name: 'gauge', title: i18n.translate('visTypeVislib.gauge.gaugeTitle', { defaultMessage: 'Gauge' }), icon: 'visGauge', @@ -135,5 +135,5 @@ export const gaugeVisTypeDefinition: BaseVisTypeOptions = { }, ], }, - useCustomNoDataScreen: true, + requiresSearch: true, }; diff --git a/src/plugins/vis_type_vislib/public/goal.ts b/src/plugins/vis_type_vislib/public/goal.ts index 55a9f83daa4ab..6565ae53f3104 100644 --- a/src/plugins/vis_type_vislib/public/goal.ts +++ b/src/plugins/vis_type_vislib/public/goal.ts @@ -10,13 +10,14 @@ import { i18n } from '@kbn/i18n'; import { AggGroupNames } from '../../data/public'; import { ColorMode, ColorSchemas } from '../../charts/public'; -import { BaseVisTypeOptions } from '../../visualizations/public'; +import { VisTypeDefinition } from '../../visualizations/public'; import { getGaugeCollections, GaugeOptions } from './editor'; import { toExpressionAst } from './to_ast'; -import { GaugeType, BasicVislibParams } from './types'; +import { GaugeType } from './types'; +import { GaugeVisParams } from './gauge'; -export const goalVisTypeDefinition: BaseVisTypeOptions = { +export const goalVisTypeDefinition: VisTypeDefinition = { name: 'goal', title: i18n.translate('visTypeVislib.goal.goalTitle', { defaultMessage: 'Goal' }), icon: 'visGoal', @@ -98,5 +99,5 @@ export const goalVisTypeDefinition: BaseVisTypeOptions = { }, ], }, - useCustomNoDataScreen: true, + requiresSearch: true, }; diff --git a/src/plugins/vis_type_vislib/public/heatmap.ts b/src/plugins/vis_type_vislib/public/heatmap.ts index 8f891263e354a..1b1f4c6530fef 100644 --- a/src/plugins/vis_type_vislib/public/heatmap.ts +++ b/src/plugins/vis_type_vislib/public/heatmap.ts @@ -12,12 +12,12 @@ import { Position } from '@elastic/charts'; import { RangeValues } from '../../vis_default_editor/public'; import { AggGroupNames } from '../../data/public'; import { ColorSchemas, ColorSchemaParams } from '../../charts/public'; -import { VIS_EVENT_TO_TRIGGER, BaseVisTypeOptions } from '../../visualizations/public'; +import { VIS_EVENT_TO_TRIGGER, VisTypeDefinition } from '../../visualizations/public'; import { ValueAxis, ScaleType, AxisType } from '../../vis_type_xy/public'; import { HeatmapOptions, getHeatmapCollections } from './editor'; import { TimeMarker } from './vislib/visualizations/time_marker'; -import { CommonVislibParams, BasicVislibParams, VislibChartType } from './types'; +import { CommonVislibParams, VislibChartType } from './types'; import { toExpressionAst } from './to_ast'; export interface HeatmapVisParams extends CommonVislibParams, ColorSchemaParams { @@ -32,7 +32,7 @@ export interface HeatmapVisParams extends CommonVislibParams, ColorSchemaParams times: TimeMarker[]; } -export const heatmapVisTypeDefinition: BaseVisTypeOptions = { +export const heatmapVisTypeDefinition: VisTypeDefinition = { name: 'heatmap', title: i18n.translate('visTypeVislib.heatmap.heatmapTitle', { defaultMessage: 'Heat map' }), icon: 'heatmap', @@ -127,4 +127,5 @@ export const heatmapVisTypeDefinition: BaseVisTypeOptions = { }, ], }, + requiresSearch: true, }; diff --git a/src/plugins/vis_type_vislib/public/histogram.ts b/src/plugins/vis_type_vislib/public/histogram.ts index 8116b40e9522e..5162df2e6d985 100644 --- a/src/plugins/vis_type_vislib/public/histogram.ts +++ b/src/plugins/vis_type_vislib/public/histogram.ts @@ -7,13 +7,12 @@ */ import { xyVisTypes } from '../../vis_type_xy/public'; -import { BaseVisTypeOptions } from '../../visualizations/public'; +import { VisTypeDefinition } from '../../visualizations/public'; import { toExpressionAst } from './to_ast'; import { BasicVislibParams } from './types'; -export const histogramVisTypeDefinition: BaseVisTypeOptions = { - ...(xyVisTypes.histogram() as BaseVisTypeOptions), +export const histogramVisTypeDefinition = { + ...xyVisTypes.histogram(), toExpressionAst, - visualization: undefined, -}; +} as VisTypeDefinition; diff --git a/src/plugins/vis_type_vislib/public/horizontal_bar.ts b/src/plugins/vis_type_vislib/public/horizontal_bar.ts index b07261bc89b56..14c214a13e903 100644 --- a/src/plugins/vis_type_vislib/public/horizontal_bar.ts +++ b/src/plugins/vis_type_vislib/public/horizontal_bar.ts @@ -7,13 +7,12 @@ */ import { xyVisTypes } from '../../vis_type_xy/public'; -import { BaseVisTypeOptions } from '../../visualizations/public'; +import { VisTypeDefinition } from '../../visualizations/public'; import { toExpressionAst } from './to_ast'; import { BasicVislibParams } from './types'; -export const horizontalBarVisTypeDefinition: BaseVisTypeOptions = { - ...(xyVisTypes.horizontalBar() as BaseVisTypeOptions), +export const horizontalBarVisTypeDefinition = { + ...xyVisTypes.horizontalBar(), toExpressionAst, - visualization: undefined, -}; +} as VisTypeDefinition; diff --git a/src/plugins/vis_type_vislib/public/line.ts b/src/plugins/vis_type_vislib/public/line.ts index 80840427a016c..33f2cc2969345 100644 --- a/src/plugins/vis_type_vislib/public/line.ts +++ b/src/plugins/vis_type_vislib/public/line.ts @@ -7,13 +7,12 @@ */ import { xyVisTypes } from '../../vis_type_xy/public'; -import { BaseVisTypeOptions } from '../../visualizations/public'; +import { VisTypeDefinition } from '../../visualizations/public'; import { toExpressionAst } from './to_ast'; import { BasicVislibParams } from './types'; -export const lineVisTypeDefinition: BaseVisTypeOptions = { - ...(xyVisTypes.line() as BaseVisTypeOptions), +export const lineVisTypeDefinition = { + ...xyVisTypes.line(), toExpressionAst, - visualization: undefined, -}; +} as VisTypeDefinition; diff --git a/src/plugins/vis_type_vislib/public/pie.ts b/src/plugins/vis_type_vislib/public/pie.ts index 1311706aa2799..974be507ba113 100644 --- a/src/plugins/vis_type_vislib/public/pie.ts +++ b/src/plugins/vis_type_vislib/public/pie.ts @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; import { Position } from '@elastic/charts'; import { AggGroupNames } from '../../data/public'; -import { BaseVisTypeOptions, VIS_EVENT_TO_TRIGGER } from '../../visualizations/public'; +import { VisTypeDefinition, VIS_EVENT_TO_TRIGGER } from '../../visualizations/public'; import { getPositions } from '../../vis_type_xy/public'; import { CommonVislibParams } from './types'; @@ -28,7 +28,7 @@ export interface PieVisParams extends CommonVislibParams { }; } -export const pieVisTypeDefinition: BaseVisTypeOptions = { +export const pieVisTypeDefinition: VisTypeDefinition = { name: 'pie', title: i18n.translate('visTypeVislib.pie.pieTitle', { defaultMessage: 'Pie' }), icon: 'visPie', @@ -93,5 +93,5 @@ export const pieVisTypeDefinition: BaseVisTypeOptions = { ], }, hierarchicalData: true, - responseHandler: 'vislib_slices', + requiresSearch: true, }; diff --git a/src/plugins/vis_type_vislib/public/to_ast.ts b/src/plugins/vis_type_vislib/public/to_ast.ts index be51ee70e6368..bad3d731a0887 100644 --- a/src/plugins/vis_type_vislib/public/to_ast.ts +++ b/src/plugins/vis_type_vislib/public/to_ast.ts @@ -8,7 +8,12 @@ import moment from 'moment'; -import { VisToExpressionAst, getVisSchemas } from '../../visualizations/public'; +import { + Vis, + VisToExpressionAstParams, + getVisSchemas, + VisParams, +} from '../../visualizations/public'; import { buildExpression, buildExpressionFunction } from '../../expressions/public'; import type { Dimensions, DateHistogramParams, HistogramParams } from '../../vis_type_xy/public'; import { BUCKET_TYPES } from '../../data/public'; @@ -17,7 +22,10 @@ import { vislibVisName, VisTypeVislibExpressionFunctionDefinition } from './vis_ import { BasicVislibParams, VislibChartType } from './types'; import { getEsaggsFn } from './to_ast_esaggs'; -export const toExpressionAst: VisToExpressionAst = async (vis, params) => { +export const toExpressionAst = async ( + vis: Vis, + params: VisToExpressionAstParams +) => { const schemas = getVisSchemas(vis, params); const dimensions: Dimensions = { x: schemas.segment ? schemas.segment[0] : null, @@ -58,9 +66,11 @@ export const toExpressionAst: VisToExpressionAst = async (vis (dimensions.y || []).forEach((yDimension) => { const yAgg = responseAggs.filter(({ enabled }) => enabled)[yDimension.accessor]; - const seriesParam = (visConfig.seriesParams || []).find((param) => param.data.id === yAgg.id); + const seriesParam = ((visConfig.seriesParams as BasicVislibParams['seriesParams']) || []).find( + (param) => param.data.id === yAgg.id + ); if (seriesParam) { - const usedValueAxis = (visConfig.valueAxes || []).find( + const usedValueAxis = ((visConfig.valueAxes as BasicVislibParams['valueAxes']) || []).find( (valueAxis) => valueAxis.id === seriesParam.valueAxis ); if (usedValueAxis?.scale.mode === 'percentage') { @@ -72,13 +82,11 @@ export const toExpressionAst: VisToExpressionAst = async (vis } }); - visConfig.dimensions = dimensions; - const visTypeVislib = buildExpressionFunction( vislibVisName, { type: vis.type.name as Exclude, - visConfig: JSON.stringify(visConfig), + visConfig: JSON.stringify({ ...visConfig, dimensions }), } ); diff --git a/src/plugins/vis_type_vislib/public/to_ast_esaggs.ts b/src/plugins/vis_type_vislib/public/to_ast_esaggs.ts index 2e73eea393d65..9de486fc1ba04 100644 --- a/src/plugins/vis_type_vislib/public/to_ast_esaggs.ts +++ b/src/plugins/vis_type_vislib/public/to_ast_esaggs.ts @@ -13,16 +13,13 @@ import { IndexPatternLoadExpressionFunctionDefinition, } from '../../data/public'; -import { PieVisParams } from './pie'; -import { BasicVislibParams } from './types'; - /** * Get esaggs expressions function * TODO: replace this with vis.data.aggs!.toExpressionAst(); * https://github.com/elastic/kibana/issues/61768 * @param vis */ -export function getEsaggsFn(vis: Vis | Vis) { +export function getEsaggsFn(vis: Vis) { return buildExpressionFunction('esaggs', { index: buildExpression([ buildExpressionFunction('indexPatternLoad', { diff --git a/src/plugins/vis_type_vislib/public/vis_type_vislib_vis_types.ts b/src/plugins/vis_type_vislib/public/vis_type_vislib_vis_types.ts index c80ddbd8976b3..52212741fe9df 100644 --- a/src/plugins/vis_type_vislib/public/vis_type_vislib_vis_types.ts +++ b/src/plugins/vis_type_vislib/public/vis_type_vislib_vis_types.ts @@ -6,6 +6,7 @@ * Public License, v 1. */ +import { VisTypeDefinition } from 'src/plugins/visualizations/public'; import { histogramVisTypeDefinition } from './histogram'; import { lineVisTypeDefinition } from './line'; import { areaVisTypeDefinition } from './area'; @@ -16,7 +17,7 @@ import { goalVisTypeDefinition } from './goal'; export { pieVisTypeDefinition } from './pie'; -export const visLibVisTypeDefinitions = [ +export const visLibVisTypeDefinitions: Array> = [ histogramVisTypeDefinition, lineVisTypeDefinition, areaVisTypeDefinition, @@ -26,7 +27,7 @@ export const visLibVisTypeDefinitions = [ goalVisTypeDefinition, ]; -export const convertedTypeDefinitions = [ +export const convertedTypeDefinitions: Array> = [ heatmapVisTypeDefinition, gaugeVisTypeDefinition, goalVisTypeDefinition, diff --git a/src/plugins/vis_type_xy/public/editor/collections.ts b/src/plugins/vis_type_xy/public/editor/collections.ts index e976ceebb1353..bfce92abdb7ef 100644 --- a/src/plugins/vis_type_xy/public/editor/collections.ts +++ b/src/plugins/vis_type_xy/public/editor/collections.ts @@ -143,39 +143,38 @@ export const getRotateOptions = () => [ }, ]; -export const getFittingFunctions = () => - [ - { - value: Fit.None, - text: i18n.translate('visTypeXy.fittingFunctionsTitle.none', { - defaultMessage: 'Hide (Do not fill gaps)', - }), - }, - { - value: Fit.Zero, - text: i18n.translate('visTypeXy.fittingFunctionsTitle.zero', { - defaultMessage: 'Zero (Fill gaps with zeros)', - }), - }, - { - value: Fit.Linear, - text: i18n.translate('visTypeXy.fittingFunctionsTitle.linear', { - defaultMessage: 'Linear (Fill gaps with a line)', - }), - }, - { - value: Fit.Carry, - text: i18n.translate('visTypeXy.fittingFunctionsTitle.carry', { - defaultMessage: 'Last (Fill gaps with the last value)', - }), - }, - { - value: Fit.Lookahead, - text: i18n.translate('visTypeXy.fittingFunctionsTitle.lookahead', { - defaultMessage: 'Next (Fill gaps with the next value)', - }), - }, - ] as const; +export const getFittingFunctions = () => [ + { + value: Fit.None, + text: i18n.translate('visTypeXy.fittingFunctionsTitle.none', { + defaultMessage: 'Hide (Do not fill gaps)', + }), + }, + { + value: Fit.Zero, + text: i18n.translate('visTypeXy.fittingFunctionsTitle.zero', { + defaultMessage: 'Zero (Fill gaps with zeros)', + }), + }, + { + value: Fit.Linear, + text: i18n.translate('visTypeXy.fittingFunctionsTitle.linear', { + defaultMessage: 'Linear (Fill gaps with a line)', + }), + }, + { + value: Fit.Carry, + text: i18n.translate('visTypeXy.fittingFunctionsTitle.carry', { + defaultMessage: 'Last (Fill gaps with the last value)', + }), + }, + { + value: Fit.Lookahead, + text: i18n.translate('visTypeXy.fittingFunctionsTitle.lookahead', { + defaultMessage: 'Next (Fill gaps with the next value)', + }), + }, +]; export const getConfigCollections = () => ({ legendPositions: getPositions(), diff --git a/src/plugins/vis_type_xy/public/editor/common_config.tsx b/src/plugins/vis_type_xy/public/editor/common_config.tsx index 4cfb18b4a0b11..1d635463cd963 100644 --- a/src/plugins/vis_type_xy/public/editor/common_config.tsx +++ b/src/plugins/vis_type_xy/public/editor/common_config.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import { VisOptionsProps } from '../../../vis_default_editor/public'; +import { VisEditorOptionsProps } from '../../../visualizations/public'; import { VisParams } from '../types'; import { MetricsAxisOptions, PointSeriesOptions } from './components/options'; @@ -22,7 +22,7 @@ export function getOptionTabs(showElasticChartsOptions = false) { title: i18n.translate('visTypeXy.area.tabs.metricsAxesTitle', { defaultMessage: 'Metrics & axes', }), - editor: (props: VisOptionsProps) => ( + editor: (props: VisEditorOptionsProps) => ( ), }, @@ -31,7 +31,7 @@ export function getOptionTabs(showElasticChartsOptions = false) { title: i18n.translate('visTypeXy.area.tabs.panelSettingsTitle', { defaultMessage: 'Panel settings', }), - editor: (props: VisOptionsProps) => ( + editor: (props: VisEditorOptionsProps) => ( extends VisOptionsProps { +export interface ValidationVisOptionsProps extends VisEditorOptionsProps { setMultipleValidity(paramName: string, isValid: boolean): void; extraProps?: E; } -interface ValidationWrapperProps extends VisOptionsProps { +interface ValidationWrapperProps extends VisEditorOptionsProps { component: React.ComponentType>; extraProps?: E; } diff --git a/src/plugins/vis_type_xy/public/editor/components/options/metrics_axes/category_axis_panel.tsx b/src/plugins/vis_type_xy/public/editor/components/options/metrics_axes/category_axis_panel.tsx index edb6cfac3c2dd..f863d668985d8 100644 --- a/src/plugins/vis_type_xy/public/editor/components/options/metrics_axes/category_axis_panel.tsx +++ b/src/plugins/vis_type_xy/public/editor/components/options/metrics_axes/category_axis_panel.tsx @@ -13,11 +13,8 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { EuiPanel, EuiTitle, EuiSpacer } from '@elastic/eui'; import { Position } from '@elastic/charts'; -import { - SelectOption, - SwitchOption, - VisOptionsProps, -} from '../../../../../../vis_default_editor/public'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; +import { SelectOption, SwitchOption } from '../../../../../../vis_default_editor/public'; import { LabelOptions, SetAxisLabel } from './label_options'; import { CategoryAxis } from '../../../../types'; @@ -26,7 +23,7 @@ export interface CategoryAxisPanelProps { axis: CategoryAxis; onPositionChanged: (position: Position) => void; setCategoryAxis: (value: CategoryAxis) => void; - vis: VisOptionsProps['vis']; + vis: VisEditorOptionsProps['vis']; } function CategoryAxisPanel({ diff --git a/src/plugins/vis_type_xy/public/sample_vis.test.mocks.ts b/src/plugins/vis_type_xy/public/sample_vis.test.mocks.ts index 324ea96c082ba..880161293ca25 100644 --- a/src/plugins/vis_type_xy/public/sample_vis.test.mocks.ts +++ b/src/plugins/vis_type_xy/public/sample_vis.test.mocks.ts @@ -106,10 +106,7 @@ export const samplePieVis = { }, }, hidden: false, - requestHandler: 'courier', - responseHandler: 'vislib_slices', hierarchicalData: true, - useCustomNoDataScreen: false, }, title: '[Flights] Airline Carrier', description: '', @@ -126,7 +123,6 @@ export const samplePieVis = { truncate: 100, }, }, - sessionState: {}, data: { searchSource: { id: 'data_source1', @@ -1622,10 +1618,7 @@ export const sampleAreaVis = { }, }, hidden: false, - requestHandler: 'courier', - responseHandler: 'none', hierarchicalData: false, - useCustomNoDataScreen: false, }, title: '[eCommerce] Sales by Category', description: '', @@ -1762,7 +1755,6 @@ export const sampleAreaVis = { ], }, }, - sessionState: {}, data: { searchSource: { id: 'data_source1', diff --git a/src/plugins/vis_type_xy/public/types/vis_type.ts b/src/plugins/vis_type_xy/public/types/vis_type.ts index 3decb8854d355..19b8b88ec5f66 100644 --- a/src/plugins/vis_type_xy/public/types/vis_type.ts +++ b/src/plugins/vis_type_xy/public/types/vis_type.ts @@ -6,16 +6,11 @@ * Public License, v 1. */ -import { BaseVisTypeOptions } from '../../../visualizations/public'; +import { VisTypeDefinition } from '../../../visualizations/public'; import { ChartType } from '../../common'; import { VisParams } from './param'; export type VisTypeNames = ChartType | 'horizontal_bar'; -export type XyVisTypeDefinition = BaseVisTypeOptions & { - name: VisTypeNames; - visConfig: { - defaults: Omit; - }; -}; +export type XyVisTypeDefinition = VisTypeDefinition; diff --git a/src/plugins/vis_type_xy/public/vis_types/area.ts b/src/plugins/vis_type_xy/public/vis_types/area.ts index 09007a01ca8bc..24045a5c308b4 100644 --- a/src/plugins/vis_type_xy/public/vis_types/area.ts +++ b/src/plugins/vis_type_xy/public/vis_types/area.ts @@ -181,4 +181,5 @@ export const getAreaVisTypeDefinition = ( }, ], }, + requiresSearch: true, }); diff --git a/src/plugins/vis_type_xy/public/vis_types/histogram.ts b/src/plugins/vis_type_xy/public/vis_types/histogram.ts index daae5f5e48e61..c5a2825e7420b 100644 --- a/src/plugins/vis_type_xy/public/vis_types/histogram.ts +++ b/src/plugins/vis_type_xy/public/vis_types/histogram.ts @@ -184,4 +184,5 @@ export const getHistogramVisTypeDefinition = ( }, ], }, + requiresSearch: true, }); diff --git a/src/plugins/vis_type_xy/public/vis_types/horizontal_bar.ts b/src/plugins/vis_type_xy/public/vis_types/horizontal_bar.ts index 9e026fa0d7474..b6821b268f5c5 100644 --- a/src/plugins/vis_type_xy/public/vis_types/horizontal_bar.ts +++ b/src/plugins/vis_type_xy/public/vis_types/horizontal_bar.ts @@ -183,4 +183,5 @@ export const getHorizontalBarVisTypeDefinition = ( }, ], }, + requiresSearch: true, }); diff --git a/src/plugins/vis_type_xy/public/vis_types/line.ts b/src/plugins/vis_type_xy/public/vis_types/line.ts index 3f3087207fa19..093b7efb6af36 100644 --- a/src/plugins/vis_type_xy/public/vis_types/line.ts +++ b/src/plugins/vis_type_xy/public/vis_types/line.ts @@ -175,4 +175,5 @@ export const getLineVisTypeDefinition = ( }, ], }, + requiresSearch: true, }); diff --git a/src/plugins/visualizations/public/components/__snapshots__/visualization_requesterror.test.js.snap b/src/plugins/visualizations/public/components/__snapshots__/visualization_requesterror.test.js.snap deleted file mode 100644 index d1dde7340cfa1..0000000000000 --- a/src/plugins/visualizations/public/components/__snapshots__/visualization_requesterror.test.js.snap +++ /dev/null @@ -1,24 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`VisualizationRequestError should render according to snapshot 1`] = ` -
-
-
- -
- Request error -
-
-
-`; diff --git a/src/plugins/visualizations/public/components/_visualization.scss b/src/plugins/visualizations/public/components/_visualization.scss index e8d4c5c6db445..42b59b8de93cd 100644 --- a/src/plugins/visualizations/public/components/_visualization.scss +++ b/src/plugins/visualizations/public/components/_visualization.scss @@ -15,48 +15,6 @@ position: relative; padding: $euiSizeS; flex: 1 1 100%; - - /** - * 1. Expand to fill the container but accept being squeezed smaller by the spy, even so small - * that it disappears entirely. - */ - .visChart__container { - @include euiScrollBar; - min-height: 0; - flex: 1 1 0; /* 1 */ - display: flex; - flex-direction: row; - overflow: auto; - transition: opacity .01s; - - // IE11 Hack - // - // Normally we would just set flex: 1 1 0%, which works as expected in IE11. - // Unfortunately, a recent bug in Firefox causes this rule to be ignored, so we - // have to use an IE-specific hack instead. - @include internetExplorerOnly() { - flex: 1 0; - } - - &:focus { - box-shadow: none; - } - } - - // SASSTODO: Can't find exact usage - .loading { - opacity: .5; - } - - // SASSTODO: Can't find exact usage - .spinner { - position: absolute; - top: 40%; - left: 0; - right: 0; - z-index: 20; - opacity: .5; - } } .visChart { diff --git a/src/plugins/visualizations/public/components/index.ts b/src/plugins/visualizations/public/components/index.ts index 88f3acf20d39b..1d6b6b5d911ea 100644 --- a/src/plugins/visualizations/public/components/index.ts +++ b/src/plugins/visualizations/public/components/index.ts @@ -6,6 +6,4 @@ * Public License, v 1. */ -export { Visualization } from './visualization'; export { VisualizationContainer } from './visualization_container'; -export { VisualizationNoResults } from './visualization_noresults'; diff --git a/src/plugins/visualizations/public/components/visualization.test.js b/src/plugins/visualizations/public/components/visualization.test.js deleted file mode 100644 index cb332232cbc55..0000000000000 --- a/src/plugins/visualizations/public/components/visualization.test.js +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * and the Server Side Public License, v 1; you may not use this file except in - * compliance with, at your election, the Elastic License or the Server Side - * Public License, v 1. - */ - -jest.useFakeTimers(); - -import React from 'react'; -import { render, mount } from 'enzyme'; -import { Visualization } from './visualization'; - -let renderPromise; -class VisualizationStub { - constructor(el, vis) { - this.el = el; - this.vis = vis; - } - - render() { - renderPromise = new Promise((resolve) => { - this.el.innerText = this.vis.params.markdown; - resolve(); - }); - - return renderPromise; - } -} - -describe('', () => { - const visData = { - hits: 1, - }; - - const uiState = { - on: () => {}, - off: () => {}, - set: () => {}, - }; - - let vis; - - beforeEach(() => { - vis = { - setUiState: function (uiState) { - this.uiState = uiState; - }, - getUiState: function () { - return this.uiState; - }, - params: {}, - type: { - title: 'new vis', - requiresSearch: true, - useCustomNoDataScreen: false, - visualization: VisualizationStub, - }, - }; - }); - - it('should display no result message when length of data is 0', () => { - const data = { rows: [] }; - const wrapper = render( - - ); - expect(wrapper.text()).toBe('No results found'); - }); - - it('should render chart when data is present', () => { - const wrapper = render( - - ); - expect(wrapper.text()).not.toBe('No results found'); - }); - - it('should call onInit when rendering no data', () => { - const spy = jest.fn(); - const noData = { hits: 0 }; - mount( - - ); - expect(spy).toHaveBeenCalled(); - }); -}); diff --git a/src/plugins/visualizations/public/components/visualization.tsx b/src/plugins/visualizations/public/components/visualization.tsx deleted file mode 100644 index bdabe6bc07297..0000000000000 --- a/src/plugins/visualizations/public/components/visualization.tsx +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * and the Server Side Public License, v 1; you may not use this file except in - * compliance with, at your election, the Elastic License or the Server Side - * Public License, v 1. - */ - -import { get } from 'lodash'; -import React from 'react'; -import { PersistedState } from '../../../../plugins/visualizations/public'; -import { memoizeLast } from '../legacy/memoize'; -import { VisualizationChart } from './visualization_chart'; -import { VisualizationNoResults } from './visualization_noresults'; -import { ExprVis } from '../expressions/vis'; - -function shouldShowNoResultsMessage(vis: ExprVis, visData: any): boolean { - const requiresSearch = get(vis, 'type.requiresSearch'); - const rows: object[] | undefined = get(visData, 'rows'); - const isZeroHits = get(visData, 'hits') === 0 || (rows && !rows.length); - const shouldShowMessage = !get(vis, 'type.useCustomNoDataScreen'); - - return Boolean(requiresSearch && isZeroHits && shouldShowMessage); -} - -interface VisualizationProps { - listenOnChange: boolean; - onInit?: () => void; - uiState: PersistedState; - vis: ExprVis; - visData: any; - visParams: any; -} - -export class Visualization extends React.Component { - private showNoResultsMessage = memoizeLast(shouldShowNoResultsMessage); - - constructor(props: VisualizationProps) { - super(props); - - props.vis.setUiState(props.uiState); - } - - public render() { - const { vis, visData, visParams, onInit, uiState, listenOnChange } = this.props; - - const noResults = this.showNoResultsMessage(vis, visData); - - return ( -
- {noResults ? ( - - ) : ( - - )} -
- ); - } - - public shouldComponentUpdate(nextProps: VisualizationProps): boolean { - if (nextProps.uiState !== this.props.uiState) { - throw new Error('Changing uiState on is not supported!'); - } - return true; - } -} diff --git a/src/plugins/visualizations/public/components/visualization_chart.test.js b/src/plugins/visualizations/public/components/visualization_chart.test.js deleted file mode 100644 index 98cc5bb8d0729..0000000000000 --- a/src/plugins/visualizations/public/components/visualization_chart.test.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * and the Server Side Public License, v 1; you may not use this file except in - * compliance with, at your election, the Elastic License or the Server Side - * Public License, v 1. - */ - -jest.useFakeTimers(); - -import React from 'react'; -import { render, mount } from 'enzyme'; -import { VisualizationChart } from './visualization_chart'; - -let renderPromise; - -class VisualizationStub { - constructor(el, vis) { - this.el = el; - this.vis = vis; - } - - render() { - renderPromise = new Promise((resolve) => { - this.el.textContent = this.vis.params.markdown; - resolve(); - }); - - return renderPromise; - } -} - -describe('', () => { - const vis = { - type: { - title: 'Test Visualization', - visualization: VisualizationStub, - }, - params: { - markdown: - 'This is a test of the [markdown](http://daringfireball.net/projects/markdown) vis.', - }, - }; - - it('should render initial html', () => { - const wrapper = render(); - expect(wrapper.text()).toBe(''); - }); - - it('should render visualization', async () => { - const wrapper = mount(); - jest.runAllTimers(); - await renderPromise; - expect(wrapper.find('.visChart').text()).toMatch(/markdown/); - }); -}); diff --git a/src/plugins/visualizations/public/components/visualization_chart.tsx b/src/plugins/visualizations/public/components/visualization_chart.tsx deleted file mode 100644 index c6ad1c53f91b7..0000000000000 --- a/src/plugins/visualizations/public/components/visualization_chart.tsx +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * and the Server Side Public License, v 1; you may not use this file except in - * compliance with, at your election, the Elastic License or the Server Side - * Public License, v 1. - */ - -import React from 'react'; -import * as Rx from 'rxjs'; -import { debounceTime, filter, share, switchMap } from 'rxjs/operators'; -import { PersistedState } from '../../../../plugins/visualizations/public'; -import { VisualizationController } from '../types'; -import { ResizeChecker } from '../../../../plugins/kibana_utils/public'; -import { ExprVis } from '../expressions/vis'; - -interface VisualizationChartProps { - onInit?: () => void; - uiState: PersistedState; - vis: ExprVis; - visData: any; - visParams: any; - listenOnChange: boolean; -} - -class VisualizationChart extends React.Component { - private resizeChecker?: ResizeChecker; - private visualization?: VisualizationController; - private chartDiv = React.createRef(); - private containerDiv = React.createRef(); - private renderSubject: Rx.Subject<{ - vis: ExprVis; - visParams: any; - visData: any; - }>; - private renderSubscription: Rx.Subscription; - - constructor(props: VisualizationChartProps) { - super(props); - - this.renderSubject = new Rx.Subject(); - const render$ = this.renderSubject.asObservable().pipe(share()); - - const success$ = render$.pipe( - filter(({ vis, visData }) => vis && (!vis.type.requiresSearch || visData)), - debounceTime(100), - switchMap(async ({ vis, visData, visParams }) => { - if (!this.visualization) { - // This should never happen, since we only should trigger another rendering - // after this component has mounted and thus the visualization implementation - // has been initialized - throw new Error('Visualization implementation was not initialized on first render.'); - } - - return this.visualization.render(visData, visParams); - }) - ); - - this.renderSubscription = success$.subscribe(() => { - if (this.props.onInit) { - this.props.onInit(); - } - }); - } - - public render() { - return ( -
-
-
- ); - } - - public componentDidMount() { - if (!this.chartDiv.current || !this.containerDiv.current) { - throw new Error('chartDiv and currentDiv reference should always be present.'); - } - - const { vis } = this.props; - const Visualization = vis.type.visualization; - - if (!Visualization) { - throw new Error( - 'Tried to use VisualizationChart component with a vis without visualization property.' - ); - } - - this.visualization = new Visualization(this.chartDiv.current, vis); - - // We know that containerDiv.current will never be null, since we will always - // have rendered and the div is always rendered into the tree (i.e. not - // inside any condition). - this.resizeChecker = new ResizeChecker(this.containerDiv.current); - this.resizeChecker.on('resize', () => this.startRenderVisualization()); - - if (this.props.listenOnChange) { - this.props.uiState.on('change', this.onUiStateChanged); - } - - this.startRenderVisualization(); - } - - public componentDidUpdate() { - this.startRenderVisualization(); - } - - public componentWillUnmount() { - if (this.renderSubscription) { - this.renderSubscription.unsubscribe(); - } - if (this.resizeChecker) { - this.resizeChecker.destroy(); - } - if (this.visualization) { - this.visualization.destroy(); - } - } - - private onUiStateChanged = () => { - this.startRenderVisualization(); - }; - - private startRenderVisualization(): void { - if (this.containerDiv.current && this.chartDiv.current) { - this.renderSubject.next({ - vis: this.props.vis, - visData: this.props.visData, - visParams: this.props.visParams, - }); - } - } -} - -export { VisualizationChart }; diff --git a/src/plugins/visualizations/public/components/visualization_requesterror.test.js b/src/plugins/visualizations/public/components/visualization_requesterror.test.js deleted file mode 100644 index 8a183efe3faa6..0000000000000 --- a/src/plugins/visualizations/public/components/visualization_requesterror.test.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * and the Server Side Public License, v 1; you may not use this file except in - * compliance with, at your election, the Elastic License or the Server Side - * Public License, v 1. - */ - -import React from 'react'; -import { render } from 'enzyme'; -import { VisualizationRequestError } from './visualization_requesterror'; - -describe('VisualizationRequestError', () => { - it('should render according to snapshot', () => { - const wrapper = render(); - expect(wrapper).toMatchSnapshot(); - }); - - it('should set html when error is an object', () => { - const wrapper = render(); - expect(wrapper.text()).toBe('Request error'); - }); - - it('should set html when error is a string', () => { - const wrapper = render(); - expect(wrapper.text()).toBe('Request error'); - }); -}); diff --git a/src/plugins/visualizations/public/components/visualization_requesterror.tsx b/src/plugins/visualizations/public/components/visualization_requesterror.tsx deleted file mode 100644 index 3378875327959..0000000000000 --- a/src/plugins/visualizations/public/components/visualization_requesterror.tsx +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * and the Server Side Public License, v 1; you may not use this file except in - * compliance with, at your election, the Elastic License or the Server Side - * Public License, v 1. - */ - -import { EuiIcon, EuiSpacer, EuiText } from '@elastic/eui'; -import React from 'react'; -import { SearchError } from '../../../../plugins/data/public'; - -interface VisualizationRequestErrorProps { - onInit?: () => void; - error: SearchError | string; -} - -export class VisualizationRequestError extends React.Component { - private containerDiv = React.createRef(); - - public render() { - const { error } = this.props; - const errorMessage = typeof error === 'string' ? error : error.message; - - return ( -
- - - - - - {errorMessage} - -
- ); - } - - public componentDidMount() { - this.afterRender(); - } - - public componentDidUpdate() { - this.afterRender(); - } - - private afterRender() { - if (this.props.onInit) { - this.props.onInit(); - } - } -} diff --git a/src/plugins/visualizations/public/embeddable/_embeddables.scss b/src/plugins/visualizations/public/embeddable/_embeddables.scss index f0ec8479489d2..2a4d5c14a46a5 100644 --- a/src/plugins/visualizations/public/embeddable/_embeddables.scss +++ b/src/plugins/visualizations/public/embeddable/_embeddables.scss @@ -8,10 +8,6 @@ @include euiScrollBar; /* 2 */ } - .visualization .visChart__container { - overflow: visible; /* 1 */ - } - .visLegend__toggle { border-bottom-right-radius: 0; border-top-left-radius: 0; diff --git a/src/plugins/visualizations/public/embeddable/get_index_pattern.ts b/src/plugins/visualizations/public/embeddable/get_index_pattern.ts deleted file mode 100644 index 65c6ebe75daf5..0000000000000 --- a/src/plugins/visualizations/public/embeddable/get_index_pattern.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * and the Server Side Public License, v 1; you may not use this file except in - * compliance with, at your election, the Elastic License or the Server Side - * Public License, v 1. - */ - -import { VisSavedObject } from '../types'; -import type { IndexPattern } from '../../../../plugins/data/public'; -import { getIndexPatterns } from '../services'; - -export async function getIndexPattern( - savedVis: VisSavedObject -): Promise { - if (savedVis.visState.type !== 'metrics') { - return savedVis.searchSource!.getField('index'); - } - - const indexPatternsClient = getIndexPatterns(); - - return savedVis.visState.params.index_pattern - ? (await indexPatternsClient.find(`"${savedVis.visState.params.index_pattern}"`))[0] - : await indexPatternsClient.getDefault(); -} diff --git a/src/plugins/visualizations/public/embeddable/to_ast.ts b/src/plugins/visualizations/public/embeddable/to_ast.ts new file mode 100644 index 0000000000000..31a9db5b92d11 --- /dev/null +++ b/src/plugins/visualizations/public/embeddable/to_ast.ts @@ -0,0 +1,45 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * and the Server Side Public License, v 1; you may not use this file except in + * compliance with, at your election, the Elastic License or the Server Side + * Public License, v 1. + */ + +import { ExpressionFunctionKibana, ExpressionFunctionKibanaContext } from '../../../data/public'; +import { buildExpression, buildExpressionFunction } from '../../../expressions/public'; + +import { VisToExpressionAst } from '../types'; + +/** + * Creates an ast expression for a visualization based on kibana context (query, filters, timerange) + * including a saved search if the visualization is based on it. + * The expression also includes particular visualization expression ast if presented. + * + * @internal + */ +export const toExpressionAst: VisToExpressionAst = async (vis, params) => { + const { savedSearchId, searchSource } = vis.data; + const query = searchSource?.getField('query'); + const filters = searchSource?.getField('filter'); + + const kibana = buildExpressionFunction('kibana', {}); + const kibanaContext = buildExpressionFunction('kibana_context', { + q: query && JSON.stringify(query), + filters: filters && JSON.stringify(filters), + savedSearchId, + }); + + const ast = buildExpression([kibana, kibanaContext]); + const expression = ast.toAst(); + + if (!vis.type.toExpressionAst) { + throw new Error('Visualization type definition should have toExpressionAst function defined'); + } + + const visExpressionAst = await vis.type.toExpressionAst(vis, params); + // expand the expression chain with a particular visualization expression chain, if it exists + expression.chain.push(...visExpressionAst.chain); + + return expression; +}; diff --git a/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts b/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts index 88fc6e6a98c0d..45bd6a8a9d554 100644 --- a/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts +++ b/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts @@ -32,8 +32,8 @@ import { IExpressionLoaderParams, ExpressionsStart, ExpressionRenderError, + ExpressionAstExpression, } from '../../../../plugins/expressions/public'; -import { buildPipeline } from '../legacy/build_pipeline'; import { Vis, SerializedVis } from '../vis'; import { getExpressions, getUiActions } from '../services'; import { VIS_EVENT_TO_TRIGGER } from './events'; @@ -41,6 +41,7 @@ import { VisualizeEmbeddableFactoryDeps } from './visualize_embeddable_factory'; import { SavedObjectAttributes } from '../../../../core/types'; import { SavedVisualizationsLoader } from '../saved_visualizations'; import { VisSavedObject } from '../types'; +import { toExpressionAst } from './to_ast'; const getKeys = (o: T): Array => Object.keys(o) as Array; @@ -94,7 +95,7 @@ export class VisualizeEmbeddable private syncColors?: boolean; private visCustomizations?: Pick; private subscriptions: Subscription[] = []; - private expression: string = ''; + private expression?: ExpressionAstExpression; private vis: Vis; private domNode: any; public readonly type = VISUALIZE_EMBEDDABLE_TYPE; @@ -382,7 +383,7 @@ export class VisualizeEmbeddable } this.abortController = new AbortController(); const abortController = this.abortController; - this.expression = await buildPipeline(this.vis, { + this.expression = await toExpressionAst(this.vis, { timefilter: this.timefilter, timeRange: this.timeRange, abortSignal: this.abortController!.signal, diff --git a/src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx b/src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx index 399e0e4b71532..6a57bf7b4477a 100644 --- a/src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx +++ b/src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx @@ -74,12 +74,12 @@ export class VisualizeEmbeddableFactory type: 'visualization', getIconForSavedObject: (savedObject) => { return ( - getTypes().get(JSON.parse(savedObject.attributes.visState).type).icon || 'visualizeApp' + getTypes().get(JSON.parse(savedObject.attributes.visState).type)?.icon || 'visualizeApp' ); }, getTooltipForSavedObject: (savedObject) => { return `${savedObject.attributes.title} (${ - getTypes().get(JSON.parse(savedObject.attributes.visState).type).title + getTypes().get(JSON.parse(savedObject.attributes.visState).type)?.title })`; }, showSavedObject: (savedObject) => { diff --git a/src/plugins/visualizations/public/expressions/vis.ts b/src/plugins/visualizations/public/expressions/vis.ts deleted file mode 100644 index a3952d284805d..0000000000000 --- a/src/plugins/visualizations/public/expressions/vis.ts +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * and the Server Side Public License, v 1; you may not use this file except in - * compliance with, at your election, the Elastic License or the Server Side - * Public License, v 1. - */ - -/** - * @name Vis - * - * @description This class consists of aggs, params, listeners, title, and type. - * - Aggs: Instances of AggConfig. - * - Params: The settings in the Options tab. - * - * Not to be confused with vislib/vis.js. - */ - -import { EventEmitter } from 'events'; -import _ from 'lodash'; -import { VisParams, PersistedState } from '../../../../plugins/visualizations/public'; - -import { getTypes } from '../services'; -import { VisType } from '../vis_types'; - -export interface ExprVisState { - title?: string; - type: VisType | string; - params?: VisParams; -} - -export interface ExprVisAPIEvents { - filter: (data: any) => void; - brush: (data: any) => void; - applyFilter: (data: any) => void; -} - -export interface ExprVisAPI { - events: ExprVisAPIEvents; -} - -export class ExprVis extends EventEmitter { - public title: string = ''; - public type: VisType; - public params: VisParams = {}; - public sessionState: Record = {}; - public API: ExprVisAPI; - public eventsSubject: any; - private uiState: PersistedState; - - constructor(visState: ExprVisState = { type: 'histogram' }) { - super(); - - this.type = this.getType(visState.type); - this.uiState = new PersistedState(); - this.setState(visState); - - this.API = { - events: { - filter: (data: any) => { - if (!this.eventsSubject) return; - this.eventsSubject.next({ - name: 'filterBucket', - data: data.data - ? { - data: data.data, - negate: data.negate, - } - : { data: [data] }, - }); - }, - brush: (data: any) => { - if (!this.eventsSubject) return; - this.eventsSubject.next({ name: 'brush', data }); - }, - applyFilter: (data: any) => { - if (!this.eventsSubject) return; - this.eventsSubject.next({ name: 'applyFilter', data }); - }, - }, - }; - } - - private getType(type: string | VisType) { - if (_.isString(type)) { - const newType = getTypes().get(type); - if (!newType) { - throw new Error(`Invalid type "${type}"`); - } - return newType; - } else { - return type; - } - } - - setState(state: ExprVisState) { - this.title = state.title || ''; - if (state.type) { - this.type = this.getType(state.type); - } - this.params = _.defaultsDeep( - {}, - _.cloneDeep(state.params || {}), - _.cloneDeep(this.type.visConfig.defaults || {}) - ); - } - - getState() { - return { - title: this.title, - type: this.type.name, - params: _.cloneDeep(this.params), - }; - } - - updateState() { - this.emit('update'); - } - - forceReload() { - this.emit('reload'); - } - - isHierarchical() { - if (_.isFunction(this.type.hierarchicalData)) { - return !!this.type.hierarchicalData(this); - } else { - return !!this.type.hierarchicalData; - } - } - - hasUiState() { - return !!this.uiState; - } - - getUiState() { - return this.uiState; - } - - setUiState(state: PersistedState) { - this.uiState = state; - } - - /** - * Currently this is only used to extract map-specific information - * (e.g. mapZoom, mapCenter). - */ - uiStateVal(key: string, val: any) { - if (this.hasUiState()) { - if (_.isUndefined(val)) { - return this.uiState.get(key); - } - return this.uiState.set(key, val); - } - return val; - } -} diff --git a/src/plugins/visualizations/public/expressions/visualization_function.ts b/src/plugins/visualizations/public/expressions/visualization_function.ts deleted file mode 100644 index 623fb303baccc..0000000000000 --- a/src/plugins/visualizations/public/expressions/visualization_function.ts +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * and the Server Side Public License, v 1; you may not use this file except in - * compliance with, at your election, the Elastic License or the Server Side - * Public License, v 1. - */ - -import { get } from 'lodash'; -import { i18n } from '@kbn/i18n'; -import { VisResponseValue, PersistedState } from '../../../../plugins/visualizations/public'; -import { ExpressionFunctionDefinition, Render } from '../../../../plugins/expressions/public'; -import { getTypes, getIndexPatterns, getFilterManager, getSearch } from '../services'; - -interface Arguments { - index?: string | null; - metricsAtAllLevels?: boolean; - partialRows?: boolean; - type?: string; - schemas?: string; - visConfig?: string; - uiState?: string; - aggConfigs?: string; -} - -export type ExpressionFunctionVisualization = ExpressionFunctionDefinition< - 'visualization', - any, - Arguments, - Promise> ->; - -export const visualization = (): ExpressionFunctionVisualization => ({ - name: 'visualization', - type: 'render', - help: i18n.translate('visualizations.functions.visualization.help', { - defaultMessage: 'A simple visualization', - }), - args: { - // TODO: Below `help` keys should be internationalized once this function - // TODO: is moved to visualizations plugin. - index: { - types: ['string', 'null'], - default: null, - help: 'Index', - }, - metricsAtAllLevels: { - types: ['boolean'], - default: false, - help: 'Metrics levels', - }, - partialRows: { - types: ['boolean'], - default: false, - help: 'Partial rows', - }, - type: { - types: ['string'], - default: '', - help: 'Type', - }, - schemas: { - types: ['string'], - default: '"{}"', - help: 'Schemas', - }, - visConfig: { - types: ['string'], - default: '"{}"', - help: 'Visualization configuration', - }, - uiState: { - types: ['string'], - default: '"{}"', - help: 'User interface state', - }, - aggConfigs: { - types: ['string'], - default: '"{}"', - help: 'Aggregation configurations', - }, - }, - async fn(input, args, { inspectorAdapters }) { - const visConfigParams = args.visConfig ? JSON.parse(args.visConfig) : {}; - const schemas = args.schemas ? JSON.parse(args.schemas) : {}; - const visType = getTypes().get(args.type || 'histogram') as any; - const indexPattern = args.index ? await getIndexPatterns().get(args.index) : null; - - const uiStateParams = args.uiState ? JSON.parse(args.uiState) : {}; - const uiState = new PersistedState(uiStateParams); - - const aggConfigsState = args.aggConfigs ? JSON.parse(args.aggConfigs) : []; - const aggs = indexPattern - ? getSearch().aggs.createAggConfigs(indexPattern, aggConfigsState) - : undefined; - - if (typeof visType.requestHandler === 'function') { - input = await visType.requestHandler({ - partialRows: args.partialRows, - metricsAtAllLevels: args.metricsAtAllLevels, - index: indexPattern, - visParams: visConfigParams, - timeRange: get(input, 'timeRange', null), - query: get(input, 'query', null), - filters: get(input, 'filters', null), - uiState, - inspectorAdapters, - queryFilter: getFilterManager(), - aggs, - }); - } - - if (typeof visType.responseHandler === 'function') { - if (input.columns) { - // assign schemas to aggConfigs - input.columns.forEach((column: any) => { - if (column.aggConfig) { - column.aggConfig.aggConfigs.schemas = visType.schemas.all; - } - }); - - Object.keys(schemas).forEach((key) => { - schemas[key].forEach((i: any) => { - if (input.columns[i] && input.columns[i].aggConfig) { - input.columns[i].aggConfig.schema = key; - } - }); - }); - } - - input = await visType.responseHandler(input, visConfigParams.dimensions); - } - - return { - type: 'render', - as: 'visualization', - value: { - visData: input, - visType: args.type || '', - visConfig: visConfigParams, - }, - }; - }, -}); diff --git a/src/plugins/visualizations/public/expressions/visualization_renderer.tsx b/src/plugins/visualizations/public/expressions/visualization_renderer.tsx deleted file mode 100644 index 3547a5d7e20ce..0000000000000 --- a/src/plugins/visualizations/public/expressions/visualization_renderer.tsx +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * and the Server Side Public License, v 1; you may not use this file except in - * compliance with, at your election, the Elastic License or the Server Side - * Public License, v 1. - */ - -import React from 'react'; -import { render, unmountComponentAtNode } from 'react-dom'; -// @ts-ignore -import { ExprVis } from './vis'; -import { Visualization } from '../components'; -import { VisParams } from '../types'; - -export const visualization = () => ({ - name: 'visualization', - displayName: 'visualization', - reuseDomNode: true, - render: async (domNode: HTMLElement, config: any, handlers: any) => { - const { visData, visConfig, params } = config; - const visType = config.visType || visConfig.type; - - const vis = new ExprVis({ - title: config.title, - type: visType as string, - params: visConfig as VisParams, - }); - - vis.eventsSubject = { next: handlers.event }; - - const uiState = handlers.uiState || vis.getUiState(); - - handlers.onDestroy(() => { - unmountComponentAtNode(domNode); - }); - - const listenOnChange = params ? params.listenOnChange : false; - render( - , - domNode - ); - }, -}); diff --git a/src/plugins/visualizations/public/index.ts b/src/plugins/visualizations/public/index.ts index 0bf8aa6e5c418..b4216e1fc16af 100644 --- a/src/plugins/visualizations/public/index.ts +++ b/src/plugins/visualizations/public/index.ts @@ -10,7 +10,6 @@ import { PublicContract } from '@kbn/utility-types'; import { PluginInitializerContext } from 'src/core/public'; import { VisualizationsPlugin, VisualizationsSetup, VisualizationsStart } from './plugin'; import { VisualizeEmbeddableFactory, VisualizeEmbeddable } from './embeddable'; -import { ExprVis as ExprVisClass } from './expressions/vis'; export function plugin(initializerContext: PluginInitializerContext) { return new VisualizationsPlugin(initializerContext); @@ -20,39 +19,27 @@ export function plugin(initializerContext: PluginInitializerContext) { export { Vis } from './vis'; export { TypesService } from './vis_types/types_service'; export { VISUALIZE_EMBEDDABLE_TYPE, VIS_EVENT_TO_TRIGGER } from './embeddable'; -export { VisualizationContainer, VisualizationNoResults } from './components'; -export { getSchemas as getVisSchemas } from './legacy/build_pipeline'; +export { VisualizationContainer } from './components'; +export { getVisSchemas } from './vis_schemas'; /** @public types */ export { VisualizationsSetup, VisualizationsStart }; export { VisGroups } from './vis_types'; -export type { - VisTypeAlias, - VisType, - BaseVisTypeOptions, - ReactVisTypeOptions, - Schema, - ISchemas, -} from './vis_types'; +export type { VisTypeAlias, VisTypeDefinition, Schema, ISchemas } from './vis_types'; export { SerializedVis, SerializedVisData, VisData } from './vis'; export type VisualizeEmbeddableFactoryContract = PublicContract; export type VisualizeEmbeddableContract = PublicContract; export { VisualizeInput } from './embeddable'; -export type ExprVis = ExprVisClass; -export { SchemaConfig, BuildPipelineParams } from './legacy/build_pipeline'; -// @ts-ignore +export { SchemaConfig } from './vis_schemas'; export { updateOldState } from './legacy/vis_update_state'; export { PersistedState } from './persisted_state'; export { - VisualizationControllerConstructor, - VisualizationController, ISavedVis, VisSavedObject, - VisResponseValue, VisToExpressionAst, - VisParams, + VisToExpressionAstParams, + VisEditorOptionsProps, } from './types'; -export { ExprVisAPIEvents } from './expressions/vis'; export { VisualizationListItem, VisualizationStage } from './vis_types/vis_type_alias_registry'; export { VISUALIZE_ENABLE_LABS_SETTING } from '../common/constants'; -export { SavedVisState } from '../common'; +export { SavedVisState, VisParams } from '../common'; diff --git a/src/plugins/visualizations/public/legacy/__snapshots__/build_pipeline.test.ts.snap b/src/plugins/visualizations/public/legacy/__snapshots__/build_pipeline.test.ts.snap deleted file mode 100644 index 3d685064111dc..0000000000000 --- a/src/plugins/visualizations/public/legacy/__snapshots__/build_pipeline.test.ts.snap +++ /dev/null @@ -1,3 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`visualize loader pipeline helpers: build pipeline buildPipeline calls toExpression on vis_type if it exists 1`] = `"kibana | kibana_context | test"`; diff --git a/src/plugins/visualizations/public/legacy/build_pipeline.test.ts b/src/plugins/visualizations/public/legacy/build_pipeline.test.ts deleted file mode 100644 index a3d867380602d..0000000000000 --- a/src/plugins/visualizations/public/legacy/build_pipeline.test.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * and the Server Side Public License, v 1; you may not use this file except in - * compliance with, at your election, the Elastic License or the Server Side - * Public License, v 1. - */ - -import { prepareJson, prepareString, buildPipeline } from './build_pipeline'; -import { Vis } from '..'; -import { dataPluginMock } from '../../../../plugins/data/public/mocks'; -import { parseExpression } from '../../../expressions/common'; - -describe('visualize loader pipeline helpers: build pipeline', () => { - describe('prepareJson', () => { - it('returns a correctly formatted key/value string', () => { - const expected = `foo='{}' `; // trailing space is expected - const actual = prepareJson('foo', {}); - expect(actual).toBe(expected); - }); - - it('stringifies provided data', () => { - const expected = `foo='{\"well\":\"hello\",\"there\":{\"friend\":true}}' `; - const actual = prepareJson('foo', { well: 'hello', there: { friend: true } }); - expect(actual).toBe(expected); - }); - - it('escapes single quotes', () => { - const expected = `foo='{\"well\":\"hello \\'hi\\'\",\"there\":{\"friend\":true}}' `; - const actual = prepareJson('foo', { well: `hello 'hi'`, there: { friend: true } }); - expect(actual).toBe(expected); - }); - - it('returns empty string if data is undefined', () => { - const actual = prepareJson('foo', undefined); - expect(actual).toBe(''); - }); - }); - - describe('prepareString', () => { - it('returns a correctly formatted key/value string', () => { - const expected = `foo='bar' `; // trailing space is expected - const actual = prepareString('foo', 'bar'); - expect(actual).toBe(expected); - }); - - it('escapes single quotes', () => { - const expected = `foo='\\'bar\\'' `; - const actual = prepareString('foo', `'bar'`); - expect(actual).toBe(expected); - }); - - it('returns empty string if data is undefined', () => { - const actual = prepareString('foo', undefined); - expect(actual).toBe(''); - }); - }); - - describe('buildPipeline', () => { - const dataStart = dataPluginMock.createStartContract(); - - it('calls toExpression on vis_type if it exists', async () => { - const vis = ({ - getState: () => {}, - isHierarchical: () => false, - data: { - aggs: { - getResponseAggs: () => [], - }, - searchSource: { - getField: jest.fn(), - getParent: jest.fn(), - }, - }, - // @ts-ignore - type: { - toExpressionAst: () => parseExpression('test'), - }, - } as unknown) as Vis; - const expression = await buildPipeline(vis, { - timefilter: dataStart.query.timefilter.timefilter, - }); - expect(expression).toMatchSnapshot(); - }); - }); -}); diff --git a/src/plugins/visualizations/public/legacy/build_pipeline.ts b/src/plugins/visualizations/public/legacy/build_pipeline.ts deleted file mode 100644 index d337ef7bcf379..0000000000000 --- a/src/plugins/visualizations/public/legacy/build_pipeline.ts +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * and the Server Side Public License, v 1; you may not use this file except in - * compliance with, at your election, the Elastic License or the Server Side - * Public License, v 1. - */ - -import { - buildExpression, - formatExpression, - SerializedFieldFormat, -} from '../../../../plugins/expressions/public'; -import { IAggConfig, search, TimefilterContract } from '../../../../plugins/data/public'; -import { Vis } from '../types'; -const { isDateHistogramBucketAggConfig } = search.aggs; - -interface SchemaConfigParams { - precision?: number; - useGeocentroid?: boolean; -} - -export interface SchemaConfig { - accessor: number; - label: string; - format: SerializedFieldFormat; - params: SchemaConfigParams; - aggType: string; -} - -export interface Schemas { - metric: SchemaConfig[]; - bucket?: SchemaConfig[]; - geo_centroid?: any[]; - group?: any[]; - params?: any[]; - radius?: any[]; - segment?: any[]; - split_column?: SchemaConfig[]; - split_row?: SchemaConfig[]; - width?: any[]; - // catch all for schema name - [key: string]: any[] | undefined; -} -export interface BuildPipelineParams { - timefilter: TimefilterContract; - timeRange?: any; - abortSignal?: AbortSignal; -} - -export const getSchemas = ( - vis: Vis, - { timeRange, timefilter }: BuildPipelineParams -): Schemas => { - const createSchemaConfig = (accessor: number, agg: IAggConfig): SchemaConfig => { - if (isDateHistogramBucketAggConfig(agg)) { - agg.params.timeRange = timeRange; - const bounds = - agg.params.timeRange && agg.fieldIsTimeField() - ? timefilter.calculateBounds(agg.params.timeRange) - : undefined; - agg.buckets.setBounds(bounds); - agg.buckets.setInterval(agg.params.interval); - } - - const hasSubAgg = [ - 'derivative', - 'moving_avg', - 'serial_diff', - 'cumulative_sum', - 'sum_bucket', - 'avg_bucket', - 'min_bucket', - 'max_bucket', - ].includes(agg.type.name); - - const formatAgg = hasSubAgg - ? agg.params.customMetric || agg.aggConfigs.getRequestAggById(agg.params.metricAgg) - : agg; - - const params: SchemaConfigParams = {}; - - if (agg.type.name === 'geohash_grid') { - params.precision = agg.params.precision; - params.useGeocentroid = agg.params.useGeocentroid; - } - - const label = agg.makeLabel && agg.makeLabel(); - - return { - accessor, - format: formatAgg.toSerializedFieldFormat(), - params, - label, - aggType: agg.type.name, - }; - }; - - let cnt = 0; - const schemas: Schemas = { - metric: [], - }; - - if (!vis.data.aggs) { - return schemas; - } - - const responseAggs = vis.data.aggs.getResponseAggs().filter((agg: IAggConfig) => agg.enabled); - const isHierarchical = vis.isHierarchical(); - const metrics = responseAggs.filter((agg: IAggConfig) => agg.type.type === 'metrics'); - responseAggs.forEach((agg: IAggConfig) => { - let skipMetrics = false; - let schemaName = agg.schema; - if (!schemaName) { - if (agg.type.name === 'geo_centroid') { - schemaName = 'geo_centroid'; - } else { - cnt++; - return; - } - } - if (schemaName === 'split') { - // TODO: We should check if there's a better way then casting to `any` here - schemaName = `split_${(vis.params as any).row ? 'row' : 'column'}`; - skipMetrics = responseAggs.length - metrics.length > 1; - } - if (!schemas[schemaName]) { - schemas[schemaName] = []; - } - if (!isHierarchical || agg.type.type !== 'metrics') { - schemas[schemaName]!.push(createSchemaConfig(cnt++, agg)); - } - if (isHierarchical && (agg.type.type !== 'metrics' || metrics.length === responseAggs.length)) { - metrics.forEach((metric: any) => { - const schemaConfig = createSchemaConfig(cnt++, metric); - if (!skipMetrics) { - schemas.metric.push(schemaConfig); - } - }); - } - }); - return schemas; -}; - -export const prepareJson = (variable: string, data?: object): string => { - if (data === undefined) { - return ''; - } - return `${variable}='${JSON.stringify(data).replace(/\\/g, `\\\\`).replace(/'/g, `\\'`)}' `; -}; - -export const escapeString = (data: string): string => { - return data.replace(/\\/g, `\\\\`).replace(/'/g, `\\'`); -}; - -export const prepareString = (variable: string, data?: string): string => { - if (data === undefined) { - return ''; - } - return `${variable}='${escapeString(data)}' `; -}; - -export const prepareValue = (variable: string, data: any, raw: boolean = false) => { - if (data === undefined) { - return ''; - } - if (raw) { - return `${variable}=${data} `; - } - switch (typeof data) { - case 'string': - return prepareString(variable, data); - case 'object': - return prepareJson(variable, data); - default: - return `${variable}=${data} `; - } -}; - -export const prepareDimension = (variable: string, data: any) => { - if (data === undefined) { - return ''; - } - - let expr = `${variable}={visdimension ${data.accessor} `; - if (data.format) { - expr += prepareValue('format', data.format.id); - expr += prepareJson('formatParams', data.format.params); - } - expr += '} '; - - return expr; -}; - -export const buildPipeline = async (vis: Vis, params: BuildPipelineParams) => { - const { indexPattern, searchSource } = vis.data; - const query = searchSource!.getField('query'); - const filters = searchSource!.getField('filter'); - const { uiState, title } = vis; - - // context - let pipeline = `kibana | kibana_context `; - if (query) { - pipeline += prepareJson('query', query); - } - if (filters) { - pipeline += prepareJson('filters', filters); - } - if (vis.data.savedSearchId) { - pipeline += prepareString('savedSearchId', vis.data.savedSearchId); - } - pipeline += '| '; - - if (vis.type.toExpressionAst) { - const visAst = await vis.type.toExpressionAst(vis, params); - pipeline += formatExpression(visAst); - } else { - // request handler - if (vis.type.requestHandler === 'courier') { - pipeline += `esaggs - index={indexPatternLoad ${prepareString('id', indexPattern!.id)}} - metricsAtAllLevels=${vis.isHierarchical()} - partialRows=${vis.params.showPartialRows || false} `; - if (vis.data.aggs) { - vis.data.aggs.aggs.forEach((agg) => { - const ast = agg.toExpressionAst(); - if (ast) { - pipeline += `aggs={${buildExpression(ast).toString()}} `; - } - }); - } - pipeline += `| `; - } else { - const schemas = getSchemas(vis, params); - const visConfig = { ...vis.params }; - visConfig.dimensions = schemas; - visConfig.title = title; - pipeline += `visualization type='${vis.type.name}' - ${prepareJson('visConfig', visConfig)} - ${prepareJson('uiState', uiState)} - metricsAtAllLevels=${vis.isHierarchical()} - partialRows=${vis.params.showPartialRows || false} `; - if (indexPattern) { - pipeline += `${prepareString('index', indexPattern.id)} `; - if (vis.data.aggs) { - pipeline += `${prepareJson('aggConfigs', vis.data.aggs!.aggs)}`; - } - } - } - } - - return pipeline; -}; diff --git a/src/plugins/visualizations/public/mocks.ts b/src/plugins/visualizations/public/mocks.ts index a8bf3b1ff3eb9..4f9fd53125847 100644 --- a/src/plugins/visualizations/public/mocks.ts +++ b/src/plugins/visualizations/public/mocks.ts @@ -22,7 +22,6 @@ import { savedObjectsPluginMock } from '../../../plugins/saved_objects/public/mo const createSetupContract = (): VisualizationsSetup => ({ createBaseVisualization: jest.fn(), - createReactVisualization: jest.fn(), registerAlias: jest.fn(), hideTypes: jest.fn(), }); diff --git a/src/plugins/visualizations/public/plugin.ts b/src/plugins/visualizations/public/plugin.ts index 8a82b36f37caf..24514dde10cda 100644 --- a/src/plugins/visualizations/public/plugin.ts +++ b/src/plugins/visualizations/public/plugin.ts @@ -20,15 +20,12 @@ import { TypesService, TypesSetup, TypesStart } from './vis_types'; import { setUISettings, setTypes, - setI18n, setApplication, setCapabilities, setHttp, - setIndexPatterns, setSearch, setSavedObjects, setUsageCollector, - setFilterManager, setExpressions, setUiActions, setSavedVisualizationsLoader, @@ -47,8 +44,6 @@ import { } from './embeddable'; import { ExpressionsSetup, ExpressionsStart } from '../../expressions/public'; import { EmbeddableSetup, EmbeddableStart } from '../../embeddable/public'; -import { visualization as visualizationFunction } from './expressions/visualization_function'; -import { visualization as visualizationRenderer } from './expressions/visualization_renderer'; import { range as rangeExpressionFunction } from './expression_functions/range'; import { visDimension as visDimensionExpressionFunction } from './expression_functions/vis_dimension'; import { DataPublicPluginSetup, DataPublicPluginStart } from '../../../plugins/data/public'; @@ -138,8 +133,6 @@ export class VisualizationsPlugin setUISettings(core.uiSettings); setUsageCollector(usageCollection); - expressions.registerFunction(visualizationFunction); - expressions.registerRenderer(visualizationRenderer); expressions.registerFunction(rangeExpressionFunction); expressions.registerFunction(visDimensionExpressionFunction); const embeddableFactory = new VisualizeEmbeddableFactory({ start }); @@ -155,7 +148,6 @@ export class VisualizationsPlugin { data, expressions, uiActions, embeddable, dashboard, savedObjects }: VisualizationsStartDeps ): VisualizationsStart { const types = this.types.start(); - setI18n(core.i18n); setTypes(types); setEmbeddable(embeddable); setApplication(core.application); @@ -163,9 +155,7 @@ export class VisualizationsPlugin setHttp(core.http); setSavedObjects(core.savedObjects); setDocLinks(core.docLinks); - setIndexPatterns(data.indexPatterns); setSearch(data.search); - setFilterManager(data.query.filterManager); setExpressions(expressions); setUiActions(uiActions); setTimeFilter(data.query.timefilter.timefilter); diff --git a/src/plugins/visualizations/public/services.ts b/src/plugins/visualizations/public/services.ts index dd7d0941e7378..30cc514e48de4 100644 --- a/src/plugins/visualizations/public/services.ts +++ b/src/plugins/visualizations/public/services.ts @@ -11,7 +11,6 @@ import { Capabilities, ChromeStart, HttpStart, - I18nStart, IUiSettingsClient, OverlayStart, SavedObjectsStart, @@ -19,12 +18,7 @@ import { } from '../../../core/public'; import { TypesStart } from './vis_types'; import { createGetterSetter } from '../../../plugins/kibana_utils/public'; -import { - DataPublicPluginStart, - FilterManager, - IndexPatternsContract, - TimefilterContract, -} from '../../../plugins/data/public'; +import { DataPublicPluginStart, TimefilterContract } from '../../../plugins/data/public'; import { UsageCollectionSetup } from '../../../plugins/usage_collection/public'; import { ExpressionsStart } from '../../../plugins/expressions/public'; import { UiActionsStart } from '../../../plugins/ui_actions/public'; @@ -48,20 +42,10 @@ export const [getSavedObjects, setSavedObjects] = createGetterSetter('Types'); -export const [getI18n, setI18n] = createGetterSetter('I18n'); - export const [getDocLinks, setDocLinks] = createGetterSetter('DocLinks'); -export const [getFilterManager, setFilterManager] = createGetterSetter( - 'FilterManager' -); - export const [getTimeFilter, setTimeFilter] = createGetterSetter('TimeFilter'); -export const [getIndexPatterns, setIndexPatterns] = createGetterSetter( - 'IndexPatterns' -); - export const [getSearch, setSearch] = createGetterSetter('Search'); export const [getUsageCollector, setUsageCollector] = createGetterSetter( diff --git a/src/plugins/visualizations/public/types.ts b/src/plugins/visualizations/public/types.ts index dc9ca49840561..3a751c92f3ae7 100644 --- a/src/plugins/visualizations/public/types.ts +++ b/src/plugins/visualizations/public/types.ts @@ -7,26 +7,27 @@ */ import { SavedObject } from '../../../plugins/saved_objects/public'; -import { SearchSourceFields, TimefilterContract } from '../../../plugins/data/public'; +import { + AggConfigOptions, + IAggConfigs, + SearchSourceFields, + TimefilterContract, +} from '../../../plugins/data/public'; import { ExpressionAstExpression } from '../../expressions/public'; import { SerializedVis, Vis } from './vis'; -import { ExprVis } from './expressions/vis'; -import { SavedVisState, VisParams } from '../common/types'; +import { PersistedState } from './persisted_state'; +import { VisParams } from '../common'; export { Vis, SerializedVis, VisParams }; -export interface VisualizationController { - render(visData: any, visParams: any): Promise; - destroy(): void; - isLoaded?(): Promise | void; +export interface SavedVisState { + title: string; + type: string; + params: VisParams; + aggs: AggConfigOptions[]; } -export type VisualizationControllerConstructor = new ( - el: HTMLElement, - vis: ExprVis -) => VisualizationController; - export interface ISavedVis { id?: string; title: string; @@ -40,13 +41,6 @@ export interface ISavedVis { export interface VisSavedObject extends SavedObject, ISavedVis {} -export interface VisResponseValue { - visType: string; - visData: object; - visConfig: object; - params?: object; -} - export interface VisToExpressionAstParams { timefilter: TimefilterContract; timeRange?: any; @@ -57,3 +51,15 @@ export type VisToExpressionAst = ( vis: Vis, params: VisToExpressionAstParams ) => Promise | ExpressionAstExpression; + +export interface VisEditorOptionsProps { + aggs: IAggConfigs; + hasHistogramAgg: boolean; + isTabSelected: boolean; + stateParams: VisParamType; + vis: Vis; + uiState: PersistedState; + setValue(paramName: T, value: VisParamType[T]): void; + setValidity(isValid: boolean): void; + setTouched(isTouched: boolean): void; +} diff --git a/src/plugins/visualizations/public/vis.ts b/src/plugins/visualizations/public/vis.ts index 56a151fb82ed3..ab44c361bd5bd 100644 --- a/src/plugins/visualizations/public/vis.ts +++ b/src/plugins/visualizations/public/vis.ts @@ -22,7 +22,6 @@ import { i18n } from '@kbn/i18n'; import { PersistedState } from './persisted_state'; import { getTypes, getAggs, getSearch, getSavedSearchLoader } from './services'; -import { VisType } from './vis_types'; import { IAggConfigs, IndexPattern, @@ -30,6 +29,7 @@ import { AggConfigOptions, SearchSourceFields, } from '../../../plugins/data/public'; +import { BaseVisType } from './vis_types'; import { VisParams } from '../common/types'; export interface SerializedVisData { @@ -71,14 +71,11 @@ const getSearchSource = async (inputSearchSource: ISearchSource, savedSearchId?: type PartialVisState = Assign }>; export class Vis { - public readonly type: VisType; + public readonly type: BaseVisType; public readonly id?: string; public title: string = ''; public description: string = ''; public params: TVisParams; - // Session state is for storing information that is transitory, and will not be saved with the visualization. - // For instance, map bounds, which depends on the view port, browser window size, etc. - public sessionState: Record = {}; public data: VisData = {}; public readonly uiState: PersistedState; diff --git a/src/plugins/visualizations/public/vis_schemas.ts b/src/plugins/visualizations/public/vis_schemas.ts new file mode 100644 index 0000000000000..a00417b90baac --- /dev/null +++ b/src/plugins/visualizations/public/vis_schemas.ts @@ -0,0 +1,136 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * and the Server Side Public License, v 1; you may not use this file except in + * compliance with, at your election, the Elastic License or the Server Side + * Public License, v 1. + */ + +import { SerializedFieldFormat } from '../../expressions/public'; +import { IAggConfig, search } from '../../data/public'; + +import { Vis, VisToExpressionAstParams } from './types'; + +const { isDateHistogramBucketAggConfig } = search.aggs; + +interface SchemaConfigParams { + precision?: number; + useGeocentroid?: boolean; +} + +export interface SchemaConfig { + accessor: number; + label: string; + format: SerializedFieldFormat; + params: SchemaConfigParams; + aggType: string; +} + +export interface Schemas { + metric: SchemaConfig[]; + bucket?: SchemaConfig[]; + geo_centroid?: any[]; + group?: any[]; + params?: any[]; + radius?: any[]; + segment?: any[]; + split_column?: SchemaConfig[]; + split_row?: SchemaConfig[]; + width?: any[]; + // catch all for schema name + [key: string]: any[] | undefined; +} + +export const getVisSchemas = ( + vis: Vis, + { timeRange, timefilter }: VisToExpressionAstParams +): Schemas => { + const createSchemaConfig = (accessor: number, agg: IAggConfig): SchemaConfig => { + if (isDateHistogramBucketAggConfig(agg)) { + agg.params.timeRange = timeRange; + const bounds = + agg.params.timeRange && agg.fieldIsTimeField() + ? timefilter.calculateBounds(agg.params.timeRange) + : undefined; + agg.buckets.setBounds(bounds); + agg.buckets.setInterval(agg.params.interval); + } + + const hasSubAgg = [ + 'derivative', + 'moving_avg', + 'serial_diff', + 'cumulative_sum', + 'sum_bucket', + 'avg_bucket', + 'min_bucket', + 'max_bucket', + ].includes(agg.type.name); + + const formatAgg = hasSubAgg + ? agg.params.customMetric || agg.aggConfigs.getRequestAggById(agg.params.metricAgg) + : agg; + + const params: SchemaConfigParams = {}; + + if (agg.type.name === 'geohash_grid') { + params.precision = agg.params.precision; + params.useGeocentroid = agg.params.useGeocentroid; + } + + const label = agg.makeLabel && agg.makeLabel(); + + return { + accessor, + format: formatAgg.toSerializedFieldFormat(), + params, + label, + aggType: agg.type.name, + }; + }; + + let cnt = 0; + const schemas: Schemas = { + metric: [], + }; + + if (!vis.data.aggs) { + return schemas; + } + + const responseAggs = vis.data.aggs.getResponseAggs().filter((agg: IAggConfig) => agg.enabled); + const isHierarchical = vis.isHierarchical(); + const metrics = responseAggs.filter((agg: IAggConfig) => agg.type.type === 'metrics'); + responseAggs.forEach((agg: IAggConfig) => { + let skipMetrics = false; + let schemaName = agg.schema; + if (!schemaName) { + if (agg.type.name === 'geo_centroid') { + schemaName = 'geo_centroid'; + } else { + cnt++; + return; + } + } + if (schemaName === 'split') { + // TODO: We should check if there's a better way then casting to `any` here + schemaName = `split_${(vis.params as any).row ? 'row' : 'column'}`; + skipMetrics = responseAggs.length - metrics.length > 1; + } + if (!schemas[schemaName]) { + schemas[schemaName] = []; + } + if (!isHierarchical || agg.type.type !== 'metrics') { + schemas[schemaName]!.push(createSchemaConfig(cnt++, agg)); + } + if (isHierarchical && (agg.type.type !== 'metrics' || metrics.length === responseAggs.length)) { + metrics.forEach((metric: any) => { + const schemaConfig = createSchemaConfig(cnt++, metric); + if (!skipMetrics) { + schemas.metric.push(schemaConfig); + } + }); + } + }); + return schemas; +}; diff --git a/src/plugins/visualizations/public/vis_types/base_vis_type.test.ts b/src/plugins/visualizations/public/vis_types/base_vis_type.test.ts index 58670545f53e7..5091f9aca6b69 100644 --- a/src/plugins/visualizations/public/vis_types/base_vis_type.test.ts +++ b/src/plugins/visualizations/public/vis_types/base_vis_type.test.ts @@ -16,7 +16,16 @@ describe('BaseVisType', () => { name: 'test', title: 'test', description: 'test', - visualization: {} as any, + visConfig: { + defaults: {}, + }, + toExpressionAst: () => ({ + type: 'expression', + chain: [], + }), + editorConfig: { + editor: 'custom', + }, }); }).toThrow(); }); diff --git a/src/plugins/visualizations/public/vis_types/base_vis_type.ts b/src/plugins/visualizations/public/vis_types/base_vis_type.ts index e6e1704d45a8e..7425bf06bdfc2 100644 --- a/src/plugins/visualizations/public/vis_types/base_vis_type.ts +++ b/src/plugins/visualizations/public/vis_types/base_vis_type.ts @@ -9,54 +9,9 @@ import { defaultsDeep } from 'lodash'; import { VisParams } from '../types'; -import { VisType, VisTypeOptions, VisGroups } from './types'; +import { VisTypeDefinition, VisTypeOptions, VisGroups } from './types'; import { Schemas } from './schemas'; -interface CommonBaseVisTypeOptions - extends Pick< - VisType, - | 'description' - | 'getInfoMessage' - | 'getSupportedTriggers' - | 'hierarchicalData' - | 'icon' - | 'image' - | 'inspectorAdapters' - | 'name' - | 'requestHandler' - | 'responseHandler' - | 'setup' - | 'title' - >, - Pick< - Partial>, - | 'editorConfig' - | 'hidden' - | 'stage' - | 'getUsedIndexPattern' - | 'useCustomNoDataScreen' - | 'visConfig' - | 'group' - | 'titleInWizard' - | 'note' - > { - options?: Partial['options']>; -} - -interface ExpressionBaseVisTypeOptions extends CommonBaseVisTypeOptions { - toExpressionAst: VisType['toExpressionAst']; - visualization?: undefined; -} - -interface VisualizationBaseVisTypeOptions extends CommonBaseVisTypeOptions { - toExpressionAst?: undefined; - visualization: VisType['visualization']; -} - -export type BaseVisTypeOptions = - | ExpressionBaseVisTypeOptions - | VisualizationBaseVisTypeOptions; - const defaultOptions: VisTypeOptions = { showTimePicker: true, showQueryBar: true, @@ -65,7 +20,7 @@ const defaultOptions: VisTypeOptions = { hierarchicalData: false, // we should get rid of this i guess ? }; -export class BaseVisType implements VisType { +export class BaseVisType { public readonly name; public readonly title; public readonly description; @@ -76,23 +31,20 @@ export class BaseVisType implements VisType public readonly stage; public readonly group; public readonly titleInWizard; - public readonly options; - public readonly visualization; + public readonly options: VisTypeOptions; public readonly visConfig; public readonly editorConfig; public hidden; - public readonly requestHandler; - public readonly responseHandler; + public readonly requiresSearch; public readonly hierarchicalData; public readonly setup; public readonly getUsedIndexPattern; - public readonly useCustomNoDataScreen; public readonly inspectorAdapters; public readonly toExpressionAst; public readonly getInfoMessage; public readonly schemas; - constructor(opts: BaseVisTypeOptions) { + constructor(opts: VisTypeDefinition) { if (!opts.icon && !opts.image) { throw new Error('vis_type must define its icon or image'); } @@ -104,7 +56,6 @@ export class BaseVisType implements VisType this.title = opts.title; this.icon = opts.icon; this.image = opts.image; - this.visualization = opts.visualization; this.visConfig = defaultsDeep({}, opts.visConfig, { defaults: {} }); this.editorConfig = defaultsDeep({}, opts.editorConfig, { collections: {} }); this.options = defaultsDeep({}, opts.options, defaultOptions); @@ -112,20 +63,14 @@ export class BaseVisType implements VisType this.group = opts.group ?? VisGroups.AGGBASED; this.titleInWizard = opts.titleInWizard ?? ''; this.hidden = opts.hidden ?? false; - this.requestHandler = opts.requestHandler ?? 'courier'; - this.responseHandler = opts.responseHandler ?? 'none'; + this.requiresSearch = opts.requiresSearch ?? false; this.setup = opts.setup; this.hierarchicalData = opts.hierarchicalData ?? false; this.getUsedIndexPattern = opts.getUsedIndexPattern; - this.useCustomNoDataScreen = opts.useCustomNoDataScreen ?? false; this.inspectorAdapters = opts.inspectorAdapters; this.toExpressionAst = opts.toExpressionAst; this.getInfoMessage = opts.getInfoMessage; this.schemas = new Schemas(this.editorConfig?.schemas ?? []); } - - public get requiresSearch(): boolean { - return this.requestHandler !== 'none'; - } } diff --git a/src/plugins/visualizations/public/vis_types/index.ts b/src/plugins/visualizations/public/vis_types/index.ts index 0b3b1ec75cbe3..021c55e7a14bc 100644 --- a/src/plugins/visualizations/public/vis_types/index.ts +++ b/src/plugins/visualizations/public/vis_types/index.ts @@ -9,6 +9,5 @@ export * from './types_service'; export { Schemas } from './schemas'; export { VisGroups } from './types'; -export type { VisType, ISchemas, Schema } from './types'; -export type { BaseVisTypeOptions } from './base_vis_type'; -export type { ReactVisTypeOptions } from './react_vis_type'; +export { BaseVisType } from './base_vis_type'; +export type { VisTypeDefinition, ISchemas, Schema } from './types'; diff --git a/src/plugins/visualizations/public/vis_types/react_vis_controller.tsx b/src/plugins/visualizations/public/vis_types/react_vis_controller.tsx deleted file mode 100644 index 91e8db947f7e4..0000000000000 --- a/src/plugins/visualizations/public/vis_types/react_vis_controller.tsx +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * and the Server Side Public License, v 1; you may not use this file except in - * compliance with, at your election, the Elastic License or the Server Side - * Public License, v 1. - */ - -import React from 'react'; -import { render, unmountComponentAtNode } from 'react-dom'; -import { VisualizationController } from '../types'; -import { getI18n, getUISettings } from '../services'; -import { ExprVis } from '../expressions/vis'; - -export class ReactVisController implements VisualizationController { - constructor(private element: HTMLElement, private vis: ExprVis) {} - - public render(visData: any, visParams: any): Promise { - const I18nContext = getI18n().Context; - - return new Promise((resolve, reject) => { - if (!this.vis.type || !this.vis.type.visConfig || !this.vis.type.visConfig.component) { - reject('Missing component for ReactVisType'); - } - - const Component = this.vis.type.visConfig.component; - const config = getUISettings(); - render( - - - , - this.element - ); - }); - } - - public destroy() { - unmountComponentAtNode(this.element); - } -} diff --git a/src/plugins/visualizations/public/vis_types/react_vis_type.test.ts b/src/plugins/visualizations/public/vis_types/react_vis_type.test.ts deleted file mode 100644 index 76d3321f2c92d..0000000000000 --- a/src/plugins/visualizations/public/vis_types/react_vis_type.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * and the Server Side Public License, v 1; you may not use this file except in - * compliance with, at your election, the Elastic License or the Server Side - * Public License, v 1. - */ - -import { cloneDeep } from 'lodash'; -import { ReactVisType } from './react_vis_type'; - -describe('React Vis Type', () => { - const visConfig = { - name: 'test', - title: 'test', - description: 'test', - icon: 'test', - visConfig: { component: 'test' }, - }; - - describe('initialization', () => { - it('should throw if component is not set', () => { - expect(() => { - const missingConfig = cloneDeep(visConfig); - // @ts-expect-error TS knows it's a required property - delete missingConfig.visConfig.component; - new ReactVisType(missingConfig); - }).toThrow(); - }); - - it('creates react controller', () => { - const visType = new ReactVisType(visConfig); - expect(visType.visualization).not.toBeUndefined(); - }); - }); -}); diff --git a/src/plugins/visualizations/public/vis_types/react_vis_type.ts b/src/plugins/visualizations/public/vis_types/react_vis_type.ts deleted file mode 100644 index 336599f67702d..0000000000000 --- a/src/plugins/visualizations/public/vis_types/react_vis_type.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * and the Server Side Public License, v 1; you may not use this file except in - * compliance with, at your election, the Elastic License or the Server Side - * Public License, v 1. - */ - -import { BaseVisType, BaseVisTypeOptions } from './base_vis_type'; -import { ReactVisController } from './react_vis_controller'; -import { VisType } from './types'; - -export type ReactVisTypeOptions = Omit< - BaseVisTypeOptions, - 'visualization' | 'toExpressionAst' ->; - -/** - * This class should only be used for visualizations not using the `toExpressionAst` with a custom renderer. - * If you implement a custom renderer you should just mount a react component inside this. - */ -export class ReactVisType - extends BaseVisType - implements VisType { - constructor(opts: ReactVisTypeOptions) { - super({ - ...opts, - visualization: ReactVisController, - }); - - if (!this.visConfig.component) { - throw new Error('Missing component for ReactVisType'); - } - } -} diff --git a/src/plugins/visualizations/public/vis_types/schemas.ts b/src/plugins/visualizations/public/vis_types/schemas.ts index 3ce38e68e7f32..50bf50a857815 100644 --- a/src/plugins/visualizations/public/vis_types/schemas.ts +++ b/src/plugins/visualizations/public/vis_types/schemas.ts @@ -37,7 +37,6 @@ export class Schemas implements ISchemas { group: AggGroupNames.Buckets, title: schema.name, aggFilter: '*', - editor: false, params: [], }); diff --git a/src/plugins/visualizations/public/vis_types/types.ts b/src/plugins/visualizations/public/vis_types/types.ts index b38c9e41d5c7b..7244aae64e963 100644 --- a/src/plugins/visualizations/public/vis_types/types.ts +++ b/src/plugins/visualizations/public/vis_types/types.ts @@ -7,10 +7,10 @@ */ import { IconType } from '@elastic/eui'; -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import { Adapters } from 'src/plugins/inspector'; import { IndexPattern, AggGroupNames, AggParam, AggGroupName } from '../../../data/public'; -import { Vis, VisParams, VisToExpressionAst, VisualizationControllerConstructor } from '../types'; +import { Vis, VisEditorOptionsProps, VisParams, VisToExpressionAst } from '../types'; export interface VisTypeOptions { showTimePicker: boolean; @@ -34,7 +34,6 @@ export interface ISchemas { export interface Schema { aggFilter: string[]; - editor: boolean | string; group: AggGroupName; max: number; min: number; @@ -49,11 +48,35 @@ export interface Schema { tooltip?: ReactNode; } +type DefaultEditorOptionsComponent = React.ComponentType< + VisEditorOptionsProps +>; + +interface DefaultEditorConfig { + // collections should moved directly into default editor in https://github.com/elastic/kibana/issues/84879 + collections?: { + [key: string]: Array<{ text: string; value: string }> | Array<{ id: string; label: string }>; + }; + enableAutoApply?: boolean; + defaultSize?: string; + optionsTemplate?: DefaultEditorOptionsComponent; + optionTabs?: Array<{ + name: string; + title: string; + editor: DefaultEditorOptionsComponent; + }>; + schemas?: Array>; +} + +interface CustomEditorConfig { + editor: string; +} + /** - * A visualization type representing one specific type of "classical" + * A visualization type definition representing a spec of one specific type of "classical" * visualizations (i.e. not Lens visualizations). */ -export interface VisType { +export interface VisTypeDefinition { /** * Visualization unique name */ @@ -69,7 +92,7 @@ export interface VisType { /** * If given, it will be diplayed on the wizard vis card as a note in italic. */ - readonly note: string; + readonly note?: string; /** * If given, it will return the supported triggers for this vis. */ @@ -82,8 +105,6 @@ export interface VisType { readonly getUsedIndexPattern?: (visParams: VisParams) => IndexPattern[] | Promise; readonly isAccessible?: boolean; - readonly requestHandler?: string | unknown; - readonly responseHandler?: string | unknown; /** * It is the visualization icon, displayed on the wizard. */ @@ -94,21 +115,27 @@ export interface VisType { readonly image?: string; /** * Describes the visualization stage + * @default 'production' */ - readonly stage: 'experimental' | 'beta' | 'production'; + readonly stage?: 'experimental' | 'beta' | 'production'; /** * Describes the experience group that the visualization belongs. * It can be on tools, aggregation based or promoted group. + * @default 'aggbased' */ - readonly group: VisGroups; + readonly group?: VisGroups; /** * If given, it will be displayed on the wizard instead of the title. * We use it because we want to differentiate the vis title from the * way it is presented on the wizard */ - readonly titleInWizard: string; - readonly requiresSearch: boolean; - readonly useCustomNoDataScreen: boolean; + readonly titleInWizard?: string; + /** + * The flag is necessary for aggregation based visualizations. + * When "true", an additional step on the vis creation wizard will be provided + * with the selection of a search source - an index pattern or a saved search. + */ + readonly requiresSearch?: boolean; readonly hierarchicalData?: boolean | ((vis: { params: TVisParams }) => boolean); readonly inspectorAdapters?: Adapters | (() => Adapters); /** @@ -118,18 +145,27 @@ export interface VisType { * of this type. */ readonly getInfoMessage?: (vis: Vis) => React.ReactNode; - - readonly toExpressionAst?: VisToExpressionAst; - readonly visualization?: VisualizationControllerConstructor; + /** + * Should be provided to expand base visualization expression with + * custom exprsesion chain, including render expression. + * Explicit renderer should be registered in expressions plugin to render your visualization. + */ + readonly toExpressionAst: VisToExpressionAst; readonly setup?: (vis: Vis) => Promise>; - hidden: boolean; + hidden?: boolean; - readonly schemas: ISchemas; + readonly options?: Partial; - readonly options: VisTypeOptions; - - // TODO: The following types still need to be refined properly. - readonly editorConfig: Record; + /** + * Config for the default editor. + * Custom editor can be specified. + */ + readonly editorConfig: DefaultEditorConfig | CustomEditorConfig; + /** + * Have the "defaults" prop with default params for a visualization. + * TODO: ideally should have next type: { defaults: TVisParams } , but currently + * have incosistencies in legacy visLib visualizations + */ readonly visConfig: Record; } diff --git a/src/plugins/visualizations/public/vis_types/types_service.ts b/src/plugins/visualizations/public/vis_types/types_service.ts index d26f5ca882b65..09f7f8f599f2c 100644 --- a/src/plugins/visualizations/public/vis_types/types_service.ts +++ b/src/plugins/visualizations/public/vis_types/types_service.ts @@ -7,9 +7,8 @@ */ import { visTypeAliasRegistry, VisTypeAlias } from './vis_type_alias_registry'; -import { BaseVisType, BaseVisTypeOptions } from './base_vis_type'; -import { ReactVisType, ReactVisTypeOptions } from './react_vis_type'; -import { VisType, VisGroups } from './types'; +import { BaseVisType } from './base_vis_type'; +import { VisTypeDefinition, VisGroups } from './types'; /** * Vis Types Service @@ -17,10 +16,10 @@ import { VisType, VisGroups } from './types'; * @internal */ export class TypesService { - private types: Record> = {}; + private types: Record> = {}; private unregisteredHiddenTypes: string[] = []; - private registerVisualization(visDefinition: VisType) { + private registerVisualization(visDefinition: BaseVisType) { if (this.unregisteredHiddenTypes.includes(visDefinition.name)) { visDefinition.hidden = true; } @@ -37,18 +36,10 @@ export class TypesService { * registers a visualization type * @param config - visualization type definition */ - createBaseVisualization: (config: BaseVisTypeOptions): void => { + createBaseVisualization: (config: VisTypeDefinition): void => { const vis = new BaseVisType(config); this.registerVisualization(vis); }, - /** - * registers a visualization which uses react for rendering - * @param config - visualization type definition - */ - createReactVisualization: (config: ReactVisTypeOptions): void => { - const vis = new ReactVisType(config); - this.registerVisualization(vis); - }, /** * registers a visualization alias * alias is a visualization type without implementation, it just redirects somewhere in kibana @@ -77,13 +68,13 @@ export class TypesService { * returns specific visualization or undefined if not found * @param {string} visualization - id of visualization to return */ - get: (visualization: string): VisType => { + get: (visualization: string): BaseVisType | undefined => { return this.types[visualization]; }, /** * returns all registered visualization types */ - all: (): VisType[] => { + all: (): BaseVisType[] => { return [...Object.values(this.types)]; }, /** @@ -119,6 +110,3 @@ export type TypesStart = ReturnType; /** @public types */ export { VisTypeAlias }; - -/** @public static code */ -// TODO once items are moved from ui/vis into this service diff --git a/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.test.tsx b/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.test.tsx index 053d36e89ad75..9e825982b9065 100644 --- a/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.test.tsx +++ b/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.test.tsx @@ -8,19 +8,13 @@ import React from 'react'; import { mountWithIntl } from '@kbn/test/jest'; -import { TypesStart, VisType, VisGroups } from '../../vis_types'; +import { TypesStart, BaseVisType, VisGroups } from '../../vis_types'; import { AggBasedSelection } from './agg_based_selection'; describe('AggBasedSelection', () => { const defaultVisTypeParams = { hidden: false, - visualization: class Controller { - public render = jest.fn(); - public destroy = jest.fn(); - }, requiresSearch: false, - requestHandler: 'none', - responseHandler: 'none', }; const _visTypes = [ { @@ -50,22 +44,16 @@ describe('AggBasedSelection', () => { stage: 'production', ...defaultVisTypeParams, }, - ] as VisType[]; + ] as BaseVisType[]; const visTypes: TypesStart = { - get(id: string): VisType { - return _visTypes.find((vis) => vis.name === id) as VisType; - }, - all: () => { - return (_visTypes as unknown) as VisType[]; + get(id: string): BaseVisType { + return (_visTypes.find((vis) => vis.name === id) as unknown) as BaseVisType; }, + all: () => _visTypes, getAliases: () => [], unRegisterAlias: () => [], - getByGroup: (group: VisGroups) => { - return _visTypes.filter((type) => { - return type.group === group; - }) as VisType[]; - }, + getByGroup: (group: VisGroups) => _visTypes.filter((type) => type.group === group), }; beforeAll(() => { diff --git a/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.tsx b/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.tsx index 1496f0c60f82d..f5013dddc5c79 100644 --- a/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.tsx +++ b/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.tsx @@ -25,17 +25,17 @@ import { } from '@elastic/eui'; import { memoizeLast } from '../../legacy/memoize'; -import type { VisType, TypesStart } from '../../vis_types'; +import type { BaseVisType, TypesStart } from '../../vis_types'; import { VisGroups } from '../../vis_types'; import { DialogNavigation } from '../dialog_navigation'; interface VisTypeListEntry { - type: VisType; + type: BaseVisType; highlighted: boolean; } interface AggBasedSelectionProps { - onVisTypeSelected: (visType: VisType) => void; + onVisTypeSelected: (visType: BaseVisType) => void; visTypesRegistry: TypesStart; toggleGroups: (flag: boolean) => void; } diff --git a/src/plugins/visualizations/public/wizard/group_selection/group_selection.test.tsx b/src/plugins/visualizations/public/wizard/group_selection/group_selection.test.tsx index 60857cc39661e..74163296e31fd 100644 --- a/src/plugins/visualizations/public/wizard/group_selection/group_selection.test.tsx +++ b/src/plugins/visualizations/public/wizard/group_selection/group_selection.test.tsx @@ -8,20 +8,14 @@ import React from 'react'; import { mountWithIntl } from '@kbn/test/jest'; -import { TypesStart, VisType, VisGroups } from '../../vis_types'; +import { TypesStart, BaseVisType, VisGroups } from '../../vis_types'; import { GroupSelection } from './group_selection'; import { DocLinksStart } from '../../../../../core/public'; describe('GroupSelection', () => { const defaultVisTypeParams = { hidden: false, - visualization: class Controller { - public render = jest.fn(); - public destroy = jest.fn(); - }, requiresSearch: false, - requestHandler: 'none', - responseHandler: 'none', }; const _visTypes = [ { @@ -64,22 +58,22 @@ describe('GroupSelection', () => { aliasPath: '#/anotherUrl', promotion: true, } as unknown, - ] as VisType[]; + ] as BaseVisType[]; - const visTypesRegistry = (visTypes: VisType[]): TypesStart => { + const visTypesRegistry = (visTypes: BaseVisType[]): TypesStart => { return { - get(id: string): VisType { - return (visTypes.find((vis) => vis.name === id) as unknown) as VisType; + get(id: string): BaseVisType { + return (visTypes.find((vis) => vis.name === id) as unknown) as BaseVisType; }, all: () => { - return (visTypes as unknown) as VisType[]; + return (visTypes as unknown) as BaseVisType[]; }, getAliases: () => [], unRegisterAlias: () => [], getByGroup: (group: VisGroups) => { return (visTypes.filter((type) => { return type.group === group; - }) as unknown) as VisType[]; + }) as unknown) as BaseVisType[]; }, }; }; @@ -142,7 +136,7 @@ describe('GroupSelection', () => { }; const wrapper = mountWithIntl( { }; const wrapper = mountWithIntl( { }; const wrapper = mountWithIntl( { it('should sort promoted visualizations first', () => { const wrapper = mountWithIntl( { it('should render disabled aliases with a disabled class', () => { const wrapper = mountWithIntl( { it('should render a basic badge with link for disabled aliases with promoTooltip', () => { const wrapper = mountWithIntl( { }; const wrapper = mountWithIntl( { }; const wrapper = mountWithIntl( void; + onVisTypeSelected: (visType: BaseVisType | VisTypeAlias) => void; visTypesRegistry: TypesStart; docLinks: DocLinksStart; toggleGroups: (flag: boolean) => void; @@ -43,12 +43,12 @@ interface GroupSelectionProps { } interface VisCardProps { - onVisTypeSelected: (visType: VisType | VisTypeAlias) => void; - visType: VisType | VisTypeAlias; + onVisTypeSelected: (visType: BaseVisType | VisTypeAlias) => void; + visType: BaseVisType | VisTypeAlias; showExperimental?: boolean | undefined; } -function isVisTypeAlias(type: VisType | VisTypeAlias): type is VisTypeAlias { +function isVisTypeAlias(type: BaseVisType | VisTypeAlias): type is VisTypeAlias { return 'aliasPath' in type; } diff --git a/src/plugins/visualizations/public/wizard/new_vis_modal.test.tsx b/src/plugins/visualizations/public/wizard/new_vis_modal.test.tsx index baaed6d4ea8bf..c8a3c81f517ea 100644 --- a/src/plugins/visualizations/public/wizard/new_vis_modal.test.tsx +++ b/src/plugins/visualizations/public/wizard/new_vis_modal.test.tsx @@ -8,21 +8,16 @@ import React from 'react'; import { mountWithIntl } from '@kbn/test/jest'; -import { TypesStart, VisType, VisGroups } from '../vis_types'; +import { TypesStart, VisGroups } from '../vis_types'; import NewVisModal from './new_vis_modal'; import { ApplicationStart, SavedObjectsStart, DocLinksStart } from '../../../../core/public'; import { embeddablePluginMock } from '../../../embeddable/public/mocks'; +import { BaseVisType } from '../vis_types'; describe('NewVisModal', () => { const defaultVisTypeParams = { hidden: false, - visualization: class Controller { - public render = jest.fn(); - public destroy = jest.fn(); - }, requiresSearch: false, - requestHandler: 'none', - responseHandler: 'none', }; const _visTypes = [ { @@ -61,21 +56,15 @@ describe('NewVisModal', () => { stage: 'production', ...defaultVisTypeParams, }, - ]; + ] as BaseVisType[]; const visTypes: TypesStart = { - get(id: string): VisType { - return (_visTypes.find((vis) => vis.name === id) as unknown) as VisType; - }, - all: () => { - return (_visTypes as unknown) as VisType[]; + get(id: string): BaseVisType { + return (_visTypes.find((vis) => vis.name === id) as unknown) as BaseVisType; }, + all: () => _visTypes, getAliases: () => [], unRegisterAlias: () => [], - getByGroup: (group: VisGroups) => { - return (_visTypes.filter((type) => { - return type.group === group; - }) as unknown) as VisType[]; - }, + getByGroup: (group: VisGroups) => _visTypes.filter((type) => type.group === group), }; const addBasePath = (url: string) => `testbasepath${url}`; const settingsGet = jest.fn(); diff --git a/src/plugins/visualizations/public/wizard/new_vis_modal.tsx b/src/plugins/visualizations/public/wizard/new_vis_modal.tsx index 2a9641607d17a..b0be73e486d6c 100644 --- a/src/plugins/visualizations/public/wizard/new_vis_modal.tsx +++ b/src/plugins/visualizations/public/wizard/new_vis_modal.tsx @@ -21,7 +21,7 @@ import { import { SearchSelection } from './search_selection'; import { GroupSelection } from './group_selection'; import { AggBasedSelection } from './agg_based_selection'; -import type { TypesStart, VisType, VisTypeAlias } from '../vis_types'; +import type { TypesStart, BaseVisType, VisTypeAlias } from '../vis_types'; import { UsageCollectionSetup } from '../../../../plugins/usage_collection/public'; import { EmbeddableStateTransfer } from '../../../embeddable/public'; import { VISUALIZE_ENABLE_LABS_SETTING } from '../../common/constants'; @@ -46,7 +46,7 @@ interface TypeSelectionProps { interface TypeSelectionState { showSearchVisModal: boolean; showGroups: boolean; - visType?: VisType; + visType?: BaseVisType; } // TODO: redirect logic is specific to visualise & dashboard @@ -129,7 +129,7 @@ class NewVisModal extends React.Component { + private onVisTypeSelected = (visType: BaseVisType | VisTypeAlias) => { if (!('aliasPath' in visType) && visType.requiresSearch && visType.options.showIndexSelection) { this.setState({ showSearchVisModal: true, @@ -144,7 +144,11 @@ class NewVisModal extends React.Component void; - visType: VisType; + visType: BaseVisType; uiSettings: IUiSettingsClient; savedObjects: SavedObjectsStart; goBack: () => void; diff --git a/test/interpreter_functional/snapshots/baseline/combined_test3.json b/test/interpreter_functional/snapshots/baseline/combined_test3.json index 2aa601a8d3631..64b1052552c8f 100644 --- a/test/interpreter_functional/snapshots/baseline/combined_test3.json +++ b/test/interpreter_functional/snapshots/baseline/combined_test3.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/final_output_test.json b/test/interpreter_functional/snapshots/baseline/final_output_test.json index 2aa601a8d3631..64b1052552c8f 100644 --- a/test/interpreter_functional/snapshots/baseline/final_output_test.json +++ b/test/interpreter_functional/snapshots/baseline/final_output_test.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/metric_all_data.json b/test/interpreter_functional/snapshots/baseline/metric_all_data.json index dd779800cd452..0e1e5a723373f 100644 --- a/test/interpreter_functional/snapshots/baseline/metric_all_data.json +++ b/test/interpreter_functional/snapshots/baseline/metric_all_data.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"bucket":{"accessor":2,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":2,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/metric_invalid_data.json b/test/interpreter_functional/snapshots/baseline/metric_invalid_data.json index 0a47cdb8ff74a..c7b4a0325dc91 100644 --- a/test/interpreter_functional/snapshots/baseline/metric_invalid_data.json +++ b/test/interpreter_functional/snapshots/baseline/metric_invalid_data.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[],"meta":{},"rows":[],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[],"meta":{},"rows":[],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/metric_multi_metric_data.json b/test/interpreter_functional/snapshots/baseline/metric_multi_metric_data.json index 992d667fdce9f..fc8622a818dec 100644 --- a/test/interpreter_functional/snapshots/baseline/metric_multi_metric_data.json +++ b/test/interpreter_functional/snapshots/baseline/metric_multi_metric_data.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/metric_percentage_mode.json b/test/interpreter_functional/snapshots/baseline/metric_percentage_mode.json index 031c9f9ea5504..95c011f9259b9 100644 --- a/test/interpreter_functional/snapshots/baseline/metric_percentage_mode.json +++ b/test/interpreter_functional/snapshots/baseline/metric_percentage_mode.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":1000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":true,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":1000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":true,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/metric_single_metric_data.json b/test/interpreter_functional/snapshots/baseline/metric_single_metric_data.json index 8c6fde201c8f1..f4a8cd1f14e18 100644 --- a/test/interpreter_functional/snapshots/baseline/metric_single_metric_data.json +++ b/test/interpreter_functional/snapshots/baseline/metric_single_metric_data.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/partial_test_2.json b/test/interpreter_functional/snapshots/baseline/partial_test_2.json index 2aa601a8d3631..64b1052552c8f 100644 --- a/test/interpreter_functional/snapshots/baseline/partial_test_2.json +++ b/test/interpreter_functional/snapshots/baseline/partial_test_2.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/baseline/step_output_test3.json b/test/interpreter_functional/snapshots/baseline/step_output_test3.json index 2aa601a8d3631..64b1052552c8f 100644 --- a/test/interpreter_functional/snapshots/baseline/step_output_test3.json +++ b/test/interpreter_functional/snapshots/baseline/step_output_test3.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/combined_test3.json b/test/interpreter_functional/snapshots/session/combined_test3.json index 2aa601a8d3631..64b1052552c8f 100644 --- a/test/interpreter_functional/snapshots/session/combined_test3.json +++ b/test/interpreter_functional/snapshots/session/combined_test3.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/final_output_test.json b/test/interpreter_functional/snapshots/session/final_output_test.json index 2aa601a8d3631..64b1052552c8f 100644 --- a/test/interpreter_functional/snapshots/session/final_output_test.json +++ b/test/interpreter_functional/snapshots/session/final_output_test.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/metric_all_data.json b/test/interpreter_functional/snapshots/session/metric_all_data.json index dd779800cd452..0e1e5a723373f 100644 --- a/test/interpreter_functional/snapshots/session/metric_all_data.json +++ b/test/interpreter_functional/snapshots/session/metric_all_data.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"bucket":{"accessor":2,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":2,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/metric_invalid_data.json b/test/interpreter_functional/snapshots/session/metric_invalid_data.json index 0a47cdb8ff74a..c7b4a0325dc91 100644 --- a/test/interpreter_functional/snapshots/session/metric_invalid_data.json +++ b/test/interpreter_functional/snapshots/session/metric_invalid_data.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[],"meta":{},"rows":[],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[],"meta":{},"rows":[],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/metric_multi_metric_data.json b/test/interpreter_functional/snapshots/session/metric_multi_metric_data.json index 992d667fdce9f..fc8622a818dec 100644 --- a/test/interpreter_functional/snapshots/session/metric_multi_metric_data.json +++ b/test/interpreter_functional/snapshots/session/metric_multi_metric_data.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/metric_percentage_mode.json b/test/interpreter_functional/snapshots/session/metric_percentage_mode.json index 031c9f9ea5504..95c011f9259b9 100644 --- a/test/interpreter_functional/snapshots/session/metric_percentage_mode.json +++ b/test/interpreter_functional/snapshots/session/metric_percentage_mode.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":1000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":true,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":1000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":true,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/metric_single_metric_data.json b/test/interpreter_functional/snapshots/session/metric_single_metric_data.json index 8c6fde201c8f1..f4a8cd1f14e18 100644 --- a/test/interpreter_functional/snapshots/session/metric_single_metric_data.json +++ b/test/interpreter_functional/snapshots/session/metric_single_metric_data.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"metrics":[{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"},{"id":"col-2-1","meta":{"field":"bytes","index":"logstash-*","params":{"id":"bytes","params":null},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{"field":"bytes"},"schema":"metric","type":"max"},"type":"number"},"name":"Max bytes"}],"rows":[{"col-0-2":"200","col-1-1":12891,"col-2-1":19986},{"col-0-2":"404","col-1-1":696,"col-2-1":19881},{"col-0-2":"503","col-1-1":417,"col-2-1":0}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/partial_test_2.json b/test/interpreter_functional/snapshots/session/partial_test_2.json index 2aa601a8d3631..64b1052552c8f 100644 --- a/test/interpreter_functional/snapshots/session/partial_test_2.json +++ b/test/interpreter_functional/snapshots/session/partial_test_2.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/step_output_test3.json b/test/interpreter_functional/snapshots/session/step_output_test3.json index 2aa601a8d3631..64b1052552c8f 100644 --- a/test/interpreter_functional/snapshots/session/step_output_test3.json +++ b/test/interpreter_functional/snapshots/session/step_output_test3.json @@ -1 +1 @@ -{"as":"metric_vis","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file +{"as":"metric_vis","type":"render","value":{"visConfig":{"dimensions":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"metrics":[{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"}]},"metric":{"colorSchema":"Green to Red","colorsRange":[{"from":0,"to":10000,"type":"range"}],"invertColors":false,"labels":{"show":true},"metricColorMode":"None","percentageMode":false,"style":{"bgColor":false,"bgFill":"#000","fontSize":60,"labelColor":false,"subText":""},"useRanges":false}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"metric"}} \ No newline at end of file diff --git a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/kibana.json b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/kibana.json index 622cbd80090ba..33c8f3238dc47 100644 --- a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/kibana.json +++ b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/kibana.json @@ -3,6 +3,7 @@ "version": "0.0.1", "kibanaVersion": "kibana", "requiredPlugins": [ + "expressions", "visualizations" ], "server": false, diff --git a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/plugin.ts b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/plugin.ts index 7de3965d66d35..d4a7a32ba42dd 100644 --- a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/plugin.ts +++ b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/plugin.ts @@ -7,25 +7,42 @@ */ import { CoreSetup, Plugin } from 'kibana/public'; -import { VisualizationsSetup } from '../../../../../src/plugins/visualizations/public'; +import { VisualizationsSetup } from 'src/plugins/visualizations/public'; +import { Plugin as ExpressionsPlugin } from '../../../../../src/plugins/expressions/public'; + import { SelfChangingEditor } from './self_changing_vis/self_changing_editor'; -import { SelfChangingComponent } from './self_changing_vis/self_changing_components'; +import { selfChangingVisFn, SelfChangingVisParams } from './self_changing_vis_fn'; +import { selfChangingVisRenderer } from './self_changing_vis_renderer'; +import { toExpressionAst } from './to_ast'; export interface SetupDependencies { + expressions: ReturnType; visualizations: VisualizationsSetup; } export class CustomVisualizationsPublicPlugin implements Plugin { - public setup(core: CoreSetup, setupDeps: SetupDependencies) { - setupDeps.visualizations.createReactVisualization({ + public setup(core: CoreSetup, { expressions, visualizations }: SetupDependencies) { + /** + * Register an expression function with type "render" for your visualization + */ + expressions.registerFunction(selfChangingVisFn); + + /** + * Register a renderer for your visualization + */ + expressions.registerRenderer(selfChangingVisRenderer); + + /** + * Create the visualization type with definition + */ + visualizations.createBaseVisualization({ name: 'self_changing_vis', title: 'Self Changing Vis', icon: 'controlsHorizontal', description: 'This visualization is able to change its own settings, that you could also set in the editor.', visConfig: { - component: SelfChangingComponent, defaults: { counter: 0, }, @@ -39,7 +56,7 @@ export class CustomVisualizationsPublicPlugin }, ], }, - requestHandler: 'none', + toExpressionAst, }); } diff --git a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/self_changing_vis/self_changing_components.tsx b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/self_changing_vis/self_changing_components.tsx index 3b3e57bff8aa1..7409bc48d3bc3 100644 --- a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/self_changing_vis/self_changing_components.tsx +++ b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/self_changing_vis/self_changing_components.tsx @@ -7,14 +7,13 @@ */ import React, { useEffect } from 'react'; - import { EuiBadge } from '@elastic/eui'; +import { SelfChangingVisParams } from '../self_changing_vis_fn'; + interface SelfChangingComponentProps { - renderComplete: () => {}; - visParams: { - counter: number; - }; + renderComplete(): void; + visParams: SelfChangingVisParams; } export function SelfChangingComponent(props: SelfChangingComponentProps) { diff --git a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/self_changing_vis/self_changing_editor.tsx b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/self_changing_vis/self_changing_editor.tsx index ff3fd63e5d4aa..ad651ab55220d 100644 --- a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/self_changing_vis/self_changing_editor.tsx +++ b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/self_changing_vis/self_changing_editor.tsx @@ -9,13 +9,13 @@ import React from 'react'; import { EuiFieldNumber, EuiFormRow } from '@elastic/eui'; -import { VisOptionsProps } from 'src/plugins/vis_default_editor/public/vis_options_props'; +import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; interface CounterParams { counter: number; } -export class SelfChangingEditor extends React.Component> { +export class SelfChangingEditor extends React.Component> { onCounterChange = (ev: any) => { this.props.setValue('counter', parseInt(ev.target.value, 10)); }; diff --git a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/self_changing_vis_fn.ts b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/self_changing_vis_fn.ts new file mode 100644 index 0000000000000..28bcc27f71ec9 --- /dev/null +++ b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/self_changing_vis_fn.ts @@ -0,0 +1,66 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * and the Server Side Public License, v 1; you may not use this file except in + * compliance with, at your election, the Elastic License or the Server Side + * Public License, v 1. + */ + +import { ExpressionFunctionDefinition, Render } from 'src/plugins/expressions/public'; +import { KibanaContext } from 'src/plugins/data/public'; + +export interface SelfChangingVisParams { + counter: number; +} + +export interface SelfChangingVisRenderValue { + visParams: { + counter: number; + }; +} + +type Output = Promise>; + +export type SelfChangingVisExpressionFunctionDefinition = ExpressionFunctionDefinition< + 'self_changing_vis', + KibanaContext, + SelfChangingVisParams, + Output +>; + +export const selfChangingVisFn: SelfChangingVisExpressionFunctionDefinition = { + name: 'self_changing_vis', + type: 'render', + inputTypes: ['kibana_context'], + help: + 'The expression function definition should be registered for a custom visualization to be rendered', + args: { + counter: { + types: ['number'], + default: 0, + help: 'Visualization only argument with type number', + }, + }, + async fn(input, args) { + /** + * You can do any calculation you need before rendering. + * The function can also do asynchronous operations, e.x.: + * + const calculatedCounter = await new Promise((resolve) => + setTimeout(() => { + resolve(args.counter * 2); + }, 3000) + ); + */ + + return { + type: 'render', + as: 'self_changing_vis', + value: { + visParams: { + counter: args.counter, + }, + }, + }; + }, +}; diff --git a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/self_changing_vis_renderer.tsx b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/self_changing_vis_renderer.tsx new file mode 100644 index 0000000000000..ea24e6c294880 --- /dev/null +++ b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/self_changing_vis_renderer.tsx @@ -0,0 +1,26 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * and the Server Side Public License, v 1; you may not use this file except in + * compliance with, at your election, the Elastic License or the Server Side + * Public License, v 1. + */ + +import React from 'react'; +import { render, unmountComponentAtNode } from 'react-dom'; + +import { ExpressionRenderDefinition } from 'src/plugins/expressions'; +import { SelfChangingComponent } from './self_changing_vis/self_changing_components'; +import { SelfChangingVisRenderValue } from './self_changing_vis_fn'; + +export const selfChangingVisRenderer: ExpressionRenderDefinition = { + name: 'self_changing_vis', + reuseDomNode: true, + render: (domNode, { visParams }, handlers) => { + handlers.onDestroy(() => { + unmountComponentAtNode(domNode); + }); + + render(, domNode); + }, +}; diff --git a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/to_ast.ts b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/to_ast.ts new file mode 100644 index 0000000000000..0f7ecb7954d15 --- /dev/null +++ b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/to_ast.ts @@ -0,0 +1,30 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * and the Server Side Public License, v 1; you may not use this file except in + * compliance with, at your election, the Elastic License or the Server Side + * Public License, v 1. + */ + +import { VisToExpressionAst } from 'src/plugins/visualizations/public'; +import { + buildExpression, + buildExpressionFunction, +} from '../../../../../src/plugins/expressions/public'; +import { + SelfChangingVisExpressionFunctionDefinition, + SelfChangingVisParams, +} from './self_changing_vis_fn'; + +export const toExpressionAst: VisToExpressionAst = (vis) => { + const { counter } = vis.params; + + const selfChangingVis = buildExpressionFunction( + 'self_changing_vis', + { counter } + ); + + const ast = buildExpression([selfChangingVis]); + + return ast.toAst(); +}; diff --git a/x-pack/plugins/apm/public/components/shared/charts/transaction_error_rate_chart/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/transaction_error_rate_chart/index.tsx index 90877a895b05b..d712fa27c75ac 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/transaction_error_rate_chart/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/transaction_error_rate_chart/index.tsx @@ -77,7 +77,6 @@ export function TransactionErrorRateChart({ data: errorRates, type: 'linemark', color: theme.eui.euiColorVis7, - hideLegend: true, title: i18n.translate('xpack.apm.errorRate.chart.errorRate', { defaultMessage: 'Error rate (avg.)', }), diff --git a/x-pack/plugins/data_enhanced/public/plugin.ts b/x-pack/plugins/data_enhanced/public/plugin.ts index add7a966fee34..edcdea3997c8e 100644 --- a/x-pack/plugins/data_enhanced/public/plugin.ts +++ b/x-pack/plugins/data_enhanced/public/plugin.ts @@ -66,8 +66,8 @@ export class DataEnhancedPlugin this.config = this.initializerContext.config.get(); if (this.config.search.sessions.enabled) { - const { management: sessionsMgmtConfig } = this.config.search.sessions; - registerSearchSessionsMgmt(core, sessionsMgmtConfig, { management }); + const sessionsConfig = this.config.search.sessions; + registerSearchSessionsMgmt(core, sessionsConfig, { management }); } } diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/application/index.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/application/index.tsx index 27f1482a4d20d..7347f070e91c3 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/application/index.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/application/index.tsx @@ -10,7 +10,7 @@ import type { AppDependencies, IManagementSectionsPluginsSetup, IManagementSectionsPluginsStart, - SessionsMgmtConfigSchema, + SessionsConfigSchema, } from '../'; import { APP } from '../'; import { SearchSessionsMgmtAPI } from '../lib/api'; @@ -20,7 +20,7 @@ import { renderApp } from './render'; export class SearchSessionsMgmtApp { constructor( private coreSetup: CoreSetup, - private config: SessionsMgmtConfigSchema, + private config: SessionsConfigSchema, private params: ManagementAppMountParams, private pluginsSetup: IManagementSectionsPluginsSetup ) {} diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/extend_button.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/extend_button.tsx index 4c8a7b0217688..d9c2bdabcbac1 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/extend_button.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/extend_button.tsx @@ -8,6 +8,8 @@ import { EuiConfirmModal, EuiOverlayMask } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import React, { useState } from 'react'; +import { Duration } from 'moment'; +import moment from 'moment'; import { SearchSessionsMgmtAPI } from '../../lib/api'; import { TableText } from '../'; import { OnActionComplete } from './types'; @@ -15,6 +17,8 @@ import { OnActionComplete } from './types'; interface ExtendButtonProps { id: string; name: string; + expires: string | null; + extendBy: Duration; api: SearchSessionsMgmtAPI; onActionComplete: OnActionComplete; } @@ -23,8 +27,11 @@ const ExtendConfirm = ({ onConfirmDismiss, ...props }: ExtendButtonProps & { onConfirmDismiss: () => void }) => { - const { id, name, api, onActionComplete } = props; + const { id, name, expires, api, extendBy, onActionComplete } = props; const [isLoading, setIsLoading] = useState(false); + const extendByDuration = moment.duration(extendBy); + + const newExpiration = moment(expires).add(extendByDuration); const title = i18n.translate('xpack.data.mgmt.searchSessions.extendModal.title', { defaultMessage: 'Extend search session expiration', @@ -36,9 +43,10 @@ const ExtendConfirm = ({ defaultMessage: 'Cancel', }); const message = i18n.translate('xpack.data.mgmt.searchSessions.extendModal.extendMessage', { - defaultMessage: "When would you like the search session '{name}' to expire?", + defaultMessage: "The search session '{name}' expiration would be extended until {newExpires}.", values: { name, + newExpires: newExpiration.toLocaleString(), }, }); @@ -49,7 +57,7 @@ const ExtendConfirm = ({ onCancel={onConfirmDismiss} onConfirm={async () => { setIsLoading(true); - await api.sendExtend(id, '1'); + await api.sendExtend(id, `${extendByDuration.asMilliseconds()}ms`); onActionComplete(); }} confirmButtonText={confirm} diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/get_action.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/get_action.tsx index 5bf0fbda5b5cc..c80cf6c244895 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/get_action.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/get_action.tsx @@ -17,7 +17,7 @@ import { ACTION, OnActionComplete } from './types'; export const getAction = ( api: SearchSessionsMgmtAPI, actionType: string, - { id, name, reloadUrl }: UISession, + { id, name, expires, reloadUrl }: UISession, onActionComplete: OnActionComplete ): IClickActionDescriptor | null => { switch (actionType) { @@ -39,7 +39,16 @@ export const getAction = ( return { iconType: extendSessionIcon, textColor: 'default', - label: , + label: ( + + ), }; default: diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/main.test.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/main.test.tsx index e01d1a28c5e54..14aea4bcbf59b 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/main.test.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/main.test.tsx @@ -12,7 +12,7 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { coreMock } from 'src/core/public/mocks'; import { SessionsClient } from 'src/plugins/data/public/search'; -import { SessionsMgmtConfigSchema } from '..'; +import { SessionsConfigSchema } from '..'; import { SearchSessionsMgmtAPI } from '../lib/api'; import { AsyncSearchIntroDocumentation } from '../lib/documentation'; import { LocaleWrapper, mockUrls } from '../__mocks__'; @@ -20,7 +20,7 @@ import { SearchSessionsMgmtMain } from './main'; let mockCoreSetup: MockedKeys; let mockCoreStart: MockedKeys; -let mockConfig: SessionsMgmtConfigSchema; +let mockConfig: SessionsConfigSchema; let sessionsClient: SessionsClient; let api: SearchSessionsMgmtAPI; @@ -29,11 +29,14 @@ describe('Background Search Session Management Main', () => { mockCoreSetup = coreMock.createSetup(); mockCoreStart = coreMock.createStart(); mockConfig = { - expiresSoonWarning: moment.duration(1, 'days'), - maxSessions: 2000, - refreshInterval: moment.duration(1, 'seconds'), - refreshTimeout: moment.duration(10, 'minutes'), - }; + defaultExpiration: moment.duration('7d'), + management: { + expiresSoonWarning: moment.duration(1, 'days'), + maxSessions: 2000, + refreshInterval: moment.duration(1, 'seconds'), + refreshTimeout: moment.duration(10, 'minutes'), + }, + } as any; sessionsClient = new SessionsClient({ http: mockCoreSetup.http }); diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/main.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/main.tsx index 80c6a580dd183..cdf92d69f6438 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/main.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/main.tsx @@ -17,7 +17,7 @@ import { import { FormattedMessage } from '@kbn/i18n/react'; import type { CoreStart, HttpStart } from 'kibana/public'; import React from 'react'; -import type { SessionsMgmtConfigSchema } from '../'; +import type { SessionsConfigSchema } from '../'; import type { SearchSessionsMgmtAPI } from '../lib/api'; import type { AsyncSearchIntroDocumentation } from '../lib/documentation'; import { TableText } from './'; @@ -29,7 +29,7 @@ interface Props { api: SearchSessionsMgmtAPI; http: HttpStart; timezone: string; - config: SessionsMgmtConfigSchema; + config: SessionsConfigSchema; } export function SearchSessionsMgmtMain({ documentation, ...tableProps }: Props) { diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/table/table.test.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/table/table.test.tsx index 51cec8f2afeff..a99fc26889a24 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/table/table.test.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/table/table.test.tsx @@ -13,14 +13,14 @@ import React from 'react'; import { coreMock } from 'src/core/public/mocks'; import { SessionsClient } from 'src/plugins/data/public/search'; import { SearchSessionStatus } from '../../../../../common/search'; -import { SessionsMgmtConfigSchema } from '../../'; +import { SessionsConfigSchema } from '../../'; import { SearchSessionsMgmtAPI } from '../../lib/api'; import { LocaleWrapper, mockUrls } from '../../__mocks__'; import { SearchSessionsMgmtTable } from './table'; let mockCoreSetup: MockedKeys; let mockCoreStart: CoreStart; -let mockConfig: SessionsMgmtConfigSchema; +let mockConfig: SessionsConfigSchema; let sessionsClient: SessionsClient; let api: SearchSessionsMgmtAPI; @@ -29,11 +29,14 @@ describe('Background Search Session Management Table', () => { mockCoreSetup = coreMock.createSetup(); mockCoreStart = coreMock.createStart(); mockConfig = { - expiresSoonWarning: moment.duration(1, 'days'), - maxSessions: 2000, - refreshInterval: moment.duration(1, 'seconds'), - refreshTimeout: moment.duration(10, 'minutes'), - }; + defaultExpiration: moment.duration('7d'), + management: { + expiresSoonWarning: moment.duration(1, 'days'), + maxSessions: 2000, + refreshInterval: moment.duration(1, 'seconds'), + refreshTimeout: moment.duration(10, 'minutes'), + }, + } as any; sessionsClient = new SessionsClient({ http: mockCoreSetup.http }); api = new SearchSessionsMgmtAPI(sessionsClient, mockConfig, { @@ -134,7 +137,10 @@ describe('Background Search Session Management Table', () => { sessionsClient.find = jest.fn(); mockConfig = { ...mockConfig, - refreshInterval: moment.duration(10, 'seconds'), + management: { + ...mockConfig.management, + refreshInterval: moment.duration(10, 'seconds'), + }, }; await act(async () => { @@ -162,8 +168,11 @@ describe('Background Search Session Management Table', () => { mockConfig = { ...mockConfig, - refreshInterval: moment.duration(1, 'day'), - refreshTimeout: moment.duration(2, 'days'), + management: { + ...mockConfig.management, + refreshInterval: moment.duration(1, 'day'), + refreshTimeout: moment.duration(2, 'days'), + }, }; await act(async () => { diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/table/table.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/table/table.tsx index f7aecdbd58a23..290fa4d74dfeb 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/table/table.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/table/table.tsx @@ -12,7 +12,7 @@ import React, { useCallback, useMemo, useRef, useEffect, useState } from 'react' import useDebounce from 'react-use/lib/useDebounce'; import useInterval from 'react-use/lib/useInterval'; import { TableText } from '../'; -import { SessionsMgmtConfigSchema } from '../..'; +import { SessionsConfigSchema } from '../..'; import { SearchSessionsMgmtAPI } from '../../lib/api'; import { getColumns } from '../../lib/get_columns'; import { UISession } from '../../types'; @@ -26,7 +26,7 @@ interface Props { core: CoreStart; api: SearchSessionsMgmtAPI; timezone: string; - config: SessionsMgmtConfigSchema; + config: SessionsConfigSchema; } export function SearchSessionsMgmtTable({ core, api, timezone, config, ...props }: Props) { @@ -35,9 +35,10 @@ export function SearchSessionsMgmtTable({ core, api, timezone, config, ...props const [debouncedIsLoading, setDebouncedIsLoading] = useState(false); const [pagination, setPagination] = useState({ pageIndex: 0 }); const showLatestResultsHandler = useRef(); - const refreshInterval = useMemo(() => moment.duration(config.refreshInterval).asMilliseconds(), [ - config.refreshInterval, - ]); + const refreshInterval = useMemo( + () => moment.duration(config.management.refreshInterval).asMilliseconds(), + [config.management.refreshInterval] + ); // Debounce rendering the state of the Refresh button useDebounce( diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/index.ts b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/index.ts index 76a5d440cd898..695252462794b 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/index.ts +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/index.ts @@ -33,7 +33,7 @@ export interface AppDependencies { api: SearchSessionsMgmtAPI; http: HttpStart; i18n: I18nStart; - config: SessionsMgmtConfigSchema; + config: SessionsConfigSchema; } export const APP = { @@ -44,11 +44,11 @@ export const APP = { }), }; -export type SessionsMgmtConfigSchema = ConfigSchema['search']['sessions']['management']; +export type SessionsConfigSchema = ConfigSchema['search']['sessions']; export function registerSearchSessionsMgmt( coreSetup: CoreSetup, - config: SessionsMgmtConfigSchema, + config: SessionsConfigSchema, services: IManagementSectionsPluginsSetup ) { services.management.sections.section.kibana.registerApp({ diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.test.ts b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.test.ts index 5b337dfd03eb1..068225d0df8c3 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.test.ts +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.test.ts @@ -11,14 +11,14 @@ import { coreMock } from 'src/core/public/mocks'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { SavedObjectsFindResponse } from 'src/core/server'; import { SessionsClient } from 'src/plugins/data/public/search'; -import type { SessionsMgmtConfigSchema } from '../'; +import type { SessionsConfigSchema } from '../'; import { SearchSessionStatus } from '../../../../common/search'; import { mockUrls } from '../__mocks__'; import { SearchSessionsMgmtAPI } from './api'; let mockCoreSetup: MockedKeys; let mockCoreStart: MockedKeys; -let mockConfig: SessionsMgmtConfigSchema; +let mockConfig: SessionsConfigSchema; let sessionsClient: SessionsClient; describe('Search Sessions Management API', () => { @@ -26,11 +26,14 @@ describe('Search Sessions Management API', () => { mockCoreSetup = coreMock.createSetup(); mockCoreStart = coreMock.createStart(); mockConfig = { - expiresSoonWarning: moment.duration('1d'), - maxSessions: 2000, - refreshInterval: moment.duration('1s'), - refreshTimeout: moment.duration('10m'), - }; + defaultExpiration: moment.duration('7d'), + management: { + expiresSoonWarning: moment.duration(1, 'days'), + maxSessions: 2000, + refreshInterval: moment.duration(1, 'seconds'), + refreshTimeout: moment.duration(10, 'minutes'), + }, + } as any; sessionsClient = new SessionsClient({ http: mockCoreSetup.http }); }); @@ -93,8 +96,11 @@ describe('Search Sessions Management API', () => { test('handle timeout error', async () => { mockConfig = { ...mockConfig, - refreshInterval: moment.duration(1, 'hours'), - refreshTimeout: moment.duration(1, 'seconds'), + management: { + ...mockConfig.management, + refreshInterval: moment.duration(1, 'hours'), + refreshTimeout: moment.duration(1, 'seconds'), + }, }; sessionsClient.find = jest.fn().mockImplementation(async () => { diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.ts b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.ts index a2bd6b1a549be..c6a3d088b3cda 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.ts +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.ts @@ -10,7 +10,7 @@ import moment from 'moment'; import { from, race, timer } from 'rxjs'; import { mapTo, tap } from 'rxjs/operators'; import type { SharePluginStart } from 'src/plugins/share/public'; -import { SessionsMgmtConfigSchema } from '../'; +import { SessionsConfigSchema } from '../'; import type { ISessionsClient } from '../../../../../../../src/plugins/data/public'; import type { SearchSessionSavedObjectAttributes } from '../../../../common'; import { SearchSessionStatus } from '../../../../common/search'; @@ -47,10 +47,9 @@ async function getUrlFromState( } // Helper: factory for a function to map server objects to UI objects -const mapToUISession = ( - urls: UrlGeneratorsStart, - { expiresSoonWarning }: SessionsMgmtConfigSchema -) => async (savedObject: SavedObject): Promise => { +const mapToUISession = (urls: UrlGeneratorsStart, config: SessionsConfigSchema) => async ( + savedObject: SavedObject +): Promise => { const { name, appId, @@ -92,7 +91,7 @@ interface SearcgSessuibManagementDeps { export class SearchSessionsMgmtAPI { constructor( private sessionsClient: ISessionsClient, - private config: SessionsMgmtConfigSchema, + private config: SessionsConfigSchema, private deps: SearcgSessuibManagementDeps ) {} @@ -101,12 +100,14 @@ export class SearchSessionsMgmtAPI { saved_objects: object[]; } - const refreshTimeout = moment.duration(this.config.refreshTimeout); + const mgmtConfig = this.config.management; + + const refreshTimeout = moment.duration(mgmtConfig.refreshTimeout); const fetch$ = from( this.sessionsClient.find({ page: 1, - perPage: this.config.maxSessions, + perPage: mgmtConfig.maxSessions, sortField: 'created', sortOrder: 'asc', }) @@ -149,6 +150,10 @@ export class SearchSessionsMgmtAPI { this.deps.application.navigateToUrl(reloadUrl); } + public getExtendByDuration() { + return this.config.defaultExpiration; + } + // Cancel and expire public async sendCancel(id: string): Promise { try { diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/get_columns.test.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/get_columns.test.tsx index ce441efea7385..ec4f2f63ceed1 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/get_columns.test.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/get_columns.test.tsx @@ -12,7 +12,7 @@ import moment from 'moment'; import { ReactElement } from 'react'; import { coreMock } from 'src/core/public/mocks'; import { SessionsClient } from 'src/plugins/data/public/search'; -import { SessionsMgmtConfigSchema } from '../'; +import { SessionsConfigSchema } from '../'; import { SearchSessionStatus } from '../../../../common/search'; import { OnActionComplete } from '../components'; import { UISession } from '../types'; @@ -22,7 +22,7 @@ import { getColumns } from './get_columns'; let mockCoreSetup: MockedKeys; let mockCoreStart: CoreStart; -let mockConfig: SessionsMgmtConfigSchema; +let mockConfig: SessionsConfigSchema; let api: SearchSessionsMgmtAPI; let sessionsClient: SessionsClient; let handleAction: OnActionComplete; @@ -35,11 +35,14 @@ describe('Search Sessions Management table column factory', () => { mockCoreSetup = coreMock.createSetup(); mockCoreStart = coreMock.createStart(); mockConfig = { - expiresSoonWarning: moment.duration(1, 'days'), - maxSessions: 2000, - refreshInterval: moment.duration(1, 'seconds'), - refreshTimeout: moment.duration(10, 'minutes'), - }; + defaultExpiration: moment.duration('7d'), + management: { + expiresSoonWarning: moment.duration(1, 'days'), + maxSessions: 2000, + refreshInterval: moment.duration(1, 'seconds'), + refreshTimeout: moment.duration(10, 'minutes'), + }, + } as any; sessionsClient = new SessionsClient({ http: mockCoreSetup.http }); api = new SearchSessionsMgmtAPI(sessionsClient, mockConfig, { diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/get_columns.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/get_columns.tsx index 090336c37a98f..1ced354a28039 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/get_columns.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/get_columns.tsx @@ -20,7 +20,7 @@ import { capitalize } from 'lodash'; import React from 'react'; import { FormattedMessage } from 'react-intl'; import { RedirectAppLinks } from '../../../../../../../src/plugins/kibana_react/public'; -import { SessionsMgmtConfigSchema } from '../'; +import { SessionsConfigSchema } from '../'; import { SearchSessionStatus } from '../../../../common/search'; import { TableText } from '../components'; import { OnActionComplete, PopoverActionsMenu } from '../components'; @@ -45,7 +45,7 @@ function isSessionRestorable(status: SearchSessionStatus) { export const getColumns = ( core: CoreStart, api: SearchSessionsMgmtAPI, - config: SessionsMgmtConfigSchema, + config: SessionsConfigSchema, timezone: string, onActionComplete: OnActionComplete ): Array> => { diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/get_expiration_status.ts b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/get_expiration_status.ts index 3c167d6dbe41a..5a52fce760d78 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/get_expiration_status.ts +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/get_expiration_status.ts @@ -6,9 +6,9 @@ import { i18n } from '@kbn/i18n'; import moment from 'moment'; -import { SessionsMgmtConfigSchema } from '../'; +import { SessionsConfigSchema } from '../'; -export const getExpirationStatus = (config: SessionsMgmtConfigSchema, expires: string | null) => { +export const getExpirationStatus = (config: SessionsConfigSchema, expires: string | null) => { const tNow = moment.utc().valueOf(); const tFuture = moment.utc(expires).valueOf(); @@ -16,7 +16,7 @@ export const getExpirationStatus = (config: SessionsMgmtConfigSchema, expires: s // and the session was early expired when the browser refreshed the listing const durationToExpire = moment.duration(tFuture - tNow); const expiresInDays = Math.floor(durationToExpire.asDays()); - const sufficientDays = Math.ceil(moment.duration(config.expiresSoonWarning).asDays()); + const sufficientDays = Math.ceil(moment.duration(config.management.expiresSoonWarning).asDays()); let toolTipContent = i18n.translate('xpack.data.mgmt.searchSessions.status.expiresSoonInDays', { defaultMessage: 'Expires in {numDays} days', diff --git a/x-pack/plugins/data_enhanced/server/search/session/monitoring_task.ts b/x-pack/plugins/data_enhanced/server/search/session/monitoring_task.ts index d32dcf72a4205..332e69b119bb6 100644 --- a/x-pack/plugins/data_enhanced/server/search/session/monitoring_task.ts +++ b/x-pack/plugins/data_enhanced/server/search/session/monitoring_task.ts @@ -76,7 +76,7 @@ export async function scheduleSearchSessionsTasks( params: {}, }); - logger.debug(`Background search task, scheduled to run`); + logger.debug(`Search sessions task, scheduled to run`); } catch (e) { logger.debug(`Error scheduling task, received ${e.message}`); } diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/__mocks__/content_sources.mock.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/__mocks__/content_sources.mock.ts index 0e0d1fa864033..efae95f83034e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/__mocks__/content_sources.mock.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/__mocks__/content_sources.mock.ts @@ -323,3 +323,14 @@ export const mostRecentIndexJob = { activeReindexJobId: '123', numDocumentsWithErrors: 1, }; + +export const contentItems = [ + { + id: '1234', + last_updated: '2021-01-21', + }, + { + id: '1235', + last_updated: '2021-01-20', + }, +]; diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/__mocks__/meta.mock.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/__mocks__/meta.mock.ts index e596ea5d7e948..acfbad1400c66 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/__mocks__/meta.mock.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/__mocks__/meta.mock.ts @@ -6,10 +6,11 @@ import { DEFAULT_META } from '../../shared/constants'; -export const mockMeta = { +export const meta = { ...DEFAULT_META, page: { current: 1, + size: 5, total_results: 50, total_pages: 5, }, diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_content.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_content.test.tsx index c445a7aec04f6..a404ae508c130 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_content.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_content.test.tsx @@ -20,8 +20,8 @@ import { EuiLink, } from '@elastic/eui'; -import { mockMeta } from '../../../__mocks__/meta.mock'; -import { fullContentSources } from '../../../__mocks__/content_sources.mock'; +import { meta } from '../../../__mocks__/meta.mock'; +import { fullContentSources, contentItems } from '../../../__mocks__/content_sources.mock'; import { DEFAULT_META } from '../../../../shared/constants'; import { ComponentLoader } from '../../../components/shared/component_loader'; @@ -38,17 +38,8 @@ describe('SourceContent', () => { const mockValues = { contentSource: fullContentSources[0], - contentMeta: mockMeta, - contentItems: [ - { - id: '1234', - last_updated: '2021-01-21', - }, - { - id: '1235', - last_updated: '2021-01-20', - }, - ], + contentMeta: meta, + contentItems, contentFilterValue: '', dataLoading: false, sectionLoading: false, diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.test.ts new file mode 100644 index 0000000000000..a0efbfe4aca1d --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.test.ts @@ -0,0 +1,444 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { + LogicMounter, + mockFlashMessageHelpers, + mockHttpValues, + mockKibanaValues, + expectedAsyncError, +} from '../../../__mocks__'; + +import { AppLogic } from '../../app_logic'; +jest.mock('../../app_logic', () => ({ + AppLogic: { values: { isOrganization: true } }, +})); + +import { + fullContentSources, + sourceConfigData, + contentItems, +} from '../../__mocks__/content_sources.mock'; +import { meta } from '../../__mocks__/meta.mock'; + +import { DEFAULT_META } from '../../../shared/constants'; +import { NOT_FOUND_PATH } from '../../routes'; + +import { SourceLogic } from './source_logic'; + +describe('SourceLogic', () => { + const { http } = mockHttpValues; + const { + clearFlashMessages, + flashAPIErrors, + setSuccessMessage, + setQueuedSuccessMessage, + } = mockFlashMessageHelpers; + const { navigateToUrl } = mockKibanaValues; + const { mount, getListeners } = new LogicMounter(SourceLogic); + + const contentSource = fullContentSources[0]; + + const defaultValues = { + contentSource: {}, + contentItems: [], + sourceConfigData: {}, + dataLoading: true, + sectionLoading: true, + buttonLoading: false, + contentMeta: DEFAULT_META, + contentFilterValue: '', + }; + + const searchServerResponse = { + results: contentItems, + meta, + }; + + beforeEach(() => { + jest.clearAllMocks(); + mount(); + }); + + it('has expected default values', () => { + expect(SourceLogic.values).toEqual(defaultValues); + }); + + describe('actions', () => { + it('onInitializeSource', () => { + SourceLogic.actions.onInitializeSource(contentSource); + + expect(SourceLogic.values.contentSource).toEqual(contentSource); + expect(SourceLogic.values.dataLoading).toEqual(false); + }); + + it('onUpdateSourceName', () => { + const NAME = 'foo'; + SourceLogic.actions.onInitializeSource(contentSource); + SourceLogic.actions.onUpdateSourceName(NAME); + + expect(SourceLogic.values.contentSource).toEqual({ + ...contentSource, + name: NAME, + }); + expect(setSuccessMessage).toHaveBeenCalled(); + }); + + it('setSourceConfigData', () => { + SourceLogic.actions.setSourceConfigData(sourceConfigData); + + expect(SourceLogic.values.sourceConfigData).toEqual(sourceConfigData); + expect(SourceLogic.values.dataLoading).toEqual(false); + }); + + it('setSearchResults', () => { + SourceLogic.actions.setSearchResults(searchServerResponse); + + expect(SourceLogic.values.contentItems).toEqual(contentItems); + expect(SourceLogic.values.contentMeta).toEqual(meta); + expect(SourceLogic.values.sectionLoading).toEqual(false); + }); + + it('setContentFilterValue', () => { + const VALUE = 'bar'; + SourceLogic.actions.setSearchResults(searchServerResponse); + SourceLogic.actions.onInitializeSource(contentSource); + SourceLogic.actions.setContentFilterValue(VALUE); + + expect(SourceLogic.values.contentMeta).toEqual({ + ...meta, + page: { + ...meta.page, + current: DEFAULT_META.page.current, + }, + }); + expect(SourceLogic.values.contentFilterValue).toEqual(VALUE); + }); + + it('setActivePage', () => { + const PAGE = 2; + SourceLogic.actions.setSearchResults(searchServerResponse); + SourceLogic.actions.setActivePage(PAGE); + + expect(SourceLogic.values.contentMeta).toEqual({ + ...meta, + page: { + ...meta.page, + current: PAGE, + }, + }); + }); + + it('setButtonNotLoading', () => { + // Set button state to loading + SourceLogic.actions.removeContentSource(contentSource.id); + SourceLogic.actions.setButtonNotLoading(); + + expect(SourceLogic.values.buttonLoading).toEqual(false); + }); + }); + + describe('listeners', () => { + describe('initializeSource', () => { + it('calls API and sets values (org)', async () => { + const onInitializeSourceSpy = jest.spyOn(SourceLogic.actions, 'onInitializeSource'); + const promise = Promise.resolve(contentSource); + http.get.mockReturnValue(promise); + SourceLogic.actions.initializeSource(contentSource.id); + + expect(http.get).toHaveBeenCalledWith('/api/workplace_search/org/sources/123'); + await promise; + expect(onInitializeSourceSpy).toHaveBeenCalledWith(contentSource); + }); + + it('calls API and sets values (account)', async () => { + AppLogic.values.isOrganization = false; + + const onInitializeSourceSpy = jest.spyOn(SourceLogic.actions, 'onInitializeSource'); + const promise = Promise.resolve(contentSource); + http.get.mockReturnValue(promise); + SourceLogic.actions.initializeSource(contentSource.id); + + expect(http.get).toHaveBeenCalledWith('/api/workplace_search/account/sources/123'); + await promise; + expect(onInitializeSourceSpy).toHaveBeenCalledWith(contentSource); + }); + + it('handles federated source', async () => { + AppLogic.values.isOrganization = false; + + const initializeFederatedSummarySpy = jest.spyOn( + SourceLogic.actions, + 'initializeFederatedSummary' + ); + const promise = Promise.resolve({ + ...contentSource, + isFederatedSource: true, + }); + http.get.mockReturnValue(promise); + SourceLogic.actions.initializeSource(contentSource.id); + + expect(http.get).toHaveBeenCalledWith('/api/workplace_search/account/sources/123'); + await promise; + expect(initializeFederatedSummarySpy).toHaveBeenCalledWith(contentSource.id); + }); + + it('handles error', async () => { + const error = { + response: { + error: 'this is an error', + status: 400, + }, + }; + const promise = Promise.reject(error); + http.get.mockReturnValue(promise); + SourceLogic.actions.initializeSource(contentSource.id); + await expectedAsyncError(promise); + + expect(flashAPIErrors).toHaveBeenCalledWith(error); + }); + + it('handles not found state', async () => { + const error = { + response: { + error: 'this is an error', + status: 404, + }, + }; + const promise = Promise.reject(error); + http.get.mockReturnValue(promise); + SourceLogic.actions.initializeSource(contentSource.id); + await expectedAsyncError(promise); + + expect(navigateToUrl).toHaveBeenCalledWith(NOT_FOUND_PATH); + }); + }); + + describe('initializeFederatedSummary', () => { + it('calls API and sets values', async () => { + const onUpdateSummarySpy = jest.spyOn(SourceLogic.actions, 'onUpdateSummary'); + const promise = Promise.resolve(contentSource); + http.get.mockReturnValue(promise); + SourceLogic.actions.initializeFederatedSummary(contentSource.id); + + expect(http.get).toHaveBeenCalledWith( + '/api/workplace_search/org/sources/123/federated_summary' + ); + await promise; + expect(onUpdateSummarySpy).toHaveBeenCalledWith(contentSource.summary); + }); + + it('handles error', async () => { + const error = { + response: { + error: 'this is an error', + status: 400, + }, + }; + const promise = Promise.reject(error); + http.get.mockReturnValue(promise); + SourceLogic.actions.initializeFederatedSummary(contentSource.id); + await expectedAsyncError(promise); + + expect(flashAPIErrors).toHaveBeenCalledWith(error); + }); + }); + + describe('searchContentSourceDocuments', () => { + const mockBreakpoint = jest.fn(); + const values = { contentMeta: meta, contentFilterValue: '' }; + const actions = { setSearchResults: jest.fn() }; + const { searchContentSourceDocuments } = getListeners({ + values, + actions, + }); + + it('calls API and sets values (org)', async () => { + AppLogic.values.isOrganization = true; + const promise = Promise.resolve(searchServerResponse); + http.post.mockReturnValue(promise); + + await searchContentSourceDocuments({ sourceId: contentSource.id }, mockBreakpoint); + expect(http.post).toHaveBeenCalledWith('/api/workplace_search/org/sources/123/documents', { + body: JSON.stringify({ query: '', page: meta.page }), + }); + + await promise; + expect(actions.setSearchResults).toHaveBeenCalledWith(searchServerResponse); + }); + + it('calls API and sets values (account)', async () => { + AppLogic.values.isOrganization = false; + const promise = Promise.resolve(searchServerResponse); + http.post.mockReturnValue(promise); + + SourceLogic.actions.searchContentSourceDocuments(contentSource.id); + await searchContentSourceDocuments({ sourceId: contentSource.id }, mockBreakpoint); + expect(http.post).toHaveBeenCalledWith( + '/api/workplace_search/account/sources/123/documents', + { + body: JSON.stringify({ query: '', page: meta.page }), + } + ); + + await promise; + expect(actions.setSearchResults).toHaveBeenCalledWith(searchServerResponse); + }); + + it('handles error', async () => { + const error = { + response: { + error: 'this is an error', + status: 400, + }, + }; + const promise = Promise.reject(error); + http.post.mockReturnValue(promise); + + await searchContentSourceDocuments({ sourceId: contentSource.id }, mockBreakpoint); + await expectedAsyncError(promise); + + expect(flashAPIErrors).toHaveBeenCalledWith(error); + }); + }); + + describe('updateContentSource', () => { + it('calls API and sets values (org)', async () => { + AppLogic.values.isOrganization = true; + + const onUpdateSourceNameSpy = jest.spyOn(SourceLogic.actions, 'onUpdateSourceName'); + const promise = Promise.resolve(contentSource); + http.patch.mockReturnValue(promise); + SourceLogic.actions.updateContentSource(contentSource.id, contentSource); + + expect(http.patch).toHaveBeenCalledWith('/api/workplace_search/org/sources/123/settings', { + body: JSON.stringify({ content_source: contentSource }), + }); + await promise; + expect(onUpdateSourceNameSpy).toHaveBeenCalledWith(contentSource.name); + }); + + it('calls API and sets values (account)', async () => { + AppLogic.values.isOrganization = false; + + const onUpdateSourceNameSpy = jest.spyOn(SourceLogic.actions, 'onUpdateSourceName'); + const promise = Promise.resolve(contentSource); + http.patch.mockReturnValue(promise); + SourceLogic.actions.updateContentSource(contentSource.id, contentSource); + + expect(http.patch).toHaveBeenCalledWith( + '/api/workplace_search/account/sources/123/settings', + { + body: JSON.stringify({ content_source: contentSource }), + } + ); + await promise; + expect(onUpdateSourceNameSpy).toHaveBeenCalledWith(contentSource.name); + }); + + it('handles error', async () => { + const error = { + response: { + error: 'this is an error', + status: 400, + }, + }; + const promise = Promise.reject(error); + http.patch.mockReturnValue(promise); + SourceLogic.actions.updateContentSource(contentSource.id, contentSource); + await expectedAsyncError(promise); + + expect(flashAPIErrors).toHaveBeenCalledWith(error); + }); + }); + + describe('removeContentSource', () => { + it('calls API and sets values (org)', async () => { + AppLogic.values.isOrganization = true; + + const setButtonNotLoadingSpy = jest.spyOn(SourceLogic.actions, 'setButtonNotLoading'); + const promise = Promise.resolve(contentSource); + http.delete.mockReturnValue(promise); + SourceLogic.actions.removeContentSource(contentSource.id); + + expect(clearFlashMessages).toHaveBeenCalled(); + expect(http.delete).toHaveBeenCalledWith('/api/workplace_search/org/sources/123'); + await promise; + expect(setQueuedSuccessMessage).toHaveBeenCalled(); + expect(setButtonNotLoadingSpy).toHaveBeenCalled(); + }); + + it('calls API and sets values (account)', async () => { + AppLogic.values.isOrganization = false; + + const setButtonNotLoadingSpy = jest.spyOn(SourceLogic.actions, 'setButtonNotLoading'); + const promise = Promise.resolve(contentSource); + http.delete.mockReturnValue(promise); + SourceLogic.actions.removeContentSource(contentSource.id); + + expect(clearFlashMessages).toHaveBeenCalled(); + expect(http.delete).toHaveBeenCalledWith('/api/workplace_search/account/sources/123'); + await promise; + expect(setButtonNotLoadingSpy).toHaveBeenCalled(); + }); + + it('handles error', async () => { + const error = { + response: { + error: 'this is an error', + status: 400, + }, + }; + const promise = Promise.reject(error); + http.delete.mockReturnValue(promise); + SourceLogic.actions.removeContentSource(contentSource.id); + await expectedAsyncError(promise); + + expect(flashAPIErrors).toHaveBeenCalledWith(error); + }); + }); + + describe('getSourceConfigData', () => { + const serviceType = 'github'; + + it('calls API and sets values', async () => { + AppLogic.values.isOrganization = true; + + const setSourceConfigDataSpy = jest.spyOn(SourceLogic.actions, 'setSourceConfigData'); + const promise = Promise.resolve(contentSource); + http.get.mockReturnValue(promise); + SourceLogic.actions.getSourceConfigData(serviceType); + + expect(http.get).toHaveBeenCalledWith( + `/api/workplace_search/org/settings/connectors/${serviceType}` + ); + await promise; + expect(setSourceConfigDataSpy).toHaveBeenCalled(); + }); + + it('handles error', async () => { + const error = { + response: { + error: 'this is an error', + status: 400, + }, + }; + const promise = Promise.reject(error); + http.get.mockReturnValue(promise); + SourceLogic.actions.getSourceConfigData(serviceType); + await expectedAsyncError(promise); + + expect(flashAPIErrors).toHaveBeenCalledWith(error); + }); + }); + + it('resetSourceState', () => { + SourceLogic.actions.resetSourceState(); + + expect(clearFlashMessages).toHaveBeenCalled(); + }); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.ts index 2de70009c56a2..ba5c29c190f95 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.ts @@ -126,29 +126,22 @@ export const SourceLogic = kea>({ onInitializeSource: () => false, setSourceConfigData: () => false, resetSourceState: () => false, - setPreContentSourceConfigData: () => false, }, ], buttonLoading: [ false, { setButtonNotLoading: () => false, - setSourceConnectData: () => false, setSourceConfigData: () => false, resetSourceState: () => false, removeContentSource: () => true, - saveSourceConfig: () => true, - getSourceConnectData: () => true, - createContentSource: () => true, }, ], sectionLoading: [ true, { searchContentSourceDocuments: () => true, - getPreContentSourceConfigData: () => true, setSearchResults: () => false, - setPreContentSourceConfigData: () => false, }, ], contentItems: [ diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources_logic.test.ts new file mode 100644 index 0000000000000..11e3a52081637 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources_logic.test.ts @@ -0,0 +1,319 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { + LogicMounter, + mockFlashMessageHelpers, + mockHttpValues, + expectedAsyncError, +} from '../../../__mocks__'; + +import { AppLogic } from '../../app_logic'; +jest.mock('../../app_logic', () => ({ + AppLogic: { values: { isOrganization: true } }, +})); + +import { configuredSources, contentSources } from '../../__mocks__/content_sources.mock'; + +import { SourcesLogic, fetchSourceStatuses, POLLING_INTERVAL } from './sources_logic'; + +describe('SourcesLogic', () => { + const { http } = mockHttpValues; + const { flashAPIErrors, setQueuedSuccessMessage } = mockFlashMessageHelpers; + const { mount, unmount } = new LogicMounter(SourcesLogic); + + const contentSource = contentSources[0]; + + const defaultValues = { + contentSources: [], + privateContentSources: [], + sourceData: [], + availableSources: [], + configuredSources: [], + serviceTypes: [], + permissionsModal: null, + dataLoading: true, + serverStatuses: null, + }; + + const serverStatuses = [ + { + id: '123', + name: 'my source', + service_type: 'github', + status: { + status: 'this is a thing', + synced_at: '2021-01-25', + error_reason: 1, + }, + }, + ]; + + const serverResponse = { + contentSources, + privateContentSources: contentSources, + serviceTypes: configuredSources, + }; + + beforeEach(() => { + jest.useFakeTimers(); + jest.clearAllMocks(); + mount(); + }); + + it('has expected default values', () => { + expect(SourcesLogic.values).toEqual(defaultValues); + }); + + it('handles unmounting', async () => { + unmount(); + expect(clearInterval).toHaveBeenCalled(); + }); + + describe('actions', () => { + describe('onInitializeSources', () => { + it('sets values', () => { + SourcesLogic.actions.onInitializeSources(serverResponse); + + expect(SourcesLogic.values.contentSources).toEqual(contentSources); + expect(SourcesLogic.values.privateContentSources).toEqual(contentSources); + expect(SourcesLogic.values.serviceTypes).toEqual(configuredSources); + expect(SourcesLogic.values.dataLoading).toEqual(false); + }); + + it('fallbacks', () => { + SourcesLogic.actions.onInitializeSources({ + contentSources, + serviceTypes: undefined as any, + }); + + expect(SourcesLogic.values.serviceTypes).toEqual([]); + expect(SourcesLogic.values.privateContentSources).toEqual([]); + }); + }); + + it('setServerSourceStatuses', () => { + SourcesLogic.actions.setServerSourceStatuses(serverStatuses); + const source = serverStatuses[0]; + + expect(SourcesLogic.values.serverStatuses).toEqual({ + [source.id]: source.status.status, + }); + }); + + it('onSetSearchability', () => { + const id = contentSources[0].id; + const updatedSources = [...contentSources]; + updatedSources[0].searchable = false; + SourcesLogic.actions.onInitializeSources(serverResponse); + SourcesLogic.actions.onSetSearchability(id, false); + + expect(SourcesLogic.values.contentSources).toEqual(updatedSources); + expect(SourcesLogic.values.privateContentSources).toEqual(updatedSources); + }); + + describe('setAddedSource', () => { + it('configured', () => { + const name = contentSources[0].name; + SourcesLogic.actions.setAddedSource(name, false, 'custom'); + + expect(SourcesLogic.values.permissionsModal).toEqual({ + addedSourceName: name, + additionalConfiguration: false, + serviceType: 'custom', + }); + expect(setQueuedSuccessMessage).toHaveBeenCalledWith('Successfully connected source. '); + }); + + it('unconfigured', () => { + const name = contentSources[0].name; + SourcesLogic.actions.setAddedSource(name, true, 'custom'); + + expect(SourcesLogic.values.permissionsModal).toEqual({ + addedSourceName: name, + additionalConfiguration: true, + serviceType: 'custom', + }); + expect(setQueuedSuccessMessage).toHaveBeenCalledWith( + 'Successfully connected source. This source requires additional configuration.' + ); + }); + }); + + it('resetPermissionsModal', () => { + SourcesLogic.actions.resetPermissionsModal(); + + expect(SourcesLogic.values.permissionsModal).toEqual(null); + }); + }); + + describe('listeners', () => { + describe('initializeSources', () => { + it('calls API and sets values (org)', async () => { + AppLogic.values.isOrganization = true; + const pollForSourceStatusChangesSpy = jest.spyOn( + SourcesLogic.actions, + 'pollForSourceStatusChanges' + ); + const onInitializeSourcesSpy = jest.spyOn(SourcesLogic.actions, 'onInitializeSources'); + const promise = Promise.resolve(contentSources); + http.get.mockReturnValue(promise); + SourcesLogic.actions.initializeSources(); + + expect(http.get).toHaveBeenCalledWith('/api/workplace_search/org/sources'); + await promise; + expect(pollForSourceStatusChangesSpy).toHaveBeenCalled(); + expect(onInitializeSourcesSpy).toHaveBeenCalledWith(contentSources); + }); + + it('calls API (account)', async () => { + AppLogic.values.isOrganization = false; + const promise = Promise.resolve(contentSource); + http.get.mockReturnValue(promise); + SourcesLogic.actions.initializeSources(); + + expect(http.get).toHaveBeenCalledWith('/api/workplace_search/account/sources'); + }); + + it('handles error', async () => { + const error = { + response: { + error: 'this is an error', + status: 400, + }, + }; + const promise = Promise.reject(error); + http.get.mockReturnValue(promise); + SourcesLogic.actions.initializeSources(); + await expectedAsyncError(promise); + + expect(flashAPIErrors).toHaveBeenCalledWith(error); + }); + }); + + describe('setSourceSearchability', () => { + const id = contentSources[0].id; + + it('calls API and sets values (org)', async () => { + AppLogic.values.isOrganization = true; + const onSetSearchability = jest.spyOn(SourcesLogic.actions, 'onSetSearchability'); + const promise = Promise.resolve(contentSources); + http.put.mockReturnValue(promise); + SourcesLogic.actions.setSourceSearchability(id, true); + + expect(http.put).toHaveBeenCalledWith('/api/workplace_search/org/sources/123/searchable', { + body: JSON.stringify({ searchable: true }), + }); + await promise; + expect(onSetSearchability).toHaveBeenCalledWith(id, true); + }); + + it('calls API (account)', async () => { + AppLogic.values.isOrganization = false; + const promise = Promise.resolve(contentSource); + http.put.mockReturnValue(promise); + SourcesLogic.actions.setSourceSearchability(id, true); + + expect(http.put).toHaveBeenCalledWith( + '/api/workplace_search/account/sources/123/searchable', + { + body: JSON.stringify({ searchable: true }), + } + ); + }); + + it('handles error', async () => { + const error = { + response: { + error: 'this is an error', + status: 400, + }, + }; + const promise = Promise.reject(error); + http.put.mockReturnValue(promise); + SourcesLogic.actions.setSourceSearchability(id, true); + await expectedAsyncError(promise); + + expect(flashAPIErrors).toHaveBeenCalledWith(error); + }); + }); + + describe('pollForSourceStatusChanges', () => { + it('calls API and sets values', async () => { + AppLogic.values.isOrganization = true; + SourcesLogic.actions.setServerSourceStatuses(serverStatuses); + + const setServerSourceStatusesSpy = jest.spyOn( + SourcesLogic.actions, + 'setServerSourceStatuses' + ); + const promise = Promise.resolve(contentSources); + http.get.mockReturnValue(promise); + SourcesLogic.actions.pollForSourceStatusChanges(); + + jest.advanceTimersByTime(POLLING_INTERVAL); + + expect(http.get).toHaveBeenCalledWith('/api/workplace_search/org/sources/status'); + await promise; + expect(setServerSourceStatusesSpy).toHaveBeenCalledWith(contentSources); + }); + }); + + it('resetSourcesState', () => { + SourcesLogic.actions.resetSourcesState(); + + expect(clearInterval).toHaveBeenCalled(); + }); + }); + + describe('selectors', () => { + it('availableSources & configuredSources have correct length', () => { + SourcesLogic.actions.onInitializeSources(serverResponse); + + expect(SourcesLogic.values.availableSources).toHaveLength(1); + expect(SourcesLogic.values.configuredSources).toHaveLength(5); + }); + }); + + describe('fetchSourceStatuses', () => { + it('calls API and sets values (org)', async () => { + const setServerSourceStatusesSpy = jest.spyOn( + SourcesLogic.actions, + 'setServerSourceStatuses' + ); + const promise = Promise.resolve(contentSources); + http.get.mockReturnValue(promise); + fetchSourceStatuses(true); + + expect(http.get).toHaveBeenCalledWith('/api/workplace_search/org/sources/status'); + await promise; + expect(setServerSourceStatusesSpy).toHaveBeenCalledWith(contentSources); + }); + + it('calls API (account)', async () => { + const promise = Promise.resolve(contentSource); + http.get.mockReturnValue(promise); + fetchSourceStatuses(false); + + expect(http.get).toHaveBeenCalledWith('/api/workplace_search/account/sources/status'); + }); + + it('handles error', async () => { + const error = { + response: { + error: 'this is an error', + status: 400, + }, + }; + const promise = Promise.reject(error); + http.get.mockReturnValue(promise); + fetchSourceStatuses(true); + await expectedAsyncError(promise); + + expect(flashAPIErrors).toHaveBeenCalledWith(error); + }); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources_logic.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources_logic.ts index 0a3d047796f49..57e1a97e7bdf6 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/sources_logic.ts @@ -12,11 +12,7 @@ import { i18n } from '@kbn/i18n'; import { HttpLogic } from '../../../shared/http'; -import { - flashAPIErrors, - setQueuedSuccessMessage, - clearFlashMessages, -} from '../../../shared/flash_messages'; +import { flashAPIErrors, setQueuedSuccessMessage } from '../../../shared/flash_messages'; import { Connector, ContentSourceDetails, ContentSourceStatus, SourceDataItem } from '../../types'; @@ -40,7 +36,6 @@ export interface ISourcesActions { additionalConfiguration: boolean, serviceType: string ): { addedSourceName: string; additionalConfiguration: boolean; serviceType: string }; - resetFlashMessages(): void; resetPermissionsModal(): void; resetSourcesState(): void; initializeSources(): void; @@ -78,7 +73,7 @@ interface ISourcesServerResponse { } let pollingInterval: number; -const POLLING_INTERVAL = 10000; +export const POLLING_INTERVAL = 10000; export const SourcesLogic = kea>({ path: ['enterprise_search', 'workplace_search', 'sources_logic'], @@ -91,7 +86,6 @@ export const SourcesLogic = kea>( additionalConfiguration: boolean, serviceType: string ) => ({ addedSourceName, additionalConfiguration, serviceType }), - resetFlashMessages: () => true, resetPermissionsModal: () => true, resetSourcesState: () => true, initializeSources: () => true, @@ -238,9 +232,6 @@ export const SourcesLogic = kea>( ].join(' ') ); }, - resetFlashMessages: () => { - clearFlashMessages(); - }, resetSourcesState: () => { clearInterval(pollingInterval); }, @@ -252,7 +243,7 @@ export const SourcesLogic = kea>( }), }); -const fetchSourceStatuses = async (isOrganization: boolean) => { +export const fetchSourceStatuses = async (isOrganization: boolean) => { const route = isOrganization ? '/api/workplace_search/org/sources/status' : '/api/workplace_search/account/sources/status'; @@ -273,7 +264,6 @@ const updateSourcesOnToggle = ( sourceId: string, searchable: boolean ): ContentSourceDetails[] => { - if (!contentSources) return []; const sources = cloneDeep(contentSources) as ContentSourceDetails[]; const index = findIndex(sources, ({ id }) => id === sourceId); const updatedSource = sources[index]; diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/groups.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/groups.test.tsx index 7c746f75ffc94..30f345d8e017e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/groups.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/groups.test.tsx @@ -7,7 +7,7 @@ import '../../../__mocks__/shallow_useeffect.mock'; import { setMockActions, setMockValues } from '../../../__mocks__'; import { groups } from '../../__mocks__/groups.mock'; -import { mockMeta } from '../../__mocks__/meta.mock'; +import { meta } from '../../__mocks__/meta.mock'; import React from 'react'; import { shallow } from 'enzyme'; @@ -46,7 +46,7 @@ const mockValues = { newGroup: null, groupListLoading: false, hasFiltersSet: false, - groupsMeta: mockMeta, + groupsMeta: meta, filteredSources: [], filteredUsers: [], filterValue: '', diff --git a/x-pack/plugins/global_search_bar/public/components/__snapshots__/search_bar.test.tsx.snap b/x-pack/plugins/global_search_bar/public/components/__snapshots__/search_bar.test.tsx.snap index f5e7a030d59e3..8433d98c232d6 100644 --- a/x-pack/plugins/global_search_bar/public/components/__snapshots__/search_bar.test.tsx.snap +++ b/x-pack/plugins/global_search_bar/public/components/__snapshots__/search_bar.test.tsx.snap @@ -33,7 +33,7 @@ exports[`SearchBar supports keyboard shortcuts 1`] = ` ; + usageCollection: UsageCollectionSetup; +}) { + const { http, notifications } = coreSetup; + + httpService.setup(http); + notificationService.setup(notifications); + + const uiMetricService = new UiMetricService(UIM_APP_NAME); + + setUiMetricService(uiMetricService); + + uiMetricService.setup(usageCollection); + + return { uiMetricService }; } export async function mountManagementSection( coreSetup: CoreSetup, usageCollection: UsageCollectionSetup, - services: InternalServices, params: ManagementAppMountParams, + extensionsService: ExtensionsService, fleet?: FleetSetup ) { const { element, setBreadcrumbs, history } = params; @@ -50,6 +68,11 @@ export async function mountManagementSection( breadcrumbService.setup(setBreadcrumbs); documentationService.setup(docLinks); + const { uiMetricService } = initSetup({ + usageCollection, + coreSetup, + }); + const appDependencies: AppDependencies = { core: { fatalErrors, @@ -59,7 +82,7 @@ export async function mountManagementSection( usageCollection, fleet, }, - services, + services: { httpService, notificationService, uiMetricService, extensionsService }, history, setBreadcrumbs, uiSettings, diff --git a/x-pack/plugins/index_management/public/application/store/selectors/extension_service.ts b/x-pack/plugins/index_management/public/application/store/selectors/extension_service.ts new file mode 100644 index 0000000000000..c5ce1c359b99b --- /dev/null +++ b/x-pack/plugins/index_management/public/application/store/selectors/extension_service.ts @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { ExtensionsService } from '../../../services'; + +// Temporary hack to provide the extensionsService instance to this file. +// TODO: Refactor and export all the app selectors through the app dependencies context + +let extensionsService; +export const setExtensionsService = (_extensionsService: ExtensionsService) => { + extensionsService = _extensionsService; +}; + +export { extensionsService }; + +// End hack diff --git a/x-pack/plugins/index_management/public/application/store/selectors/index.js b/x-pack/plugins/index_management/public/application/store/selectors/index.js index c80658581dbee..800cf1473d1a7 100644 --- a/x-pack/plugins/index_management/public/application/store/selectors/index.js +++ b/x-pack/plugins/index_management/public/application/store/selectors/index.js @@ -9,15 +9,9 @@ import { createSelector } from 'reselect'; import * as qs from 'query-string'; import { indexStatusLabels } from '../../lib/index_status_labels'; import { sortTable } from '../../services'; +import { extensionsService } from './extension_service'; -// Temporary hack to provide the extensionsService instance to this file. -// TODO: Refactor and export all the app selectors through the app dependencies context - -let extensionsService; -export const setExtensionsService = (_extensionsService) => { - extensionsService = _extensionsService; -}; -// End hack +export { extensionsService }; export const getDetailPanelData = (state) => state.detailPanel.data; export const getDetailPanelError = (state) => state.detailPanel.error; diff --git a/x-pack/plugins/index_management/public/application/store/selectors/indices_filter.test.ts b/x-pack/plugins/index_management/public/application/store/selectors/indices_filter.test.ts index f230ddd18e9eb..ca63f305b8c60 100644 --- a/x-pack/plugins/index_management/public/application/store/selectors/indices_filter.test.ts +++ b/x-pack/plugins/index_management/public/application/store/selectors/indices_filter.test.ts @@ -4,9 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ import { ExtensionsService } from '../../../services'; -import { getFilteredIndices, setExtensionsService } from '.'; +import { getFilteredIndices } from '.'; // @ts-ignore import { defaultTableState } from '../reducers/table_state'; +import { setExtensionsService } from './extension_service'; describe('getFilteredIndices selector', () => { let extensionService: ExtensionsService; diff --git a/x-pack/plugins/index_management/public/index.ts b/x-pack/plugins/index_management/public/index.ts index da6d90f22a384..d40d16ad4f74a 100644 --- a/x-pack/plugins/index_management/public/index.ts +++ b/x-pack/plugins/index_management/public/index.ts @@ -15,4 +15,4 @@ export { IndexManagementPluginSetup } from './types'; export { getIndexListUri } from './application/services/routing'; -export { Index } from '../common'; +export type { Index } from '../common'; diff --git a/x-pack/plugins/index_management/public/plugin.ts b/x-pack/plugins/index_management/public/plugin.ts index 9eeeaa9d3c723..35413bd4f9ca1 100644 --- a/x-pack/plugins/index_management/public/plugin.ts +++ b/x-pack/plugins/index_management/public/plugin.ts @@ -6,54 +6,43 @@ import { i18n } from '@kbn/i18n'; import { CoreSetup } from '../../../../src/core/public'; +import { setExtensionsService } from './application/store/selectors/extension_service'; -import { UIM_APP_NAME, PLUGIN } from '../common/constants'; - -import { httpService } from './application/services/http'; -import { notificationService } from './application/services/notification'; -import { UiMetricService } from './application/services/ui_metric'; - -import { setExtensionsService } from './application/store/selectors'; -import { setUiMetricService } from './application/services/api'; +import { ExtensionsService } from './services'; import { IndexManagementPluginSetup, SetupDependencies, StartDependencies } from './types'; -import { ExtensionsService } from './services'; + +// avoid import from index files in plugin.ts, use specific import paths +import { PLUGIN } from '../common/constants/plugin'; export class IndexMgmtUIPlugin { - private uiMetricService = new UiMetricService(UIM_APP_NAME); private extensionsService = new ExtensionsService(); constructor() { // Temporary hack to provide the service instances in module files in order to avoid a big refactor // For the selectors we should expose them through app dependencies and read them from there on each container component. setExtensionsService(this.extensionsService); - setUiMetricService(this.uiMetricService); } public setup( coreSetup: CoreSetup, plugins: SetupDependencies ): IndexManagementPluginSetup { - const { http, notifications } = coreSetup; const { fleet, usageCollection, management } = plugins; - httpService.setup(http); - notificationService.setup(notifications); - this.uiMetricService.setup(usageCollection); - management.sections.section.data.registerApp({ id: PLUGIN.id, title: i18n.translate('xpack.idxMgmt.appTitle', { defaultMessage: 'Index Management' }), order: 0, mount: async (params) => { const { mountManagementSection } = await import('./application/mount_management_section'); - const services = { - httpService, - notificationService, - uiMetricService: this.uiMetricService, - extensionsService: this.extensionsService, - }; - return mountManagementSection(coreSetup, usageCollection, services, params, fleet); + return mountManagementSection( + coreSetup, + usageCollection, + params, + this.extensionsService, + fleet + ); }, }); diff --git a/x-pack/plugins/index_management/server/plugin.ts b/x-pack/plugins/index_management/server/plugin.ts index 3717e7e94d29f..aaa11bc2d47cc 100644 --- a/x-pack/plugins/index_management/server/plugin.ts +++ b/x-pack/plugins/index_management/server/plugin.ts @@ -13,7 +13,7 @@ import { ILegacyCustomClusterClient, } from 'src/core/server'; -import { PLUGIN } from '../common'; +import { PLUGIN } from '../common/constants/plugin'; import { Dependencies } from './types'; import { ApiRoutes } from './routes'; import { License, IndexDataEnricher } from './services'; diff --git a/x-pack/plugins/lens/kibana.json b/x-pack/plugins/lens/kibana.json index 4ecc7f0128591..dc0a92ac702d0 100644 --- a/x-pack/plugins/lens/kibana.json +++ b/x-pack/plugins/lens/kibana.json @@ -12,7 +12,6 @@ "urlForwarding", "visualizations", "dashboard", - "charts", "uiActions", "embeddable", "share" diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx index 63f6f77dd10cc..4031cae548a10 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx @@ -504,8 +504,9 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({ onChange={(e) => { setLocalState({ ...localState, nameFilter: e.target.value }); }} - aria-label={i18n.translate('xpack.lens.indexPatterns.filterByNameAriaLabel', { - defaultMessage: 'Search fields', + aria-label={i18n.translate('xpack.lens.indexPatterns.filterByNameLabel', { + defaultMessage: 'Search field names', + description: 'Search the list of fields in the index pattern for the provided text', })} aria-describedby={fieldSearchDescriptionId} /> diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/suffix_formatter.ts b/x-pack/plugins/lens/public/indexpattern_datasource/suffix_formatter.ts index 3d9f3be01a11b..26541c9f890b9 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/suffix_formatter.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/suffix_formatter.ts @@ -5,7 +5,11 @@ */ import { i18n } from '@kbn/i18n'; -import { FieldFormat, KBN_FIELD_TYPES } from '../../../../../src/plugins/data/public'; +import { + FieldFormat, + FieldFormatInstanceType, + KBN_FIELD_TYPES, +} from '../../../../../src/plugins/data/public'; import { FormatFactory } from '../types'; import { TimeScaleUnit } from './time_scale'; @@ -23,7 +27,7 @@ export const unitSuffixesLong: Record = { d: i18n.translate('xpack.lens.fieldFormats.longSuffix.d', { defaultMessage: 'per day' }), }; -export function getSuffixFormatter(formatFactory: FormatFactory) { +export function getSuffixFormatter(formatFactory: FormatFactory): FieldFormatInstanceType { return class SuffixFormatter extends FieldFormat { static id = 'suffix'; static title = i18n.translate('xpack.lens.fieldFormats.suffix.title', { diff --git a/x-pack/plugins/lens/tsconfig.json b/x-pack/plugins/lens/tsconfig.json new file mode 100644 index 0000000000000..7ac5a2980d0ba --- /dev/null +++ b/x-pack/plugins/lens/tsconfig.json @@ -0,0 +1,41 @@ + +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "*.ts", + "common/**/*", + "public/**/*", + "server/**/*", + "../../typings/**/*" + ], + "references": [ + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../task_manager/tsconfig.json" }, + { "path": "../global_search/tsconfig.json"}, + { "path": "../saved_objects_tagging/tsconfig.json"}, + { "path": "../../../src/plugins/data/tsconfig.json"}, + { "path": "../../../src/plugins/charts/tsconfig.json"}, + { "path": "../../../src/plugins/expressions/tsconfig.json"}, + { "path": "../../../src/plugins/navigation/tsconfig.json" }, + { "path": "../../../src/plugins/url_forwarding/tsconfig.json" }, + { "path": "../../../src/plugins/visualizations/tsconfig.json" }, + { "path": "../../../src/plugins/dashboard/tsconfig.json" }, + { "path": "../../../src/plugins/ui_actions/tsconfig.json" }, + { "path": "../../../src/plugins/embeddable/tsconfig.json" }, + { "path": "../../../src/plugins/share/tsconfig.json" }, + { "path": "../../../src/plugins/usage_collection/tsconfig.json" }, + { "path": "../../../src/plugins/saved_objects/tsconfig.json"}, + { "path": "../../../src/plugins/kibana_utils/tsconfig.json" }, + { "path": "../../../src/plugins/kibana_react/tsconfig.json" }, + { "path": "../../../src/plugins/embeddable/tsconfig.json"}, + { "path": "../../../src/plugins/lens_oss/tsconfig.json"}, + { "path": "../../../src/plugins/presentation_util/tsconfig.json"}, + ] + } \ No newline at end of file diff --git a/x-pack/plugins/maps/common/descriptor_types/source_descriptor_types.ts b/x-pack/plugins/maps/common/descriptor_types/source_descriptor_types.ts index 603e1d767e1c6..b849b42429cf6 100644 --- a/x-pack/plugins/maps/common/descriptor_types/source_descriptor_types.ts +++ b/x-pack/plugins/maps/common/descriptor_types/source_descriptor_types.ts @@ -156,7 +156,13 @@ export type TiledSingleLayerVectorSourceDescriptor = AbstractSourceDescriptor & tooltipProperties: string[]; }; +export type GeoJsonFileFieldDescriptor = { + name: string; + type: 'string' | 'number'; +}; + export type GeojsonFileSourceDescriptor = { + __fields?: GeoJsonFileFieldDescriptor[]; __featureCollection: FeatureCollection; name: string; type: string; diff --git a/x-pack/plugins/maps/kibana.json b/x-pack/plugins/maps/kibana.json index e47968b027cc3..42adf6f2a950b 100644 --- a/x-pack/plugins/maps/kibana.json +++ b/x-pack/plugins/maps/kibana.json @@ -23,5 +23,5 @@ "ui": true, "server": true, "extraPublicDirs": ["common/constants"], - "requiredBundles": ["kibanaReact", "kibanaUtils", "home", "mapsOss"] + "requiredBundles": ["kibanaReact", "kibanaUtils", "home", "mapsOss", "presentationUtil"] } diff --git a/x-pack/plugins/maps/public/classes/fields/geojson_file_field.ts b/x-pack/plugins/maps/public/classes/fields/geojson_file_field.ts new file mode 100644 index 0000000000000..ae42b09d491c5 --- /dev/null +++ b/x-pack/plugins/maps/public/classes/fields/geojson_file_field.ts @@ -0,0 +1,43 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { FIELD_ORIGIN } from '../../../common/constants'; +import { IField, AbstractField } from './field'; +import { IVectorSource } from '../sources/vector_source'; +import { GeoJsonFileSource } from '../sources/geojson_file_source'; + +export class GeoJsonFileField extends AbstractField implements IField { + private readonly _source: GeoJsonFileSource; + private readonly _dataType: string; + + constructor({ + fieldName, + source, + origin, + dataType, + }: { + fieldName: string; + source: GeoJsonFileSource; + origin: FIELD_ORIGIN; + dataType: string; + }) { + super({ fieldName, origin }); + this._source = source; + this._dataType = dataType; + } + + getSource(): IVectorSource { + return this._source; + } + + async getLabel(): Promise { + return this.getName(); + } + + async getDataType(): Promise { + return this._dataType; + } +} diff --git a/x-pack/plugins/maps/public/classes/layers/file_upload_wizard/wizard.tsx b/x-pack/plugins/maps/public/classes/layers/file_upload_wizard/wizard.tsx index a0029c5c64e0b..68fd25ce9e7ae 100644 --- a/x-pack/plugins/maps/public/classes/layers/file_upload_wizard/wizard.tsx +++ b/x-pack/plugins/maps/public/classes/layers/file_upload_wizard/wizard.tsx @@ -14,7 +14,7 @@ import { SCALING_TYPES, } from '../../../../common/constants'; import { getFileUploadComponent } from '../../../kibana_services'; -import { GeojsonFileSource } from '../../sources/geojson_file_source'; +import { GeoJsonFileSource } from '../../sources/geojson_file_source'; import { VectorLayer } from '../../layers/vector_layer/vector_layer'; import { createDefaultLayerDescriptor } from '../../sources/es_search_source'; import { RenderWizardArguments } from '../../layers/layer_wizard_registry'; @@ -79,7 +79,10 @@ export class ClientFileCreateSourceEditor extends Component { + describe('getName', () => { + it('should get default display name', async () => { + const geojsonFileSource = new GeoJsonFileSource({}); + expect(await geojsonFileSource.getDisplayName()).toBe('Features'); + }); + }); + describe('getBounds', () => { + it('should get null bounds', async () => { + const geojsonFileSource = new GeoJsonFileSource({}); + expect( + await geojsonFileSource.getBoundsForFilters(({} as unknown) as BoundsFilters, () => {}) + ).toEqual(null); + }); + + it('should get bounds from feature collection', async () => { + const geojsonFileSource = new GeoJsonFileSource({ + __featureCollection: { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [0, 1], + }, + properties: {}, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [2, 3], + }, + properties: {}, + }, + ], + }, + }); + + expect(geojsonFileSource.isBoundsAware()).toBe(true); + expect( + await geojsonFileSource.getBoundsForFilters(({} as unknown) as BoundsFilters, () => {}) + ).toEqual({ + maxLat: 3, + maxLon: 2, + minLat: 1, + minLon: 0, + }); + }); + }); + + describe('getFields', () => { + it('should get fields from config', async () => { + const geojsonFileSource = new GeoJsonFileSource({ + __fields: [ + { + type: 'string', + name: 'foo', + }, + { + type: 'number', + name: 'bar', + }, + ], + }); + + const fields = await geojsonFileSource.getFields(); + + const actualFields = fields.map(async (field) => { + return { + dataType: await field.getDataType(), + origin: field.getOrigin(), + name: field.getName(), + source: field.getSource(), + }; + }); + + expect(await Promise.all(actualFields)).toEqual([ + { + dataType: 'string', + origin: FIELD_ORIGIN.SOURCE, + source: geojsonFileSource, + name: 'foo', + }, + { + dataType: 'number', + origin: FIELD_ORIGIN.SOURCE, + source: geojsonFileSource, + name: 'bar', + }, + ]); + }); + }); +}); diff --git a/x-pack/plugins/maps/public/classes/sources/geojson_file_source/geojson_file_source.ts b/x-pack/plugins/maps/public/classes/sources/geojson_file_source/geojson_file_source.ts index 6172405152739..69d84dc65d382 100644 --- a/x-pack/plugins/maps/public/classes/sources/geojson_file_source/geojson_file_source.ts +++ b/x-pack/plugins/maps/public/classes/sources/geojson_file_source/geojson_file_source.ts @@ -5,13 +5,22 @@ */ import { Feature, FeatureCollection } from 'geojson'; -import { AbstractVectorSource, GeoJsonWithMeta } from '../vector_source'; -import { EMPTY_FEATURE_COLLECTION, SOURCE_TYPES } from '../../../../common/constants'; -import { GeojsonFileSourceDescriptor } from '../../../../common/descriptor_types'; +import { AbstractVectorSource, BoundsFilters, GeoJsonWithMeta } from '../vector_source'; +import { EMPTY_FEATURE_COLLECTION, FIELD_ORIGIN, SOURCE_TYPES } from '../../../../common/constants'; +import { + GeoJsonFileFieldDescriptor, + GeojsonFileSourceDescriptor, + MapExtent, +} from '../../../../common/descriptor_types'; import { registerSource } from '../source_registry'; import { IField } from '../../fields/field'; +import { getFeatureCollectionBounds } from '../../util/get_feature_collection_bounds'; +import { GeoJsonFileField } from '../../fields/geojson_file_field'; +import { Adapters } from '../../../../../../../src/plugins/inspector/common/adapters'; -function getFeatureCollection(geoJson: Feature | FeatureCollection | null): FeatureCollection { +function getFeatureCollection( + geoJson: Feature | FeatureCollection | null | undefined +): FeatureCollection { if (!geoJson) { return EMPTY_FEATURE_COLLECTION; } @@ -30,18 +39,73 @@ function getFeatureCollection(geoJson: Feature | FeatureCollection | null): Feat return EMPTY_FEATURE_COLLECTION; } -export class GeojsonFileSource extends AbstractVectorSource { +export class GeoJsonFileSource extends AbstractVectorSource { static createDescriptor( - geoJson: Feature | FeatureCollection | null, - name: string + descriptor: Partial ): GeojsonFileSourceDescriptor { return { type: SOURCE_TYPES.GEOJSON_FILE, - __featureCollection: getFeatureCollection(geoJson), - name, + __featureCollection: getFeatureCollection(descriptor.__featureCollection), + __fields: descriptor.__fields || [], + name: descriptor.name || 'Features', }; } + constructor(descriptor: Partial, inspectorAdapters?: Adapters) { + const normalizedDescriptor = GeoJsonFileSource.createDescriptor(descriptor); + super(normalizedDescriptor, inspectorAdapters); + } + + _getFields(): GeoJsonFileFieldDescriptor[] { + const fields = (this._descriptor as GeojsonFileSourceDescriptor).__fields; + return fields ? fields : []; + } + + createField({ fieldName }: { fieldName: string }): IField { + const fields = this._getFields(); + const descriptor: GeoJsonFileFieldDescriptor | undefined = fields.find((field) => { + return field.name === fieldName; + }); + + if (!descriptor) { + throw new Error( + `Cannot find corresponding field ${fieldName} in __fields array ${JSON.stringify( + this._getFields() + )} ` + ); + } + return new GeoJsonFileField({ + fieldName: descriptor.name, + source: this, + origin: FIELD_ORIGIN.SOURCE, + dataType: descriptor.type, + }); + } + + async getFields(): Promise { + const fields = this._getFields(); + return fields.map((field: GeoJsonFileFieldDescriptor) => { + return new GeoJsonFileField({ + fieldName: field.name, + source: this, + origin: FIELD_ORIGIN.SOURCE, + dataType: field.type, + }); + }); + } + + isBoundsAware(): boolean { + return true; + } + + async getBoundsForFilters( + boundsFilters: BoundsFilters, + registerCancelCallback: (callback: () => void) => void + ): Promise { + const featureCollection = (this._descriptor as GeojsonFileSourceDescriptor).__featureCollection; + return getFeatureCollectionBounds(featureCollection, false); + } + async getGeoJsonWithMeta(): Promise { return { data: (this._descriptor as GeojsonFileSourceDescriptor).__featureCollection, @@ -49,10 +113,6 @@ export class GeojsonFileSource extends AbstractVectorSource { }; } - createField({ fieldName }: { fieldName: string }): IField { - throw new Error('Not implemented'); - } - async getDisplayName() { return (this._descriptor as GeojsonFileSourceDescriptor).name; } @@ -63,6 +123,6 @@ export class GeojsonFileSource extends AbstractVectorSource { } registerSource({ - ConstructorFunction: GeojsonFileSource, + ConstructorFunction: GeoJsonFileSource, type: SOURCE_TYPES.GEOJSON_FILE, }); diff --git a/x-pack/plugins/maps/public/classes/sources/geojson_file_source/index.ts b/x-pack/plugins/maps/public/classes/sources/geojson_file_source/index.ts index cf0d15dcb747a..ef6806e0aa151 100644 --- a/x-pack/plugins/maps/public/classes/sources/geojson_file_source/index.ts +++ b/x-pack/plugins/maps/public/classes/sources/geojson_file_source/index.ts @@ -4,4 +4,4 @@ * you may not use this file except in compliance with the Elastic License. */ -export { GeojsonFileSource } from './geojson_file_source'; +export { GeoJsonFileSource } from './geojson_file_source'; diff --git a/x-pack/plugins/maps/public/routes/map_page/saved_map/saved_map.ts b/x-pack/plugins/maps/public/routes/map_page/saved_map/saved_map.ts index 27fd78980710f..df424124be3f2 100644 --- a/x-pack/plugins/maps/public/routes/map_page/saved_map/saved_map.ts +++ b/x-pack/plugins/maps/public/routes/map_page/saved_map/saved_map.ts @@ -281,10 +281,12 @@ export class SavedMap { returnToOrigin, newTags, saveByReference, + dashboardId, }: OnSaveProps & { - returnToOrigin: boolean; + returnToOrigin?: boolean; newTags?: string[]; saveByReference: boolean; + dashboardId?: string | null; }) { if (!this._attributes) { throw new Error('Invalid usage, must await whenReady before calling save'); @@ -337,7 +339,7 @@ export class SavedMap { }); return; } - this._getStateTransfer().navigateToWithEmbeddablePackage(this._originatingApp, { + await this._getStateTransfer().navigateToWithEmbeddablePackage(this._originatingApp, { state: { embeddableId: newCopyOnSave ? undefined : this._embeddableId, type: MAP_SAVED_OBJECT_TYPE, @@ -345,6 +347,15 @@ export class SavedMap { }, }); return; + } else if (dashboardId) { + await this._getStateTransfer().navigateToWithEmbeddablePackage('dashboards', { + state: { + type: MAP_SAVED_OBJECT_TYPE, + input: updatedMapEmbeddableInput, + }, + path: dashboardId === 'new' ? '#/create' : `#/view/${dashboardId}`, + }); + return; } this._mapEmbeddableInput = updatedMapEmbeddableInput; diff --git a/x-pack/plugins/maps/public/routes/map_page/top_nav_config.tsx b/x-pack/plugins/maps/public/routes/map_page/top_nav_config.tsx index 43a74a9c73012..7010c281d24c6 100644 --- a/x-pack/plugins/maps/public/routes/map_page/top_nav_config.tsx +++ b/x-pack/plugins/maps/public/routes/map_page/top_nav_config.tsx @@ -10,6 +10,7 @@ import { Adapters } from 'src/plugins/inspector/public'; import { getCoreChrome, getMapsCapabilities, + getIsAllowByValueEmbeddables, getInspector, getCoreI18n, getSavedObjectsClient, @@ -25,6 +26,7 @@ import { import { MAP_SAVED_OBJECT_TYPE } from '../../../common/constants'; import { SavedMap } from './saved_map'; import { getMapEmbeddableDisplayName } from '../../../common/i18n_getters'; +import { SavedObjectSaveModalDashboard } from '../../../../../../src/plugins/presentation_util/public'; export function getTopNavConfig({ savedMap, @@ -139,53 +141,67 @@ export function getTopNavConfig({ /> ) : undefined; - const saveModal = ( - { - try { - await checkForDuplicateTitle( - { - id: props.newCopyOnSave ? undefined : savedMap.getSavedObjectId(), - title: props.newTitle, - copyOnSave: props.newCopyOnSave, - lastSavedTitle: savedMap.getSavedObjectId() ? savedMap.getTitle() : '', - getEsType: () => MAP_SAVED_OBJECT_TYPE, - getDisplayName: getMapEmbeddableDisplayName, - }, - props.isTitleDuplicateConfirmed, - props.onTitleDuplicate, - { - savedObjectsClient: getSavedObjectsClient(), - overlays: getCoreOverlays(), - } - ); - } catch (e) { - // ignore duplicate title failure, user notified in save modal - return {}; - } + const saveModalProps = { + onSave: async ( + props: OnSaveProps & { returnToOrigin?: boolean; dashboardId?: string | null } + ) => { + try { + await checkForDuplicateTitle( + { + id: props.newCopyOnSave ? undefined : savedMap.getSavedObjectId(), + title: props.newTitle, + copyOnSave: props.newCopyOnSave, + lastSavedTitle: savedMap.getSavedObjectId() ? savedMap.getTitle() : '', + getEsType: () => MAP_SAVED_OBJECT_TYPE, + getDisplayName: getMapEmbeddableDisplayName, + }, + props.isTitleDuplicateConfirmed, + props.onTitleDuplicate, + { + savedObjectsClient: getSavedObjectsClient(), + overlays: getCoreOverlays(), + } + ); + } catch (e) { + // ignore duplicate title failure, user notified in save modal + return {}; + } + + await savedMap.save({ + ...props, + newTags: selectedTags, + saveByReference: !props.dashboardId, + }); + // showSaveModal wrapper requires onSave to return an object with an id to close the modal after successful save + return { id: 'id' }; + }, + onClose: () => {}, + documentInfo: { + description: mapDescription, + id: savedMap.getSavedObjectId(), + title: savedMap.getTitle(), + }, + objectType: i18n.translate('xpack.maps.topNav.saveModalType', { + defaultMessage: 'map', + }), + }; + + const saveModal = + savedMap.getOriginatingApp() || !getIsAllowByValueEmbeddables() ? ( + + ) : ( + + ); - await savedMap.save({ - ...props, - newTags: selectedTags, - saveByReference: true, - }); - // showSaveModal wrapper requires onSave to return an object with an id to close the modal after successful save - return { id: 'id' }; - }} - onClose={() => {}} - documentInfo={{ - description: mapDescription, - id: savedMap.getSavedObjectId(), - title: savedMap.getTitle(), - }} - objectType={i18n.translate('xpack.maps.topNav.saveModalType', { - defaultMessage: 'map', - })} - options={tagSelector} - /> - ); showSaveModal(saveModal, getCoreI18n().Context); }, }); diff --git a/x-pack/plugins/maps/public/selectors/map_selectors.ts b/x-pack/plugins/maps/public/selectors/map_selectors.ts index 7b72a3c979abe..8876b9536ce92 100644 --- a/x-pack/plugins/maps/public/selectors/map_selectors.ts +++ b/x-pack/plugins/maps/public/selectors/map_selectors.ts @@ -22,7 +22,7 @@ import { TiledVectorLayer } from '../classes/layers/tiled_vector_layer/tiled_vec import { copyPersistentState, TRACKED_LAYER_DESCRIPTOR } from '../reducers/util'; import { InnerJoin } from '../classes/joins/inner_join'; import { getSourceByType } from '../classes/sources/source_registry'; -import { GeojsonFileSource } from '../classes/sources/geojson_file_source'; +import { GeoJsonFileSource } from '../classes/sources/geojson_file_source'; import { SOURCE_DATA_REQUEST_ID, STYLE_TYPE, @@ -241,10 +241,10 @@ export const getSpatialFiltersLayer = createSelector( type: 'FeatureCollection', features: extractFeaturesFromFilters(filters), }; - const geoJsonSourceDescriptor = GeojsonFileSource.createDescriptor( - featureCollection, - 'spatialFilters' - ); + const geoJsonSourceDescriptor = GeoJsonFileSource.createDescriptor({ + __featureCollection: featureCollection, + name: 'spatialFilters', + }); return new VectorLayer({ layerDescriptor: VectorLayer.createDescriptor({ @@ -272,7 +272,7 @@ export const getSpatialFiltersLayer = createSelector( }, }), }), - source: new GeojsonFileSource(geoJsonSourceDescriptor), + source: new GeoJsonFileSource(geoJsonSourceDescriptor), }); } ); diff --git a/x-pack/plugins/ml/common/types/ml_url_generator.ts b/x-pack/plugins/ml/common/types/ml_url_generator.ts index 3ff57fc622da4..d7fded8299952 100644 --- a/x-pack/plugins/ml/common/types/ml_url_generator.ts +++ b/x-pack/plugins/ml/common/types/ml_url_generator.ts @@ -93,7 +93,18 @@ export interface ExplorerAppState { mlExplorerSwimlane: { selectedType?: 'overall' | 'viewBy'; selectedLanes?: string[]; - selectedTimes?: [number, number]; + /** + * @deprecated legacy query param variable, use `selectedLanes` + */ + selectedLane?: string[] | string; + /** + * It's possible to have only "from" time boundaries, e.g. in the Watcher URL + */ + selectedTimes?: [number, number] | number; + /** + * @deprecated legacy query param variable, use `selectedTimes` + */ + selectedTime?: [number, number] | number; showTopFieldValues?: boolean; viewByFieldName?: string; viewByPerPage?: number; diff --git a/x-pack/plugins/ml/public/application/explorer/hooks/use_selected_cells.test.ts b/x-pack/plugins/ml/public/application/explorer/hooks/use_selected_cells.test.ts index 08c8d11987f19..2308d4ae4f15c 100644 --- a/x-pack/plugins/ml/public/application/explorer/hooks/use_selected_cells.test.ts +++ b/x-pack/plugins/ml/public/application/explorer/hooks/use_selected_cells.test.ts @@ -130,4 +130,38 @@ describe('useSelectedCells', () => { }, }); }); + + test('should extend single time point selection with a bucket interval value', () => { + (useTimefilter() as jest.Mocked).getBounds.mockReturnValue({ + min: moment(1498824778 * 1000), + max: moment(1502366798 * 1000), + }); + + const urlState = { + mlExplorerSwimlane: { + selectedType: 'overall', + selectedLanes: ['Overall'], + selectedTimes: 1498780800, + showTopFieldValues: true, + viewByFieldName: 'apache2.access.remote_ip', + viewByFromPage: 1, + viewByPerPage: 10, + }, + mlExplorerFilter: {}, + } as ExplorerAppState; + + const setUrlState = jest.fn(); + + const bucketInterval = 86400; + + const { result } = renderHook(() => useSelectedCells(urlState, setUrlState, bucketInterval)); + + expect(result.current[0]).toEqual({ + lanes: ['Overall'], + showTopFieldValues: true, + times: [1498780800, 1498867200], + type: 'overall', + viewByFieldName: 'apache2.access.remote_ip', + }); + }); }); diff --git a/x-pack/plugins/ml/public/application/explorer/hooks/use_selected_cells.ts b/x-pack/plugins/ml/public/application/explorer/hooks/use_selected_cells.ts index 4ce828b0b7633..becc6197af888 100644 --- a/x-pack/plugins/ml/public/application/explorer/hooks/use_selected_cells.ts +++ b/x-pack/plugins/ml/public/application/explorer/hooks/use_selected_cells.ts @@ -19,18 +19,33 @@ export const useSelectedCells = ( const timeBounds = timeFilter.getBounds(); // keep swimlane selection, restore selectedCells from AppState - const selectedCells = useMemo(() => { - return appState?.mlExplorerSwimlane?.selectedType !== undefined - ? { - type: appState.mlExplorerSwimlane.selectedType, - lanes: appState.mlExplorerSwimlane.selectedLanes!, - times: appState.mlExplorerSwimlane.selectedTimes!, - showTopFieldValues: appState.mlExplorerSwimlane.showTopFieldValues, - viewByFieldName: appState.mlExplorerSwimlane.viewByFieldName, - } - : undefined; + const selectedCells: AppStateSelectedCells | undefined = useMemo(() => { + if (!appState?.mlExplorerSwimlane?.selectedType) { + return; + } + + let times = + appState.mlExplorerSwimlane.selectedTimes ?? appState.mlExplorerSwimlane.selectedTime!; + if (typeof times === 'number' && bucketIntervalInSeconds) { + times = [times, times + bucketIntervalInSeconds]; + } + + let lanes = + appState.mlExplorerSwimlane.selectedLanes ?? appState.mlExplorerSwimlane.selectedLane!; + + if (typeof lanes === 'string') { + lanes = [lanes]; + } + + return { + type: appState.mlExplorerSwimlane.selectedType, + lanes, + times, + showTopFieldValues: appState.mlExplorerSwimlane.showTopFieldValues, + viewByFieldName: appState.mlExplorerSwimlane.viewByFieldName, + } as AppStateSelectedCells; // TODO fix appState to use memoization - }, [JSON.stringify(appState?.mlExplorerSwimlane)]); + }, [JSON.stringify(appState?.mlExplorerSwimlane), bucketIntervalInSeconds]); const setSelectedCells = useCallback( (swimlaneSelectedCells?: AppStateSelectedCells) => { diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/create_watch_flyout/email.html b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/create_watch_flyout/email.html index 2e93c7eefcf1e..713a68ba0c036 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/create_watch_flyout/email.html +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/create_watch_flyout/email.html @@ -22,7 +22,7 @@

- + <%= openInAnomalyExplorerLinkText %>
diff --git a/x-pack/plugins/monitoring/public/alerts/lib/alerts_toast.tsx b/x-pack/plugins/monitoring/public/alerts/lib/alerts_toast.tsx index f478545046894..302a7f2fe469f 100644 --- a/x-pack/plugins/monitoring/public/alerts/lib/alerts_toast.tsx +++ b/x-pack/plugins/monitoring/public/alerts/lib/alerts_toast.tsx @@ -81,6 +81,24 @@ const showUnableToDisableWatcherClusterAlertsError = () => { }); }; +const showDisabledWatcherClusterAlertsError = () => { + Legacy.shims.toastNotifications.addWarning({ + title: toMountPoint( + + ), + text: toMountPoint( +

+ {i18n.translate('xpack.monitoring.healthCheck.disabledWatches.text', { + defaultMessage: `Review the alert definition using Setup mode and configure additional action connectors to get notified via your favorite method.`, + })} +

+ ), + }); +}; + export const showAlertsToast = (response: EnableAlertResponse) => { const { isSufficientlySecure, @@ -92,5 +110,7 @@ export const showAlertsToast = (response: EnableAlertResponse) => { showTlsAndEncryptionError(); } else if (disabledWatcherClusterAlerts === false) { showUnableToDisableWatcherClusterAlertsError(); + } else if (disabledWatcherClusterAlerts === true) { + showDisabledWatcherClusterAlertsError(); } }; diff --git a/x-pack/plugins/monitoring/public/components/no_data/blurbs/cloud_deployment.js b/x-pack/plugins/monitoring/public/components/no_data/blurbs/cloud_deployment.js index c01243fdeec47..e1262771f94a3 100644 --- a/x-pack/plugins/monitoring/public/components/no_data/blurbs/cloud_deployment.js +++ b/x-pack/plugins/monitoring/public/components/no_data/blurbs/cloud_deployment.js @@ -7,8 +7,10 @@ import React from 'react'; import { EuiText, EuiTextColor, EuiLink } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; +import { Legacy } from '../../../legacy_shims'; export const CloudDeployment = () => { + const { ELASTIC_WEBSITE_URL } = Legacy.shims.docLinks; return ( @@ -32,7 +34,7 @@ export const CloudDeployment = () => { defaultMessage="section for a deployment to configure monitoring. For more information visit " /> the documentation page. diff --git a/x-pack/plugins/monitoring/public/components/no_data/explanations/exporters/__snapshots__/exporters.test.js.snap b/x-pack/plugins/monitoring/public/components/no_data/explanations/exporters/__snapshots__/exporters.test.js.snap index 99f5a979c812b..6bfc17121d511 100644 --- a/x-pack/plugins/monitoring/public/components/no_data/explanations/exporters/__snapshots__/exporters.test.js.snap +++ b/x-pack/plugins/monitoring/public/components/no_data/explanations/exporters/__snapshots__/exporters.test.js.snap @@ -135,7 +135,7 @@ Array [ section for a deployment to configure monitoring. For more information visit diff --git a/x-pack/plugins/monitoring/public/components/no_data/explanations/exporters/exporters.test.js b/x-pack/plugins/monitoring/public/components/no_data/explanations/exporters/exporters.test.js index 2bc581ffb1abb..280572b000011 100644 --- a/x-pack/plugins/monitoring/public/components/no_data/explanations/exporters/exporters.test.js +++ b/x-pack/plugins/monitoring/public/components/no_data/explanations/exporters/exporters.test.js @@ -8,6 +8,16 @@ import React from 'react'; import { renderWithIntl } from '@kbn/test/jest'; import { ExplainExporters, ExplainExportersCloud } from './exporters'; +jest.mock('../../../../legacy_shims', () => ({ + Legacy: { + shims: { + docLinks: { + ELASTIC_WEBSITE_URL: 'https://www.elastic.co/', + }, + }, + }, +})); + describe('ExplainExporters', () => { test('should explain about xpack.monitoring.exporters setting', () => { const reason = { diff --git a/x-pack/plugins/monitoring/public/components/no_data/reasons/__snapshots__/reason_found.test.js.snap b/x-pack/plugins/monitoring/public/components/no_data/reasons/__snapshots__/reason_found.test.js.snap index e3d25f97c9f78..649d5f7f757ab 100644 --- a/x-pack/plugins/monitoring/public/components/no_data/reasons/__snapshots__/reason_found.test.js.snap +++ b/x-pack/plugins/monitoring/public/components/no_data/reasons/__snapshots__/reason_found.test.js.snap @@ -210,7 +210,7 @@ Array [ section for a deployment to configure monitoring. For more information visit diff --git a/x-pack/plugins/monitoring/public/components/no_data/reasons/reason_found.test.js b/x-pack/plugins/monitoring/public/components/no_data/reasons/reason_found.test.js index b4abda87ea1e0..b18351f22851e 100644 --- a/x-pack/plugins/monitoring/public/components/no_data/reasons/reason_found.test.js +++ b/x-pack/plugins/monitoring/public/components/no_data/reasons/reason_found.test.js @@ -8,6 +8,16 @@ import React from 'react'; import { renderWithIntl } from '@kbn/test/jest'; import { ReasonFound } from '.'; +jest.mock('../../../legacy_shims', () => ({ + Legacy: { + shims: { + docLinks: { + ELASTIC_WEBSITE_URL: 'https://www.elastic.co/', + }, + }, + }, +})); + const enabler = {}; describe('ReasonFound', () => { diff --git a/x-pack/plugins/monitoring/public/plugin.ts b/x-pack/plugins/monitoring/public/plugin.ts index a0de3a7663a12..52f8d07f4fdb6 100644 --- a/x-pack/plugins/monitoring/public/plugin.ts +++ b/x-pack/plugins/monitoring/public/plugin.ts @@ -18,7 +18,6 @@ import { FeatureCatalogueCategory, HomePublicPluginSetup, } from '../../../../src/plugins/home/public'; -import { UI_SETTINGS } from '../../../../src/plugins/data/public'; import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/public'; import { MonitoringStartPluginDependencies, MonitoringConfig } from './types'; import { TriggersAndActionsUIPublicPluginSetup } from '../../triggers_actions_ui/public'; @@ -98,7 +97,6 @@ export class MonitoringPlugin }; this.setInitialTimefilter(deps); - const monitoringApp = new AngularApp(deps); const removeHistoryListener = params.history.listen((location) => { if (location.pathname === '' && location.hash === '') { @@ -121,18 +119,10 @@ export class MonitoringPlugin public stop() {} - private setInitialTimefilter({ core: coreContext, data }: MonitoringStartPluginDependencies) { + private setInitialTimefilter({ data }: MonitoringStartPluginDependencies) { const { timefilter } = data.query.timefilter; - const { uiSettings } = coreContext; const refreshInterval = { value: 10000, pause: false }; - const time = { from: 'now-1h', to: 'now' }; timefilter.setRefreshInterval(refreshInterval); - timefilter.setTime(time); - uiSettings.overrideLocalDefault( - UI_SETTINGS.TIMEPICKER_REFRESH_INTERVAL_DEFAULTS, - JSON.stringify(refreshInterval) - ); - uiSettings.overrideLocalDefault(UI_SETTINGS.TIMEPICKER_TIME_DEFAULTS, JSON.stringify(time)); } private getExternalConfig() { diff --git a/x-pack/plugins/reporting/server/lib/layouts/index.ts b/x-pack/plugins/reporting/server/lib/layouts/index.ts index e0b5b3f095443..b6804b6ac8c8a 100644 --- a/x-pack/plugins/reporting/server/lib/layouts/index.ts +++ b/x-pack/plugins/reporting/server/lib/layouts/index.ts @@ -7,7 +7,7 @@ import { LevelLogger } from '../'; import { LayoutSelectorDictionary, Size } from '../../../common/types'; import { HeadlessChromiumDriver } from '../../browsers'; -import { Layout } from './layout'; +import type { Layout } from './layout'; export { LayoutParams, @@ -17,7 +17,7 @@ export { Size, } from '../../../common/types'; export { createLayout } from './create_layout'; -export { Layout } from './layout'; +export type { Layout } from './layout'; export { PreserveLayout } from './preserve_layout'; export { CanvasLayout } from './canvas_layout'; export { PrintLayout } from './print_layout'; diff --git a/x-pack/plugins/reporting/server/lib/layouts/layout.ts b/x-pack/plugins/reporting/server/lib/layouts/layout.ts index cb068632063a5..027404f4c33e2 100644 --- a/x-pack/plugins/reporting/server/lib/layouts/layout.ts +++ b/x-pack/plugins/reporting/server/lib/layouts/layout.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { CustomPageSize, PredefinedPageSize } from 'pdfmake/interfaces'; -import { PageSizeParams, PdfImageSize, Size } from './'; +import type { CustomPageSize, PredefinedPageSize } from 'pdfmake/interfaces'; +import type { PageSizeParams, PdfImageSize, Size } from '../../../common/types'; export interface ViewZoomWidthHeight { zoom: number; diff --git a/x-pack/plugins/reporting/server/lib/layouts/preserve_layout.ts b/x-pack/plugins/reporting/server/lib/layouts/preserve_layout.ts index ccd08e01fec19..e7c84f2088319 100644 --- a/x-pack/plugins/reporting/server/lib/layouts/preserve_layout.ts +++ b/x-pack/plugins/reporting/server/lib/layouts/preserve_layout.ts @@ -9,7 +9,8 @@ import { CustomPageSize } from 'pdfmake/interfaces'; import { getDefaultLayoutSelectors } from '../../../common'; import { LAYOUT_TYPES } from '../../../common/constants'; import { LayoutSelectorDictionary, PageSizeParams, Size } from '../../../common/types'; -import { Layout, LayoutInstance } from './'; +import type { LayoutInstance } from './'; +import { Layout } from './layout'; // We use a zoom of two to bump up the resolution of the screenshot a bit. const ZOOM: number = 2; diff --git a/x-pack/plugins/reporting/server/lib/layouts/print_layout.ts b/x-pack/plugins/reporting/server/lib/layouts/print_layout.ts index 8db1fa7ff6347..c51582aa404d9 100644 --- a/x-pack/plugins/reporting/server/lib/layouts/print_layout.ts +++ b/x-pack/plugins/reporting/server/lib/layouts/print_layout.ts @@ -13,7 +13,8 @@ import { LAYOUT_TYPES } from '../../../common/constants'; import { LayoutSelectorDictionary, Size } from '../../../common/types'; import { HeadlessChromiumDriver } from '../../browsers'; import { CaptureConfig } from '../../types'; -import { Layout, LayoutInstance } from './'; +import type { LayoutInstance } from './'; +import { Layout } from './layout'; export class PrintLayout extends Layout implements LayoutInstance { public readonly selectors: LayoutSelectorDictionary = { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/es_results.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/es_results.ts index 6718ff2d1f15f..6ff8b61f4120a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/es_results.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/es_results.ts @@ -14,11 +14,7 @@ import { SignalHit, WrappedSignalHit, } from '../types'; -import { - Logger, - SavedObject, - SavedObjectsFindResponse, -} from '../../../../../../../../src/core/server'; +import { SavedObject, SavedObjectsFindResponse } from '../../../../../../../../src/core/server'; import { loggingSystemMock } from '../../../../../../../../src/core/server/mocks'; import { RuleTypeParams } from '../../types'; import { IRuleStatusSOAttributes } from '../../rules/types'; @@ -615,7 +611,7 @@ export const exampleFindRuleStatusResponse: ( saved_objects: mockStatuses.map((obj) => ({ ...obj, score: 1 })), }); -export const mockLogger: Logger = loggingSystemMock.createLogger(); +export const mockLogger = loggingSystemMock.createLogger(); export const sampleBulkErrorItem = ( { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts index f00900255a968..cce781f82e64f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts @@ -538,6 +538,35 @@ describe('rules_notification_alert_type', () => { expect(ruleStatusService.success).toHaveBeenCalled(); }); + it('should not call checkPrivileges if ML rule', async () => { + const ruleAlert = getMlResult(); + payload = getPayload(ruleAlert, alertServices) as jest.Mocked; + jobsSummaryMock.mockResolvedValue([ + { + id: 'some_job_id', + jobState: 'started', + datafeedState: 'started', + }, + ]); + (findMlSignals as jest.Mock).mockResolvedValue({ + _shards: { failed: 0 }, + hits: { + hits: [{}], + }, + }); + (bulkCreateMlSignals as jest.Mock).mockResolvedValue({ + success: true, + bulkCreateDuration: 1, + createdItemsCount: 1, + errors: [], + }); + (checkPrivileges as jest.Mock).mockClear(); + + await alert.executor(payload); + expect(checkPrivileges).toHaveBeenCalledTimes(0); + expect(ruleStatusService.success).toHaveBeenCalled(); + }); + it('should call scheduleActions if signalsCount was greater than 0 and rule has actions defined', async () => { const ruleAlert = getMlResult(); ruleAlert.actions = [ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.ts index 370f2555b02b8..d08ab66af5683 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.ts @@ -186,49 +186,52 @@ export const signalRulesAlertType = ({ // move this collection of lines into a function in utils // so that we can use it in create rules route, bulk, etc. try { - const hasTimestampOverride = timestampOverride != null && !isEmpty(timestampOverride); - const [privileges, timestampFieldCaps] = await Promise.all([ - pipe( - { services, version, index }, - ({ services: svc, version: ver, index: idx }) => - pipe( - tryCatch(() => getInputIndex(svc, ver, idx), toError), - chain((indices) => tryCatch(() => checkPrivileges(svc, indices), toError)) - ), - toPromise - ), - services.scopedClusterClient.fieldCaps({ - index, - fields: hasTimestampOverride - ? ['@timestamp', timestampOverride as string] - : ['@timestamp'], - allow_no_indices: false, - include_unmapped: true, - }), - ]); + if (!isEmpty(index)) { + const hasTimestampOverride = timestampOverride != null && !isEmpty(timestampOverride); + const [privileges, timestampFieldCaps] = await Promise.all([ + pipe( + { services, version, index }, + ({ services: svc, version: ver, index: idx }) => + pipe( + tryCatch(() => getInputIndex(svc, ver, idx), toError), + chain((indices) => tryCatch(() => checkPrivileges(svc, indices), toError)) + ), + toPromise + ), + services.scopedClusterClient.fieldCaps({ + index, + fields: hasTimestampOverride + ? ['@timestamp', timestampOverride as string] + : ['@timestamp'], + allow_no_indices: false, + include_unmapped: true, + }), + ]); - wrotePartialFailureStatus = await flow( - () => - tryCatch( - () => hasReadIndexPrivileges(privileges, logger, buildRuleMessage, ruleStatusService), - toError + wrotePartialFailureStatus = await flow( + () => + tryCatch( + () => + hasReadIndexPrivileges(privileges, logger, buildRuleMessage, ruleStatusService), + toError + ), + chain((wroteStatus) => + tryCatch( + () => + hasTimestampFields( + wroteStatus, + hasTimestampOverride ? (timestampOverride as string) : '@timestamp', + timestampFieldCaps, + ruleStatusService, + logger, + buildRuleMessage + ), + toError + ) ), - chain((wroteStatus) => - tryCatch( - () => - hasTimestampFields( - wroteStatus, - hasTimestampOverride ? (timestampOverride as string) : '@timestamp', - timestampFieldCaps, - ruleStatusService, - logger, - buildRuleMessage - ), - toError - ) - ), - toPromise - )(); + toPromise + )(); + } } catch (exc) { logger.error(buildRuleMessage(`Check privileges failed to execute ${exc}`)); } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts index ac004a7fff1fa..ec55ad7f588e8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts @@ -6,6 +6,7 @@ import moment from 'moment'; import sinon from 'sinon'; +import { ApiResponse, Context } from '@elastic/elasticsearch/lib/Transport'; import { alertsMock, AlertServicesMock } from '../../../../../alerts/server/mocks'; import { listMock } from '../../../../../lists/server/mocks'; @@ -28,6 +29,7 @@ import { getListsClient, getSignalTimeTuples, getExceptions, + hasTimestampFields, wrapBuildingBlocks, generateSignalId, createErrorsFromShard, @@ -61,6 +63,14 @@ const buildRuleMessage = buildRuleMessageFactory({ name: 'fake name', }); +const ruleStatusServiceMock = { + success: jest.fn(), + find: jest.fn(), + goingToRun: jest.fn(), + error: jest.fn(), + partialFailure: jest.fn(), +}; + describe('utils', () => { const anchor = '2020-01-01T06:06:06.666Z'; const unix = moment(anchor).valueOf(); @@ -803,6 +813,85 @@ describe('utils', () => { }); }); + describe('hasTimestampFields', () => { + test('returns true when missing timestamp override field', async () => { + const timestampField = 'event.ingested'; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const timestampFieldCapsResponse: Partial, Context>> = { + body: { + fields: { + [timestampField]: { + date: { + type: 'date', + searchable: true, + aggregatable: true, + indices: ['myfakeindex-3', 'myfakeindex-4'], + }, + unmapped: { + type: 'unmapped', + searchable: false, + aggregatable: false, + indices: ['myfakeindex-1', 'myfakeindex-2'], + }, + }, + }, + }, + }; + mockLogger.error.mockClear(); + const res = await hasTimestampFields( + false, + timestampField, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + timestampFieldCapsResponse as ApiResponse>, + ruleStatusServiceMock, + mockLogger, + buildRuleMessage + ); + expect(mockLogger.error).toHaveBeenCalledWith( + 'The following indices are missing the timestamp override field "event.ingested": ["myfakeindex-1","myfakeindex-2"] name: "fake name" id: "fake id" rule id: "fake rule id" signals index: "fakeindex"' + ); + expect(res).toBeTruthy(); + }); + test('returns true when missing timestamp field', async () => { + const timestampField = '@timestamp'; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const timestampFieldCapsResponse: Partial, Context>> = { + body: { + fields: { + [timestampField]: { + date: { + type: 'date', + searchable: true, + aggregatable: true, + indices: ['myfakeindex-3', 'myfakeindex-4'], + }, + unmapped: { + type: 'unmapped', + searchable: false, + aggregatable: false, + indices: ['myfakeindex-1', 'myfakeindex-2'], + }, + }, + }, + }, + }; + mockLogger.error.mockClear(); + const res = await hasTimestampFields( + false, + timestampField, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + timestampFieldCapsResponse as ApiResponse>, + ruleStatusServiceMock, + mockLogger, + buildRuleMessage + ); + expect(mockLogger.error).toHaveBeenCalledWith( + 'The following indices are missing the timestamp field "@timestamp": ["myfakeindex-1","myfakeindex-2"] name: "fake name" id: "fake id" rule id: "fake rule id" signals index: "fakeindex"' + ); + expect(res).toBeTruthy(); + }); + }); + describe('wrapBuildingBlocks', () => { it('should generate a unique id for each building block', () => { const wrappedBlocks = wrapBuildingBlocks( diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts index 23c5e6499c8ad..0ad502b67fbe6 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts @@ -120,8 +120,10 @@ export const hasTimestampFields = async ( // if there is a timestamp override and the unmapped array for the timestamp override key is not empty, // partial failure const errorString = `The following indices are missing the ${ - timestampField === '@timestamp' ? 'timestamp field "@timestamp"' : 'timestamp override field' - } "${timestampField}": ${JSON.stringify( + timestampField === '@timestamp' + ? 'timestamp field "@timestamp"' + : `timestamp override field "${timestampField}"` + }: ${JSON.stringify( isEmpty(timestampFieldCapsResponse.body.fields) ? timestampFieldCapsResponse.body.indices : timestampFieldCapsResponse.body.fields[timestampField].unmapped.indices diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index ef2149c4931fa..e28b41e0ce5e3 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -529,10 +529,6 @@ "core.ui_settings.params.notifications.infoLifetimeTitle": "情報通知時間", "core.ui_settings.params.notifications.warningLifetimeText": "警告通知が画面に表示される時間(ミリ秒単位)です。{infinityValue}に設定すると、無効になります。", "core.ui_settings.params.notifications.warningLifetimeTitle": "警告通知時間", - "core.ui_settings.params.pageNavigationDesc": "ナビゲーションのスタイルを変更", - "core.ui_settings.params.pageNavigationLegacy": "レガシー", - "core.ui_settings.params.pageNavigationModern": "モダン", - "core.ui_settings.params.pageNavigationName": "サイドナビゲーションスタイル", "core.ui_settings.params.storeUrlText": "URLが長くなりすぎるためブラウザーが対応できない場合があります。セッションストレージにURLの一部を保存することでこの問題に対処できるかどうかをテストしています。結果を教えてください!", "core.ui_settings.params.storeUrlTitle": "セッションストレージにURLを格納", "core.ui_settings.params.themeVersionText": "現在のバージョンと次のバージョンのKibanaで使用されるテーマを切り替えます。この設定を適用するにはページの更新が必要です。", @@ -4693,7 +4689,6 @@ "visualizations.function.visDimension.format.help": "フォーマット", "visualizations.function.visDimension.formatParams.help": "フォーマットパラメーター", "visualizations.function.visDimension.help": "visConfig ディメンションオブジェクトを生成します", - "visualizations.functions.visualization.help": "シンプルなビジュアライゼーションです", "visualizations.initializeWithoutIndexPatternErrorMessage": "インデックスパターンなしで集約を初期化しようとしています", "visualizations.newVisWizard.aggBasedGroupDescription": "クラシック Visualize ライブラリを使用して、アグリゲーションに基づいてグラフを作成します。", "visualizations.newVisWizard.aggBasedGroupTitle": "アグリゲーションに基づく", @@ -11436,7 +11431,6 @@ "xpack.lens.indexPatterns.clearFiltersLabel": "名前とタイプフィルターを消去", "xpack.lens.indexPatterns.fieldFiltersLabel": "フィールドフィルター", "xpack.lens.indexPatterns.fieldSearchLiveRegion": "{availableFields}使用可能な{availableFields, plural, other {フィールド}}。{emptyFields}空の{emptyFields, plural, other {フィールド}}。 {metaFields}メタ{metaFields, plural, other {フィールド}}。", - "xpack.lens.indexPatterns.filterByNameAriaLabel": "検索フィールド", "xpack.lens.indexPatterns.filterByNameLabel": "検索フィールド名", "xpack.lens.indexPatterns.noAvailableDataLabel": "データを含むフィールドはありません。", "xpack.lens.indexPatterns.noDataLabel": "フィールドがありません。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 08d064ce8a05c..49fd9ce095f66 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -529,10 +529,6 @@ "core.ui_settings.params.notifications.infoLifetimeTitle": "信息通知生存时间", "core.ui_settings.params.notifications.warningLifetimeText": "在屏幕上显示警告通知的时间(毫秒)。设置为 {infinityValue} 将禁用此项。", "core.ui_settings.params.notifications.warningLifetimeTitle": "警告通知生存时间", - "core.ui_settings.params.pageNavigationDesc": "更改导航样式", - "core.ui_settings.params.pageNavigationLegacy": "旧版", - "core.ui_settings.params.pageNavigationModern": "现代", - "core.ui_settings.params.pageNavigationName": "侧边导航样式", "core.ui_settings.params.storeUrlText": "有时,URL 可能会变得过长,使某些浏览器无法进行处理。为此,我们将正测试在会话存储中存储 URL 的组成部分是否会有所帮助。请向我们反馈您的体验!", "core.ui_settings.params.storeUrlTitle": "将 URL 存储在会话存储中", "core.ui_settings.params.themeVersionText": "在用于当前版和下一版 Kibana 的主题之间切换。需要刷新页面,才能应用设置。", @@ -4698,7 +4694,6 @@ "visualizations.function.visDimension.format.help": "格式", "visualizations.function.visDimension.formatParams.help": "格式参数", "visualizations.function.visDimension.help": "生成 visConfig 维度对象", - "visualizations.functions.visualization.help": "简单可视化", "visualizations.initializeWithoutIndexPatternErrorMessage": "正在尝试在不使用索引模式的情况下初始化聚合", "visualizations.newVisWizard.aggBasedGroupDescription": "使用我们的经典可视化库,基于聚合创建图表。", "visualizations.newVisWizard.aggBasedGroupTitle": "基于聚合", @@ -11465,7 +11460,6 @@ "xpack.lens.indexPatterns.clearFiltersLabel": "清除名称和类型筛选", "xpack.lens.indexPatterns.fieldFiltersLabel": "字段筛选", "xpack.lens.indexPatterns.fieldSearchLiveRegion": "{availableFields} 个可用{availableFields, plural, other {字段}}。{emptyFields} 个空{emptyFields, plural, other {字段}}。{metaFields} 个元{metaFields, plural,other {字段}}。", - "xpack.lens.indexPatterns.filterByNameAriaLabel": "搜索字段", "xpack.lens.indexPatterns.filterByNameLabel": "搜索字段名称", "xpack.lens.indexPatterns.noAvailableDataLabel": "没有包含数据的可用字段。", "xpack.lens.indexPatterns.noDataLabel": "无字段。", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.test.tsx index 13f1aea91c7ac..731152f4a9d63 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.test.tsx @@ -796,6 +796,42 @@ describe('edit button', () => { }); }); +describe('refresh button', () => { + it('should call requestRefresh when clicked', () => { + const alert = mockAlert(); + const alertType: AlertType = { + id: '.noop', + name: 'No Op', + actionGroups: [{ id: 'default', name: 'Default' }], + recoveryActionGroup, + actionVariables: { context: [], state: [], params: [] }, + defaultActionGroupId: 'default', + minimumLicenseRequired: 'basic', + producer: ALERTS_FEATURE_ID, + authorizedConsumers, + enabledInLicense: true, + }; + + const requestRefresh = jest.fn(); + const refreshButton = shallow( + + ) + .find('[data-test-subj="refreshAlertsButton"]') + .first(); + + expect(refreshButton.exists()).toBeTruthy(); + + refreshButton.simulate('click'); + expect(requestRefresh).toHaveBeenCalledTimes(1); + }); +}); + function mockAlert(overloads: Partial = {}): Alert { return { id: uuid.v4(), diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.tsx index 5bb8d47988eed..c2a64bfa3a207 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.tsx @@ -163,6 +163,20 @@ export const AlertDetails: React.FunctionComponent = ({ ) : null} + + + + + diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.test.tsx index 875268bd93112..8ca3edb1c68df 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.test.tsx @@ -270,6 +270,13 @@ describe('alerts_list component with items', () => { expect(wrapper.find('[data-test-subj="alertStatus-ok"]').length).toBeGreaterThan(0); expect(wrapper.find('[data-test-subj="alertStatus-pending"]').length).toBeGreaterThan(0); expect(wrapper.find('[data-test-subj="alertStatus-unknown"]').length).toBe(0); + expect(wrapper.find('[data-test-subj="refreshAlertsButton"]').exists()).toBeTruthy(); + }); + + it('loads alerts when refresh button is clicked', async () => { + await setup(); + wrapper.find('[data-test-subj="refreshAlertsButton"]').first().simulate('click'); + expect(loadAlerts).toHaveBeenCalled(); }); }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx index a1a4cfcab18ef..293d471560503 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx @@ -406,6 +406,18 @@ export const AlertsList: React.FunctionComponent = () => { selectedStatuses={alertStatusesFilter} onChange={(ids: string[]) => setAlertStatusesFilter(ids)} />, + + + , ]; const authorizedToModifySelectedAlerts = selectedIds.length diff --git a/x-pack/test/functional/apps/maps/embeddable/save_and_return.js b/x-pack/test/functional/apps/maps/embeddable/save_and_return.js index 40af8ddb9d44b..13aa08cbbeb38 100644 --- a/x-pack/test/functional/apps/maps/embeddable/save_and_return.js +++ b/x-pack/test/functional/apps/maps/embeddable/save_and_return.js @@ -31,6 +31,7 @@ export default function ({ getPageObjects, getService }) { after(async () => { await security.testUser.restoreDefaults(); }); + describe('new map', () => { beforeEach(async () => { await PageObjects.common.navigateToApp('dashboard'); @@ -55,7 +56,7 @@ export default function ({ getPageObjects, getService }) { it('should cut the originator and stay in maps application', async () => { await PageObjects.maps.saveMap( 'map created from dashboard save and return with originator app cut', - true + false ); await PageObjects.maps.waitForLayersToLoad(); await testSubjects.missingOrFail('mapSaveAndReturnButton'); @@ -94,7 +95,7 @@ export default function ({ getPageObjects, getService }) { describe('save as and uncheck return to origin switch', () => { it('should cut the originator and stay in maps application', async () => { - await PageObjects.maps.saveMap('Clone 2 of map embeddable example', true); + await PageObjects.maps.saveMap('Clone 2 of map embeddable example', false); await PageObjects.maps.waitForLayersToLoad(); await testSubjects.missingOrFail('mapSaveAndReturnButton'); await testSubjects.existOrFail('mapSaveButton'); diff --git a/x-pack/test/functional/page_objects/gis_page.ts b/x-pack/test/functional/page_objects/gis_page.ts index 7e22acf785d36..7767499cb6bd3 100644 --- a/x-pack/test/functional/page_objects/gis_page.ts +++ b/x-pack/test/functional/page_objects/gis_page.ts @@ -9,7 +9,7 @@ import { APP_ID } from '../../../plugins/maps/common/constants'; import { FtrProviderContext } from '../ftr_provider_context'; export function GisPageProvider({ getService, getPageObjects }: FtrProviderContext) { - const PageObjects = getPageObjects(['common', 'header', 'timePicker']); + const PageObjects = getPageObjects(['common', 'header', 'timePicker', 'visualize']); const log = getService('log'); const testSubjects = getService('testSubjects'); @@ -148,18 +148,14 @@ export function GisPageProvider({ getService, getPageObjects }: FtrProviderConte await renderable.waitForRender(); } - async saveMap(name: string, uncheckReturnToOriginModeSwitch = false, tags?: string[]) { + async saveMap(name: string, redirectToOrigin = true, tags?: string[]) { await testSubjects.click('mapSaveButton'); await testSubjects.setValue('savedObjectTitle', name); - if (uncheckReturnToOriginModeSwitch) { - const redirectToOriginCheckboxExists = await testSubjects.exists( - 'returnToOriginModeSwitch' - ); - if (!redirectToOriginCheckboxExists) { - throw new Error('Unable to uncheck "returnToOriginModeSwitch", it does not exist.'); - } - await testSubjects.setEuiSwitch('returnToOriginModeSwitch', 'uncheck'); - } + await PageObjects.visualize.setSaveModalValues(name, { + addToDashboard: false, + redirectToOrigin, + saveAsNew: true, + }); if (tags) { await testSubjects.click('savedObjectTagSelector'); for (const tagName of tags) { diff --git a/x-pack/test/saved_object_tagging/functional/tests/maps_integration.ts b/x-pack/test/saved_object_tagging/functional/tests/maps_integration.ts index 4e44659b4fc67..32b9cc378db45 100644 --- a/x-pack/test/saved_object_tagging/functional/tests/maps_integration.ts +++ b/x-pack/test/saved_object_tagging/functional/tests/maps_integration.ts @@ -13,7 +13,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const listingTable = getService('listingTable'); const testSubjects = getService('testSubjects'); const find = getService('find'); - const PageObjects = getPageObjects(['maps', 'tagManagement', 'common']); + const PageObjects = getPageObjects(['maps', 'tagManagement', 'common', 'visualize']); /** * Select tags in the searchbar's tag filter. @@ -78,7 +78,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('allows to select tags for a new map', async () => { - await PageObjects.maps.saveMap('my-new-map', false, ['tag-1', 'tag-3']); + await PageObjects.maps.saveMap('my-new-map', true, ['tag-1', 'tag-3']); await PageObjects.maps.gotoMapListingPage(); await selectFilterTags('tag-1'); @@ -91,6 +91,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await testSubjects.click('mapSaveButton'); await testSubjects.setValue('savedObjectTitle', 'map-with-new-tag'); + await PageObjects.visualize.setSaveModalValues('map-with-new-tag', { + addToDashboard: false, + saveAsNew: true, + }); await testSubjects.click('savedObjectTagSelector'); await testSubjects.click(`tagSelectorOption-action__create`); @@ -127,7 +131,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('allows to select tags for an existing map', async () => { await listingTable.clickItemLink('map', 'map 4 (tag-1)'); - await PageObjects.maps.saveMap('map 4 (tag-1)', false, ['tag-3']); + await PageObjects.maps.saveMap('map 4 (tag-1)', true, ['tag-3']); await PageObjects.maps.gotoMapListingPage(); await selectFilterTags('tag-3'); diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index 699ff64af3f88..6368751fedf75 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -46,6 +46,7 @@ { "path": "../plugins/embeddable_enhanced/tsconfig.json" }, { "path": "../plugins/event_log/tsconfig.json" }, { "path": "../plugins/licensing/tsconfig.json" }, + { "path": "../plugins/lens/tsconfig.json" }, { "path": "../plugins/task_manager/tsconfig.json" }, { "path": "../plugins/telemetry_collection_xpack/tsconfig.json" }, { "path": "../plugins/triggers_actions_ui/tsconfig.json" }, diff --git a/x-pack/tsconfig.json b/x-pack/tsconfig.json index ae12773023663..a6eb098b5d678 100644 --- a/x-pack/tsconfig.json +++ b/x-pack/tsconfig.json @@ -18,6 +18,7 @@ "plugins/embeddable_enhanced/**/*", "plugins/event_log/**/*", "plugins/licensing/**/*", + "plugins/lens/**/*", "plugins/searchprofiler/**/*", "plugins/security_solution/cypress/**/*", "plugins/task_manager/**/*", @@ -84,6 +85,7 @@ { "path": "./plugins/embeddable_enhanced/tsconfig.json" }, { "path": "./plugins/event_log/tsconfig.json" }, { "path": "./plugins/licensing/tsconfig.json" }, + { "path": "./plugins/lens/tsconfig.json" }, { "path": "./plugins/searchprofiler/tsconfig.json" }, { "path": "./plugins/task_manager/tsconfig.json" }, { "path": "./plugins/telemetry_collection_xpack/tsconfig.json" }, diff --git a/x-pack/tsconfig.refs.json b/x-pack/tsconfig.refs.json index 02623b11ce314..6a9e54e2e7adf 100644 --- a/x-pack/tsconfig.refs.json +++ b/x-pack/tsconfig.refs.json @@ -5,6 +5,7 @@ { "path": "./plugins/alerts/tsconfig.json"}, { "path": "./plugins/dashboard_enhanced/tsconfig.json" }, { "path": "./plugins/licensing/tsconfig.json" }, + { "path": "./plugins/lens/tsconfig.json" }, { "path": "./plugins/console_extensions/tsconfig.json" }, { "path": "./plugins/discover_enhanced/tsconfig.json" }, { "path": "./plugins/data_enhanced/tsconfig.json" }, diff --git a/yarn.lock b/yarn.lock index 7625510d3b915..174f1284a3a6b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@babel/cli@^7.10.5": - version "7.11.6" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.11.6.tgz#1fcbe61c2a6900c3539c06ee58901141f3558482" - integrity sha512-+w7BZCvkewSmaRM6H4L2QM3RL90teqEIHDIFXAmrW33+0jhlymnDAEdqVeCZATvxhQuio1ifoGVlJJbIiH9Ffg== +"@babel/cli@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.12.10.tgz#67a1015b1cd505bde1696196febf910c4c339a48" + integrity sha512-+y4ZnePpvWs1fc/LhZRTHkTesbXkyBYuOB+5CyodZqrEuETXi3zOVfpAQIdgC3lXbHLTDG9dQosxR9BhvLKDLQ== dependencies: commander "^4.0.1" convert-source-map "^1.1.0" @@ -16,7 +16,8 @@ slash "^2.0.0" source-map "^0.5.0" optionalDependencies: - chokidar "^2.1.8" + "@nicolo-ribaudo/chokidar-2" "2.1.8-no-fsevents" + chokidar "^3.4.0" "@babel/code-frame@7.8.3": version "7.8.3" @@ -32,6 +33,13 @@ dependencies: "@babel/highlight" "^7.10.4" +"@babel/code-frame@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== + dependencies: + "@babel/highlight" "^7.10.4" + "@babel/compat-data@^7.10.4", "@babel/compat-data@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.11.0.tgz#e9f73efe09af1355b723a7f39b11bad637d7c99c" @@ -41,6 +49,16 @@ invariant "^2.2.4" semver "^5.5.0" +"@babel/compat-data@^7.12.5": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.12.5.tgz#f56db0c4bb1bbbf221b4e81345aab4141e7cb0e9" + integrity sha512-DTsS7cxrsH3by8nqQSpFSyjSfSYl57D6Cf4q8dW3LK83tBKBDCkfcay1nYkXq1nIHXnpX8WMMb/O25HOy3h1zg== + +"@babel/compat-data@^7.12.7": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.12.7.tgz#9329b4782a7d6bbd7eef57e11addf91ee3ef1e41" + integrity sha512-YaxPMGs/XIWtYqrdEOZOCPsVWfEoriXopnsz3/i7apYPXQ3698UFhS6dVT1KN5qOsWmVgw/FOrmQgpRaZayGsw== + "@babel/core@7.10.5": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.10.5.tgz#1f15e2cca8ad9a1d78a38ddba612f5e7cdbbd330" @@ -83,7 +101,7 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@>=7.9.0", "@babel/core@^7.1.0", "@babel/core@^7.11.6", "@babel/core@^7.7.5", "@babel/core@^7.9.0": +"@babel/core@>=7.9.0", "@babel/core@^7.1.0", "@babel/core@^7.7.5", "@babel/core@^7.9.0": version "7.11.6" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.11.6.tgz#3a9455dc7387ff1bac45770650bc13ba04a15651" integrity sha512-Wpcv03AGnmkgm6uS6k8iwhIwTrcP0m17TL1n1sy7qD0qelDu4XNeW0dN0mHfa+Gei211yDaLoEe/VlbXQzM4Bg== @@ -105,6 +123,27 @@ semver "^5.4.1" source-map "^0.5.0" +"@babel/core@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd" + integrity sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w== + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/generator" "^7.12.10" + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helpers" "^7.12.5" + "@babel/parser" "^7.12.10" + "@babel/template" "^7.12.7" + "@babel/traverse" "^7.12.10" + "@babel/types" "^7.12.10" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.2" + lodash "^4.17.19" + semver "^5.4.1" + source-map "^0.5.0" + "@babel/generator@^7.10.5", "@babel/generator@^7.11.5", "@babel/generator@^7.11.6", "@babel/generator@^7.4.4", "@babel/generator@^7.9.6": version "7.11.6" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.6.tgz#b868900f81b163b4d464ea24545c61cbac4dc620" @@ -114,6 +153,15 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.12.10", "@babel/generator@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.11.tgz#98a7df7b8c358c9a37ab07a24056853016aba3af" + integrity sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA== + dependencies: + "@babel/types" "^7.12.11" + jsesc "^2.5.1" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.0.0", "@babel/helper-annotate-as-pure@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3" @@ -121,6 +169,13 @@ dependencies: "@babel/types" "^7.10.4" +"@babel/helper-annotate-as-pure@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.10.tgz#54ab9b000e60a93644ce17b3f37d313aaf1d115d" + integrity sha512-XplmVbC1n+KY6jL8/fgLVXXUauDIB+lD5+GsQEh6F6GBF1dq1qy4DP4yXWzDKcoqXB3X58t61e85Fitoww4JVQ== + dependencies: + "@babel/types" "^7.12.10" + "@babel/helper-builder-binary-assignment-operator-visitor@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz#bb0b75f31bf98cbf9ff143c1ae578b87274ae1a3" @@ -157,6 +212,16 @@ levenary "^1.1.1" semver "^5.5.0" +"@babel/helper-compilation-targets@^7.12.5": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.5.tgz#cb470c76198db6a24e9dbc8987275631e5d29831" + integrity sha512-+qH6NrscMolUlzOYngSBMIOQpKUGPPsc61Bu5W10mg84LxZ7cmvnBHzARKbDoFxVvqqAbj6Tg6N7bSrWSPXMyw== + dependencies: + "@babel/compat-data" "^7.12.5" + "@babel/helper-validator-option" "^7.12.1" + browserslist "^4.14.5" + semver "^5.5.0" + "@babel/helper-create-class-features-plugin@^7.10.4", "@babel/helper-create-class-features-plugin@^7.10.5", "@babel/helper-create-class-features-plugin@^7.3.0": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.5.tgz#9f61446ba80e8240b0a5c85c6fdac8459d6f259d" @@ -169,6 +234,17 @@ "@babel/helper-replace-supers" "^7.10.4" "@babel/helper-split-export-declaration" "^7.10.4" +"@babel/helper-create-class-features-plugin@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz#3c45998f431edd4a9214c5f1d3ad1448a6137f6e" + integrity sha512-hkL++rWeta/OVOBTRJc9a5Azh5mt5WgZUGAKMD8JM141YsE08K//bp1unBBieO6rUKkIPyUE0USQ30jAy3Sk1w== + dependencies: + "@babel/helper-function-name" "^7.10.4" + "@babel/helper-member-expression-to-functions" "^7.12.1" + "@babel/helper-optimise-call-expression" "^7.10.4" + "@babel/helper-replace-supers" "^7.12.1" + "@babel/helper-split-export-declaration" "^7.10.4" + "@babel/helper-create-regexp-features-plugin@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.4.tgz#fdd60d88524659a0b6959c0579925e425714f3b8" @@ -178,6 +254,15 @@ "@babel/helper-regex" "^7.10.4" regexpu-core "^4.7.0" +"@babel/helper-create-regexp-features-plugin@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.1.tgz#18b1302d4677f9dc4740fe8c9ed96680e29d37e8" + integrity sha512-rsZ4LGvFTZnzdNZR5HZdmJVuXK8834R5QkF3WvcnBhrlVtF0HSIUC6zbreL9MgjTywhKokn8RIYRiq99+DLAxA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.4" + "@babel/helper-regex" "^7.10.4" + regexpu-core "^4.7.1" + "@babel/helper-define-map@^7.10.4": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz#b53c10db78a640800152692b13393147acb9bb30" @@ -204,6 +289,15 @@ "@babel/template" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/helper-function-name@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz#1fd7738aee5dcf53c3ecff24f1da9c511ec47b42" + integrity sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA== + dependencies: + "@babel/helper-get-function-arity" "^7.12.10" + "@babel/template" "^7.12.7" + "@babel/types" "^7.12.11" + "@babel/helper-get-function-arity@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2" @@ -211,6 +305,13 @@ dependencies: "@babel/types" "^7.10.4" +"@babel/helper-get-function-arity@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf" + integrity sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag== + dependencies: + "@babel/types" "^7.12.10" + "@babel/helper-hoist-variables@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz#d49b001d1d5a68ca5e6604dda01a6297f7c9381e" @@ -225,6 +326,13 @@ dependencies: "@babel/types" "^7.11.0" +"@babel/helper-member-expression-to-functions@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz#fba0f2fcff3fba00e6ecb664bb5e6e26e2d6165c" + integrity sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ== + dependencies: + "@babel/types" "^7.12.1" + "@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz#4c5c54be04bd31670a7382797d75b9fa2e5b5620" @@ -232,6 +340,13 @@ dependencies: "@babel/types" "^7.10.4" +"@babel/helper-module-imports@^7.12.1", "@babel/helper-module-imports@^7.12.5": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz#1bfc0229f794988f76ed0a4d4e90860850b54dfb" + integrity sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA== + dependencies: + "@babel/types" "^7.12.5" + "@babel/helper-module-transforms@^7.10.4", "@babel/helper-module-transforms@^7.10.5", "@babel/helper-module-transforms@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz#b16f250229e47211abdd84b34b64737c2ab2d359" @@ -245,6 +360,21 @@ "@babel/types" "^7.11.0" lodash "^4.17.19" +"@babel/helper-module-transforms@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz#7954fec71f5b32c48e4b303b437c34453fd7247c" + integrity sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w== + dependencies: + "@babel/helper-module-imports" "^7.12.1" + "@babel/helper-replace-supers" "^7.12.1" + "@babel/helper-simple-access" "^7.12.1" + "@babel/helper-split-export-declaration" "^7.11.0" + "@babel/helper-validator-identifier" "^7.10.4" + "@babel/template" "^7.10.4" + "@babel/traverse" "^7.12.1" + "@babel/types" "^7.12.1" + lodash "^4.17.19" + "@babel/helper-optimise-call-expression@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz#50dc96413d594f995a77905905b05893cd779673" @@ -275,6 +405,15 @@ "@babel/traverse" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/helper-remap-async-to-generator@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.1.tgz#8c4dbbf916314f6047dc05e6a2217074238347fd" + integrity sha512-9d0KQCRM8clMPcDwo8SevNs+/9a8yWVVmaE80FGJcEP8N1qToREmWEGnBn8BUlJhYRFz6fqxeRL1sl5Ogsed7A== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.4" + "@babel/helper-wrap-function" "^7.10.4" + "@babel/types" "^7.12.1" + "@babel/helper-replace-supers@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz#d585cd9388ea06e6031e4cd44b6713cbead9e6cf" @@ -285,6 +424,16 @@ "@babel/traverse" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/helper-replace-supers@^7.12.1": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz#f009a17543bbbbce16b06206ae73b63d3fca68d9" + integrity sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.12.1" + "@babel/helper-optimise-call-expression" "^7.10.4" + "@babel/traverse" "^7.12.5" + "@babel/types" "^7.12.5" + "@babel/helper-simple-access@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz#0f5ccda2945277a2a7a2d3a821e15395edcf3461" @@ -293,6 +442,13 @@ "@babel/template" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/helper-simple-access@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz#32427e5aa61547d38eb1e6eaf5fd1426fdad9136" + integrity sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA== + dependencies: + "@babel/types" "^7.12.1" + "@babel/helper-skip-transparent-expression-wrappers@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.11.0.tgz#eec162f112c2f58d3af0af125e3bb57665146729" @@ -300,6 +456,13 @@ dependencies: "@babel/types" "^7.11.0" +"@babel/helper-skip-transparent-expression-wrappers@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz#462dc63a7e435ade8468385c63d2b84cce4b3cbf" + integrity sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA== + dependencies: + "@babel/types" "^7.12.1" + "@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f" @@ -307,11 +470,33 @@ dependencies: "@babel/types" "^7.11.0" +"@babel/helper-split-export-declaration@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz#1b4cc424458643c47d37022223da33d76ea4603a" + integrity sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g== + dependencies: + "@babel/types" "^7.12.11" + "@babel/helper-validator-identifier@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== +"@babel/helper-validator-identifier@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" + integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== + +"@babel/helper-validator-option@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.1.tgz#175567380c3e77d60ff98a54bb015fe78f2178d9" + integrity sha512-YpJabsXlJVWP0USHjnC/AQDTLlZERbON577YUVO/wLpqyj6HAtVYnWaQaN0iUN+1/tWn3c+uKKXjRut5115Y2A== + +"@babel/helper-validator-option@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.11.tgz#d66cb8b7a3e7fe4c6962b32020a131ecf0847f4f" + integrity sha512-TBFCyj939mFSdeX7U7DDj32WtzYY7fDcalgq8v3fBZMNOJQNn7nOYzMaUCiPxPYfCup69mtIpqlKgMZLvQ8Xhw== + "@babel/helper-wrap-function@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.10.4.tgz#8a6f701eab0ff39f765b5a1cfef409990e624b87" @@ -331,6 +516,15 @@ "@babel/traverse" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/helpers@^7.12.5": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.5.tgz#1a1ba4a768d9b58310eda516c449913fe647116e" + integrity sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA== + dependencies: + "@babel/template" "^7.10.4" + "@babel/traverse" "^7.12.5" + "@babel/types" "^7.12.5" + "@babel/highlight@^7.10.4", "@babel/highlight@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" @@ -340,11 +534,16 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.10.5", "@babel/parser@^7.11.2", "@babel/parser@^7.11.5", "@babel/parser@^7.2.0", "@babel/parser@^7.4.5", "@babel/parser@^7.9.6": +"@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.10.5", "@babel/parser@^7.11.5", "@babel/parser@^7.2.0", "@babel/parser@^7.4.5", "@babel/parser@^7.9.6": version "7.11.5" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.5.tgz#c7ff6303df71080ec7a4f5b8c003c58f1cf51037" integrity sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q== +"@babel/parser@^7.12.10", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.7.0": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.11.tgz#9ce3595bcd74bc5c466905e86c535b8b25011e79" + integrity sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg== + "@babel/plugin-proposal-async-generator-functions@^7.10.4", "@babel/plugin-proposal-async-generator-functions@^7.2.0": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.5.tgz#3491cabf2f7c179ab820606cec27fed15e0e8558" @@ -354,6 +553,15 @@ "@babel/helper-remap-async-to-generator" "^7.10.4" "@babel/plugin-syntax-async-generators" "^7.8.0" +"@babel/plugin-proposal-async-generator-functions@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.1.tgz#dc6c1170e27d8aca99ff65f4925bd06b1c90550e" + integrity sha512-d+/o30tJxFxrA1lhzJqiUcEJdI6jKlNregCv5bASeGf2Q4MXmnwH7viDo7nhx1/ohf09oaH8j1GVYG/e3Yqk6A== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-remap-async-to-generator" "^7.12.1" + "@babel/plugin-syntax-async-generators" "^7.8.0" + "@babel/plugin-proposal-class-properties@7.3.0": version "7.3.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.3.0.tgz#272636bc0fa19a0bc46e601ec78136a173ea36cd" @@ -370,6 +578,14 @@ "@babel/helper-create-class-features-plugin" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-proposal-class-properties@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.1.tgz#a082ff541f2a29a4821065b8add9346c0c16e5de" + integrity sha512-cKp3dlQsFsEs5CWKnN7BnSHOd0EOW8EKpEjkoz1pO2E5KzIDNV9Ros1b0CnmbVgAGXJubOYVBOGCT1OmJwOI7w== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-proposal-decorators@^7.8.3": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.10.5.tgz#42898bba478bc4b1ae242a703a953a7ad350ffb4" @@ -387,6 +603,14 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-dynamic-import" "^7.8.0" +"@babel/plugin-proposal-dynamic-import@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.12.1.tgz#43eb5c2a3487ecd98c5c8ea8b5fdb69a2749b2dc" + integrity sha512-a4rhUSZFuq5W8/OO8H7BL5zspjnc1FLd9hlOxIK/f7qG4a0qsqk8uvF/ywgBA8/OmjsapjpvaEOYItfGG1qIvQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" + "@babel/plugin-proposal-export-default-from@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.10.4.tgz#08f66eef0067cbf6a7bc036977dcdccecaf0c6c5" @@ -403,6 +627,14 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" +"@babel/plugin-proposal-export-namespace-from@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.1.tgz#8b9b8f376b2d88f5dd774e4d24a5cc2e3679b6d4" + integrity sha512-6CThGf0irEkzujYS5LQcjBx8j/4aQGiVv7J9+2f7pGfxqyKh3WnmVJYW3hdrQjyksErMGBPQrCnHfOtna+WLbw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + "@babel/plugin-proposal-json-strings@^7.10.4", "@babel/plugin-proposal-json-strings@^7.2.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.10.4.tgz#593e59c63528160233bd321b1aebe0820c2341db" @@ -411,6 +643,14 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-json-strings" "^7.8.0" +"@babel/plugin-proposal-json-strings@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.12.1.tgz#d45423b517714eedd5621a9dfdc03fa9f4eb241c" + integrity sha512-GoLDUi6U9ZLzlSda2Df++VSqDJg3CG+dR0+iWsv6XRw1rEq+zwt4DirM9yrxW6XWaTpmai1cWJLMfM8qQJf+yw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-json-strings" "^7.8.0" + "@babel/plugin-proposal-logical-assignment-operators@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.11.0.tgz#9f80e482c03083c87125dee10026b58527ea20c8" @@ -419,6 +659,14 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" +"@babel/plugin-proposal-logical-assignment-operators@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.12.1.tgz#f2c490d36e1b3c9659241034a5d2cd50263a2751" + integrity sha512-k8ZmVv0JU+4gcUGeCDZOGd0lCIamU/sMtIiX3UWnUc5yzgq6YUGyEolNYD+MLYKfSzgECPcqetVcJP9Afe/aCA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-proposal-nullish-coalescing-operator@^7.10.1", "@babel/plugin-proposal-nullish-coalescing-operator@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.10.4.tgz#02a7e961fc32e6d5b2db0649e01bf80ddee7e04a" @@ -427,6 +675,14 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" +"@babel/plugin-proposal-nullish-coalescing-operator@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz#3ed4fff31c015e7f3f1467f190dbe545cd7b046c" + integrity sha512-nZY0ESiaQDI1y96+jk6VxMOaL4LPo/QDHBqL+SF3/vl6dHkTwHlOI8L4ZwuRBHgakRBw5zsVylel7QPbbGuYgg== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" + "@babel/plugin-proposal-numeric-separator@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.10.4.tgz#ce1590ff0a65ad12970a609d78855e9a4c1aef06" @@ -435,6 +691,14 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-numeric-separator" "^7.10.4" +"@babel/plugin-proposal-numeric-separator@^7.12.7": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.7.tgz#8bf253de8139099fea193b297d23a9d406ef056b" + integrity sha512-8c+uy0qmnRTeukiGsjLGy6uVs/TFjJchGXUeBqlG4VWYOdJWkhhVPdQ3uHwbmalfJwv2JsV0qffXP4asRfL2SQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-proposal-object-rest-spread@7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.10.4.tgz#50129ac216b9a6a55b3853fdd923e74bf553a4c0" @@ -461,6 +725,15 @@ "@babel/plugin-syntax-object-rest-spread" "^7.8.0" "@babel/plugin-transform-parameters" "^7.10.4" +"@babel/plugin-proposal-object-rest-spread@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz#def9bd03cea0f9b72283dac0ec22d289c7691069" + integrity sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.0" + "@babel/plugin-transform-parameters" "^7.12.1" + "@babel/plugin-proposal-optional-catch-binding@^7.10.4", "@babel/plugin-proposal-optional-catch-binding@^7.2.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.10.4.tgz#31c938309d24a78a49d68fdabffaa863758554dd" @@ -469,6 +742,14 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" +"@babel/plugin-proposal-optional-catch-binding@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.12.1.tgz#ccc2421af64d3aae50b558a71cede929a5ab2942" + integrity sha512-hFvIjgprh9mMw5v42sJWLI1lzU5L2sznP805zeT6rySVRA0Y18StRhDqhSxlap0oVgItRsB6WSROp4YnJTJz0g== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" + "@babel/plugin-proposal-optional-chaining@^7.10.1", "@babel/plugin-proposal-optional-chaining@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.11.0.tgz#de5866d0646f6afdaab8a566382fe3a221755076" @@ -478,6 +759,15 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.11.0" "@babel/plugin-syntax-optional-chaining" "^7.8.0" +"@babel/plugin-proposal-optional-chaining@^7.12.7": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.7.tgz#e02f0ea1b5dc59d401ec16fb824679f683d3303c" + integrity sha512-4ovylXZ0PWmwoOvhU2vhnzVNnm88/Sm9nx7V8BPgMvAzn5zDou3/Awy0EjglyubVHasJj+XCEkr/r1X3P5elCA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-skip-transparent-expression-wrappers" "^7.12.1" + "@babel/plugin-syntax-optional-chaining" "^7.8.0" + "@babel/plugin-proposal-private-methods@^7.10.4", "@babel/plugin-proposal-private-methods@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.10.4.tgz#b160d972b8fdba5c7d111a145fc8c421fc2a6909" @@ -486,6 +776,14 @@ "@babel/helper-create-class-features-plugin" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-proposal-private-methods@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.12.1.tgz#86814f6e7a21374c980c10d38b4493e703f4a389" + integrity sha512-mwZ1phvH7/NHK6Kf8LP7MYDogGV+DKB1mryFOEwx5EBNQrosvIczzZFTUmWaeujd5xT6G1ELYWUz3CutMhjE1w== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-proposal-unicode-property-regex@^7.10.4", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.4.tgz#4483cda53041ce3413b7fe2f00022665ddfaa75d" @@ -494,6 +792,14 @@ "@babel/helper-create-regexp-features-plugin" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-proposal-unicode-property-regex@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.1.tgz#2a183958d417765b9eae334f47758e5d6a82e072" + integrity sha512-MYq+l+PvHuw/rKUz1at/vb6nCnQ2gmJBNaM62z0OgH7B2W1D9pvkpYtlti9bGtizNIU1K3zm4bZF9F91efVY0w== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-async-generators@^7.2.0", "@babel/plugin-syntax-async-generators@^7.8.0", "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" @@ -515,6 +821,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-syntax-class-properties@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz#bcb297c5366e79bebadef509549cd93b04f19978" + integrity sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-decorators@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.10.4.tgz#6853085b2c429f9d322d02f5a635018cdeb2360c" @@ -571,6 +884,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-syntax-jsx@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz#9d9d357cc818aa7ae7935917c1257f67677a0926" + integrity sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" @@ -613,7 +933,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-top-level-await@^7.10.4", "@babel/plugin-syntax-top-level-await@^7.8.3": +"@babel/plugin-syntax-top-level-await@^7.10.4", "@babel/plugin-syntax-top-level-await@^7.12.1", "@babel/plugin-syntax-top-level-await@^7.8.3": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz#dd6c0b357ac1bb142d98537450a319625d13d2a0" integrity sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A== @@ -627,6 +947,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-syntax-typescript@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.1.tgz#460ba9d77077653803c3dd2e673f76d66b4029e5" + integrity sha512-UZNEcCY+4Dp9yYRCAHrHDU+9ZXLYaY9MgBXSRLkB9WjYFRR6quJBumfVrEkUxrePPBwFcpWfNKXqVRQQtm7mMA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-arrow-functions@^7.10.4", "@babel/plugin-transform-arrow-functions@^7.2.0", "@babel/plugin-transform-arrow-functions@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.10.4.tgz#e22960d77e697c74f41c501d44d73dbf8a6a64cd" @@ -634,6 +961,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-arrow-functions@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.12.1.tgz#8083ffc86ac8e777fbe24b5967c4b2521f3cb2b3" + integrity sha512-5QB50qyN44fzzz4/qxDPQMBCTHgxg3n0xRBLJUmBlLoU/sFvxVWGZF/ZUfMVDQuJUKXaBhbupxIzIfZ6Fwk/0A== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-async-to-generator@^7.10.4", "@babel/plugin-transform-async-to-generator@^7.4.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.10.4.tgz#41a5017e49eb6f3cda9392a51eef29405b245a37" @@ -643,6 +977,15 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/helper-remap-async-to-generator" "^7.10.4" +"@babel/plugin-transform-async-to-generator@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.12.1.tgz#3849a49cc2a22e9743cbd6b52926d30337229af1" + integrity sha512-SDtqoEcarK1DFlRJ1hHRY5HvJUj5kX4qmtpMAm2QnhOlyuMC4TMdCRgW6WXpv93rZeYNeLP22y8Aq2dbcDRM1A== + dependencies: + "@babel/helper-module-imports" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-remap-async-to-generator" "^7.12.1" + "@babel/plugin-transform-block-scoped-functions@^7.10.4", "@babel/plugin-transform-block-scoped-functions@^7.2.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.10.4.tgz#1afa595744f75e43a91af73b0d998ecfe4ebc2e8" @@ -650,6 +993,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-block-scoped-functions@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.1.tgz#f2a1a365bde2b7112e0a6ded9067fdd7c07905d9" + integrity sha512-5OpxfuYnSgPalRpo8EWGPzIYf0lHBWORCkj5M0oLBwHdlux9Ri36QqGW3/LR13RSVOAoUUMzoPI/jpE4ABcHoA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-block-scoping@^7.10.4", "@babel/plugin-transform-block-scoping@^7.4.4", "@babel/plugin-transform-block-scoping@^7.8.3": version "7.11.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.11.1.tgz#5b7efe98852bef8d652c0b28144cd93a9e4b5215" @@ -657,6 +1007,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-block-scoping@^7.12.11": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.12.tgz#d93a567a152c22aea3b1929bb118d1d0a175cdca" + integrity sha512-VOEPQ/ExOVqbukuP7BYJtI5ZxxsmegTwzZ04j1aF0dkSypGo9XpDHuOrABsJu+ie+penpSJheDJ11x1BEZNiyQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-classes@^7.10.4", "@babel/plugin-transform-classes@^7.4.4", "@babel/plugin-transform-classes@^7.9.5": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.10.4.tgz#405136af2b3e218bc4a1926228bc917ab1a0adc7" @@ -671,6 +1028,20 @@ "@babel/helper-split-export-declaration" "^7.10.4" globals "^11.1.0" +"@babel/plugin-transform-classes@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.12.1.tgz#65e650fcaddd3d88ddce67c0f834a3d436a32db6" + integrity sha512-/74xkA7bVdzQTBeSUhLLJgYIcxw/dpEpCdRDiHgPJ3Mv6uC11UhjpOhl72CgqbBCmt1qtssCyB2xnJm1+PFjog== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.4" + "@babel/helper-define-map" "^7.10.4" + "@babel/helper-function-name" "^7.10.4" + "@babel/helper-optimise-call-expression" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-replace-supers" "^7.12.1" + "@babel/helper-split-export-declaration" "^7.10.4" + globals "^11.1.0" + "@babel/plugin-transform-computed-properties@^7.10.4", "@babel/plugin-transform-computed-properties@^7.2.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.10.4.tgz#9ded83a816e82ded28d52d4b4ecbdd810cdfc0eb" @@ -678,6 +1049,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-computed-properties@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.12.1.tgz#d68cf6c9b7f838a8a4144badbe97541ea0904852" + integrity sha512-vVUOYpPWB7BkgUWPo4C44mUQHpTZXakEqFjbv8rQMg7TC6S6ZhGZ3otQcRH6u7+adSlE5i0sp63eMC/XGffrzg== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-destructuring@^7.10.4", "@babel/plugin-transform-destructuring@^7.4.4", "@babel/plugin-transform-destructuring@^7.9.5": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.10.4.tgz#70ddd2b3d1bea83d01509e9bb25ddb3a74fc85e5" @@ -685,6 +1063,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-destructuring@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.12.1.tgz#b9a570fe0d0a8d460116413cb4f97e8e08b2f847" + integrity sha512-fRMYFKuzi/rSiYb2uRLiUENJOKq4Gnl+6qOv5f8z0TZXg3llUwUhsNNwrwaT/6dUhJTzNpBr+CUvEWBtfNY1cw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-dotall-regex@^7.10.4", "@babel/plugin-transform-dotall-regex@^7.4.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.4.tgz#469c2062105c1eb6a040eaf4fac4b488078395ee" @@ -693,6 +1078,14 @@ "@babel/helper-create-regexp-features-plugin" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-dotall-regex@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.1.tgz#a1d16c14862817b6409c0a678d6f9373ca9cd975" + integrity sha512-B2pXeRKoLszfEW7J4Hg9LoFaWEbr/kzo3teWHmtFCszjRNa/b40f9mfeqZsIDLLt/FjwQ6pz/Gdlwy85xNckBA== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-duplicate-keys@^7.10.4", "@babel/plugin-transform-duplicate-keys@^7.2.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.10.4.tgz#697e50c9fee14380fe843d1f306b295617431e47" @@ -700,6 +1093,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-duplicate-keys@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.1.tgz#745661baba295ac06e686822797a69fbaa2ca228" + integrity sha512-iRght0T0HztAb/CazveUpUQrZY+aGKKaWXMJ4uf9YJtqxSUe09j3wteztCUDRHs+SRAL7yMuFqUsLoAKKzgXjw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-exponentiation-operator@^7.10.4", "@babel/plugin-transform-exponentiation-operator@^7.2.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.10.4.tgz#5ae338c57f8cf4001bdb35607ae66b92d665af2e" @@ -708,6 +1108,14 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-exponentiation-operator@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.1.tgz#b0f2ed356ba1be1428ecaf128ff8a24f02830ae0" + integrity sha512-7tqwy2bv48q+c1EHbXK0Zx3KXd2RVQp6OC7PbwFNt/dPTAV3Lu5sWtWuAj8owr5wqtWnqHfl2/mJlUmqkChKug== + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-flow-strip-types@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.10.4.tgz#c497957f09e86e3df7296271e9eb642876bf7788" @@ -723,6 +1131,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-for-of@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.12.1.tgz#07640f28867ed16f9511c99c888291f560921cfa" + integrity sha512-Zaeq10naAsuHo7heQvyV0ptj4dlZJwZgNAtBYBnu5nNKJoW62m0zKcIEyVECrUKErkUkg6ajMy4ZfnVZciSBhg== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-function-name@^7.10.4", "@babel/plugin-transform-function-name@^7.4.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.10.4.tgz#6a467880e0fc9638514ba369111811ddbe2644b7" @@ -731,6 +1146,14 @@ "@babel/helper-function-name" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-function-name@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.1.tgz#2ec76258c70fe08c6d7da154003a480620eba667" + integrity sha512-JF3UgJUILoFrFMEnOJLJkRHSk6LUSXLmEFsA23aR2O5CSLUxbeUX1IZ1YQ7Sn0aXb601Ncwjx73a+FVqgcljVw== + dependencies: + "@babel/helper-function-name" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-literals@^7.10.4", "@babel/plugin-transform-literals@^7.2.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.10.4.tgz#9f42ba0841100a135f22712d0e391c462f571f3c" @@ -738,6 +1161,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-literals@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.1.tgz#d73b803a26b37017ddf9d3bb8f4dc58bfb806f57" + integrity sha512-+PxVGA+2Ag6uGgL0A5f+9rklOnnMccwEBzwYFL3EUaKuiyVnUipyXncFcfjSkbimLrODoqki1U9XxZzTvfN7IQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-member-expression-literals@^7.10.4", "@babel/plugin-transform-member-expression-literals@^7.2.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.10.4.tgz#b1ec44fcf195afcb8db2c62cd8e551c881baf8b7" @@ -745,6 +1175,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-member-expression-literals@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.1.tgz#496038602daf1514a64d43d8e17cbb2755e0c3ad" + integrity sha512-1sxePl6z9ad0gFMB9KqmYofk34flq62aqMt9NqliS/7hPEpURUCMbyHXrMPlo282iY7nAvUB1aQd5mg79UD9Jg== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-modules-amd@^7.10.4", "@babel/plugin-transform-modules-amd@^7.2.0": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.5.tgz#1b9cddaf05d9e88b3aad339cb3e445c4f020a9b1" @@ -754,6 +1191,15 @@ "@babel/helper-plugin-utils" "^7.10.4" babel-plugin-dynamic-import-node "^2.3.3" +"@babel/plugin-transform-modules-amd@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.12.1.tgz#3154300b026185666eebb0c0ed7f8415fefcf6f9" + integrity sha512-tDW8hMkzad5oDtzsB70HIQQRBiTKrhfgwC/KkJeGsaNFTdWhKNt/BiE8c5yj19XiGyrxpbkOfH87qkNg1YGlOQ== + dependencies: + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + babel-plugin-dynamic-import-node "^2.3.3" + "@babel/plugin-transform-modules-commonjs@^7.10.4", "@babel/plugin-transform-modules-commonjs@^7.4.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.10.4.tgz#66667c3eeda1ebf7896d41f1f16b17105a2fbca0" @@ -764,6 +1210,16 @@ "@babel/helper-simple-access" "^7.10.4" babel-plugin-dynamic-import-node "^2.3.3" +"@babel/plugin-transform-modules-commonjs@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.12.1.tgz#fa403124542636c786cf9b460a0ffbb48a86e648" + integrity sha512-dY789wq6l0uLY8py9c1B48V8mVL5gZh/+PQ5ZPrylPYsnAvnEMjqsUXkuoDVPeVK+0VyGar+D08107LzDQ6pag== + dependencies: + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-simple-access" "^7.12.1" + babel-plugin-dynamic-import-node "^2.3.3" + "@babel/plugin-transform-modules-systemjs@^7.10.4", "@babel/plugin-transform-modules-systemjs@^7.4.4": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.5.tgz#6270099c854066681bae9e05f87e1b9cadbe8c85" @@ -774,6 +1230,17 @@ "@babel/helper-plugin-utils" "^7.10.4" babel-plugin-dynamic-import-node "^2.3.3" +"@babel/plugin-transform-modules-systemjs@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.12.1.tgz#663fea620d593c93f214a464cd399bf6dc683086" + integrity sha512-Hn7cVvOavVh8yvW6fLwveFqSnd7rbQN3zJvoPNyNaQSvgfKmDBO9U1YL9+PCXGRlZD9tNdWTy5ACKqMuzyn32Q== + dependencies: + "@babel/helper-hoist-variables" "^7.10.4" + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-validator-identifier" "^7.10.4" + babel-plugin-dynamic-import-node "^2.3.3" + "@babel/plugin-transform-modules-umd@^7.10.4", "@babel/plugin-transform-modules-umd@^7.2.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.10.4.tgz#9a8481fe81b824654b3a0b65da3df89f3d21839e" @@ -782,6 +1249,14 @@ "@babel/helper-module-transforms" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-modules-umd@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.12.1.tgz#eb5a218d6b1c68f3d6217b8fa2cc82fec6547902" + integrity sha512-aEIubCS0KHKM0zUos5fIoQm+AZUMt1ZvMpqz0/H5qAQ7vWylr9+PLYurT+Ic7ID/bKLd4q8hDovaG3Zch2uz5Q== + dependencies: + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-named-capturing-groups-regex@^7.10.4", "@babel/plugin-transform-named-capturing-groups-regex@^7.4.5": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.10.4.tgz#78b4d978810b6f3bcf03f9e318f2fc0ed41aecb6" @@ -789,6 +1264,13 @@ dependencies: "@babel/helper-create-regexp-features-plugin" "^7.10.4" +"@babel/plugin-transform-named-capturing-groups-regex@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.1.tgz#b407f5c96be0d9f5f88467497fa82b30ac3e8753" + integrity sha512-tB43uQ62RHcoDp9v2Nsf+dSM8sbNodbEicbQNA53zHz8pWUhsgHSJCGpt7daXxRydjb0KnfmB+ChXOv3oADp1Q== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.12.1" + "@babel/plugin-transform-new-target@^7.10.4", "@babel/plugin-transform-new-target@^7.4.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.10.4.tgz#9097d753cb7b024cb7381a3b2e52e9513a9c6888" @@ -796,6 +1278,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-new-target@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.1.tgz#80073f02ee1bb2d365c3416490e085c95759dec0" + integrity sha512-+eW/VLcUL5L9IvJH7rT1sT0CzkdUTvPrXC2PXTn/7z7tXLBuKvezYbGdxD5WMRoyvyaujOq2fWoKl869heKjhw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-object-super@^7.10.4", "@babel/plugin-transform-object-super@^7.2.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.10.4.tgz#d7146c4d139433e7a6526f888c667e314a093894" @@ -804,6 +1293,14 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/helper-replace-supers" "^7.10.4" +"@babel/plugin-transform-object-super@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.1.tgz#4ea08696b8d2e65841d0c7706482b048bed1066e" + integrity sha512-AvypiGJH9hsquNUn+RXVcBdeE3KHPZexWRdimhuV59cSoOt5kFBmqlByorAeUlGG2CJWd0U+4ZtNKga/TB0cAw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-replace-supers" "^7.12.1" + "@babel/plugin-transform-parameters@^7.10.4", "@babel/plugin-transform-parameters@^7.4.4", "@babel/plugin-transform-parameters@^7.9.5": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.5.tgz#59d339d58d0b1950435f4043e74e2510005e2c4a" @@ -812,6 +1309,13 @@ "@babel/helper-get-function-arity" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-parameters@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.12.1.tgz#d2e963b038771650c922eff593799c96d853255d" + integrity sha512-xq9C5EQhdPK23ZeCdMxl8bbRnAgHFrw5EOC3KJUsSylZqdkCaFEXxGSBuTSObOpiiHHNyb82es8M1QYgfQGfNg== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-property-literals@^7.10.4", "@babel/plugin-transform-property-literals@^7.2.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.10.4.tgz#f6fe54b6590352298785b83edd815d214c42e3c0" @@ -819,6 +1323,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-property-literals@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.1.tgz#41bc81200d730abb4456ab8b3fbd5537b59adecd" + integrity sha512-6MTCR/mZ1MQS+AwZLplX4cEySjCpnIF26ToWo942nqn8hXSm7McaHQNeGx/pt7suI1TWOWMfa/NgBhiqSnX0cQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-react-constant-elements@^7.9.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.10.4.tgz#0f485260bf1c29012bb973e7e404749eaac12c9e" @@ -833,6 +1344,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-react-display-name@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.12.1.tgz#1cbcd0c3b1d6648c55374a22fc9b6b7e5341c00d" + integrity sha512-cAzB+UzBIrekfYxyLlFqf/OagTvHLcVBb5vpouzkYkBclRPraiygVnafvAoipErZLI8ANv8Ecn6E/m5qPXD26w== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-react-jsx-development@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.10.4.tgz#6ec90f244394604623880e15ebc3c34c356258ba" @@ -842,6 +1360,13 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-jsx" "^7.10.4" +"@babel/plugin-transform-react-jsx-development@^7.12.7": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.12.12.tgz#bccca33108fe99d95d7f9e82046bfe762e71f4e7" + integrity sha512-i1AxnKxHeMxUaWVXQOSIco4tvVvvCxMSfeBMnMM06mpaJt3g+MpxYQQrDfojUQldP1xxraPSJYSMEljoWM/dCg== + dependencies: + "@babel/plugin-transform-react-jsx" "^7.12.12" + "@babel/plugin-transform-react-jsx-self@^7.0.0", "@babel/plugin-transform-react-jsx-self@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.10.4.tgz#cd301a5fed8988c182ed0b9d55e9bd6db0bd9369" @@ -868,6 +1393,17 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-jsx" "^7.10.4" +"@babel/plugin-transform-react-jsx@^7.12.10", "@babel/plugin-transform-react-jsx@^7.12.12": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.12.tgz#b0da51ffe5f34b9a900e9f1f5fb814f9e512d25e" + integrity sha512-JDWGuzGNWscYcq8oJVCtSE61a5+XAOos+V0HrxnDieUus4UMnBEosDnY1VJqU5iZ4pA04QY7l0+JvHL1hZEfsw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.12.10" + "@babel/helper-module-imports" "^7.12.5" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-jsx" "^7.12.1" + "@babel/types" "^7.12.12" + "@babel/plugin-transform-react-pure-annotations@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.10.4.tgz#3eefbb73db94afbc075f097523e445354a1c6501" @@ -876,6 +1412,14 @@ "@babel/helper-annotate-as-pure" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-react-pure-annotations@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.12.1.tgz#05d46f0ab4d1339ac59adf20a1462c91b37a1a42" + integrity sha512-RqeaHiwZtphSIUZ5I85PEH19LOSzxfuEazoY7/pWASCAIBuATQzpSVD+eT6MebeeZT2F4eSL0u4vw6n4Nm0Mjg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-regenerator@^7.10.4", "@babel/plugin-transform-regenerator@^7.4.5": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.10.4.tgz#2015e59d839074e76838de2159db421966fd8b63" @@ -883,6 +1427,13 @@ dependencies: regenerator-transform "^0.14.2" +"@babel/plugin-transform-regenerator@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.1.tgz#5f0a28d842f6462281f06a964e88ba8d7ab49753" + integrity sha512-gYrHqs5itw6i4PflFX3OdBPMQdPbF4bj2REIUxlMRUFk0/ZOAIpDFuViuxPjUL7YC8UPnf+XG7/utJvqXdPKng== + dependencies: + regenerator-transform "^0.14.2" + "@babel/plugin-transform-reserved-words@^7.10.4", "@babel/plugin-transform-reserved-words@^7.2.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.10.4.tgz#8f2682bcdcef9ed327e1b0861585d7013f8a54dd" @@ -890,6 +1441,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-reserved-words@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.1.tgz#6fdfc8cc7edcc42b36a7c12188c6787c873adcd8" + integrity sha512-pOnUfhyPKvZpVyBHhSBoX8vfA09b7r00Pmm1sH+29ae2hMTKVmSp4Ztsr8KBKjLjx17H0eJqaRC3bR2iThM54A== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-runtime@7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.2.0.tgz#566bc43f7d0aedc880eaddbd29168d0f248966ea" @@ -900,14 +1458,13 @@ resolve "^1.8.1" semver "^5.5.1" -"@babel/plugin-transform-runtime@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.11.0.tgz#e27f78eb36f19448636e05c33c90fd9ad9b8bccf" - integrity sha512-LFEsP+t3wkYBlis8w6/kmnd6Kb1dxTd+wGJ8MlxTGzQo//ehtqlVL4S9DNUa53+dtPSQobN2CXx4d81FqC58cw== +"@babel/plugin-transform-runtime@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.10.tgz#af0fded4e846c4b37078e8e5d06deac6cd848562" + integrity sha512-xOrUfzPxw7+WDm9igMgQCbO3cJKymX7dFdsgRr1eu9n3KjjyU4pptIXbXPseQDquw+W+RuJEJMHKHNsPNNm3CA== dependencies: - "@babel/helper-module-imports" "^7.10.4" + "@babel/helper-module-imports" "^7.12.5" "@babel/helper-plugin-utils" "^7.10.4" - resolve "^1.8.1" semver "^5.5.1" "@babel/plugin-transform-shorthand-properties@^7.10.4", "@babel/plugin-transform-shorthand-properties@^7.2.0", "@babel/plugin-transform-shorthand-properties@^7.8.3": @@ -917,6 +1474,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-shorthand-properties@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.1.tgz#0bf9cac5550fce0cfdf043420f661d645fdc75e3" + integrity sha512-GFZS3c/MhX1OusqB1MZ1ct2xRzX5ppQh2JU1h2Pnfk88HtFTM+TWQqJNfwkmxtPQtb/s1tk87oENfXJlx7rSDw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-spread@^7.11.0", "@babel/plugin-transform-spread@^7.2.0", "@babel/plugin-transform-spread@^7.8.3": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.11.0.tgz#fa84d300f5e4f57752fe41a6d1b3c554f13f17cc" @@ -925,6 +1489,14 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/helper-skip-transparent-expression-wrappers" "^7.11.0" +"@babel/plugin-transform-spread@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.12.1.tgz#527f9f311be4ec7fdc2b79bb89f7bf884b3e1e1e" + integrity sha512-vuLp8CP0BE18zVYjsEBZ5xoCecMK6LBMMxYzJnh01rxQRvhNhH1csMMmBfNo5tGpGO+NhdSNW2mzIvBu3K1fng== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-skip-transparent-expression-wrappers" "^7.12.1" + "@babel/plugin-transform-sticky-regex@^7.10.4", "@babel/plugin-transform-sticky-regex@^7.2.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.10.4.tgz#8f3889ee8657581130a29d9cc91d7c73b7c4a28d" @@ -933,6 +1505,13 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/helper-regex" "^7.10.4" +"@babel/plugin-transform-sticky-regex@^7.12.7": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.7.tgz#560224613ab23987453948ed21d0b0b193fa7fad" + integrity sha512-VEiqZL5N/QvDbdjfYQBhruN0HYjSPjC4XkeqW4ny/jNtH9gcbgaqBIXYEZCNnESMAGs0/K/R7oFGMhOyu/eIxg== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-template-literals@^7.10.4", "@babel/plugin-transform-template-literals@^7.4.4", "@babel/plugin-transform-template-literals@^7.8.3": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.5.tgz#78bc5d626a6642db3312d9d0f001f5e7639fde8c" @@ -941,6 +1520,13 @@ "@babel/helper-annotate-as-pure" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-template-literals@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.12.1.tgz#b43ece6ed9a79c0c71119f576d299ef09d942843" + integrity sha512-b4Zx3KHi+taXB1dVRBhVJtEPi9h1THCeKmae2qP0YdUHIFhVjtpqqNfxeVAa1xeHVhAy4SbHxEwx5cltAu5apw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-typeof-symbol@^7.10.4", "@babel/plugin-transform-typeof-symbol@^7.2.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.10.4.tgz#9509f1a7eec31c4edbffe137c16cc33ff0bc5bfc" @@ -948,6 +1534,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-typeof-symbol@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.10.tgz#de01c4c8f96580bd00f183072b0d0ecdcf0dec4b" + integrity sha512-JQ6H8Rnsogh//ijxspCjc21YPd3VLVoYtAwv3zQmqAt8YGYUtdo5usNhdl4b9/Vir2kPFZl6n1h0PfUz4hJhaA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-typescript@^7.10.4": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.11.0.tgz#2b4879676af37342ebb278216dd090ac67f13abb" @@ -957,6 +1550,15 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-typescript" "^7.10.4" +"@babel/plugin-transform-typescript@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.12.1.tgz#d92cc0af504d510e26a754a7dbc2e5c8cd9c7ab4" + integrity sha512-VrsBByqAIntM+EYMqSm59SiMEf7qkmI9dqMt6RbD/wlwueWmYcI0FFK5Fj47pP6DRZm+3teXjosKlwcZJ5lIMw== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-typescript" "^7.12.1" + "@babel/plugin-transform-unicode-escapes@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.10.4.tgz#feae523391c7651ddac115dae0a9d06857892007" @@ -964,6 +1566,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-unicode-escapes@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.1.tgz#5232b9f81ccb07070b7c3c36c67a1b78f1845709" + integrity sha512-I8gNHJLIc7GdApm7wkVnStWssPNbSRMPtgHdmH3sRM1zopz09UWPS4x5V4n1yz/MIWTVnJ9sp6IkuXdWM4w+2Q== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-unicode-regex@^7.10.4", "@babel/plugin-transform-unicode-regex@^7.4.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.10.4.tgz#e56d71f9282fac6db09c82742055576d5e6d80a8" @@ -972,6 +1581,14 @@ "@babel/helper-create-regexp-features-plugin" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-unicode-regex@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.1.tgz#cc9661f61390db5c65e3febaccefd5c6ac3faecb" + integrity sha512-SqH4ClNngh/zGwHZOOQMTD+e8FGWexILV+ePMyiDJttAWRh5dhDL8rcl5lSgU3Huiq6Zn6pWTMvdPAb21Dwdyg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/preset-env@7.4.5": version "7.4.5" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.4.5.tgz#2fad7f62983d5af563b5f3139242755884998a58" @@ -1026,7 +1643,79 @@ js-levenshtein "^1.1.3" semver "^5.5.0" -"@babel/preset-env@^7.11.0", "@babel/preset-env@^7.9.5", "@babel/preset-env@^7.9.6": +"@babel/preset-env@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.12.11.tgz#55d5f7981487365c93dbbc84507b1c7215e857f9" + integrity sha512-j8Tb+KKIXKYlDBQyIOy4BLxzv1NUOwlHfZ74rvW+Z0Gp4/cI2IMDPBWAgWceGcE7aep9oL/0K9mlzlMGxA8yNw== + dependencies: + "@babel/compat-data" "^7.12.7" + "@babel/helper-compilation-targets" "^7.12.5" + "@babel/helper-module-imports" "^7.12.5" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-validator-option" "^7.12.11" + "@babel/plugin-proposal-async-generator-functions" "^7.12.1" + "@babel/plugin-proposal-class-properties" "^7.12.1" + "@babel/plugin-proposal-dynamic-import" "^7.12.1" + "@babel/plugin-proposal-export-namespace-from" "^7.12.1" + "@babel/plugin-proposal-json-strings" "^7.12.1" + "@babel/plugin-proposal-logical-assignment-operators" "^7.12.1" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.12.1" + "@babel/plugin-proposal-numeric-separator" "^7.12.7" + "@babel/plugin-proposal-object-rest-spread" "^7.12.1" + "@babel/plugin-proposal-optional-catch-binding" "^7.12.1" + "@babel/plugin-proposal-optional-chaining" "^7.12.7" + "@babel/plugin-proposal-private-methods" "^7.12.1" + "@babel/plugin-proposal-unicode-property-regex" "^7.12.1" + "@babel/plugin-syntax-async-generators" "^7.8.0" + "@babel/plugin-syntax-class-properties" "^7.12.1" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + "@babel/plugin-syntax-json-strings" "^7.8.0" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" + "@babel/plugin-syntax-optional-chaining" "^7.8.0" + "@babel/plugin-syntax-top-level-await" "^7.12.1" + "@babel/plugin-transform-arrow-functions" "^7.12.1" + "@babel/plugin-transform-async-to-generator" "^7.12.1" + "@babel/plugin-transform-block-scoped-functions" "^7.12.1" + "@babel/plugin-transform-block-scoping" "^7.12.11" + "@babel/plugin-transform-classes" "^7.12.1" + "@babel/plugin-transform-computed-properties" "^7.12.1" + "@babel/plugin-transform-destructuring" "^7.12.1" + "@babel/plugin-transform-dotall-regex" "^7.12.1" + "@babel/plugin-transform-duplicate-keys" "^7.12.1" + "@babel/plugin-transform-exponentiation-operator" "^7.12.1" + "@babel/plugin-transform-for-of" "^7.12.1" + "@babel/plugin-transform-function-name" "^7.12.1" + "@babel/plugin-transform-literals" "^7.12.1" + "@babel/plugin-transform-member-expression-literals" "^7.12.1" + "@babel/plugin-transform-modules-amd" "^7.12.1" + "@babel/plugin-transform-modules-commonjs" "^7.12.1" + "@babel/plugin-transform-modules-systemjs" "^7.12.1" + "@babel/plugin-transform-modules-umd" "^7.12.1" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.12.1" + "@babel/plugin-transform-new-target" "^7.12.1" + "@babel/plugin-transform-object-super" "^7.12.1" + "@babel/plugin-transform-parameters" "^7.12.1" + "@babel/plugin-transform-property-literals" "^7.12.1" + "@babel/plugin-transform-regenerator" "^7.12.1" + "@babel/plugin-transform-reserved-words" "^7.12.1" + "@babel/plugin-transform-shorthand-properties" "^7.12.1" + "@babel/plugin-transform-spread" "^7.12.1" + "@babel/plugin-transform-sticky-regex" "^7.12.7" + "@babel/plugin-transform-template-literals" "^7.12.1" + "@babel/plugin-transform-typeof-symbol" "^7.12.10" + "@babel/plugin-transform-unicode-escapes" "^7.12.1" + "@babel/plugin-transform-unicode-regex" "^7.12.1" + "@babel/preset-modules" "^0.1.3" + "@babel/types" "^7.12.11" + core-js-compat "^3.8.0" + semver "^5.5.0" + +"@babel/preset-env@^7.9.5", "@babel/preset-env@^7.9.6": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.11.0.tgz#860ee38f2ce17ad60480c2021ba9689393efb796" integrity sha512-2u1/k7rG/gTh02dylX2kL3S0IJNF+J6bfDSp4DI2Ma8QN6Y9x9pmAax59fsCk6QUQG0yqH47yJWA+u1I1LccAg== @@ -1130,7 +1819,7 @@ "@babel/plugin-transform-react-jsx-self" "^7.0.0" "@babel/plugin-transform-react-jsx-source" "^7.0.0" -"@babel/preset-react@^7.0.0", "@babel/preset-react@^7.10.4", "@babel/preset-react@^7.8.3", "@babel/preset-react@^7.9.4": +"@babel/preset-react@^7.0.0", "@babel/preset-react@^7.8.3", "@babel/preset-react@^7.9.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.10.4.tgz#92e8a66d816f9911d11d4cc935be67adfc82dbcf" integrity sha512-BrHp4TgOIy4M19JAfO1LhycVXOPWdDbTRep7eVyatf174Hff+6Uk53sDyajqZPu8W1qXRBiYOfIamek6jA7YVw== @@ -1143,7 +1832,27 @@ "@babel/plugin-transform-react-jsx-source" "^7.10.4" "@babel/plugin-transform-react-pure-annotations" "^7.10.4" -"@babel/preset-typescript@^7.10.4", "@babel/preset-typescript@^7.9.0": +"@babel/preset-react@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.12.10.tgz#4fed65f296cbb0f5fb09de6be8cddc85cc909be9" + integrity sha512-vtQNjaHRl4DUpp+t+g4wvTHsLQuye+n0H/wsXIZRn69oz/fvNC7gQ4IK73zGJBaxvHoxElDvnYCthMcT7uzFoQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-react-display-name" "^7.12.1" + "@babel/plugin-transform-react-jsx" "^7.12.10" + "@babel/plugin-transform-react-jsx-development" "^7.12.7" + "@babel/plugin-transform-react-pure-annotations" "^7.12.1" + +"@babel/preset-typescript@^7.12.7": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.12.7.tgz#fc7df8199d6aae747896f1e6c61fc872056632a3" + integrity sha512-nOoIqIqBmHBSEgBXWR4Dv/XBehtIFcw9PqZw6rFYuKrzsZmOQm3PR5siLBnKZFEsDb03IegG8nSjU/iXXXYRmw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-validator-option" "^7.12.1" + "@babel/plugin-transform-typescript" "^7.12.1" + +"@babel/preset-typescript@^7.9.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.10.4.tgz#7d5d052e52a682480d6e2cc5aa31be61c8c25e36" integrity sha512-SdYnvGPv+bLlwkF2VkJnaX/ni1sMNetcGI1+nThF1gyv6Ph8Qucc4ZZAjM5yZcE/AKRXIOTZz7eSRDWOEjPyRQ== @@ -1162,6 +1871,17 @@ pirates "^4.0.0" source-map-support "^0.5.16" +"@babel/register@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.12.10.tgz#19b87143f17128af4dbe7af54c735663b3999f60" + integrity sha512-EvX/BvMMJRAA3jZgILWgbsrHwBQvllC5T8B29McyME8DvkdOxk4ujESfrMvME8IHSDvWXrmMXxPvA/lx2gqPLQ== + dependencies: + find-cache-dir "^2.0.0" + lodash "^4.17.19" + make-dir "^2.1.0" + pirates "^4.0.0" + source-map-support "^0.5.16" + "@babel/runtime-corejs2@^7.2.0": version "7.11.2" resolved "https://registry.yarnpkg.com/@babel/runtime-corejs2/-/runtime-corejs2-7.11.2.tgz#700a03945ebad0d31ba6690fc8a6bcc9040faa47" @@ -1199,6 +1919,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.12.5": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" + integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.10.4", "@babel/template@^7.3.3", "@babel/template@^7.4.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278" @@ -1208,7 +1935,16 @@ "@babel/parser" "^7.10.4" "@babel/types" "^7.10.4" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.1.6", "@babel/traverse@^7.10.4", "@babel/traverse@^7.10.5", "@babel/traverse@^7.11.5", "@babel/traverse@^7.4.5": +"@babel/template@^7.12.7": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.7.tgz#c817233696018e39fbb6c491d2fb684e05ed43bc" + integrity sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow== + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/parser" "^7.12.7" + "@babel/types" "^7.12.7" + +"@babel/traverse@^7.1.0", "@babel/traverse@^7.1.6", "@babel/traverse@^7.10.4", "@babel/traverse@^7.10.5", "@babel/traverse@^7.11.5", "@babel/traverse@^7.4.5": version "7.11.5" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.11.5.tgz#be777b93b518eb6d76ee2e1ea1d143daa11e61c3" integrity sha512-EjiPXt+r7LiCZXEfRpSJd+jUMnBd4/9OUv7Nx3+0u9+eimMwJmG0Q98lw4/289JCoxSE8OolDMNZaaF/JZ69WQ== @@ -1223,6 +1959,21 @@ globals "^11.1.0" lodash "^4.17.19" +"@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.12", "@babel/traverse@^7.12.5", "@babel/traverse@^7.7.0": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.12.tgz#d0cd87892704edd8da002d674bc811ce64743376" + integrity sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w== + dependencies: + "@babel/code-frame" "^7.12.11" + "@babel/generator" "^7.12.11" + "@babel/helper-function-name" "^7.12.11" + "@babel/helper-split-export-declaration" "^7.12.11" + "@babel/parser" "^7.12.11" + "@babel/types" "^7.12.12" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.19" + "@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.11.5", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.9.5": version "7.11.5" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.5.tgz#d9de577d01252d77c6800cee039ee64faf75662d" @@ -1232,6 +1983,15 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" +"@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.11", "@babel/types@^7.12.12", "@babel/types@^7.12.5", "@babel/types@^7.12.7", "@babel/types@^7.7.0": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.12.tgz#4608a6ec313abbd87afa55004d373ad04a96c299" + integrity sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ== + dependencies: + "@babel/helper-validator-identifier" "^7.12.11" + lodash "^4.17.19" + to-fast-properties "^2.0.0" + "@base2/pretty-print-object@1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@base2/pretty-print-object/-/pretty-print-object-1.0.0.tgz#860ce718b0b73f4009e153541faff2cb6b85d047" @@ -3061,6 +3821,23 @@ call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" +"@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents": + version "2.1.8-no-fsevents" + resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.tgz#da7c3996b8e6e19ebd14d82eaced2313e7769f9b" + integrity sha512-+nb9vWloHNNMFHjGofEam3wopE3m1yuambrrd/fnPc+lFOMB9ROTqQlche9ByFWNkdNqfSgR/kkQtQ8DzEWt2w== + dependencies: + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^3.1.0" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^3.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" + "@nodelib/fs.scandir@2.1.3": version "2.1.3" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" @@ -4555,7 +5332,7 @@ resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-7.0.4.tgz#bfd5b0d0d1ba13e351dff65b6e52783b816826c8" integrity sha512-WiZhq3SVJHFRgRYLXvpf65XnV6ipVHhnNaNvE8yCimejrGglkg38kEj0JcizqwSHxmPSjcTlig/6JouxLGEhGw== -"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.10", "@types/babel__core@^7.1.7": +"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": version "7.1.10" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.10.tgz#ca58fc195dd9734e77e57c6f2df565623636ab40" integrity sha512-x8OM8XzITIMyiwl5Vmo2B1cR1S1Ipkyv4mdlbJjMa1lmuKvKY9FrBbEANIaMlnWn5Rf7uO+rC/VgYabNkE17Hw== @@ -4566,6 +5343,17 @@ "@types/babel__template" "*" "@types/babel__traverse" "*" +"@types/babel__core@^7.1.12": + version "7.1.12" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.12.tgz#4d8e9e51eb265552a7e4f1ff2219ab6133bdfb2d" + integrity sha512-wMTHiiTiBAAPebqaPiPDLFA4LYPKr6Ph0Xq/6rq1Ur3v66HXyG+clfR9CNETkD7MQS8ZHvpQOtA53DLws5WAEQ== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + "@types/babel__generator@*": version "7.0.2" resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.0.2.tgz#d2112a6b21fad600d7674274293c85dce0cb47fc" @@ -7492,6 +8280,11 @@ async-done@^1.2.0, async-done@^1.2.2: process-nextick-args "^2.0.0" stream-exhaust "^1.0.1" +async-each@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== + async-foreach@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" @@ -7675,15 +8468,15 @@ babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: esutils "^2.0.2" js-tokens "^3.0.2" -babel-eslint@^10.0.3: - version "10.0.3" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.3.tgz#81a2c669be0f205e19462fed2482d33e4687a88a" - integrity sha512-z3U7eMY6r/3f3/JB9mTsLjyxrv0Yb1zb8PCWCLpguxfCzBIZUwy23R1t/XKewP+8mEN2Ck8Dtr4q20z6ce6SoA== +babel-eslint@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232" + integrity sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.0.0" - "@babel/traverse" "^7.0.0" - "@babel/types" "^7.0.0" + "@babel/parser" "^7.7.0" + "@babel/traverse" "^7.7.0" + "@babel/types" "^7.7.0" eslint-visitor-keys "^1.0.0" resolve "^1.12.0" @@ -7736,7 +8529,7 @@ babel-helper-to-multiple-sequence-expressions@^0.5.0: resolved "https://registry.yarnpkg.com/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.5.0.tgz#a3f924e3561882d42fcf48907aa98f7979a4588d" integrity sha512-m2CvfDW4+1qfDdsrtf4dwOslQC3yhbgyBFptncp4wvtdrDHqueW7slsYv4gArie056phvQFhT2nRcGS4bnm6mA== -babel-jest@^26.3.0, babel-jest@^26.6.3: +babel-jest@^26.6.3: version "26.6.3" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.3.tgz#d87d25cb0037577a0c89f82e5755c5d293c01056" integrity sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA== @@ -7760,6 +8553,16 @@ babel-loader@^8.0.6: mkdirp "^0.5.1" pify "^4.0.1" +babel-loader@^8.2.2: + version "8.2.2" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.2.tgz#9363ce84c10c9a40e6c753748e1441b60c8a0b81" + integrity sha512-JvTd0/D889PQBtUXJ2PXaKU/pjZDMtHA9V2ecm+eNRmmBCMR09a+fmpGTNwnJtFmFl5Ei7Vy47LjBb+L0wQ99g== + dependencies: + find-cache-dir "^3.3.1" + loader-utils "^1.4.0" + make-dir "^3.1.0" + schema-utils "^2.6.5" + babel-messages@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" @@ -7767,13 +8570,18 @@ babel-messages@^6.23.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-add-module-exports@1.0.2, babel-plugin-add-module-exports@^1.0.2: +babel-plugin-add-module-exports@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-1.0.2.tgz#96cd610d089af664f016467fc4567c099cce2d9c" integrity sha512-4paN7RivvU3Rzju1vGSHWPjO8Y0rI6droWvSFKI6dvEQ4mvoV0zGojnlzVRfI6N8zISo6VERXt3coIuVmzuvNg== optionalDependencies: chokidar "^2.0.4" +babel-plugin-add-module-exports@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-1.0.4.tgz#6caa4ddbe1f578c6a5264d4d3e6c8a2720a7ca2b" + integrity sha512-g+8yxHUZ60RcyaUpfNzy56OtWW+x9cyEe9j+CranqLiqbju2yf/Cy6ZtYK40EZxtrdHllzlVZgLmcOUCTlJ7Jg== + babel-plugin-add-react-displayname@^0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/babel-plugin-add-react-displayname/-/babel-plugin-add-react-displayname-0.0.5.tgz#339d4cddb7b65fd62d1df9db9fe04de134122bd5" @@ -8304,6 +9112,11 @@ big.js@^5.2.2: resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== +binary-extensions@^1.0.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== + binary-extensions@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" @@ -8450,7 +9263,7 @@ brace@0.11.1, brace@^0.11.0, brace@^0.11.1: resolved "https://registry.yarnpkg.com/brace/-/brace-0.11.1.tgz#4896fcc9d544eef45f4bb7660db320d3b379fe58" integrity sha1-SJb8ydVE7vRfS7dmDbMg07N5/lg= -braces@^2.3.1: +braces@^2.3.1, braces@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== @@ -8746,6 +9559,28 @@ browserslist@^4.12.0, browserslist@^4.8.3: node-releases "^1.1.53" pkg-up "^2.0.0" +browserslist@^4.14.5: + version "4.14.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.14.7.tgz#c071c1b3622c1c2e790799a37bb09473a4351cb6" + integrity sha512-BSVRLCeG3Xt/j/1cCGj1019Wbty0H+Yvu2AOuZSuoaUWn3RatbL33Cxk+Q4jRMRAbOm0p7SLravLjpnT6s0vzQ== + dependencies: + caniuse-lite "^1.0.30001157" + colorette "^1.2.1" + electron-to-chromium "^1.3.591" + escalade "^3.1.1" + node-releases "^1.1.66" + +browserslist@^4.16.1: + version "4.16.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.1.tgz#bf757a2da376b3447b800a16f0f1c96358138766" + integrity sha512-UXhDrwqsNcpTYJBTZsbGATDxZbiVDsx6UjpmRUmtnP10pr8wAYr5LgFoEFw9ixriQH2mv/NX2SfGzE/o8GndLA== + dependencies: + caniuse-lite "^1.0.30001173" + colorette "^1.2.1" + electron-to-chromium "^1.3.634" + escalade "^3.1.1" + node-releases "^1.1.69" + browserslist@^4.6.0, browserslist@^4.8.5: version "4.14.5" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.14.5.tgz#1c751461a102ddc60e40993639b709be7f2c4015" @@ -9100,11 +9935,16 @@ camelize@^1.0.0: resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b" integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs= -caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001043, caniuse-lite@^1.0.30001097, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001135: +caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001043, caniuse-lite@^1.0.30001097, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001135, caniuse-lite@^1.0.30001173: version "1.0.30001179" resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001179.tgz" integrity sha512-blMmO0QQujuUWZKyVrD1msR4WNDAqb/UPO1Sw2WWsQ7deoM5bJiicKnWJ1Y0NS/aGINSnKPIWBMw5luX+NDUCA== +caniuse-lite@^1.0.30001157: + version "1.0.30001164" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001164.tgz#5bbfd64ca605d43132f13cc7fdabb17c3036bfdc" + integrity sha512-G+A/tkf4bu0dSp9+duNiXc7bGds35DioCyC6vgK2m/rjA4Krpy5WeZgZyfH2f0wj2kI6yAWWucyap6oOwmY1mg== + capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -9343,7 +10183,7 @@ cheerio@^1.0.0-rc.3: lodash "^4.15.0" parse5 "^3.0.1" -chokidar@2.1.2, chokidar@3.3.0, chokidar@^2.0.0, chokidar@^2.0.4, chokidar@^2.1.1, chokidar@^2.1.2, chokidar@^2.1.8, chokidar@^3.2.2, chokidar@^3.3.0, chokidar@^3.4.1, chokidar@^3.4.3: +chokidar@2.1.2, chokidar@3.3.0, chokidar@^2.0.0, chokidar@^2.0.4, chokidar@^2.1.1, chokidar@^2.1.2, chokidar@^2.1.8, chokidar@^3.2.2, chokidar@^3.3.0, chokidar@^3.4.0, chokidar@^3.4.1, chokidar@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b" integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ== @@ -10226,6 +11066,14 @@ core-js-compat@^3.6.2: browserslist "^4.8.3" semver "7.0.0" +core-js-compat@^3.8.0: + version "3.8.3" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.8.3.tgz#9123fb6b9cad30f0651332dc77deba48ef9b0b3f" + integrity sha512-1sCb0wBXnBIL16pfFG1Gkvei6UzvKyTNYpiC41yrdjEv0UoJoq9E/abTMzyYJ6JpTkAj15dLjbqifIzEBDVvog== + dependencies: + browserslist "^4.16.1" + semver "7.0.0" + core-js-pure@^3.0.0, core-js-pure@^3.0.1: version "3.6.5" resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.6.5.tgz#c79e75f5e38dbc85a662d91eea52b8256d53b813" @@ -12191,6 +13039,16 @@ electron-to-chromium@^1.3.571: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.577.tgz#9885f3f72c6e3367010b461ff6f2d9624a929720" integrity sha512-dSb64JQSFif/pD8mpVAgSFkbVi6YHbK6JeEziwNNmXlr/Ne2rZtseFK5SM7JoWSLf6gP0gVvRGi4/2ZRhSX/rA== +electron-to-chromium@^1.3.591: + version "1.3.598" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.598.tgz#8f757018902ab6190323a8c5f6124d854893a35b" + integrity sha512-G5Ztk23/ubLYVPxPXnB1uu105uzIPd4xB/D8ld8x1GaSC9+vU9NZL16nYZya8H77/7CCKKN7dArzJL3pBs8N7A== + +electron-to-chromium@^1.3.634: + version "1.3.642" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.642.tgz#8b884f50296c2ae2a9997f024d0e3e57facc2b94" + integrity sha512-cev+jOrz/Zm1i+Yh334Hed6lQVOkkemk2wRozfMF4MtTR7pxf3r3L5Rbd7uX1zMcEqVJ7alJBnJL7+JffkC6FQ== + elegant-spinner@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" @@ -12740,10 +13598,10 @@ eslint-module-utils@2.5.0, eslint-module-utils@^2.4.1: debug "^2.6.9" pkg-dir "^2.0.0" -eslint-plugin-babel@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-babel/-/eslint-plugin-babel-5.3.0.tgz#2e7f251ccc249326da760c1a4c948a91c32d0023" - integrity sha512-HPuNzSPE75O+SnxHIafbW5QB45r2w78fxqwK3HmjqIUoPfPzVrq6rD+CINU3yzoDSzEhUkX07VUphbF73Lth/w== +eslint-plugin-babel@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-babel/-/eslint-plugin-babel-5.3.1.tgz#75a2413ffbf17e7be57458301c60291f2cfbf560" + integrity sha512-VsQEr6NH3dj664+EyxJwO4FCYm/00JhYb3Sk3ft8o+fpKuIfQ9TaW6uVUfvwMXHcf/lsnRIoyFPsLMyiWCSL/g== dependencies: eslint-rule-composer "^0.3.0" @@ -16486,6 +17344,13 @@ is-bigint@^1.0.0: resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.0.tgz#73da8c33208d00f130e9b5e15d23eac9215601c4" integrity sha512-t5mGUXC/xRheCK431ylNiSkGGpBp8bHENBcENTkDT6ppwPzEVxNGZRvgvmOEfbWkFhA7D2GEuE2mmQTr78sl2g== +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= + dependencies: + binary-extensions "^1.0.0" + is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -20656,6 +21521,16 @@ node-releases@^1.1.61: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.61.tgz#707b0fca9ce4e11783612ba4a2fcba09047af16e" integrity sha512-DD5vebQLg8jLCOzwupn954fbIiZht05DAZs0k2u8NStSe6h9XdsuIQL8hSRKYiU8WUQRznmSDrKGbv3ObOmC7g== +node-releases@^1.1.66: + version "1.1.67" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.67.tgz#28ebfcccd0baa6aad8e8d4d8fe4cbc49ae239c12" + integrity sha512-V5QF9noGFl3EymEwUYzO+3NTDpGfQB4ve6Qfnzf3UNydMhjQRVPR1DZTuvWiLzaFJYw2fmDwAfnRNEVb64hSIg== + +node-releases@^1.1.69: + version "1.1.70" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.70.tgz#66e0ed0273aa65666d7fe78febe7634875426a08" + integrity sha512-Slf2s69+2/uAD79pVVQo8uSiC34+g8GWY8UH2Qtqv34ZfhYrxpYpfzs9Js9d6O0mbDmALuxaTlplnBTnSELcrw== + node-sass@^4.14.1: version "4.14.1" resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.14.1.tgz#99c87ec2efb7047ed638fb4c9db7f3a42e2217b5" @@ -23847,6 +24722,15 @@ readdir-scoped-modules@^1.0.0: graceful-fs "^4.1.2" once "^1.3.0" +readdirp@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + readdirp@~3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" @@ -24102,6 +24986,18 @@ regexpu-core@^4.7.0: unicode-match-property-ecmascript "^1.0.4" unicode-match-property-value-ecmascript "^1.2.0" +regexpu-core@^4.7.1: + version "4.7.1" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.1.tgz#2dea5a9a07233298fbf0db91fa9abc4c6e0f8ad6" + integrity sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ== + dependencies: + regenerate "^1.4.0" + regenerate-unicode-properties "^8.2.0" + regjsgen "^0.5.1" + regjsparser "^0.6.4" + unicode-match-property-ecmascript "^1.0.4" + unicode-match-property-value-ecmascript "^1.2.0" + registry-auth-token@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.1.1.tgz#40a33be1e82539460f94328b0f7f0f84c16d9479" @@ -28175,6 +29071,11 @@ unzip-response@^1.0.0: resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-1.0.2.tgz#b984f0877fc0a89c2c773cc1ef7b5b232b5b06fe" integrity sha1-uYTwh3/AqJwsdzzB73tbIytbBv4= +upath@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== + update-notifier@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-0.5.0.tgz#07b5dc2066b3627ab3b4f530130f7eddda07a4cc"