diff --git a/.eslintrc.js b/.eslintrc.js index 5a1705ff90c2c..d97668b3545e2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -49,6 +49,11 @@ const ELASTIC_LICENSE_HEADER = ` */ `; +const allMochaRules = {}; +Object.keys(require('eslint-plugin-mocha').rules).forEach(k => { + allMochaRules['mocha/' + k] = 'off'; +}); + module.exports = { root: true, @@ -518,6 +523,14 @@ module.exports = { }, }, + /** + * Harden specific rules + */ + { + files: ['test/harden/*.js'], + rules: allMochaRules, + }, + /** * APM overrides */ diff --git a/docs/apm/advanced-queries.asciidoc b/docs/apm/advanced-queries.asciidoc index 971d543bbb445..ed77ebb4c4930 100644 --- a/docs/apm/advanced-queries.asciidoc +++ b/docs/apm/advanced-queries.asciidoc @@ -21,22 +21,22 @@ TIP: Read the {kibana-ref}/kuery-query.html[Kibana Query Language Enhancements] [float] [[discover-advanced-queries]] -=== Querying in the Discover app +=== Querying in Discover -It may also be helpful to view your APM data in the {kibana-ref}/discover.html[Discover app]. -Querying documents in Discover works the same way as querying in the APM app, -and all of the example APM app queries can also be used in the Discover app. +It may also be helpful to view your APM data in {kibana-ref}/discover.html[*Discover*]. +Querying documents in *Discover* works the same way as querying in the APM app, +and all of the example APM app queries can also be used in *Discover*. [float] -==== Example Discover app query +==== Example Discover query -One example where you may want to make use of the Discover app, +One example where you may want to make use of *Discover*, is for viewing _all_ transactions for an endpoint, instead of just a sample. TIP: Starting in v7.6, you can view 10 samples per bucket in the APM app, instead of just one. Use the APM app to find a transaction name and time bucket that you're interested in learning more about. -Then, switch to the Discover app and make a search: +Then, switch to *Discover* and make a search: ["source","sh"] ----- diff --git a/docs/getting-started/tutorial-discovering.asciidoc b/docs/getting-started/tutorial-discovering.asciidoc index d1e7e9b2d9c43..923301b3fd896 100644 --- a/docs/getting-started/tutorial-discovering.asciidoc +++ b/docs/getting-started/tutorial-discovering.asciidoc @@ -1,20 +1,19 @@ [[tutorial-discovering]] === Discover your data -Using the Discover application, you can enter +Using *Discover*, enter an {ref}/query-dsl-query-string-query.html#query-string-syntax[Elasticsearch query] to search your data and filter the results. -. Open *Discover*. +. Open *Discover*. + -The current index pattern appears below the filter bar, in this case `shakes*`. -You might need to click *New* in the menu bar to refresh the data. +The `shakes*` index pattern appears. -. Click the caret to the right of the current index pattern, and select `ba*`. +. To make `ba*` the current index, click the index pattern dropdown, then select `ba*`. + -By default, all fields are shown for each matching document. +By default, all fields are shown for each matching document. -. In the search field, enter the following string: +. In the search field, enter: + [source,text] account_number<100 AND balance>47500 @@ -25,11 +24,10 @@ excess of 47,500. Results appear for account numbers 8, 32, 78, 85, and 97. [role="screenshot"] image::images/tutorial-discover-2.png[] -. To choose which -fields to display, hover the pointer over the list of *Available fields* -and then click *add* next to each field you want include as a column in the table. +. Hover over the list of *Available fields*, then +click *add* next to each field you want include as a column in the table. + -For example, if you add the `account_number` field, the display changes to a list of five +For example, when you add the `account_number` field, the display changes to a list of five account numbers. + [role="screenshot"] diff --git a/docs/infrastructure/index.asciidoc b/docs/infrastructure/index.asciidoc index 5e2d0f3e757b0..60695c0e3f1cf 100644 --- a/docs/infrastructure/index.asciidoc +++ b/docs/infrastructure/index.asciidoc @@ -10,7 +10,7 @@ Then you can drill down to view more detailed metrics or other information for t You can: -* View your infrastructure metrics by hosts, Kubernetes pods or Docker containers. +* View your infrastructure metrics by hosts, Kubernetes pods, or Docker containers. You can group and filter the data in various ways to help you identify the items that interest you. * View current and historic values for metrics such as CPU usage, memory usage, and network traffic for each component. diff --git a/docs/logs/index.asciidoc b/docs/logs/index.asciidoc index edbadde223103..b12dc096bff45 100644 --- a/docs/logs/index.asciidoc +++ b/docs/logs/index.asciidoc @@ -16,6 +16,7 @@ In this case, you will only see the logs for the selected component. * <> * <> * <> +* <> [role="screenshot"] image::logs/images/logs-console.png[Log Console in Kibana] diff --git a/docs/management/index-patterns.asciidoc b/docs/management/index-patterns.asciidoc index d8073e4590c3c..45f8bd13a5c54 100644 --- a/docs/management/index-patterns.asciidoc +++ b/docs/management/index-patterns.asciidoc @@ -52,9 +52,8 @@ If {kib} detects an index with a timestamp, you’re asked to choose a field to filter your data by time. If you don’t specify a field, you won’t be able to use the time filter. - - [float] +[[rollup-index-pattern]] ==== Rollup index pattern If a rollup index is detected in the cluster, clicking *Create index pattern* @@ -62,7 +61,11 @@ includes an item for creating a rollup index pattern. You can match an index pattern to only rolled up data, or mix both rolled up and raw data to explore and visualize all data together. An index pattern can match -only one rollup index. +only one rollup index. When matching multiple indices, +use a comma to separate the names, with no space after the comma. + +For specific fields, the data in a rollup index includes only summarized metrics. +From the original raw data, you are unable to search any other field. [float] [[management-cross-cluster-search]] diff --git a/docs/management/managing-fields.asciidoc b/docs/management/managing-fields.asciidoc index b54f4fe5194ad..1a1bcec10ab50 100644 --- a/docs/management/managing-fields.asciidoc +++ b/docs/management/managing-fields.asciidoc @@ -1,8 +1,8 @@ [[managing-fields]] -== Index Patterns and Fields +== Index patterns and fields The *Index patterns* UI helps you create and manage -the index patterns that retrieve your data from Elasticsearch. +the index patterns that retrieve your data from {es}. [role="screenshot"] image::images/management-index-patterns.png[] @@ -10,8 +10,8 @@ image::images/management-index-patterns.png[] [float] === Create an index pattern -An index pattern is the glue that connects Kibana to your Elasticsearch data. Create an -index pattern whenever you load your own data into Kibana. To get started, +An index pattern is the glue that connects {kib} to your {es} data. Create an +index pattern whenever you load your own data into {kib}. To get started, click *Create index pattern*, and then follow the guided steps. Refer to <> for the types of index patterns that you can create. @@ -33,7 +33,7 @@ you create is automatically designated as the default pattern. The default index pattern is loaded when you open *Discover*. * *Refresh the index fields list.* You can refresh the index fields list to -pick up any newly-added fields. Doing so also resets Kibana’s popularity counters +pick up any newly-added fields. Doing so also resets the {kib} popularity counters for the fields. The popularity counters are used in *Discover* to sort fields in lists. * [[delete-pattern]]*Delete the index pattern.* This action removes the pattern from the list of @@ -60,7 +60,7 @@ Kibana has field formatters for the following field types: * <> [[field-formatters-string]] -=== String Field Formatters +=== String field formatters String fields support the `String` and `Url` formatters. @@ -69,7 +69,7 @@ include::field-formatters/string-formatter.asciidoc[] include::field-formatters/url-formatter.asciidoc[] [[field-formatters-date]] -=== Date Field Formatters +=== Date field formatters Date fields support the `Date`, `Url`, and `String` formatters. @@ -81,19 +81,19 @@ include::field-formatters/string-formatter.asciidoc[] include::field-formatters/url-formatter.asciidoc[] [[field-formatters-geopoint]] -=== Geographic Point Field Formatters +=== Geographic point field formatters Geographic point fields support the `String` formatter. include::field-formatters/string-formatter.asciidoc[] [[field-formatters-numeric]] -=== Numeric Field Formatters +=== Numeric field formatters Numeric fields support the `Url`, `Bytes`, `Duration`, `Number`, `Percentage`, `String`, and `Color` formatters. The `Bytes`, `Number`, and `Percentage` formatters enable you to choose the display formats of numbers in this field using -the <> syntax that Kibana maintains. +the <> syntax that {kib} maintains. include::field-formatters/url-formatter.asciidoc[] @@ -104,25 +104,22 @@ include::field-formatters/duration-formatter.asciidoc[] include::field-formatters/color-formatter.asciidoc[] [[scripted-fields]] -=== Scripted Fields +=== Scripted fields -Scripted fields compute data on the fly from the data in your Elasticsearch indices. Scripted field data is shown on -the Discover tab as part of the document data, and you can use scripted fields in your visualizations. -Scripted field values are computed at query time so they aren't indexed and cannot be searched using Kibana's default -query language. However they can be queried using Kibana's new <>. Scripted -fields are also supported in the filter bar. +Scripted fields compute data on the fly from the data in your {es} indices. The data is shown on +the Discover tab as part of the document data, and you can use scripted fields in your visualizations. You query scripted fields with the <>, and can filter them using the filter bar. The scripted field values are computed at query time, so they aren't indexed and cannot be searched using the {kib} default +query language. WARNING: Computing data on the fly with scripted fields can be very resource intensive and can have a direct impact on -Kibana's performance. Keep in mind that there's no built-in validation of a scripted field. If your scripts are +{kib} performance. Keep in mind that there's no built-in validation of a scripted field. If your scripts are buggy, you'll get exceptions whenever you try to view the dynamically generated data. -When you define a scripted field in Kibana, you have a choice of scripting languages. Starting with 5.0, the default +When you define a scripted field in {kib}, you have a choice of scripting languages. In 5.0 and later, the default options are {ref}/modules-scripting-expression.html[Lucene expressions] and {ref}/modules-scripting-painless.html[Painless]. -While you can use other scripting languages if you enable dynamic scripting for them in Elasticsearch, this is not recommended +While you can use other scripting languages if you enable dynamic scripting for them in {es}, this is not recommended because they cannot be sufficiently {ref}/modules-scripting-security.html[sandboxed]. -WARNING: Use of Groovy, JavaScript, and Python scripting is deprecated starting in Elasticsearch 5.0, and support for those -scripting languages will be removed in the future. +WARNING: In 5.0 and later, Groovy, JavaScript, and Python scripting are deprecated and unsupported. You can reference any single value numeric field in your expressions, for example: @@ -130,44 +127,40 @@ You can reference any single value numeric field in your expressions, for exampl doc['field_name'].value ---- -For more background on scripted fields and additional examples, refer to this blog: -https://www.elastic.co/blog/using-painless-kibana-scripted-fields[Using Painless in Kibana scripted fields] +For more information on scripted fields and additional examples, refer to +https://www.elastic.co/blog/using-painless-kibana-scripted-fields[Using Painless in {kib} scripted fields] [float] [[create-scripted-field]] -=== Creating a Scripted Field -To create a scripted field: +=== Create a scripted field -. Go to *Management > Kibana > Index Patterns* +. Go to *Management > {kib} > Index Patterns* . Select the index pattern you want to add a scripted field to. -. Go to the pattern's *Scripted fields* tab. -. Click *Add scripted field*. +. Go to the *Scripted fields* tab for the index pattern, then click *Add scripted field*. . Enter a name for the scripted field. . Enter the expression that you want to use to compute a value on the fly from your index data. . Click *Create field*. -For more information about scripted fields in Elasticsearch, see +For more information about scripted fields in {es}, see {ref}/modules-scripting.html[Scripting]. [float] [[update-scripted-field]] -=== Updating a Scripted Field -To modify a scripted field: +=== Update a scripted field -. Go to *Management > Kibana > Index Patterns* -. Click the index pattern's *Scripted fields* tab. +. Go to *Management > {kib} > Index Patterns* +. Click the *Scripted fields* tab for the index pattern. . Click the *Edit* button for the scripted field you want to change. -. Make your changes and then click *Save field* to update the field. +. Make your changes, then click *Save field*. -WARNING: Keep in mind that there's no built-in validation of a scripted field. If your scripts are buggy, you'll get +WARNING: Built-in validation is unsupported for scripted fields. If your scripts are buggy, you'll get exceptions whenever you try to view the dynamically generated data. [float] [[delete-scripted-field]] -=== Deleting a Scripted Field -To delete a scripted field: +=== Delete a scripted field -. Go to *Management > Kibana > Index Patterns* -. Click the index pattern's *Scripted fields* tab. -. Click the *Delete* button for the scripted field you want to remove. -. Click *Delete* in the confirmation window. +. Go to *Management > {kib} > Index Patterns* +. Click the *Scripted fields* tab for the index pattern. +. Click *Delete* for the scripted field you want to remove. +. Click *Delete* on the confirmation window. diff --git a/docs/management/rollups/create_and_manage_rollups.asciidoc b/docs/management/rollups/create_and_manage_rollups.asciidoc index 83e1b7c16f8b4..565c179b741f1 100644 --- a/docs/management/rollups/create_and_manage_rollups.asciidoc +++ b/docs/management/rollups/create_and_manage_rollups.asciidoc @@ -56,6 +56,7 @@ job—reusing the same name can lead to problems with mismatched job configu You can read more at {ref}/rollup-job-config.html[rollup job configuration]. [float] +[[rollup-data-tutorial]] === Try it: Create and visualize rolled up data This example creates a rollup job to capture log data from sample web logs. @@ -138,8 +139,7 @@ is `rollup_logstash,kibana_sample_data_logs`. image::images/management_rollup_job_vis.png[][Visualization of rolled up data] You can then create a dashboard that contains visualizations of the rolled up -data, raw data, or both. See <> -for more information. +data, raw data, or both. For more information, refer to <>. [role="screenshot"] image::images/management_rollup_job_dashboard.png[][Dashboard with rolled up data] diff --git a/docs/uptime/index.asciidoc b/docs/uptime/index.asciidoc index 1a48d7d1c199c..785b9f818f5bf 100644 --- a/docs/uptime/index.asciidoc +++ b/docs/uptime/index.asciidoc @@ -8,10 +8,11 @@ Uptime allows you to monitor the status of network endpoints via HTTP/S, TCP, an You can explore endpoint status over time, drill down into specific monitors, and easily view a high-level snapshot of your environment at any point in time. -[float] -== Get Started +To get started with Elastic Uptime, refer to {uptime-guide}/install-uptime.html[Install Uptime]. + +* <> +* <> -See {uptime-guide}/install-uptime.html[Install Uptime] for instructions on getting started with Elastic Uptime. -- include::overview.asciidoc[] diff --git a/docs/user/visualize.asciidoc b/docs/user/visualize.asciidoc index a78b4604ed1e6..f6be2040e3e8c 100644 --- a/docs/user/visualize.asciidoc +++ b/docs/user/visualize.asciidoc @@ -7,73 +7,78 @@ _Visualize_ enables you to create visualizations of the data from your {es} indi {kib} visualizations are based on {es} queries. By using a series of {es} {ref}/search-aggregations.html[aggregations] to extract and process your data, you can create charts that show you the trends, spikes, and dips you need to know about. +To begin, open *Visualize*, then click *Create new visualization*. + [float] -[[create-a-visualization]] -== Create visualizations +[[visualization-types]] +== Types of visualizations + +{kib} supports several types of visualizations. -. Open *Visualize*. -. Click *Create new visualization*. -. Choose the visualization type: -+ -* Basic charts -[horizontal] <>:: Quickly build several types of basic visualizations by simply dragging and dropping the data fields you want to display. -* *<>* -[horizontal] -Line, area, and bar charts:: Compare different series in X/Y charts. +<>:: -Pie chart:: Display each source contribution to a total. +* *Line, area, and bar charts* — Compares different series in X/Y charts. -Data table:: Flattens aggregations into table format. +* *Pie chart* — Displays each source contribution to a total. -Metric:: Display a single number. +* *Data table* — Flattens aggregations into table format. -Goal and gauge:: Display a number with progress indicators. +* *Metric* — Displays a single number. -Tag cloud:: Display words in a cloud, where the size of the word corresponds to its importance. +* *Goal and gauge* — Displays a number with progress indicators. -* *Time series optimized* -[horizontal] -<>:: Visualize time series data using pipeline aggregations. +* *Tag cloud* — Displays words in a cloud, where the size of the word corresponds to its importance. -<>:: Compute and combine data from multiple time series +<>:: Visualizes time series data using pipeline aggregations. + +<>:: Computes and combine data from multiple time series data sets. -* *Maps* -[horizontal] -<>:: The most powerful way of visualizing map data in {kib}. +<>:: +* *<>* — Displays geospatial data in {kib}. + +* *Coordinate map* — Displays points on a map using a geohash aggregation. -<>:: Displays points on a map using a geohash aggregation. +* *Region map* — Merges any structured map data onto a shape. -<>:: Merge any structured map data onto a shape. +* *Heat map* — Displays shaded cells within a matrix. -<>:: Display shaded cells within a matrix. +<>:: -* *<>* -[horizontal] -Controls:: Adds interactive inputs to a Dashboard. +* *Markdown widget* — Displays free-form information or instructions. -Markdown widget:: Display free-form information or instructions. +* *Controls* — Adds interactive inputs to a dashboard. -* *For developers* -[horizontal] -<>:: Complete control over query and display. +<>:: Completes control over query and display. -. Specify a search query to retrieve the data for your visualization: -** To enter new search criteria, select the <> for the indices that +[float] +[[choose-your-data]] +== Choose your data + +Specify a search query to retrieve the data for your visualization, or used rolled up data. + +* To enter new search criteria, select the <> for the indices that contain the data you want to visualize. The visualization builder opens with a wildcard query that matches all of the documents in the selected indices. -** To build a visualization from a saved search, click the name of the saved + +* To build a visualization from a saved search, click the name of the saved search you want to use. The visualization builder opens and loads the selected query. + NOTE: When you build a visualization from a saved search, any subsequent -modifications to the saved search are automatically reflected in the -visualization. To disable automatic updates, you can disconnect a visualization -from the saved search. +modifications to the saved search are reflected in the +visualization. To disable automatic updates, delete the visualization +on the *Saved Object* page. + +* To build a visualization using <>, select +the index pattern that includes the data. Rolled up data is summarized into +time buckets that can be split into sub buckets for numeric field values or +terms. To lower granularity, use a time aggregation that uses and combines +several time buckets. For an example, refer to <>. [float] [[vis-inspector]] @@ -124,8 +129,6 @@ to view an embedded visualization. * Generate a PNG report. -- -include::{kib-repo-dir}/visualize/visualize_rollup_data.asciidoc[] - include::{kib-repo-dir}/visualize/aggregations.asciidoc[] include::{kib-repo-dir}/visualize/lens.asciidoc[] diff --git a/examples/ui_action_examples/package.json b/examples/ui_action_examples/package.json index 3d1201ad68b3b..fbede6b4dbad7 100644 --- a/examples/ui_action_examples/package.json +++ b/examples/ui_action_examples/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.5.3" + "typescript": "3.7.2" } } diff --git a/examples/ui_actions_explorer/package.json b/examples/ui_actions_explorer/package.json index d13bf86028680..1758471ced483 100644 --- a/examples/ui_actions_explorer/package.json +++ b/examples/ui_actions_explorer/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.5.3" + "typescript": "3.7.2" } } diff --git a/examples/url_generators_examples/package.json b/examples/url_generators_examples/package.json index e07482db25f43..d3e8bd98aebf4 100644 --- a/examples/url_generators_examples/package.json +++ b/examples/url_generators_examples/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.5.3" + "typescript": "3.7.2" } } diff --git a/examples/url_generators_explorer/package.json b/examples/url_generators_explorer/package.json index 52da533dc0c05..f472ba1d08506 100644 --- a/examples/url_generators_explorer/package.json +++ b/examples/url_generators_explorer/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.5.3" + "typescript": "3.7.2" } } diff --git a/package.json b/package.json index c83633b0ded8c..077848dc26dc5 100644 --- a/package.json +++ b/package.json @@ -243,6 +243,7 @@ "regenerator-runtime": "^0.13.3", "regression": "2.0.1", "request": "^2.88.0", + "require-in-the-middle": "^5.0.2", "reselect": "^4.0.0", "resize-observer-polyfill": "^1.5.0", "rison-node": "1.0.2", @@ -277,7 +278,6 @@ }, "devDependencies": { "@babel/parser": "^7.5.5", - "@babel/plugin-syntax-dynamic-import": "^7.2.0", "@babel/types": "^7.5.5", "@elastic/elasticsearch": "^7.4.0", "@elastic/eslint-config-kibana": "0.15.0", @@ -384,7 +384,6 @@ "axe-core": "^3.4.1", "babel-eslint": "^10.0.3", "babel-jest": "^24.9.0", - "babel-plugin-dynamic-import-node": "^2.2.0", "backport": "4.9.0", "chai": "3.5.0", "chance": "1.0.18", @@ -474,6 +473,7 @@ "strip-ansi": "^3.0.1", "supertest": "^3.1.0", "supertest-as-promised": "^4.0.2", + "tape": "^4.13.0", "tree-kill": "^1.2.2", "typescript": "3.7.2", "typings-tester": "^0.3.2", diff --git a/scripts/test_hardening.js b/scripts/test_hardening.js new file mode 100644 index 0000000000000..c0a20a9ff6cb4 --- /dev/null +++ b/scripts/test_hardening.js @@ -0,0 +1,41 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +var execFileSync = require('child_process').execFileSync; +var path = require('path'); +var syncGlob = require('glob').sync; +var program = require('commander'); + +program + .name('node scripts/test_hardening.js') + .arguments('[file...]') + .description( + 'Run the tests in test/harden directory. If no files are provided, all files within the directory will be run.' + ) + .action(function(globs) { + if (globs.length === 0) globs.push(path.join('test', 'harden', '*')); + globs.forEach(function(glob) { + syncGlob(glob).forEach(function(filename) { + if (path.basename(filename)[0] === '_') return; + console.log(process.argv[0], filename); + execFileSync(process.argv[0], [filename], { stdio: 'inherit' }); + }); + }); + }) + .parse(process.argv); diff --git a/src/core/public/overlays/flyout/__snapshots__/flyout_service.test.tsx.snap b/src/core/public/overlays/flyout/__snapshots__/flyout_service.test.tsx.snap index 9bd686776138f..6b4b22b8541bc 100644 --- a/src/core/public/overlays/flyout/__snapshots__/flyout_service.test.tsx.snap +++ b/src/core/public/overlays/flyout/__snapshots__/flyout_service.test.tsx.snap @@ -31,7 +31,7 @@ Array [ ] `; -exports[`FlyoutService openFlyout() renders a flyout to the DOM 2`] = `"
Flyout content
"`; +exports[`FlyoutService openFlyout() renders a flyout to the DOM 2`] = `"
Flyout content
"`; exports[`FlyoutService openFlyout() with a currently active flyout replaces the current flyout with a new one 1`] = ` Array [ @@ -74,4 +74,4 @@ Array [ ] `; -exports[`FlyoutService openFlyout() with a currently active flyout replaces the current flyout with a new one 2`] = `"
Flyout content 2
"`; +exports[`FlyoutService openFlyout() with a currently active flyout replaces the current flyout with a new one 2`] = `"
Flyout content 2
"`; diff --git a/src/core/public/overlays/modal/__snapshots__/modal_service.test.tsx.snap b/src/core/public/overlays/modal/__snapshots__/modal_service.test.tsx.snap index ca044aa5c111f..b17e7d0fec773 100644 --- a/src/core/public/overlays/modal/__snapshots__/modal_service.test.tsx.snap +++ b/src/core/public/overlays/modal/__snapshots__/modal_service.test.tsx.snap @@ -31,7 +31,7 @@ Array [ ] `; -exports[`ModalService openConfirm() renders a mountpoint confirm message 2`] = `"
Modal content
"`; +exports[`ModalService openConfirm() renders a mountpoint confirm message 2`] = `"
Modal content
"`; exports[`ModalService openConfirm() renders a string confirm message 1`] = ` Array [ @@ -53,7 +53,7 @@ Array [ ] `; -exports[`ModalService openConfirm() renders a string confirm message 2`] = `"

Some message

"`; +exports[`ModalService openConfirm() renders a string confirm message 2`] = `"

Some message

"`; exports[`ModalService openConfirm() with a currently active confirm replaces the current confirm with the new one 1`] = ` Array [ @@ -145,7 +145,7 @@ Array [ ] `; -exports[`ModalService openModal() renders a modal to the DOM 2`] = `"
Modal content
"`; +exports[`ModalService openModal() renders a modal to the DOM 2`] = `"
Modal content
"`; exports[`ModalService openModal() with a currently active confirm replaces the current confirm with the new one 1`] = ` Array [ diff --git a/src/dev/jest/babel_transform.js b/src/dev/jest/babel_transform.js index cb9f3032b2857..4ddfb5889c092 100644 --- a/src/dev/jest/babel_transform.js +++ b/src/dev/jest/babel_transform.js @@ -32,9 +32,4 @@ module.exports = babelJest.createTransformer({ }, ], ], - plugins: [ - // enables jest to parse and execute dynamic import() calls - '@babel/plugin-syntax-dynamic-import', - 'dynamic-import-node', - ], }); diff --git a/src/dev/jest/config.js b/src/dev/jest/config.js index a7304e3f93219..2be3b7b3c83fe 100644 --- a/src/dev/jest/config.js +++ b/src/dev/jest/config.js @@ -53,6 +53,8 @@ export default { '!src/legacy/ui/public/{agg_types,vis}/**/*.d.ts', ], moduleNameMapper: { + '@elastic/eui$': '/node_modules/@elastic/eui/test-env', + '@elastic/eui/lib/(.*)?': '/node_modules/@elastic/eui/test-env/$1', '^src/plugins/(.*)': '/src/plugins/$1', '^plugins/([^/.]*)(.*)': '/src/legacy/core_plugins/$1/public$2', '^ui/(.*)': '/src/legacy/ui/public/$1', @@ -88,9 +90,9 @@ export default { '^.+\\.html?$': 'jest-raw-loader', }, transformIgnorePatterns: [ - // ignore all node_modules except @elastic/eui and monaco-editor which both require babel transforms to handle dynamic import() + // ignore all node_modules except monaco-editor which requires babel transforms to handle dynamic import() // since ESM modules are not natively supported in Jest yet (https://github.com/facebook/jest/issues/4842) - '[/\\\\]node_modules(?![\\/\\\\]@elastic[\\/\\\\]eui)(?![\\/\\\\]monaco-editor)[/\\\\].+\\.js$', + '[/\\\\]node_modules(?![\\/\\\\]monaco-editor)[/\\\\].+\\.js$', 'packages/kbn-pm/dist/index.js', ], snapshotSerializers: [ diff --git a/src/legacy/core_plugins/kibana/public/dashboard/np_ready/__snapshots__/dashboard_empty_screen.test.tsx.snap b/src/legacy/core_plugins/kibana/public/dashboard/np_ready/__snapshots__/dashboard_empty_screen.test.tsx.snap index c9f56dc898381..e71e4f1b15134 100644 --- a/src/legacy/core_plugins/kibana/public/dashboard/np_ready/__snapshots__/dashboard_empty_screen.test.tsx.snap +++ b/src/legacy/core_plugins/kibana/public/dashboard/np_ready/__snapshots__/dashboard_empty_screen.test.tsx.snap @@ -687,25 +687,12 @@ exports[`DashboardEmptyScreen renders correctly with visualize paragraph 1`] = ` size="m" type="arrowDown" > - - - + @@ -50,15 +43,8 @@ exports[`FieldName renders a number field by providing a field record, useShortD class="euiToken euiToken--euiColorVis0 euiToken--square euiToken--light euiToken--small kbnFieldIcon" title="Number field" > - @@ -88,15 +74,8 @@ exports[`FieldName renders a string field by providing fieldType and fieldName 1 class="euiToken euiToken--euiColorVis1 euiToken--square euiToken--light euiToken--small kbnFieldIcon" title="String field" > - diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/__jest__/__snapshots__/table.test.js.snap b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/__jest__/__snapshots__/table.test.js.snap index 651cade244a20..49f3b83ca2879 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/__jest__/__snapshots__/table.test.js.snap +++ b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/__jest__/__snapshots__/table.test.js.snap @@ -135,13 +135,10 @@ exports[`Table should render normally 1`] = ` exports[`Table should render the boolean template (false) 1`] = ``; exports[`Table should render the boolean template (true) 1`] = ` - `; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/category_axis_panel.test.tsx.snap b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/category_axis_panel.test.tsx.snap index 037989a86af01..2b7c03084ec65 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/category_axis_panel.test.tsx.snap +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/category_axis_panel.test.tsx.snap @@ -52,59 +52,16 @@ exports[`CategoryAxisPanel component should init with the default set of props 1 value={true} /> `; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/chart_options.test.tsx.snap b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/chart_options.test.tsx.snap index 56f35ae021173..e9cd2b737b879 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/chart_options.test.tsx.snap +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/chart_options.test.tsx.snap @@ -31,22 +31,6 @@ exports[`ChartOptions component should init with the default set of props 1`] = diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/value_axes_panel.test.tsx.snap b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/value_axes_panel.test.tsx.snap index f589a69eecbc3..0b673a819f666 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/value_axes_panel.test.tsx.snap +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/value_axes_panel.test.tsx.snap @@ -89,7 +89,6 @@ exports[`ValueAxesPanel component should init with the default set of props 1`] size="m" /> diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.test.tsx b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.test.tsx index 69622bb3666a6..91cdcd0f456b1 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.test.tsx +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.test.tsx @@ -21,14 +21,12 @@ import React from 'react'; import { shallow } from 'enzyme'; import { CategoryAxisPanel, CategoryAxisPanelProps } from './category_axis_panel'; import { Axis } from '../../../types'; -import { Positions, getPositions } from '../../../utils/collections'; +import { Positions } from '../../../utils/collections'; import { LabelOptions } from './label_options'; -import { categoryAxis } from './mocks'; +import { categoryAxis, vis } from './mocks'; jest.mock('ui/new_platform'); -const positions = getPositions(); - describe('CategoryAxisPanel component', () => { let setCategoryAxis: jest.Mock; let onPositionChanged: jest.Mock; @@ -42,16 +40,10 @@ describe('CategoryAxisPanel component', () => { defaultProps = { axis, - vis: { - type: { - editorConfig: { - collections: { positions }, - }, - }, - }, + vis, onPositionChanged, setCategoryAxis, - } as any; + }; }); it('should init with the default set of props', () => { diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.tsx b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.tsx index c1da70f5c17c2..049df0cdd77be 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.tsx +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.tsx @@ -23,21 +23,25 @@ import { EuiPanel, EuiTitle, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { VisOptionsProps } from '../../../../../vis_default_editor/public'; -import { BasicVislibParams, Axis } from '../../../types'; +import { VisOptionsProps } from 'src/legacy/core_plugins/vis_default_editor/public'; +import { Axis } from '../../../types'; import { SelectOption, SwitchOption } from '../../common'; -import { LabelOptions } from './label_options'; +import { LabelOptions, SetAxisLabel } from './label_options'; import { Positions } from '../../../utils/collections'; -export interface CategoryAxisPanelProps extends VisOptionsProps { +export interface CategoryAxisPanelProps { axis: Axis; onPositionChanged: (position: Positions) => void; setCategoryAxis: (value: Axis) => void; + vis: VisOptionsProps['vis']; } -function CategoryAxisPanel(props: CategoryAxisPanelProps) { - const { axis, onPositionChanged, vis, setCategoryAxis } = props; - +function CategoryAxisPanel({ + axis, + onPositionChanged, + vis, + setCategoryAxis, +}: CategoryAxisPanelProps) { const setAxis = useCallback( (paramName: T, value: Axis[T]) => { const updatedAxis = { @@ -57,6 +61,17 @@ function CategoryAxisPanel(props: CategoryAxisPanelProps) { [setAxis, onPositionChanged] ); + const setAxisLabel: SetAxisLabel = useCallback( + (paramName, value) => { + const labels = { + ...axis.labels, + [paramName]: value, + }; + setAxis('labels', labels); + }, + [axis.labels, setAxis] + ); + return ( @@ -89,7 +104,13 @@ function CategoryAxisPanel(props: CategoryAxisPanelProps) { setValue={setAxis} /> - {axis.show && } + {axis.show && ( + + )} ); } diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.test.tsx b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.test.tsx index 9679728a2a3d1..c913fd4f35713 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.test.tsx +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.test.tsx @@ -22,21 +22,11 @@ import { shallow } from 'enzyme'; import { ChartOptions, ChartOptionsParams } from './chart_options'; import { SeriesParam } from '../../../types'; import { LineOptions } from './line_options'; -import { - ChartTypes, - ChartModes, - getInterpolationModes, - getChartTypes, - getChartModes, -} from '../../../utils/collections'; -import { valueAxis, seriesParam } from './mocks'; +import { ChartTypes, ChartModes } from '../../../utils/collections'; +import { valueAxis, seriesParam, vis } from './mocks'; jest.mock('ui/new_platform'); -const interpolationModes = getInterpolationModes(); -const chartTypes = getChartTypes(); -const chartModes = getChartModes(); - describe('ChartOptions component', () => { let setParamByIndex: jest.Mock; let changeValueAxis: jest.Mock; @@ -51,19 +41,11 @@ describe('ChartOptions component', () => { defaultProps = { index: 0, chart, - vis: { - type: { - editorConfig: { - collections: { interpolationModes, chartTypes, chartModes }, - }, - }, - }, - stateParams: { - valueAxes: [valueAxis], - }, + vis, + valueAxes: [valueAxis], setParamByIndex, changeValueAxis, - } as any; + }; }); it('should init with the default set of props', () => { diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.tsx b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.tsx index 399028a1128a9..bc12e04e29468 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.tsx +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.tsx @@ -22,8 +22,8 @@ import React, { useMemo, useCallback } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; -import { VisOptionsProps } from '../../../../../vis_default_editor/public'; -import { BasicVislibParams, SeriesParam, ValueAxis } from '../../../types'; +import { Vis } from 'src/legacy/core_plugins/visualizations/public'; +import { SeriesParam, ValueAxis } from '../../../types'; import { ChartTypes } from '../../../utils/collections'; import { SelectOption } from '../../common'; import { LineOptions } from './line_options'; @@ -31,17 +31,19 @@ import { SetParamByIndex, ChangeValueAxis } from './'; export type SetChart = (paramName: T, value: SeriesParam[T]) => void; -export interface ChartOptionsParams extends VisOptionsProps { +export interface ChartOptionsParams { chart: SeriesParam; index: number; changeValueAxis: ChangeValueAxis; setParamByIndex: SetParamByIndex; + valueAxes: ValueAxis[]; + vis: Vis; } function ChartOptions({ chart, index, - stateParams, + valueAxes, vis, changeValueAxis, setParamByIndex, @@ -62,7 +64,7 @@ function ChartOptions({ const valueAxesOptions = useMemo( () => [ - ...stateParams.valueAxes.map(({ id, name }: ValueAxis) => ({ + ...valueAxes.map(({ id, name }: ValueAxis) => ({ text: name, value: id, })), @@ -73,7 +75,7 @@ function ChartOptions({ value: 'new', }, ], - [stateParams.valueAxes] + [valueAxes] ); return ( diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.test.tsx b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.test.tsx index a112b9a3db708..a93ee454a7afd 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.test.tsx +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.test.tsx @@ -42,7 +42,7 @@ describe('CustomExtentsOptions component', () => { setMultipleValidity = jest.fn(); defaultProps = { - axis: { ...valueAxis }, + axisScale: { ...valueAxis.scale }, setValueAxis, setValueAxisScale, setMultipleValidity, @@ -57,7 +57,7 @@ describe('CustomExtentsOptions component', () => { describe('boundsMargin', () => { it('should set validity as true when value is positive', () => { - defaultProps.axis.scale.boundsMargin = 5; + defaultProps.axisScale.boundsMargin = 5; mount(); expect(setMultipleValidity).toBeCalledWith(BOUNDS_MARGIN, true); @@ -66,17 +66,17 @@ describe('CustomExtentsOptions component', () => { it('should set validity as true when value is empty', () => { const comp = mount(); comp.setProps({ - axis: { ...valueAxis, scale: { ...valueAxis.scale, boundsMargin: undefined } }, + axisScale: { ...valueAxis.scale, boundsMargin: undefined }, }); expect(setMultipleValidity).toBeCalledWith(BOUNDS_MARGIN, true); }); it('should set validity as false when value is negative', () => { - defaultProps.axis.scale.defaultYExtents = true; + defaultProps.axisScale.defaultYExtents = true; const comp = mount(); comp.setProps({ - axis: { ...valueAxis, scale: { ...valueAxis.scale, boundsMargin: -1 } }, + axisScale: { ...valueAxis.scale, boundsMargin: -1 }, }); expect(setMultipleValidity).toBeCalledWith(BOUNDS_MARGIN, false); @@ -91,7 +91,7 @@ describe('CustomExtentsOptions component', () => { }); it('should hide bounds margin input when defaultYExtents is false', () => { - defaultProps.axis.scale = { ...defaultProps.axis.scale, defaultYExtents: false }; + defaultProps.axisScale = { ...defaultProps.axisScale, defaultYExtents: false }; const comp = shallow(); expect(comp.find({ paramName: BOUNDS_MARGIN }).exists()).toBeFalsy(); @@ -102,7 +102,7 @@ describe('CustomExtentsOptions component', () => { comp.find({ paramName: DEFAULT_Y_EXTENTS }).prop('setValue')(DEFAULT_Y_EXTENTS, true); expect(setMultipleValidity).not.toBeCalled(); - expect(setValueAxis).toBeCalledWith(SCALE, defaultProps.axis.scale); + expect(setValueAxis).toBeCalledWith(SCALE, defaultProps.axisScale); }); it('should reset boundsMargin when value is false', () => { @@ -110,7 +110,7 @@ describe('CustomExtentsOptions component', () => { comp.find({ paramName: DEFAULT_Y_EXTENTS }).prop('setValue')(DEFAULT_Y_EXTENTS, false); const newScale = { - ...defaultProps.axis.scale, + ...defaultProps.axisScale, boundsMargin: undefined, defaultYExtents: false, }; @@ -126,7 +126,7 @@ describe('CustomExtentsOptions component', () => { }); it('should hide YExtents when value is false', () => { - defaultProps.axis.scale = { ...defaultProps.axis.scale, setYExtents: false }; + defaultProps.axisScale = { ...defaultProps.axisScale, setYExtents: false }; const comp = shallow(); expect(comp.find(YExtents).exists()).toBeFalsy(); @@ -136,7 +136,7 @@ describe('CustomExtentsOptions component', () => { const comp = shallow(); comp.find({ paramName: SET_Y_EXTENTS }).prop('setValue')(SET_Y_EXTENTS, true); - expect(setValueAxis).toBeCalledWith(SCALE, defaultProps.axis.scale); + expect(setValueAxis).toBeCalledWith(SCALE, defaultProps.axisScale); }); it('should reset min and max when value is false', () => { @@ -144,7 +144,7 @@ describe('CustomExtentsOptions component', () => { comp.find({ paramName: SET_Y_EXTENTS }).prop('setValue')(SET_Y_EXTENTS, false); const newScale = { - ...defaultProps.axis.scale, + ...defaultProps.axisScale, min: undefined, max: undefined, setYExtents: false, diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.tsx b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.tsx index e322e2863a186..53b2ffa55a941 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.tsx +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.tsx @@ -26,14 +26,14 @@ import { YExtents } from './y_extents'; import { SetScale } from './value_axis_options'; export interface CustomExtentsOptionsProps { - axis: ValueAxis; + axisScale: ValueAxis['scale']; setMultipleValidity(paramName: string, isValid: boolean): void; setValueAxis(paramName: T, value: ValueAxis[T]): void; setValueAxisScale: SetScale; } function CustomExtentsOptions({ - axis, + axisScale, setMultipleValidity, setValueAxis, setValueAxisScale, @@ -44,7 +44,7 @@ function CustomExtentsOptions({ ); const isBoundsMarginValid = - !axis.scale.defaultYExtents || !axis.scale.boundsMargin || axis.scale.boundsMargin >= 0; + !axisScale.defaultYExtents || !axisScale.boundsMargin || axisScale.boundsMargin >= 0; const setBoundsMargin = useCallback( (paramName: 'boundsMargin', value: number | '') => @@ -54,25 +54,25 @@ function CustomExtentsOptions({ const onDefaultYExtentsChange = useCallback( (paramName: 'defaultYExtents', value: boolean) => { - const scale = { ...axis.scale, [paramName]: value }; + const scale = { ...axisScale, [paramName]: value }; if (!scale.defaultYExtents) { delete scale.boundsMargin; } setValueAxis('scale', scale); }, - [setValueAxis, axis.scale] + [axisScale, setValueAxis] ); const onSetYExtentsChange = useCallback( (paramName: 'setYExtents', value: boolean) => { - const scale = { ...axis.scale, [paramName]: value }; + const scale = { ...axisScale, [paramName]: value }; if (!scale.setYExtents) { delete scale.min; delete scale.max; } setValueAxis('scale', scale); }, - [setValueAxis, axis.scale] + [axisScale, setValueAxis] ); useEffect(() => { @@ -91,11 +91,11 @@ function CustomExtentsOptions({ } )} paramName="defaultYExtents" - value={axis.scale.defaultYExtents} + value={axisScale.defaultYExtents} setValue={onDefaultYExtentsChange} /> - {axis.scale.defaultYExtents && ( + {axisScale.defaultYExtents && ( <> @@ -121,13 +121,13 @@ function CustomExtentsOptions({ defaultMessage: 'Set axis extents', })} paramName="setYExtents" - value={axis.scale.setYExtents} + value={axisScale.setYExtents} setValue={onSetYExtentsChange} /> - {axis.scale.setYExtents && ( + {axisScale.setYExtents && ( diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/index.tsx b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/index.tsx index 32c21008c2a3a..82b64e4185ed2 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/index.tsx +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/index.tsx @@ -304,7 +304,13 @@ function MetricsAxisOptions(props: ValidationVisOptionsProps) return isTabSelected ? ( <> - + ) removeValueAxis={removeValueAxis} onValueAxisPositionChanged={onValueAxisPositionChanged} setParamByIndex={setParamByIndex} - {...props} + setMultipleValidity={props.setMultipleValidity} + seriesParams={stateParams.seriesParams} + valueAxes={stateParams.valueAxes} + vis={vis} /> ) : null; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.test.tsx b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.test.tsx index 91d9987c77f3b..48fcbdf8f9082 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.test.tsx +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.test.tsx @@ -21,32 +21,26 @@ import React from 'react'; import { shallow } from 'enzyme'; import { LabelOptions, LabelOptionsProps } from './label_options'; import { TruncateLabelsOption } from '../../common'; -import { valueAxis, categoryAxis } from './mocks'; +import { valueAxis } from './mocks'; jest.mock('ui/new_platform'); const FILTER = 'filter'; const ROTATE = 'rotate'; const DISABLED = 'disabled'; -const CATEGORY_AXES = 'categoryAxes'; describe('LabelOptions component', () => { - let setValue: jest.Mock; + let setAxisLabel: jest.Mock; let defaultProps: LabelOptionsProps; beforeEach(() => { - setValue = jest.fn(); + setAxisLabel = jest.fn(); defaultProps = { - axis: { ...valueAxis }, - axesName: CATEGORY_AXES, - index: 0, - stateParams: { - categoryAxes: [{ ...categoryAxis }], - valueAxes: [{ ...valueAxis }], - } as any, - setValue, - } as any; + axisLabels: { ...valueAxis.labels }, + axisFilterCheckboxName: '', + setAxisLabel, + }; }); it('should init with the default set of props', () => { @@ -64,7 +58,7 @@ describe('LabelOptions component', () => { }); it('should disable other fields when axis.labels.show is false', () => { - defaultProps.axis.labels.show = false; + defaultProps.axisLabels.show = false; const comp = shallow(); expect(comp.find({ paramName: FILTER }).prop(DISABLED)).toBeTruthy(); @@ -76,25 +70,20 @@ describe('LabelOptions component', () => { const comp = shallow(); comp.find({ paramName: ROTATE }).prop('setValue')(ROTATE, '5'); - const newAxes = [{ ...categoryAxis, labels: { ...categoryAxis.labels, rotate: 5 } }]; - expect(setValue).toBeCalledWith(CATEGORY_AXES, newAxes); + expect(setAxisLabel).toBeCalledWith('rotate', 5); }); it('should set filter value', () => { const comp = shallow(); - expect(defaultProps.stateParams.categoryAxes[0].labels.filter).toBeTruthy(); comp.find({ paramName: FILTER }).prop('setValue')(FILTER, false); - const newAxes = [{ ...categoryAxis, labels: { ...categoryAxis.labels, filter: false } }]; - expect(setValue).toBeCalledWith(CATEGORY_AXES, newAxes); + expect(setAxisLabel).toBeCalledWith(FILTER, false); }); it('should set value for valueAxes', () => { - defaultProps.axesName = 'valueAxes'; const comp = shallow(); comp.find(TruncateLabelsOption).prop('setValue')('truncate', 10); - const newAxes = [{ ...valueAxis, labels: { ...valueAxis.labels, truncate: 10 } }]; - expect(setValue).toBeCalledWith('valueAxes', newAxes); + expect(setAxisLabel).toBeCalledWith('truncate', 10); }); }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.tsx b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.tsx index 2dc5889090dca..b6b54193e9f4a 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.tsx +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.tsx @@ -23,33 +23,21 @@ import { EuiTitle, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { VisOptionsProps } from '../../../../../vis_default_editor/public'; -import { BasicVislibParams, Axis } from '../../../types'; +import { Axis } from '../../../types'; import { SelectOption, SwitchOption, TruncateLabelsOption } from '../../common'; import { getRotateOptions } from '../../../utils/collections'; -export interface LabelOptionsProps extends VisOptionsProps { - axis: Axis; - axesName: 'categoryAxes' | 'valueAxes'; - index: number; +export type SetAxisLabel = ( + paramName: T, + value: Axis['labels'][T] +) => void; +export interface LabelOptionsProps { + axisLabels: Axis['labels']; + axisFilterCheckboxName: string; + setAxisLabel: SetAxisLabel; } -function LabelOptions({ stateParams, setValue, axis, axesName, index }: LabelOptionsProps) { - const setAxisLabel = useCallback( - (paramName: T, value: Axis['labels'][T]) => { - const axes = [...stateParams[axesName]]; - axes[index] = { - ...axes[index], - labels: { - ...axes[index].labels, - [paramName]: value, - }, - }; - setValue(axesName, axes); - }, - [axesName, index, setValue, stateParams] - ); - +function LabelOptions({ axisLabels, axisFilterCheckboxName, setAxisLabel }: LabelOptionsProps) { const setAxisLabelRotate = useCallback( (paramName: 'rotate', value: Axis['labels']['rotate']) => { setAxisLabel(paramName, Number(value)); @@ -77,20 +65,18 @@ function LabelOptions({ stateParams, setValue, axis, axesName, index }: LabelOpt defaultMessage: 'Show labels', })} paramName="show" - value={axis.labels.show} + value={axisLabels.show} setValue={setAxisLabel} /> @@ -99,20 +85,20 @@ function LabelOptions({ stateParams, setValue, axis, axesName, index }: LabelOpt diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/line_options.test.tsx b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/line_options.test.tsx index 98ef8a094a260..1d29d39bfcb7f 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/line_options.test.tsx +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/line_options.test.tsx @@ -21,14 +21,12 @@ import React from 'react'; import { shallow } from 'enzyme'; import { LineOptions, LineOptionsParams } from './line_options'; import { NumberInputOption } from '../../common'; -import { getInterpolationModes } from '../../../utils/collections'; -import { seriesParam } from './mocks'; +import { seriesParam, vis } from './mocks'; jest.mock('ui/new_platform'); const LINE_WIDTH = 'lineWidth'; const DRAW_LINES = 'drawLinesBetweenPoints'; -const interpolationModes = getInterpolationModes(); describe('LineOptions component', () => { let setChart: jest.Mock; @@ -39,15 +37,9 @@ describe('LineOptions component', () => { defaultProps = { chart: { ...seriesParam }, - vis: { - type: { - editorConfig: { - collections: { interpolationModes }, - }, - }, - }, + vis, setChart, - } as any; + }; }); it('should init with the default set of props', () => { diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/mocks.ts b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/mocks.ts index 7955bf79c24eb..58c75629f1fa1 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/mocks.ts +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/mocks.ts @@ -17,6 +17,7 @@ * under the License. */ +import { Vis } from 'src/legacy/core_plugins/visualizations/public'; import { Axis, ValueAxis, SeriesParam, Style } from '../../../types'; import { ChartTypes, @@ -25,6 +26,10 @@ import { ScaleTypes, Positions, AxisTypes, + getScaleTypes, + getAxisModes, + getPositions, + getInterpolationModes, } from '../../../utils/collections'; const defaultValueAxisId = 'ValueAxis-1'; @@ -84,4 +89,17 @@ const seriesParam: SeriesParam = { valueAxis: defaultValueAxisId, }; -export { defaultValueAxisId, categoryAxis, valueAxis, seriesParam }; +const positions = getPositions(); +const axisModes = getAxisModes(); +const scaleTypes = getScaleTypes(); +const interpolationModes = getInterpolationModes(); + +const vis = ({ + type: { + editorConfig: { + collections: { scaleTypes, axisModes, positions, interpolationModes }, + }, + }, +} as any) as Vis; + +export { defaultValueAxisId, categoryAxis, valueAxis, seriesParam, vis }; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/series_panel.tsx b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/series_panel.tsx index db28256816f8d..44e7a4cfb0088 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/series_panel.tsx +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/series_panel.tsx @@ -23,19 +23,20 @@ import { EuiPanel, EuiTitle, EuiSpacer, EuiAccordion } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { VisOptionsProps } from '../../../../../vis_default_editor/public'; -import { BasicVislibParams } from '../../../types'; +import { Vis } from 'src/legacy/core_plugins/visualizations/public'; +import { ValueAxis, SeriesParam } from '../../../types'; import { ChartOptions } from './chart_options'; import { SetParamByIndex, ChangeValueAxis } from './'; -export interface SeriesPanelProps extends VisOptionsProps { +export interface SeriesPanelProps { changeValueAxis: ChangeValueAxis; setParamByIndex: SetParamByIndex; + seriesParams: SeriesParam[]; + valueAxes: ValueAxis[]; + vis: Vis; } -function SeriesPanel(props: SeriesPanelProps) { - const { stateParams } = props; - +function SeriesPanel({ seriesParams, ...chartProps }: SeriesPanelProps) { return ( @@ -48,7 +49,7 @@ function SeriesPanel(props: SeriesPanelProps) { - {stateParams.seriesParams.map((chart, index) => ( + {seriesParams.map((chart, index) => ( - + ))} diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.test.tsx b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.test.tsx index 7524c7a13435b..141273fa6bc3f 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.test.tsx +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.test.tsx @@ -21,16 +21,12 @@ import React from 'react'; import { shallow } from 'enzyme'; import { ValueAxesPanel, ValueAxesPanelProps } from './value_axes_panel'; import { ValueAxis, SeriesParam } from '../../../types'; -import { Positions, getScaleTypes, getAxisModes, getPositions } from '../../../utils/collections'; +import { Positions } from '../../../utils/collections'; import { mountWithIntl } from 'test_utils/enzyme_helpers'; -import { valueAxis, seriesParam } from './mocks'; +import { valueAxis, seriesParam, vis } from './mocks'; jest.mock('ui/new_platform'); -const positions = getPositions(); -const axisModes = getAxisModes(); -const scaleTypes = getScaleTypes(); - describe('ValueAxesPanel component', () => { let setParamByIndex: jest.Mock; let onValueAxisPositionChanged: jest.Mock; @@ -66,24 +62,16 @@ describe('ValueAxesPanel component', () => { }; defaultProps = { - stateParams: { - seriesParams: [seriesParamCount, seriesParamAverage], - valueAxes: [axisLeft, axisRight], - }, - vis: { - type: { - editorConfig: { - collections: { scaleTypes, axisModes, positions }, - }, - }, - }, + seriesParams: [seriesParamCount, seriesParamAverage], + valueAxes: [axisLeft, axisRight], + vis, isCategoryAxisHorizontal: false, setParamByIndex, onValueAxisPositionChanged, addValueAxis, removeValueAxis, setMultipleValidity, - } as any; + }; }); it('should init with the default set of props', () => { @@ -93,7 +81,7 @@ describe('ValueAxesPanel component', () => { }); it('should not allow to remove the last value axis', () => { - defaultProps.stateParams.valueAxes = [axisLeft]; + defaultProps.valueAxes = [axisLeft]; const comp = mountWithIntl(); expect(comp.find('[data-test-subj="removeValueAxisBtn"] button').exists()).toBeFalsy(); }); @@ -133,7 +121,7 @@ describe('ValueAxesPanel component', () => { }); it('should show when multiple series match value axis', () => { - defaultProps.stateParams.seriesParams[1].valueAxis = 'ValueAxis-1'; + defaultProps.seriesParams[1].valueAxis = 'ValueAxis-1'; const comp = mountWithIntl(); expect( comp @@ -144,7 +132,7 @@ describe('ValueAxesPanel component', () => { }); it('should not show when no series match value axis', () => { - defaultProps.stateParams.seriesParams[0].valueAxis = 'ValueAxis-2'; + defaultProps.seriesParams[0].valueAxis = 'ValueAxis-2'; const comp = mountWithIntl(); expect( comp diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.tsx b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.tsx index 4aa2aee083a67..30d80ed595fe7 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.tsx +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.tsx @@ -31,31 +31,35 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { BasicVislibParams, ValueAxis } from '../../../types'; +import { Vis } from 'src/legacy/core_plugins/visualizations/public'; +import { SeriesParam, ValueAxis } from '../../../types'; import { ValueAxisOptions } from './value_axis_options'; import { SetParamByIndex } from './'; -import { ValidationVisOptionsProps } from '../../common'; -export interface ValueAxesPanelProps extends ValidationVisOptionsProps { +export interface ValueAxesPanelProps { isCategoryAxisHorizontal: boolean; addValueAxis: () => ValueAxis; removeValueAxis: (axis: ValueAxis) => void; onValueAxisPositionChanged: (index: number, value: ValueAxis['position']) => void; setParamByIndex: SetParamByIndex; + seriesParams: SeriesParam[]; + valueAxes: ValueAxis[]; + vis: Vis; + setMultipleValidity: (paramName: string, isValid: boolean) => void; } function ValueAxesPanel(props: ValueAxesPanelProps) { - const { stateParams, addValueAxis, removeValueAxis } = props; + const { addValueAxis, removeValueAxis, seriesParams, valueAxes } = props; const getSeries = useCallback( (axis: ValueAxis) => { - const isFirst = stateParams.valueAxes[0].id === axis.id; - const series = stateParams.seriesParams.filter( + const isFirst = valueAxes[0].id === axis.id; + const series = seriesParams.filter( serie => serie.valueAxis === axis.id || (isFirst && !serie.valueAxis) ); return series.map(serie => serie.data.label).join(', '); }, - [stateParams.valueAxes, stateParams.seriesParams] + [seriesParams, valueAxes] ); const removeButtonTooltip = useMemo( @@ -131,7 +135,7 @@ function ValueAxesPanel(props: ValueAxesPanelProps) { - {stateParams.valueAxes.map((axis, index) => ( + {valueAxes.map((axis, index) => ( <> - + ))} diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.test.tsx b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.test.tsx index bd512e9365783..955867e66d09f 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.test.tsx +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.test.tsx @@ -20,24 +20,15 @@ import React from 'react'; import { shallow } from 'enzyme'; import { ValueAxisOptions, ValueAxisOptionsParams } from './value_axis_options'; -import { Axis } from '../../../types'; +import { ValueAxis } from '../../../types'; import { TextInputOption } from '../../common'; import { LabelOptions } from './label_options'; -import { - ScaleTypes, - Positions, - getScaleTypes, - getAxisModes, - getPositions, -} from '../../../utils/collections'; -import { valueAxis, categoryAxis } from './mocks'; +import { ScaleTypes, Positions } from '../../../utils/collections'; +import { valueAxis, vis } from './mocks'; jest.mock('ui/new_platform'); const POSITION = 'position'; -const positions = getPositions(); -const axisModes = getAxisModes(); -const scaleTypes = getScaleTypes(); interface PositionOption { text: string; @@ -50,7 +41,7 @@ describe('ValueAxisOptions component', () => { let onValueAxisPositionChanged: jest.Mock; let setMultipleValidity: jest.Mock; let defaultProps: ValueAxisOptionsParams; - let axis: Axis; + let axis: ValueAxis; beforeEach(() => { setParamByIndex = jest.fn(); @@ -61,22 +52,13 @@ describe('ValueAxisOptions component', () => { defaultProps = { axis, index: 0, - stateParams: { - categoryAxes: [{ ...categoryAxis }], - valueAxes: [axis], - }, - vis: { - type: { - editorConfig: { - collections: { scaleTypes, axisModes, positions }, - }, - }, - }, + valueAxis, + vis, isCategoryAxisHorizontal: false, setParamByIndex, onValueAxisPositionChanged, setMultipleValidity, - } as any; + }; }); it('should init with the default set of props', () => { diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.tsx b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.tsx index d094a1d422385..0e78bf2f31ef6 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.tsx +++ b/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.tsx @@ -21,15 +21,11 @@ import React, { useCallback, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiSpacer, EuiAccordion, EuiHorizontalRule } from '@elastic/eui'; -import { BasicVislibParams, ValueAxis } from '../../../types'; +import { Vis } from 'src/legacy/core_plugins/visualizations/public'; +import { ValueAxis } from '../../../types'; import { Positions } from '../../../utils/collections'; -import { - SelectOption, - SwitchOption, - TextInputOption, - ValidationVisOptionsProps, -} from '../../common'; -import { LabelOptions } from './label_options'; +import { SelectOption, SwitchOption, TextInputOption } from '../../common'; +import { LabelOptions, SetAxisLabel } from './label_options'; import { CustomExtentsOptions } from './custom_extents_options'; import { isAxisHorizontal } from './utils'; import { SetParamByIndex } from './'; @@ -39,25 +35,27 @@ export type SetScale = ( value: ValueAxis['scale'][T] ) => void; -export interface ValueAxisOptionsParams extends ValidationVisOptionsProps { +export interface ValueAxisOptionsParams { axis: ValueAxis; index: number; isCategoryAxisHorizontal: boolean; onValueAxisPositionChanged: (index: number, value: ValueAxis['position']) => void; setParamByIndex: SetParamByIndex; + valueAxis: ValueAxis; + vis: Vis; + setMultipleValidity: (paramName: string, isValid: boolean) => void; } -function ValueAxisOptions(props: ValueAxisOptionsParams) { - const { - axis, - index, - isCategoryAxisHorizontal, - stateParams, - vis, - onValueAxisPositionChanged, - setParamByIndex, - } = props; - +function ValueAxisOptions({ + axis, + index, + isCategoryAxisHorizontal, + valueAxis, + vis, + onValueAxisPositionChanged, + setParamByIndex, + setMultipleValidity, +}: ValueAxisOptionsParams) { const setValueAxis = useCallback( (paramName: T, value: ValueAxis[T]) => setParamByIndex('valueAxes', index, paramName, value), @@ -67,25 +65,37 @@ function ValueAxisOptions(props: ValueAxisOptionsParams) { const setValueAxisTitle = useCallback( (paramName: T, value: ValueAxis['title'][T]) => { const title = { - ...stateParams.valueAxes[index].title, + ...valueAxis.title, [paramName]: value, }; setParamByIndex('valueAxes', index, 'title', title); }, - [setParamByIndex, index, stateParams.valueAxes] + [valueAxis.title, setParamByIndex, index] ); const setValueAxisScale: SetScale = useCallback( (paramName, value) => { const scale = { - ...stateParams.valueAxes[index].scale, + ...valueAxis.scale, [paramName]: value, }; setParamByIndex('valueAxes', index, 'scale', scale); }, - [setParamByIndex, index, stateParams.valueAxes] + [valueAxis.scale, setParamByIndex, index] + ); + + const setAxisLabel: SetAxisLabel = useCallback( + (paramName, value) => { + const labels = { + ...valueAxis.labels, + [paramName]: value, + }; + + setParamByIndex('valueAxes', index, 'labels', labels); + }, + [valueAxis.labels, setParamByIndex, index] ); const onPositionChanged = useCallback( @@ -175,7 +185,11 @@ function ValueAxisOptions(props: ValueAxisOptionsParams) { setValue={setValueAxisTitle} /> - + ) : ( @@ -204,9 +218,10 @@ function ValueAxisOptions(props: ValueAxisOptionsParams) { <> diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap b/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap index c2bac1c1e706a..8a90ff8982732 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap +++ b/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`VisLegend Component Legend closed should match the snapshot 1`] = `"
"`; +exports[`VisLegend Component Legend closed should match the snapshot 1`] = `"
"`; -exports[`VisLegend Component Legend open should match the snapshot 1`] = `"
"`; +exports[`VisLegend Component Legend open should match the snapshot 1`] = `"
"`; diff --git a/src/legacy/core_plugins/visualizations/public/np_ready/public/components/__snapshots__/visualization_noresults.test.js.snap b/src/legacy/core_plugins/visualizations/public/np_ready/public/components/__snapshots__/visualization_noresults.test.js.snap index 336b39cf15879..afaea0d9b8462 100644 --- a/src/legacy/core_plugins/visualizations/public/np_ready/public/components/__snapshots__/visualization_noresults.test.js.snap +++ b/src/legacy/core_plugins/visualizations/public/np_ready/public/components/__snapshots__/visualization_noresults.test.js.snap @@ -16,15 +16,10 @@ exports[`VisualizationNoResults should render according to snapshot 1`] = `
-
-
-
-
@@ -242,15 +232,9 @@ exports[`NewVisModal filter for visualization types should render as expected 1` class="euiFormControlLayoutClearButton" type="button" > -
@@ -292,15 +276,10 @@ exports[`NewVisModal filter for visualization types should render as expected 1` class="euiBetaBadge euiBetaBadge--iconOnly euiKeyPadMenuItem__betaBadge" tabindex="0" > - @@ -308,15 +287,10 @@ exports[`NewVisModal filter for visualization types should render as expected 1`
-

-

-

-

-
@@ -592,15 +546,9 @@ exports[`NewVisModal filter for visualization types should render as expected 1` class="euiFormControlLayoutClearButton" type="button" > - @@ -642,15 +590,10 @@ exports[`NewVisModal filter for visualization types should render as expected 1` class="euiBetaBadge euiBetaBadge--iconOnly euiKeyPadMenuItem__betaBadge" tabindex="0" > -
@@ -658,15 +601,10 @@ exports[`NewVisModal filter for visualization types should render as expected 1`
-

-

-

-

-
@@ -882,15 +800,9 @@ exports[`NewVisModal filter for visualization types should render as expected 1` class="euiFormControlLayoutClearButton" type="button" > - @@ -932,15 +844,10 @@ exports[`NewVisModal filter for visualization types should render as expected 1` class="euiBetaBadge euiBetaBadge--iconOnly euiKeyPadMenuItem__betaBadge" tabindex="0" > - @@ -948,15 +855,10 @@ exports[`NewVisModal filter for visualization types should render as expected 1`
-

-

-

- - - +

@@ -141,16 +135,10 @@ exports[`Storyshots arguments/AxisConfig/components extended 1`] = ` - diff --git a/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/date_format/__examples__/__snapshots__/date_format.stories.storyshot b/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/date_format/__examples__/__snapshots__/date_format.stories.storyshot index 014c365055fa3..c71d7a5990c74 100644 --- a/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/date_format/__examples__/__snapshots__/date_format.stories.storyshot +++ b/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/date_format/__examples__/__snapshots__/date_format.stories.storyshot @@ -42,16 +42,10 @@ Array [ - @@ -120,16 +114,10 @@ Array [ - @@ -197,16 +185,10 @@ exports[`Storyshots arguments/DateFormat with preset format 1`] = ` - diff --git a/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/number_format/__examples__/__snapshots__/number_format.stories.storyshot b/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/number_format/__examples__/__snapshots__/number_format.stories.storyshot index e93ad3be31f1d..4ce238e6ea14f 100644 --- a/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/number_format/__examples__/__snapshots__/number_format.stories.storyshot +++ b/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/number_format/__examples__/__snapshots__/number_format.stories.storyshot @@ -52,16 +52,10 @@ Array [ - @@ -140,16 +134,10 @@ Array [ - @@ -227,16 +215,10 @@ exports[`Storyshots arguments/NumberFormat with preset format 1`] = ` - diff --git a/x-pack/legacy/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset.examples.storyshot b/x-pack/legacy/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset.examples.storyshot index 35de0fb665be1..5cb64964ee38f 100644 --- a/x-pack/legacy/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset.examples.storyshot +++ b/x-pack/legacy/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset.examples.storyshot @@ -74,16 +74,11 @@ exports[`Storyshots components/Assets/Asset airplane 1`] = ` onFocus={[Function]} type="button" > - @@ -108,16 +103,11 @@ exports[`Storyshots components/Assets/Asset airplane 1`] = ` className="euiButtonIcon euiButtonIcon--primary" type="button" > - @@ -143,16 +133,11 @@ exports[`Storyshots components/Assets/Asset airplane 1`] = ` className="euiButtonIcon euiButtonIcon--primary" type="button" > - @@ -174,16 +159,11 @@ exports[`Storyshots components/Assets/Asset airplane 1`] = ` onFocus={[Function]} type="button" > - @@ -268,16 +248,11 @@ exports[`Storyshots components/Assets/Asset marker 1`] = ` onFocus={[Function]} type="button" > - @@ -302,16 +277,11 @@ exports[`Storyshots components/Assets/Asset marker 1`] = ` className="euiButtonIcon euiButtonIcon--primary" type="button" > - @@ -337,16 +307,11 @@ exports[`Storyshots components/Assets/Asset marker 1`] = ` className="euiButtonIcon euiButtonIcon--primary" type="button" > - @@ -368,16 +333,11 @@ exports[`Storyshots components/Assets/Asset marker 1`] = ` onFocus={[Function]} type="button" > - diff --git a/x-pack/legacy/plugins/canvas/public/components/color_dot/__examples__/__snapshots__/color_dot.stories.storyshot b/x-pack/legacy/plugins/canvas/public/components/color_dot/__examples__/__snapshots__/color_dot.stories.storyshot index 77359957b8443..7368a457766ac 100644 --- a/x-pack/legacy/plugins/canvas/public/components/color_dot/__examples__/__snapshots__/color_dot.stories.storyshot +++ b/x-pack/legacy/plugins/canvas/public/components/color_dot/__examples__/__snapshots__/color_dot.stories.storyshot @@ -126,20 +126,9 @@ Array [ } } > - , @@ -157,20 +146,9 @@ Array [ } } > - , @@ -188,20 +166,9 @@ Array [ } } > - , @@ -219,20 +186,9 @@ Array [ } } > - , diff --git a/x-pack/legacy/plugins/canvas/public/components/color_manager/__examples__/__snapshots__/color_manager.stories.storyshot b/x-pack/legacy/plugins/canvas/public/components/color_manager/__examples__/__snapshots__/color_manager.stories.storyshot index 5da0ea8738c37..89c8d1b8b1716 100644 --- a/x-pack/legacy/plugins/canvas/public/components/color_manager/__examples__/__snapshots__/color_manager.stories.storyshot +++ b/x-pack/legacy/plugins/canvas/public/components/color_manager/__examples__/__snapshots__/color_manager.stories.storyshot @@ -388,16 +388,11 @@ exports[`Storyshots components/Color/ColorManager interactive 1`] = ` onClick={[Function]} type="button" > - @@ -808,16 +798,11 @@ Array [ onClick={[Function]} type="button" > - @@ -897,16 +877,11 @@ Array [ onClick={[Function]} type="button" > - @@ -986,16 +956,11 @@ Array [ onClick={[Function]} type="button" > - diff --git a/x-pack/legacy/plugins/canvas/public/components/color_palette/__examples__/__snapshots__/color_palette.stories.storyshot b/x-pack/legacy/plugins/canvas/public/components/color_palette/__examples__/__snapshots__/color_palette.stories.storyshot index 8610ed2f1b4a3..4ad0570c68df2 100644 --- a/x-pack/legacy/plugins/canvas/public/components/color_palette/__examples__/__snapshots__/color_palette.stories.storyshot +++ b/x-pack/legacy/plugins/canvas/public/components/color_palette/__examples__/__snapshots__/color_palette.stories.storyshot @@ -376,20 +376,10 @@ Array [ } } > - @@ -739,20 +729,10 @@ exports[`Storyshots components/Color/ColorPalette six colors, wrap at 4 1`] = ` } } > - @@ -1022,20 +1002,10 @@ Array [ } } > - diff --git a/x-pack/legacy/plugins/canvas/public/components/color_picker/__examples__/__snapshots__/color_picker.stories.storyshot b/x-pack/legacy/plugins/canvas/public/components/color_picker/__examples__/__snapshots__/color_picker.stories.storyshot index 5fbb4ee7d584d..972e707fc3441 100644 --- a/x-pack/legacy/plugins/canvas/public/components/color_picker/__examples__/__snapshots__/color_picker.stories.storyshot +++ b/x-pack/legacy/plugins/canvas/public/components/color_picker/__examples__/__snapshots__/color_picker.stories.storyshot @@ -225,16 +225,11 @@ exports[`Storyshots components/Color/ColorPicker interactive 1`] = ` onClick={[Function]} type="button" > - @@ -315,20 +305,10 @@ exports[`Storyshots components/Color/ColorPicker six colors 1`] = ` } } > - @@ -526,16 +506,11 @@ exports[`Storyshots components/Color/ColorPicker six colors 1`] = ` onClick={[Function]} type="button" > - @@ -790,16 +760,11 @@ exports[`Storyshots components/Color/ColorPicker six colors, value missing 1`] = onClick={[Function]} type="button" > - @@ -859,20 +819,10 @@ exports[`Storyshots components/Color/ColorPicker three colors 1`] = ` } } > - @@ -989,16 +939,11 @@ exports[`Storyshots components/Color/ColorPicker three colors 1`] = ` onClick={[Function]} type="button" > - diff --git a/x-pack/legacy/plugins/canvas/public/components/custom_element_modal/__examples__/__snapshots__/custom_element_modal.examples.storyshot b/x-pack/legacy/plugins/canvas/public/components/custom_element_modal/__examples__/__snapshots__/custom_element_modal.examples.storyshot index a469f03a71e3e..61ffc33cd9dde 100644 --- a/x-pack/legacy/plugins/canvas/public/components/custom_element_modal/__examples__/__snapshots__/custom_element_modal.examples.storyshot +++ b/x-pack/legacy/plugins/canvas/public/components/custom_element_modal/__examples__/__snapshots__/custom_element_modal.examples.storyshot @@ -54,16 +54,11 @@ Array [ onClick={[Function]} type="button" > -
-
-
-
-
-
-
-
-
-
-
-
-
-
- @@ -57,16 +52,11 @@ exports[`Storyshots components/Elements/ElementControls has two buttons 1`] = ` onFocus={[Function]} type="button" > - diff --git a/x-pack/legacy/plugins/canvas/public/components/element_types/__examples__/__snapshots__/element_grid.stories.storyshot b/x-pack/legacy/plugins/canvas/public/components/element_types/__examples__/__snapshots__/element_grid.stories.storyshot index 3a52402400822..6572aa582f48c 100644 --- a/x-pack/legacy/plugins/canvas/public/components/element_types/__examples__/__snapshots__/element_grid.stories.storyshot +++ b/x-pack/legacy/plugins/canvas/public/components/element_types/__examples__/__snapshots__/element_grid.stories.storyshot @@ -74,16 +74,11 @@ exports[`Storyshots components/Elements/ElementGrid with controls 1`] = ` onFocus={[Function]} type="button" > - @@ -104,16 +99,11 @@ exports[`Storyshots components/Elements/ElementGrid with controls 1`] = ` onFocus={[Function]} type="button" > - @@ -183,16 +173,11 @@ exports[`Storyshots components/Elements/ElementGrid with controls 1`] = ` onFocus={[Function]} type="button" > - @@ -213,16 +198,11 @@ exports[`Storyshots components/Elements/ElementGrid with controls 1`] = ` onFocus={[Function]} type="button" > - @@ -292,16 +272,11 @@ exports[`Storyshots components/Elements/ElementGrid with controls 1`] = ` onFocus={[Function]} type="button" > - @@ -322,16 +297,11 @@ exports[`Storyshots components/Elements/ElementGrid with controls 1`] = ` onFocus={[Function]} type="button" > - @@ -416,16 +386,11 @@ exports[`Storyshots components/Elements/ElementGrid with controls and filter 1`] onFocus={[Function]} type="button" > - @@ -446,16 +411,11 @@ exports[`Storyshots components/Elements/ElementGrid with controls and filter 1`] onFocus={[Function]} type="button" > - diff --git a/x-pack/legacy/plugins/canvas/public/components/file_upload/__snapshots__/file_upload.stories.storyshot b/x-pack/legacy/plugins/canvas/public/components/file_upload/__snapshots__/file_upload.stories.storyshot index 7f18c2dc85215..da8c4b6768714 100644 --- a/x-pack/legacy/plugins/canvas/public/components/file_upload/__snapshots__/file_upload.stories.storyshot +++ b/x-pack/legacy/plugins/canvas/public/components/file_upload/__snapshots__/file_upload.stories.storyshot @@ -19,16 +19,11 @@ exports[`Storyshots components/FileUpload default 1`] = `
-
-
@@ -128,16 +122,10 @@ exports[`Storyshots components/FontPicker with value 1`] = ` -
diff --git a/x-pack/legacy/plugins/canvas/public/components/item_grid/__examples__/__snapshots__/item_grid.stories.storyshot b/x-pack/legacy/plugins/canvas/public/components/item_grid/__examples__/__snapshots__/item_grid.stories.storyshot index 5ee984885bbc0..4796cf9742dd9 100644 --- a/x-pack/legacy/plugins/canvas/public/components/item_grid/__examples__/__snapshots__/item_grid.stories.storyshot +++ b/x-pack/legacy/plugins/canvas/public/components/item_grid/__examples__/__snapshots__/item_grid.stories.storyshot @@ -70,20 +70,9 @@ exports[`Storyshots components/ItemGrid complex grid 1`] = ` } } > -
@@ -101,20 +90,9 @@ exports[`Storyshots components/ItemGrid complex grid 1`] = ` } } > -
@@ -132,20 +110,9 @@ exports[`Storyshots components/ItemGrid complex grid 1`] = ` } } > -
@@ -156,38 +123,14 @@ exports[`Storyshots components/ItemGrid icon grid 1`] = `
- - -
`; diff --git a/x-pack/legacy/plugins/canvas/public/components/keyboard_shortcuts_doc/__examples__/__snapshots__/keyboard_shortcuts_doc.stories.storyshot b/x-pack/legacy/plugins/canvas/public/components/keyboard_shortcuts_doc/__examples__/__snapshots__/keyboard_shortcuts_doc.stories.storyshot index 9954ae0147a97..503677687ba12 100644 --- a/x-pack/legacy/plugins/canvas/public/components/keyboard_shortcuts_doc/__examples__/__snapshots__/keyboard_shortcuts_doc.stories.storyshot +++ b/x-pack/legacy/plugins/canvas/public/components/keyboard_shortcuts_doc/__examples__/__snapshots__/keyboard_shortcuts_doc.stories.storyshot @@ -54,16 +54,11 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` onClick={[Function]} type="button" > -
- @@ -85,16 +80,11 @@ exports[`Storyshots components/Sidebar/SidebarHeader default 1`] = ` onFocus={[Function]} type="button" > - @@ -149,16 +139,11 @@ exports[`Storyshots components/Sidebar/SidebarHeader without layer controls 1`] onFocus={[Function]} type="button" > - @@ -192,16 +177,11 @@ exports[`Storyshots components/Sidebar/SidebarHeader without layer controls 1`] onFocus={[Function]} type="button" > - diff --git a/x-pack/legacy/plugins/canvas/public/components/tag/__examples__/__snapshots__/tag.stories.storyshot b/x-pack/legacy/plugins/canvas/public/components/tag/__examples__/__snapshots__/tag.stories.storyshot index 754724a957e2d..181d8b867edf0 100644 --- a/x-pack/legacy/plugins/canvas/public/components/tag/__examples__/__snapshots__/tag.stories.storyshot +++ b/x-pack/legacy/plugins/canvas/public/components/tag/__examples__/__snapshots__/tag.stories.storyshot @@ -54,20 +54,9 @@ exports[`Storyshots components/Tags/Tag as health 1`] = `
-
-
-
-
-
- - diff --git a/x-pack/legacy/plugins/canvas/public/expression_types/arg_types/container_style/__examples__/__snapshots__/extended_template.examples.storyshot b/x-pack/legacy/plugins/canvas/public/expression_types/arg_types/container_style/__examples__/__snapshots__/extended_template.examples.storyshot index 649d11cb2dbab..298c2482e6093 100644 --- a/x-pack/legacy/plugins/canvas/public/expression_types/arg_types/container_style/__examples__/__snapshots__/extended_template.examples.storyshot +++ b/x-pack/legacy/plugins/canvas/public/expression_types/arg_types/container_style/__examples__/__snapshots__/extended_template.examples.storyshot @@ -138,16 +138,10 @@ exports[`Storyshots arguments/ContainerStyle extended 1`] = ` -
@@ -208,16 +202,10 @@ exports[`Storyshots arguments/ContainerStyle extended 1`] = ` -
@@ -368,16 +356,10 @@ exports[`Storyshots arguments/ContainerStyle extended 1`] = ` -
@@ -629,16 +611,10 @@ exports[`Storyshots arguments/ContainerStyle/components appearance form 1`] = ` -
@@ -699,16 +675,10 @@ exports[`Storyshots arguments/ContainerStyle/components appearance form 1`] = ` - @@ -858,16 +828,10 @@ exports[`Storyshots arguments/ContainerStyle/components border form 1`] = ` - @@ -1130,16 +1094,10 @@ exports[`Storyshots arguments/ContainerStyle/components extended template 1`] = - @@ -1200,16 +1158,10 @@ exports[`Storyshots arguments/ContainerStyle/components extended template 1`] = - @@ -1360,16 +1312,10 @@ exports[`Storyshots arguments/ContainerStyle/components extended template 1`] = - diff --git a/x-pack/legacy/plugins/canvas/public/expression_types/arg_types/series_style/__examples__/__snapshots__/extended_template.examples.storyshot b/x-pack/legacy/plugins/canvas/public/expression_types/arg_types/series_style/__examples__/__snapshots__/extended_template.examples.storyshot index 8fa2d406831a4..4dbcc1bb33045 100644 --- a/x-pack/legacy/plugins/canvas/public/expression_types/arg_types/series_style/__examples__/__snapshots__/extended_template.examples.storyshot +++ b/x-pack/legacy/plugins/canvas/public/expression_types/arg_types/series_style/__examples__/__snapshots__/extended_template.examples.storyshot @@ -65,16 +65,10 @@ exports[`Storyshots arguments/SeriesStyle extended 1`] = ` - @@ -163,16 +157,10 @@ exports[`Storyshots arguments/SeriesStyle extended 1`] = ` - @@ -253,16 +241,10 @@ exports[`Storyshots arguments/SeriesStyle extended 1`] = ` - @@ -343,16 +325,10 @@ exports[`Storyshots arguments/SeriesStyle extended 1`] = ` - diff --git a/x-pack/legacy/plugins/canvas/public/expression_types/arg_types/series_style/__examples__/__snapshots__/simple_template.examples.storyshot b/x-pack/legacy/plugins/canvas/public/expression_types/arg_types/series_style/__examples__/__snapshots__/simple_template.examples.storyshot index 72477cec2603b..14466cab1a698 100644 --- a/x-pack/legacy/plugins/canvas/public/expression_types/arg_types/series_style/__examples__/__snapshots__/simple_template.examples.storyshot +++ b/x-pack/legacy/plugins/canvas/public/expression_types/arg_types/series_style/__examples__/__snapshots__/simple_template.examples.storyshot @@ -172,20 +172,13 @@ exports[`Storyshots arguments/SeriesStyle/components simple: no series 1`] = ` onMouseOut={[Function]} onMouseOver={[Function]} > - diff --git a/x-pack/legacy/plugins/canvas/shareable_runtime/api/__tests__/__snapshots__/shareable.test.tsx.snap b/x-pack/legacy/plugins/canvas/shareable_runtime/api/__tests__/__snapshots__/shareable.test.tsx.snap index e5e13671057bd..0b55f2c322761 100644 --- a/x-pack/legacy/plugins/canvas/shareable_runtime/api/__tests__/__snapshots__/shareable.test.tsx.snap +++ b/x-pack/legacy/plugins/canvas/shareable_runtime/api/__tests__/__snapshots__/shareable.test.tsx.snap @@ -9,7 +9,7 @@ exports[`Canvas Shareable Workpad API Placed successfully with default propertie
markdown mock
markdown mock
My Canvas Workpad
" +
markdown mock
My Canvas Workpad
" `; exports[`Canvas Shareable Workpad API Placed successfully with height specified 1`] = `"
"`; @@ -21,7 +21,7 @@ exports[`Canvas Shareable Workpad API Placed successfully with height specified
markdown mock
markdown mock
My Canvas Workpad
" +
markdown mock
My Canvas Workpad
" `; exports[`Canvas Shareable Workpad API Placed successfully with page specified 1`] = `"
"`; @@ -33,7 +33,7 @@ exports[`Canvas Shareable Workpad API Placed successfully with page specified 2`
markdown mock
markdown mock
My Canvas Workpad
" +
markdown mock
My Canvas Workpad
" `; exports[`Canvas Shareable Workpad API Placed successfully with width and height specified 1`] = `"
"`; @@ -45,7 +45,7 @@ exports[`Canvas Shareable Workpad API Placed successfully with width and height
markdown mock
markdown mock
My Canvas Workpad
" +
markdown mock
My Canvas Workpad
" `; exports[`Canvas Shareable Workpad API Placed successfully with width specified 1`] = `"
"`; @@ -57,5 +57,5 @@ exports[`Canvas Shareable Workpad API Placed successfully with width specified 2
markdown mock
markdown mock
My Canvas Workpad
" +
markdown mock
My Canvas Workpad
" `; diff --git a/x-pack/legacy/plugins/canvas/shareable_runtime/components/__examples__/__snapshots__/canvas.examples.storyshot b/x-pack/legacy/plugins/canvas/shareable_runtime/components/__examples__/__snapshots__/canvas.examples.storyshot index 6a33dba76c126..81e75ff5ee0d9 100644 --- a/x-pack/legacy/plugins/canvas/shareable_runtime/components/__examples__/__snapshots__/canvas.examples.storyshot +++ b/x-pack/legacy/plugins/canvas/shareable_runtime/components/__examples__/__snapshots__/canvas.examples.storyshot @@ -1324,16 +1324,9 @@ exports[`Storyshots shareables/Canvas component 1`] = ` rel="" title="Powered by Elastic.co" > - @@ -1387,16 +1380,11 @@ exports[`Storyshots shareables/Canvas component 1`] = ` onClick={[Function]} type="button" > - @@ -1441,16 +1429,11 @@ exports[`Storyshots shareables/Canvas component 1`] = ` onClick={[Function]} type="button" > - @@ -1479,16 +1462,11 @@ exports[`Storyshots shareables/Canvas component 1`] = ` onClick={[Function]} type="button" > - @@ -2828,16 +2806,9 @@ exports[`Storyshots shareables/Canvas contextual: austin 1`] = ` rel="" title="Powered by Elastic.co" > - @@ -2891,16 +2862,11 @@ exports[`Storyshots shareables/Canvas contextual: austin 1`] = ` onClick={[Function]} type="button" > - @@ -2945,16 +2911,11 @@ exports[`Storyshots shareables/Canvas contextual: austin 1`] = ` onClick={[Function]} type="button" > - @@ -2983,16 +2944,11 @@ exports[`Storyshots shareables/Canvas contextual: austin 1`] = ` onClick={[Function]} type="button" > - @@ -3148,16 +3104,9 @@ exports[`Storyshots shareables/Canvas contextual: hello 1`] = ` rel="" title="Powered by Elastic.co" > - @@ -3211,16 +3160,11 @@ exports[`Storyshots shareables/Canvas contextual: hello 1`] = ` onClick={[Function]} type="button" > - @@ -3264,16 +3208,11 @@ exports[`Storyshots shareables/Canvas contextual: hello 1`] = ` onClick={[Function]} type="button" > - @@ -3302,16 +3241,11 @@ exports[`Storyshots shareables/Canvas contextual: hello 1`] = ` onClick={[Function]} type="button" > - diff --git a/x-pack/legacy/plugins/canvas/shareable_runtime/components/__tests__/__snapshots__/app.test.tsx.snap b/x-pack/legacy/plugins/canvas/shareable_runtime/components/__tests__/__snapshots__/app.test.tsx.snap index 052ecf95dd9ec..6de8ad9f38baf 100644 --- a/x-pack/legacy/plugins/canvas/shareable_runtime/components/__tests__/__snapshots__/app.test.tsx.snap +++ b/x-pack/legacy/plugins/canvas/shareable_runtime/components/__tests__/__snapshots__/app.test.tsx.snap @@ -7,5 +7,5 @@ exports[` App renders properly 1`] = `
markdown mock
markdown mock
My Canvas Workpad
" +
markdown mock
My Canvas Workpad
" `; diff --git a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/__examples__/__snapshots__/footer.examples.storyshot b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/__examples__/__snapshots__/footer.examples.storyshot index 7b3ac299f80ad..6ff39b723a49a 100644 --- a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/__examples__/__snapshots__/footer.examples.storyshot +++ b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/__examples__/__snapshots__/footer.examples.storyshot @@ -1277,16 +1277,9 @@ exports[`Storyshots shareables/Footer contextual: austin 1`] = ` rel="" title="Powered by Elastic.co" > - @@ -1340,16 +1333,11 @@ exports[`Storyshots shareables/Footer contextual: austin 1`] = ` onClick={[Function]} type="button" > - @@ -1394,16 +1382,11 @@ exports[`Storyshots shareables/Footer contextual: austin 1`] = ` onClick={[Function]} type="button" > - @@ -1432,16 +1415,11 @@ exports[`Storyshots shareables/Footer contextual: austin 1`] = ` onClick={[Function]} type="button" > - @@ -1551,16 +1529,9 @@ exports[`Storyshots shareables/Footer contextual: hello 1`] = ` rel="" title="Powered by Elastic.co" > - @@ -1614,16 +1585,11 @@ exports[`Storyshots shareables/Footer contextual: hello 1`] = ` onClick={[Function]} type="button" > - @@ -1667,16 +1633,11 @@ exports[`Storyshots shareables/Footer contextual: hello 1`] = ` onClick={[Function]} type="button" > - @@ -1705,16 +1666,11 @@ exports[`Storyshots shareables/Footer contextual: hello 1`] = ` onClick={[Function]} type="button" > - diff --git a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/__examples__/__snapshots__/page_controls.examples.storyshot b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/__examples__/__snapshots__/page_controls.examples.storyshot index cf68c7a6075d6..18eedea470c38 100644 --- a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/__examples__/__snapshots__/page_controls.examples.storyshot +++ b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/__examples__/__snapshots__/page_controls.examples.storyshot @@ -28,16 +28,11 @@ exports[`Storyshots shareables/Footer/PageControls component 1`] = ` onClick={[Function]} type="button" > - @@ -82,16 +77,11 @@ exports[`Storyshots shareables/Footer/PageControls component 1`] = ` onClick={[Function]} type="button" > - @@ -132,16 +122,11 @@ exports[`Storyshots shareables/Footer/PageControls contextual: austin 1`] = ` onClick={[Function]} type="button" > - @@ -186,16 +171,11 @@ exports[`Storyshots shareables/Footer/PageControls contextual: austin 1`] = ` onClick={[Function]} type="button" > - @@ -236,16 +216,11 @@ exports[`Storyshots shareables/Footer/PageControls contextual: hello 1`] = ` onClick={[Function]} type="button" > - @@ -290,16 +265,11 @@ exports[`Storyshots shareables/Footer/PageControls contextual: hello 1`] = ` onClick={[Function]} type="button" > - diff --git a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/__examples__/__snapshots__/title.examples.storyshot b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/__examples__/__snapshots__/title.examples.storyshot index e8fb42c5921d7..8d43fbf83bcd0 100644 --- a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/__examples__/__snapshots__/title.examples.storyshot +++ b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/__examples__/__snapshots__/title.examples.storyshot @@ -31,16 +31,9 @@ exports[`Storyshots shareables/Footer/Title component 1`] = ` rel="" title="Powered by Elastic.co" > - @@ -102,16 +95,9 @@ exports[`Storyshots shareables/Footer/Title contextual: austin 1`] = ` rel="" title="Powered by Elastic.co" > - @@ -173,16 +159,9 @@ exports[`Storyshots shareables/Footer/Title contextual: hello 1`] = ` rel="" title="Powered by Elastic.co" > - diff --git a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/autoplay_settings.examples.storyshot b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/autoplay_settings.examples.storyshot index a90c565cd91a7..201592df65a20 100644 --- a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/autoplay_settings.examples.storyshot +++ b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/autoplay_settings.examples.storyshot @@ -44,27 +44,15 @@ exports[`Storyshots shareables/Footer/Settings/AutoplaySettings component: off, - - @@ -219,27 +207,15 @@ exports[`Storyshots shareables/Footer/Settings/AutoplaySettings component: on, 5 - - @@ -394,27 +370,15 @@ exports[`Storyshots shareables/Footer/Settings/AutoplaySettings contextual 1`] = - - diff --git a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/settings.examples.storyshot b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/settings.examples.storyshot index d35db0f6e84e4..75db465d3f91f 100644 --- a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/settings.examples.storyshot +++ b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/settings.examples.storyshot @@ -38,16 +38,11 @@ exports[`Storyshots shareables/Footer/Settings component 1`] = ` onClick={[Function]} type="button" > - @@ -95,16 +90,11 @@ exports[`Storyshots shareables/Footer/Settings contextual 1`] = ` onClick={[Function]} type="button" > - diff --git a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/toolbar_settings.examples.storyshot b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/toolbar_settings.examples.storyshot index ece411900c2ba..82e7685caaab3 100644 --- a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/toolbar_settings.examples.storyshot +++ b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/toolbar_settings.examples.storyshot @@ -55,27 +55,15 @@ exports[`Storyshots shareables/Footer/Settings/ToolbarSettings component: off 1` - - @@ -155,27 +143,15 @@ exports[`Storyshots shareables/Footer/Settings/ToolbarSettings component: on 1`] - - @@ -255,27 +231,15 @@ exports[`Storyshots shareables/Footer/Settings/ToolbarSettings contextual 1`] = - - diff --git a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__tests__/__snapshots__/settings.test.tsx.snap b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__tests__/__snapshots__/settings.test.tsx.snap index 73d7599a60359..b8bbdc5f0a6dc 100644 --- a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__tests__/__snapshots__/settings.test.tsx.snap +++ b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__tests__/__snapshots__/settings.test.tsx.snap @@ -55,40 +55,19 @@ exports[` can navigate Autoplay Settings 1`] = ` - +
Auto Play - +
@@ -205,40 +163,19 @@ exports[` can navigate Autoplay Settings 2`] = ` - +
Auto Play - +
@@ -299,21 +215,10 @@ exports[` can navigate Autoplay Settings 2`] = ` - +
@@ -347,35 +252,14 @@ exports[` can navigate Autoplay Settings 2`] = ` - - +
+
@@ -540,40 +424,19 @@ exports[` can navigate Toolbar Settings, closes when activated 1`] = - +
Auto Play - +
@@ -690,40 +532,19 @@ exports[` can navigate Toolbar Settings, closes when activated 2`] = - +
Auto Play - +
@@ -784,21 +584,10 @@ exports[` can navigate Toolbar Settings, closes when activated 2`] = - +
@@ -841,35 +630,14 @@ exports[` can navigate Toolbar Settings, closes when activated 2`] = - - +
+
@@ -905,4 +673,4 @@ exports[` can navigate Toolbar Settings, closes when activated 2`] =
`; -exports[` can navigate Toolbar Settings, closes when activated 3`] = `"
Settings
Hide Toolbar
Hide the toolbar when the mouse is not within the Canvas?
"`; +exports[` can navigate Toolbar Settings, closes when activated 3`] = `"
Settings
Hide Toolbar
Hide the toolbar when the mouse is not within the Canvas?
"`; diff --git a/x-pack/legacy/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.js.snap b/x-pack/legacy/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.js.snap index 74c3e7408fe7c..dbdbe2b52bd56 100644 --- a/x-pack/legacy/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.js.snap +++ b/x-pack/legacy/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.js.snap @@ -286,25 +286,12 @@ exports[`extend index management ilm summary extension should return extension w size="m" type="cross" > - - - +