Commit graph

2903 commits

Author SHA1 Message Date
Thomas Watson
99db840a85
Upgrade ESLint to v8 (#162309)
Upgrade eslint from 7.32.0 to 8.46.0.

For details of breaking changes, see ESLint blog post, Migrate to v8.0.0:

https://eslint.org/docs/latest/use/migrate-to-8.0.0

For a full list of changes see their CHANGELOG.md:

https://github.com/eslint/eslint/blob/main/CHANGELOG.md

This also upgrades a bunch of ESLint plugins and related packages at the same time:

@types/eslint: 7.28.0 -> 8.44.2
eslint-config-prettier: 8.5.0 -> 9.0.0
eslint-module-utils: 2.6.2 -> 2.8.0
eslint-plugin-ban; 1.5.2 -> 1.6.0
eslint-plugin-cypress: 2.13.2 -> 2.14.0
eslint-plugin-import: 2.24.2 -> 2.28.0
eslint-plugin-jsx-a11y: 6.4.1 -> 6.7.1
eslint-plugin-mocha: 10.0.5 -> 10.1.0
eslint-plugin-no-unsanitized: 3.1.5 -> 4.0.2
2023-08-11 00:32:25 +02:00
Julia Rechkunova
c97d4960bf
[Discover] Inline shard failures warnings (#161271)
- Closes https://github.com/elastic/kibana/issues/155216

## Summary

This PR replaces shard falures toasts with inline warnings in Discover.

- [x] Intercept shard failures in Discover main app
- [x] Show inline warnings above the grid instead
- [x] Handle NoResultsFound case too
- [x] Implement for Discover context app
- [x] Implement for saved search embeddable on Dashboard
- [x] Can we inline timeouts too?
- [x] Check SQL view
- [x] Add tests


Discover view with shard failures
<img width="400" alt="Screenshot 2023-07-06 at 14 23 48"
src="a0799aa0-9d2e-42ee-b89b-e0e1180220a5">

Discover view with shard failures (and no results)
<img width="400" alt="Screenshot 2023-07-07 at 13 24 50"
src="28dc2bad-9776-4aa9-8f51-219d1c87487a">

Dashboard view with shard failures
<img width="400" alt="Screenshot 2023-07-06 at 16 15 49"
src="2a68c19a-1ca8-4f10-a9f5-4aa56f9160b0">

Surrounding documents view with shard failures
<img width="400" alt="Screenshot 2023-07-10 at 17 26 31"
src="ade63cfe-a1c2-4c22-8823-58dcfef9357f">

Discover view with timeouts
<img width="400" alt="Screenshot 2023-07-07 at 16 47 27"
src="0101be19-a555-4f96-b963-7fe418d51fb5">

Dashboard view with timeouts
<img width="400" alt="Screenshot 2023-07-07 at 16 48 18"
src="82979365-4129-4385-8a13-9c139e1acbf1">

Surrounding documents view with timeouts
<img width="400" alt="Screenshot 2023-07-11 at 15 03 41"
src="0ea41b79-ac6b-4456-9cfa-0d038b10da7d">

## Testing

For testing please uncomment
3f102cf688/src/plugins/data/common/search/search_source/search_source.ts (L922)
or
3f102cf688/src/plugins/data/common/search/search_source/search_source.ts (L547)
and switch to `kibana*` data view.


### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: Davis McPhee <davismcphee@hotmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-10 13:49:45 +02:00
Patryk Kopyciński
09aaecb59d
[security_solution] Cypress flaky tests catcher (#162376)
## Summary

Inspired by https://glebbahmutov.com/blog/burning-tests/

Implements the idea presented here
https://glebbahmutov.com/blog/burning-tests/#bonus-3-burning-new-or-changed-specs

In short, on PR that is changing/adding new Cypress spec files we will
try to "burn" them, it means we will try to run each `it` `2` times to
make sure tests are written in a way that gives Cypress a chance to
recover from the failed test.
Also adding a command that allows to "burn" tests locally
```
yarn cypress:burn --spec "<>"
```

Right now the job is set to `soft_fail`, so it is not going to block the
PR from merging, but hopefully will help the Team to recognize potential
flakiness before it is merged to `main`
2023-08-09 14:58:04 -07:00
Jeramy Soucy
53965c97a1
Bump elastic-apm-node 3.49.0 -> 3.49.1 (#163522)
## Summary

Upgrades `elastic-apm-node` from 3.49.0 to 3.49.1
2023-08-09 16:39:34 -04:00
Tiago Costa
924b8e9074
chore(NA): upgrade chromedriver to v115 (#163520)
This PR upgrades chromedriver into the latest version available.
2023-08-09 20:28:41 +01:00
Dario Gieselaar
e47152d8fd
[Observability AI Assistant]: Chat & function calling (#162906)
Implements chat & function calling for the Observability AI Assistant.
The APM related changes are due to a correction in the `toBooleanRt`
type.

Code in `x-pack/observability_ai_assistant` has been reviewed via
feature branches.

---------

Co-authored-by: Coen Warmer <coen.warmer@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
2023-08-08 13:48:05 +02:00
Thomas Watson
872f011e77
Bump require-in-the-middle from v6.0.0 to v7.2.0 (#163164) 2023-08-04 14:27:17 -07:00
Thomas Watson
b1f30e52a3
Bump elastic-apm-node from v3.48.0 to v3.49.0 (#163161) 2023-08-04 20:14:19 +02:00
Thomas Watson
4c41247f93
Upgrade re2 from v1.17.7 to v1.20.1 (#162880) 2023-08-04 20:13:13 +02:00
Thomas Watson
43364f6655
Consolidate Elastic APM dependencies (#162686) 2023-08-04 11:30:54 +02:00
renovate[bot]
ed7d6cf463
Update dependency xstate to ^4.38.2 (main) (#163038)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-03 17:22:49 +02:00
Bree Hall
68fec4bc64
Upgrade EUI to v85.1.0 (#162660)
`85.0.0` ➡️ `85.1.0`

⚠️ The biggest change in this PR by far is the **removal** of several
`EuiFilterSelectItem` CSS classes and styles associated with those
classes. EUI has previously exported component-specific CSS classes for
usage such as `.euiFilterSelect__items`,
`.euiFilterGroup__popoverPanel`, or `.euiAccordionForm`.

 **As of our move to CSS-in-JS, we are actively moving away from this
architecture**. The goal is to either provide either a component or prop
directly to you instead of a CSS class. As a reminder, our classNames
are not guaranteed APIs and are subject to change without warning -
should you need to tweak or customize EUI's styling, we strongly
recommend passing in your own `className`.

💬 Moving forward, EUI will attempted to convert any usages of removed
CSS classes and their direct usages in Kibana for you. In most cases,
we'll hopefully be able to take the correct path of using a component or
prop instead. In cases where we cannot or significant/complex changes
are required, we may temporarily convert the CSS to a static CSS-in-JS
usage instead and add a TODO asking the relevant team to address this in
their own time (for example, the deprecation of `EuiFilterSelectItem`
and its conversion to `EuiSelectable`).

## [`85.1.0`](https://github.com/elastic/eui/tree/v85.1.0)

- Updated `EuiComboBox`'s `options` to accept `option.append` and
`option.prepend` props
([#6953](https://github.com/elastic/eui/pull/6953))
- Updated deprecated `.substr()` usages to `.substring()`
([#6954](https://github.com/elastic/eui/pull/6954))
- Updated `EuiInlineEdit`'s read mode button to include a title tooltip,
increasing readability of truncated text
([#6966](https://github.com/elastic/eui/pull/6966))

**Bug fixes**

- Fixed `EuiFilterGroup`'s responsive styles
([#6983](https://github.com/elastic/eui/pull/6983))

**Deprecations**

- Deprecated `EuiFilterSelectItem`; Use `EuiSelectable` instead
([#6982](https://github.com/elastic/eui/pull/6982))

**CSS-in-JS conversions**

- Converted `EuiFilterSelectItem` to Emotion
([#6982](https://github.com/elastic/eui/pull/6982))
- Removed `.euiFilterSelect__items` CSS; Use `EuiSelectable` instead
([#6982](https://github.com/elastic/eui/pull/6982))
- Removed `.euiFilterSelect__note` and `.euiFilterSelect__noteContent`
CSS; Use `EuiSelectableMessage` instead
([#6982](https://github.com/elastic/eui/pull/6982))
- Added `focus.transparency` and `focus.backgroundColor` theme tokens
([#6984](https://github.com/elastic/eui/pull/6984))

---------

Co-authored-by: Cee Chen <constance.chen@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-03 14:36:07 +01:00
Rachel Shen
d8078b625d
[Reporting] Remove PNG V1 (#162517)
## Summary

Closes https://github.com/elastic/kibana/issues/162293 and partially
addresses [154601](https://github.com/elastic/kibana/issues/154601)

Removes the screenshot diagnostic tool but keeps the browser check
Removes PngV1ExportType from core and the export types registry

### Before
There were two steps so the EuiSteps component definitely made more
sense.

![Screenshot 2023-07-31 at 8 38 50
AM](f054f024-9148-4343-be45-9ddf175b8c71)

![Screenshot 2023-07-31 at 8 41 53
AM](71c6de8a-723c-462a-a7ad-51a4ca45f58f)


### After
I removed the use of the EuiSteps component since there's only the
browser check. Since the EuiSteps also showed some validation, I added a
callout to let users know the status of the diagnostic.

![Screenshot 2023-07-31 at 8 35 05
AM](fce09be1-ec2d-43bf-ab7d-f90df82c0579)

![Screenshot 2023-07-31 at 1 51 00
PM](3fdeb41e-5d3a-4e99-b9aa-63d2d739715f)

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-02 14:30:41 -06:00
Jon
8ffd4fbb76
Bump tar to ^6.1.15 (#162897)
\>6.1.11 is needed for a bug fix in
https://github.com/elastic/kibana/pull/162722

Noted in https://github.com/elastic/kibana/pull/144012:
> tar: 6.1.11 -> 6.1.13 - Includes a bug fix for a race condition that
triggered when the ci:build-all-platforms label was added in Node.js 18
but not in Node.js 16

This upgrades to the latest patch on main before backporting to 7.17
2023-08-01 15:21:37 -05:00
Jon
1700e3e534
Bump types/tar to ^6.1.5 (#162833)
Needed for https://github.com/elastic/kibana/pull/162722 [type
fixes](https://buildkite.com/elastic/kibana-pull-request/builds/145674#01899dd0-5ec1-4e72-b6f3-92ecc6ccd51a/348-559).

7.17 is on version 4 of the types package. This upgrades to the latest
patch version on main before backporting.
2023-07-31 17:53:25 -05:00
Quynh Nguyen (Quinn)
0728003865
[ML] Add new Data comparison view (#161365)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-31 08:24:01 -07:00
Saikat Sarkar
bf5c2703f9
[ELSER] Remove missing type hints related to the inference config (#162602)
This pr is related to issue:
https://github.com/elastic/enterprise-search-team/issues/4432

This change involves removing hints related to the inference_config
attribute

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-31 17:26:34 +03:00
Thomas Watson
0e081d84f2
Upgrade eslint-plugin-jest from v24.5.0 to v27.2.3 (#162689) 2023-07-31 10:34:49 +02:00
Clint Andrew Hall
477505a2dd
[context] Unify Contexts, deprecate others (#161914)
> Pre-req for https://github.com/elastic/kibana/issues/56406

## Summary

We've had a long-standing problem in Kibana around our use of React
context, particularly with EUI and i18n. There hasn't existed an
idempotent context structure, and that has lead to a lot of unexpected
results, (e.g. missing translations, inconsistent dark mode, excess
context providers, etc).

The biggest change coming from this PR is knowing exactly which provider
to use in a particular use case. This means, for example,
`ReactDOM.render` calls won't be missing `i18n` or `theme` due to a
missing context. It also allows consumers to use `darkMode` without
having to read the `uiSetting` themselves, instead allowing the context
to do it for them.

We also haven't been honoring the intended [`EuiProvider`
API](https://eui.elastic.co/#/utilities/provider#theming-and-global-styles)...
in some cases we've been creating and re-creating the Emotion caches,
often by copy/paste of the cache code. We've also been nesting
`EuiThemeProvider` contexts unnecessarily-- thinking we need to render a
theme provider in an isolated component-- which renders an additional
`span` element into the DOM.

This PR attempts to address this inconsistency by creating a set of
context providers divided by use case:


![diagram](e01c6296-1b7a-4639-ae96-946866950efe)

### `KibanaRootContextProvider`
A root context provider for Kibana. This is the top level context
provider that wraps the entire application. It is responsible for
initializing all of the other contexts and providing them to the
application. It's provided as a package for specific use cases, (e.g.
the `RenderingService`, cases where we replace the entire page content,
Storybook, testing, etc), but not intended for plugins.

### `KibanaRenderContextProvider`
A render context provider for Kibana. This context is designed to be
used with ad-hoc renders of React components, (usually with
`ReactDOM.render`).

### `KibanaThemeContextProvider`
A theme context provider for Kibana. A corollary to EUI's
`EuiThemeProvider`, it uses Kibana services to ensure the EUI Theme is
customized correctly.

### (deprecated) `KibanaStyledComponentsThemeProvider`
A styled components theme provider for Kibana. This package is supplied
for compatibility with legacy code, but should not be used in new code.

## Deprecation strategy
This PR does *not* change any use of context by consumers. It maps the
existing contexts in `kibanaReact` to the new contexts, (along with the
loose API). This means that we won't have completely fixed all of our
dark mode issues yet. But this is necessary to keep this PR focused on
the change, rather than drawing in a lot of teams to review individual
uses.

We should, however, see an immediate performance improvement in the UI
from the reduction in `EuiProvider` calls.

## Open questions
- [ ] Does it make sense to expose a `useTheme` hook from
`@kbn/react-kibana-context-theme` to replace `useEuiTheme`?

## Next steps
- [ ] Update deprecated uses to new contexts.
- [ ] Audit and update calls to `ReactDOM.render`.
- [ ] Add ESLint rule to warn for use of EUI contexts.
- [ ] Delete code from `kibanaReact`.
2023-07-28 09:30:08 -07:00
Dario Gieselaar
f0ebb7097d
[Observability AI Assistant]: Move to new plugin, update design and use connectors (#162243)
This PR makes the following changes:

- Update look & feel of contextual insights (previously called prompts)
according to the new design that is being developed. Some things might
still change, but hopefully not too much.
- Move all the Observability AI Assistant (previously called CoPilot)
code into a separate plugin for better isolation, more specific code
ownership and to solve some circular dependency issues
- Use connectors instead of a kibana.yml setting

Note: for OpenAI, the model is currently hardcoded to `gpt-4` until
https://github.com/elastic/kibana/issues/162204 has been addressed.


557676b6-065a-4b6f-86b2-1f0c2fd5e07e

---------

Co-authored-by: Coen Warmer <coen.warmer@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-28 11:52:00 -04:00
Shahzad
971c6bd5eb
[Synthetics] Upgrade synthetics to 1.3.0 (#152419)
## Summary
2023-07-28 14:52:00 +02:00
Thomas Watson
d213ed274c
Upgrade ESLint React plugins (#162464) 2023-07-28 10:43:53 +02:00
Tomasz Kajtoch
1c42ee9720
Upgrade @elastic/eui to 85.0.1 (#162209)
## Summary

`eui@84.0.0`  `eui@85.0.1`

## [`85.0.1`](https://github.com/elastic/eui/tree/v85.0.1)

**Bug fixes**

- Fixed `EuiFilterGroup`'s responsive styles
([#6983](https://github.com/elastic/eui/pull/6983))

## [`85.0.0`](https://github.com/elastic/eui/tree/v85.0.0)

- Updated `EuiThemeProvider` to set an Emotion theme context that
returns the values of `useEuiTheme()`
([#6913](https://github.com/elastic/eui/pull/6913))
- Added `size` prop to `EuiStepsHorizontal`, defaulting to the previous
size of `m` ([#6928](https://github.com/elastic/eui/pull/6928))
- Added new `s` sizing to `EuiStepsHorizontal`
([#6928](https://github.com/elastic/eui/pull/6928))
- Added `at` and `key` icon glyphs.
([#6934](https://github.com/elastic/eui/pull/6934))
- Added a new `cloneElementWithCss` Emotion utility
([#6939](https://github.com/elastic/eui/pull/6939))
- Updated `EuiPopover` to allow consumer control of all `focusTrapProps`
([#6955](https://github.com/elastic/eui/pull/6955))

**Bug fixes**

- Fixed `EuiDataGrid` height calculation bug when browser zoom levels
are not 100% ([#6895](https://github.com/elastic/eui/pull/6895))
- Fixed `EuiTab` not correctly passing selection color state to
`prepend` and `append` children
([#6938](https://github.com/elastic/eui/pull/6938))
- Fixed `EuiInputPopover` to allow consumer control of its focus trap
via `focusTrapProps` ([#6955](https://github.com/elastic/eui/pull/6955))

**Breaking changes**

- `EuiProvider` will no longer render multiple or duplicate nested
instances of itself. If a nested `EuiProvider` is detected, that
instance will return early without further processing, and will warn if
configured to do so via `setEuiDevProviderWarning`. For nested theming,
use `EuiThemeProvider` instead.
([#6949](https://github.com/elastic/eui/pull/6949))
- Removed `onTrapDeactivation` prop from `EuiPopover`. Use
`focusTrapProps.onDeactivation` instead
([#6955](https://github.com/elastic/eui/pull/6955))

**CSS-in-JS conversions**

- Converted `EuiFilterGroup` and `EuiFilterButton` to Emotion; Removed
styles attached to `.euiFilterGroup__popoverPanel`
([#6957](https://github.com/elastic/eui/pull/6957))

---------

Co-authored-by: Cee Chen <constance.chen@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-07-27 12:47:18 -06:00
Alex Szabo
8cf68dc6ba
[Ops] Bump Node.js to version 18 (#160289)
## Summary

Bumps node.js to 18.17.0 (replacement for PR #144012 which was later
reverted)

As a result, these categorical additions were needed: 
- `node` evocations will need the `--openssl-legacy-provider` flag,
wherever it would use certain crypto functionalities
- tests required updating of the expected HTTPS Agent call arguments,
`noDelay` seems to be a default
 - `window.[NAME]` fields cannot be written directly
 - some stricter typechecks

This is using our in-house built node.js 18 versions through the URLs
the proxy-cache. (built with
https://github.com/elastic/kibana-custom-nodejs-builds/pull/4)

These urls are served from a bucket, where the RHEL7/Centos7 compatible
node distributables are. (see:
https://github.com/elastic/kibana-ci-proxy-cache/pull/7)

Further todos: 
 - [x] check docs wording and consistency
 - [ ] update the dependency report
 - [x] explain custom builds in documentation
 - [x] node_sass prebuilts

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
Co-authored-by: Thomas Watson <w@tson.dk>
2023-07-27 14:12:48 +02:00
Walter Rafelsberger
0ab24e566c
[ML] AIOps: Use Kibana's http service instead of fetch, fix throttling. (#162335)
- Originally Kibana's `http` service did not support receiving streams,
that's why we used plain `fetch` for this. This has been fixed in
#158678, so this PR updates the streaming helpers to use Kibana's `http`
service from now on.
- The PR also breaks out the response stream code into its own package
and restructures it to separate client and server side code. This brings
down the `aiops` bundle size by `~300KB`! 🥳
- The approach to client side throttling/buffering was also revamped:
There was an issue doing the throttling inside the generator function,
it always waited for the timeout. The buffering is now removed from
`fetchStream`, instead `useThrottle` from `react-use` is used on the
reduced `data` in `useFetchStream`. Loading log rate analysis results
got a lot snappier with this update!
2023-07-27 08:57:10 +02:00
Jeramy Soucy
09ed3fc8a0
Bump @elastic/request-crypto v2.0.1 -> v2.0.2 (#162532)
## Summary

Upgrades @elastic/request-crypto from 2.0.1 to 2.0.2.
2023-07-26 14:27:38 -04:00
renovate[bot]
6757d8fbdf
Update APM (main) (#162516)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@elastic/apm-rum](https://togithub.com/elastic/apm-agent-rum-js) |
[`^5.12.0` ->
`^5.13.0`](https://renovatebot.com/diffs/npm/@elastic%2fapm-rum/5.12.0/5.13.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@elastic%2fapm-rum/5.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@elastic%2fapm-rum/5.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@elastic%2fapm-rum/5.12.0/5.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@elastic%2fapm-rum/5.12.0/5.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@elastic/apm-rum-react](https://www.elastic.co/guide/en/apm/agent/rum-js/current/index.html)
([source](https://togithub.com/elastic/apm-agent-rum-js)) | [`^1.4.2` ->
`^1.4.3`](https://renovatebot.com/diffs/npm/@elastic%2fapm-rum-react/1.4.2/1.4.3)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@elastic%2fapm-rum-react/1.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@elastic%2fapm-rum-react/1.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@elastic%2fapm-rum-react/1.4.2/1.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@elastic%2fapm-rum-react/1.4.2/1.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>elastic/apm-agent-rum-js (@&#8203;elastic/apm-rum)</summary>

###
[`v5.13.0`](https://togithub.com/elastic/apm-agent-rum-js/blob/HEAD/packages/rum/CHANGELOG.md#5130-2023-07-18)

[Compare
Source](https://togithub.com/elastic/apm-agent-rum-js/compare/@elastic/apm-rum@5.12.0...@elastic/apm-rum@5.13.0)

##### Features

- **rum-core:** add apmRequest config typescript type
([#&#8203;1254](https://togithub.com/elastic/apm-agent-rum-js/issues/1254))
([cfaa327](cfaa327ba3))
- **rum-core:** enhance user transaction name obtaining
([#&#8203;1390](https://togithub.com/elastic/apm-agent-rum-js/issues/1390))
([1144b9f](1144b9fd3b))
- **rum:** add sendCredentials config option to TypeScript typings
([#&#8203;1243](https://togithub.com/elastic/apm-agent-rum-js/issues/1243))
([369800e](369800e17d))

</details>

<details>
<summary>elastic/apm-agent-rum-js
(@&#8203;elastic/apm-rum-react)</summary>

###
[`v1.4.3`](https://togithub.com/elastic/apm-agent-rum-js/blob/HEAD/packages/rum-react/CHANGELOG.md#143-2023-07-18)

[Compare
Source](https://togithub.com/elastic/apm-agent-rum-js/compare/@elastic/apm-rum-react@1.4.2...@elastic/apm-rum-react@1.4.3)

**Note:** Version bump only for package
[@&#8203;elastic/apm-rum-react](https://togithub.com/elastic/apm-rum-react)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/elastic/kibana).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMS4wIiwidXBkYXRlZEluVmVyIjoiMzYuMTEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-26 04:58:02 -04:00
Sergi Massaneda
3d6dbd4ad7
[Security Solution] Unified IA Project Navigation (#161667)
## Summary

Implementation of serverless-specific pages within the Unified IA
Navigation.

#### Links implemented:

- `Machine Learning`
  - Landing page created on serverless only
  - All links in the landing page go to `/ml` app
  
- `Dev Tools` 
  - Links directly to `/dev_tools` app


![snapshot](bd53c796-02df-4c3a-88e4-0fa043b896cd)

#### Links not implemented:
```// TODO: in a follow-up PR```

- Project Settings
  - Change the _Settings_ name by _Project Settings_
  - Modify the landing page items according to the design

## Changes

### Plugin contract changes

The Machine Learning landing page is the first page that is only available on serverless and should not exist in ess (there are more of this kind in the pipeline), so this PR implements the foundations to enable the _security_solution_serverless_ plugin to implement its own page components, configure the link definition and create new routes to render them in the Security Solution application. 
These new APIs can be called from either `security_solution_serverless` or `security_solution_ess`, allowing those plugins to have their own offering-specific pages.

The new APIs exposed in the security_solution public contract are the following:

 - `extraAppLinks$`: Observable to add extra app_links into the application links configuration, so they are stored and included in the SecuritySolution plugin `deepLinks` registry, to make them accessible from anywhere in the application using the `chrome.navLinks` API.
 
 - `extraRoutes$`: Observable to add extra routes into the main Router, so it can render the new page components. These additional routes are appended after the "sub-plugin" (_alerts_, _timeline_, ...) routes, so it is not possible to override an existing route path.
 
### New `security-solution-navigation` package

Since now we need to use the same navigation components and hooks in different plugins, these functionalities have been extracted to the `@kbn/security-solution-navigation` package, which all Security plugins will depend on (generic, serverless, and ess).

The modules exposed by this package have been extracted from the main security_solution plugin and standardized. They include the Landing pages components (new [storybook](https://ci-artifacts.kibana.dev/storybooks/pr-161667/394abe76676c6a76b2982c1d3f5bb675739c3477/security_solution_packages/index.html?path=/story/landing-links-landing-links-icons-categories--landing-links-icons-categories) available), navigation hooks, and link utilities. Also, some types and constants have been moved to this package.

A new context provider has also been created, which needs to be in place in order to use this package. The `<NavigationProvider core={core}>` is required for the package functionalities to have access to the Kibana core navigation APIs: `navigateToUrl`, `navigateToApp`, and `getUrlForApp`.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: YulNaumenko <jo.naumenko@gmail.com>
2023-07-25 14:02:10 -07:00
Luke G
02b04dd2fc
[Serverless] [Security Solution] Add runtime schema for first seen last seen search strategy (#162170)
## Summary

This PR adds validation for `firstlastseen` search strategy, as part of
https://github.com/elastic/security-team/issues/6486

### Testing
Prerequisites: you have at least one entry on your hosts screen

Visit /app/security/hosts/allHosts and click on the first host within
the table.

The page should render the last seen info. There should be no error
notifications rendered.

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-07-25 09:21:12 -07:00
Thomas Watson
a79e9c7374
Remove eslint-plugin-prefer-object-spread dependency (#162439)
Remove the `eslint-plugin-prefer-object-spread` dependency as the
`prefer-object-spread` rule has been part of ESLint since v5
2023-07-25 10:04:44 +02:00
Kurt
cbe2a09598
Upgrading word-wrap (#162339)
## Summary

Upgrading `word-wrap` from `1.2.3.` -> `1.2.5`

Please find the changelog here:
https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.5
2023-07-24 12:05:37 -04:00
renovate[bot]
6775f5818e
Update dependency @elastic/charts to v59.1.0 (main) (#162395)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@elastic/charts](https://togithub.com/elastic/elastic-charts) |
[`59.0.0` ->
`59.1.0`](https://renovatebot.com/diffs/npm/@elastic%2fcharts/59.0.0/59.1.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@elastic%2fcharts/59.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@elastic%2fcharts/59.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@elastic%2fcharts/59.0.0/59.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@elastic%2fcharts/59.0.0/59.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>elastic/elastic-charts (@&#8203;elastic/charts)</summary>

###
[`v59.1.0`](https://togithub.com/elastic/elastic-charts/blob/HEAD/CHANGELOG.md#5910-2023-07-19)

[Compare
Source](https://togithub.com/elastic/elastic-charts/compare/v59.0.0...v59.1.0)

##### Bug Fixes

- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to v83
([#&#8203;2088](https://togithub.com/elastic/elastic-charts/issues/2088))
([c72695e](c72695e80c))
- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to v84
([#&#8203;2108](https://togithub.com/elastic/elastic-charts/issues/2108))
([2b76a9a](2b76a9ae88))

##### Features

- **metric:** add value icon and color
([#&#8203;2101](https://togithub.com/elastic/elastic-charts/issues/2101))
([d7134f5](d7134f5a45))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/elastic/kibana).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMS4wIiwidXBkYXRlZEluVmVyIjoiMzYuMTEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-24 08:47:24 -04:00
Nathan Reese
257e52eb84
[file upload] bump loaders.gl@3.4.7 (#162176)
https://github.com/visgl/loaders.gl/pull/1570 removed
`_rootObjectBatches` option. Replaced `_rootObjectBatches` with
`metadata: true`

`[Symbol.asyncIterator]()` is a weird piece of code that turns an
Iterable into an Iterator,
https://stackoverflow.com/questions/67038602/using-asynciterable-with-next-style-instead-of-for-await-loop.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-20 13:10:35 -06:00
Tiago Costa
e9a6519337
chore(NA): add Blob polyfill on jest env (#162197)
This PR adds the `Blob` polyfill into the jest jsdom env which is
currently not supported as mentioned in
https://github.com/jsdom/jsdom/issues/2555

---------

Co-authored-by: Thomas Watson <w@tson.dk>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-20 18:30:43 +01:00
renovate[bot]
2152e3949c
Update dependency xstate to ^4.38.1 (main) (#161056)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-19 18:03:32 +02:00
Drew Tate
092e988df2
[Lens][Event annotations] Move logic into packages (#161500) 2023-07-19 09:46:57 -05:00
James Gowdy
219426dc7a
[ML] Creating category validation package (#161261)
Moves the server and client side code which performs analysis on data to
see whether it is suitable for categorization.
This is currently only used by the categorization job wizard to display
this callout:

![image](08db5321-0c38-474d-9bfe-90b8a9ad984a)

However this analysis will be useful for the Log Pattern Analysis
feature and so moving the code to a package allows easier sharing
between ML and AIOPs plugins.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-19 12:34:29 +01:00
Lukas Olson
2a689fa787
Create @kbn/discover-utils package (#162004)
## Summary

Creates a shared package for Discover utils/services/hooks,
`@kbn/discover-utils`. Moves a couple of utils there
(`buildDataTableRecord`/`getDocId`). This will be the future home for
many services/utils that are shared between the Discover app and its
packaged components (like unified field list, unified histogram, etc.)

### Checklist

- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-18 13:34:09 -07:00
renovate[bot]
01f6c5b191
Update dependency elastic-apm-node to ^3.48.0 (main) (#161993)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [elastic-apm-node](https://togithub.com/elastic/apm-agent-nodejs) |
[`^3.47.0` ->
`^3.48.0`](https://renovatebot.com/diffs/npm/elastic-apm-node/3.47.0/3.48.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/elastic-apm-node/3.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/elastic-apm-node/3.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/elastic-apm-node/3.47.0/3.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/elastic-apm-node/3.47.0/3.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>elastic/apm-agent-nodejs (elastic-apm-node)</summary>

###
[`v3.48.0`](https://togithub.com/elastic/apm-agent-nodejs/releases/tag/v3.48.0)

[Compare
Source](https://togithub.com/elastic/apm-agent-nodejs/compare/v3.47.0...v3.48.0)

For more information, please see the
[changelog](https://www.elastic.co/guide/en/apm/agent/nodejs/current/release-notes-3.x.html#release-notes-3.48.0).

##### Elastic APM Node.js agent layer ARNs

|Region|ARN|
|------|---|

|af-south-1|arn:aws:lambda:af-south-1:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|ap-east-1|arn:aws:lambda:ap-east-1:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|ap-northeast-1|arn:aws:lambda:ap-northeast-1:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|ap-northeast-2|arn:aws:lambda:ap-northeast-2:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|ap-northeast-3|arn:aws:lambda:ap-northeast-3:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|ap-south-1|arn:aws:lambda:ap-south-1:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|ap-southeast-1|arn:aws:lambda:ap-southeast-1:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|ap-southeast-2|arn:aws:lambda:ap-southeast-2:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|ap-southeast-3|arn:aws:lambda:ap-southeast-3:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|ca-central-1|arn:aws:lambda:ca-central-1:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|eu-central-1|arn:aws:lambda:eu-central-1:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|eu-north-1|arn:aws:lambda:eu-north-1:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|eu-south-1|arn:aws:lambda:eu-south-1:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|eu-west-1|arn:aws:lambda:eu-west-1:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|eu-west-2|arn:aws:lambda:eu-west-2:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|eu-west-3|arn:aws:lambda:eu-west-3:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|me-south-1|arn:aws:lambda:me-south-1:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|sa-east-1|arn:aws:lambda:sa-east-1:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|us-east-1|arn:aws:lambda:us-east-1:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|us-east-2|arn:aws:lambda:us-east-2:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|us-west-1|arn:aws:lambda:us-west-1:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

|us-west-2|arn:aws:lambda:us-west-2:267093732750:layer:elastic-apm-node-ver-3-48-0:1|

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/elastic/kibana).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi41LjMiLCJ1cGRhdGVkSW5WZXIiOiIzNi44LjExIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-17 04:25:34 -04:00
Patryk Kopyciński
b2b7cf6253
Bump jest@29.6.1 (#161630)
## Summary

Bump `jest@29.6.1` and resolve duplicated jest-related dependencies

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-15 17:42:30 +02:00
Ying Mao
8a56a2bbaa
[Response Ops][Actions] Allow streaming responses from Generative AI connector (#161676)
Resolves https://github.com/elastic/kibana/issues/159598

## Summary

This PR modifies the `test` subaction of the Generative AI connector to
accept a `stream` parameter (default: `false`) that allows for a
streaming response.

The Generative AI connector is basically a pass-through to the Open
AI/Azure OpenAI APIs, where the `stream` parameter is passed in via the
body of the request. This means that with the existing connector, users
could specify `stream: true` in the body which would lead to unexpected
results when the action is unprepared to return streaming results. This
PR sanitizes the body that is passed in the `run` subaction to prevent
the `stream` parameter from being set to `true` and explicitly sets the
`stream` parameter for the `test` subaction.

In order to test the streaming response, I created an example plugin
that prompts users to create a Generative AI connector if one does not
exist and then executes actions using the connector with `stream` set to
`true`. This borrows liberally from @dgieselaar's existing work from
https://github.com/elastic/kibana/pull/158678


441694cb-0154-4450-bd93-3907c4a9995c



## To Verify

1. Navigate to https://localhost:5601/app/GenAiStreamingResponseExample
2. Set up a Generative AI connector
3. Open the network console. Enter a prompt and click `Stream Response`
4. You should see the chat response return streaming results.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-14 19:17:12 -04:00
Cee Chen
fc9ac7a9c9
Upgrade EUI to v84.0.0 (#161716)
## Summary

`eui@83.1.0`  `eui@84.0.0`

---

## [`84.0.0`](https://github.com/elastic/eui/tree/v84.0.0)

- Updated `EuiDualRange`'s `minInputProps` and `maxInputProps` to
support passing more props to underlying inputs
([#6902](https://github.com/elastic/eui/pull/6902))
- `EuiFocusTrap` now supports configuring cross-iframe focus trapping
via the `crossFrame` prop
([#6908](https://github.com/elastic/eui/pull/6908))

**Bug fixes**

- Fixed `EuiFilterButton` icon display
([#6900](https://github.com/elastic/eui/pull/6900))
- Fixed `EuiCombobox` compressed plain text display
([#6910](https://github.com/elastic/eui/pull/6910))
- Fixed visual appearance of collapse buttons on collapsible
`EuiResizablePanel`s ([#6926](https://github.com/elastic/eui/pull/6926))

**Breaking changes**

- `EuiFocusTrap` now defaults to *not* trapping focus across iframes
([#6908](https://github.com/elastic/eui/pull/6908))

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-07-14 11:16:49 -07:00
Nathan Reese
9509425349
[Maps] update to maplibre 3.1.0 (#161032)
maplibre change log
https://github.com/maplibre/maplibre-gl-js/blob/main/CHANGELOG.md#310

Breaking changes that required fixes
* 3.0.0 Remove "mapbox-gl-supported" package from API. If needed, please
reference it directly instead of going through MapLibre.
(https://github.com/maplibre/maplibre-gl-js/pull/2451)
* 3.0.0 Resize map when container element is resized. The
"resize"-related events now has different data associated with it
(https://github.com/maplibre/maplibre-gl-js/pull/2157,
https://github.com/maplibre/maplibre-gl-js/issues/2551). Previously the
originalEvent field was the reason of this change, for example it could
be a resize event from the browser. Now it is ResizeObserverEntry, see
more
[here](https://developer.mozilla.org/en-US/docs/web/api/resizeobserverentry).
* 2.2.0 Improve filter specification typings
(https://github.com/maplibre/maplibre-gl-js/pull/1390)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-07-13 08:22:15 -06:00
Jeramy Soucy
d076300a52
Upgrades protobufjs 6.11.3 -> 7.2.4 (#161407)
Upgrades protobufjs from 6.11.3 to 7.2.4 via...
- @grpc/grpc-js 1.6.7 -> 1.6.8
- @opentelemetry/exporter-metrics-otlp-grpc 0.30.0 -> 0.34.0

Upgrades for compatibility...
- @opentelemetry/api-metrics 0.30.0 -> 0.31.0
- @opentelemetry/exporter-prometheus 0.30.0 -> 0.31.0
- @opentelemetry/sdk-metrics-base 0.30.0 -> 0.31.0
2023-07-13 08:51:55 -04:00
renovate[bot]
2e2da69857
Update dependency react-hook-form to ^7.44.2 (main) (#152895)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [react-hook-form](https://www.react-hook-form.com)
([source](https://togithub.com/react-hook-form/react-hook-form)) |
[`^7.43.2` ->
`^7.44.2`](https://renovatebot.com/diffs/npm/react-hook-form/7.43.2/7.44.2)
|
[![age](https://badges.renovateapi.com/packages/npm/react-hook-form/7.44.2/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/react-hook-form/7.44.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/react-hook-form/7.44.2/compatibility-slim/7.43.2)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/react-hook-form/7.44.2/confidence-slim/7.43.2)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>react-hook-form/react-hook-form</summary>

###
[`v7.44.2`](https://togithub.com/react-hook-form/react-hook-form/releases/tag/v7.44.2):
Version 7.44.2

[Compare
Source](https://togithub.com/react-hook-form/react-hook-form/compare/v7.44.1...v7.44.2)

🪟 fix
[#&#8203;10456](https://togithub.com/react-hook-form/react-hook-form/issues/10456)
`object.hasown` replaced with `hasOwnProperty`
([#&#8203;10458](https://togithub.com/react-hook-form/react-hook-form/issues/10458))

###
[`v7.44.1`](https://togithub.com/react-hook-form/react-hook-form/releases/tag/v7.44.1):
Version 7.44.1

[Compare
Source](https://togithub.com/react-hook-form/react-hook-form/compare/v7.44.0...v7.44.1)

🐞 fix `<Form />` component content-type json type missing
([#&#8203;10454](https://togithub.com/react-hook-form/react-hook-form/issues/10454))

###
[`v7.44.0`](https://togithub.com/react-hook-form/react-hook-form/releases/tag/v7.44.0):
Version 7.44.0

[Compare
Source](https://togithub.com/react-hook-form/react-hook-form/compare/v7.43.9...v7.44.0)

📄 New `<Form />` Component
([https://github.com/react-hook-form/react-hook-form/pull/9735](https://togithub.com/react-hook-form/react-hook-form/pull/9735))

https://react-hook-form.com/docs/useform/form

-   add try and catch for JSON.stringify

```tsx
// Send post request with formData
<Form
  action="/api"
  control={control}
  onSuccess={() => {
    alert("Great");
  }}
/>

// Send post request with json form data
<Form action="/api" encType="application/json" headers={{ accessToken: 'test' }}> 
  {errors.root?.server.type === 500 && 'Error message'}
  {errors.root?.server.type === 400 && 'Error message'}
</Form>

// Send post request with formData with fetch
<Form
  onSubmit={async ({ formData, data, formDataJson, event }) => {
    await fetch("api", {
      method: "post",
      body: formData,
    });
  }}
/>
```

🗝️ support TransformedValues with useFormContext
([https://github.com/react-hook-form/react-hook-form/pull/10322](https://togithub.com/react-hook-form/react-hook-form/pull/10322))

```tsx
useFormContext<FormValue, TransformedValues>()
```

🚔 added TTransformedValues to FormProvider
([https://github.com/react-hook-form/react-hook-form/pull/10368](https://togithub.com/react-hook-form/react-hook-form/pull/10368))

```tsx
FormProviderProps<TFieldValues, TContext, TTransformedValues>
```

🐞 fix
[https://github.com/react-hook-form/react-hook-form/issues/10139](https://togithub.com/react-hook-form/react-hook-form/issues/10139)
with errors diff from the previous with field array action
([https://github.com/react-hook-form/react-hook-form/pull/10216](https://togithub.com/react-hook-form/react-hook-form/pull/10216))
🐞 related
[https://github.com/react-hook-form/react-hook-form/issues/10238](https://togithub.com/react-hook-form/react-hook-form/issues/10238)
return default values in watch and useWatch when reset is called with an
empty object
🦮 remove unnecessary as unknown as cast
([https://github.com/react-hook-form/react-hook-form/pull/10300](https://togithub.com/react-hook-form/react-hook-form/pull/10300))
🧛‍♂️ close
[https://github.com/react-hook-form/react-hook-form/issues/10277](https://togithub.com/react-hook-form/react-hook-form/issues/10277)
remove pattern empty string check
([https://github.com/react-hook-form/react-hook-form/pull/10279](https://togithub.com/react-hook-form/react-hook-form/pull/10279))
🐞 fix
[https://github.com/react-hook-form/react-hook-form/issues/9037](https://togithub.com/react-hook-form/react-hook-form/issues/9037)
bugs that occur in the presence of Array polyfills
([https://github.com/react-hook-form/react-hook-form/pull/10328](https://togithub.com/react-hook-form/react-hook-form/pull/10328))
🫥 close
[https://github.com/react-hook-form/react-hook-form/issues/10348](https://togithub.com/react-hook-form/react-hook-form/issues/10348)
stop shouldUseNativeValidation pass down constraint props
([https://github.com/react-hook-form/react-hook-form/pull/10350](https://togithub.com/react-hook-form/react-hook-form/pull/10350))
😵‍💫 close
[https://github.com/react-hook-form/react-hook-form/issues/10386](https://togithub.com/react-hook-form/react-hook-form/issues/10386)
re-register controller input to fix strict mode
([https://github.com/react-hook-form/react-hook-form/pull/10418](https://togithub.com/react-hook-form/react-hook-form/pull/10418))
✍️ update form.tsx for TSdoc
([https://github.com/react-hook-form/react-hook-form/pull/10399](https://togithub.com/react-hook-form/react-hook-form/pull/10399))

thanks to [@&#8203;yasamoka](https://togithub.com/yasamoka) &
[@&#8203;Torvin](https://togithub.com/Torvin)
[@&#8203;ryota-murakami](https://togithub.com/ryota-murakami) &
[@&#8203;devakrishna33](https://togithub.com/devakrishna33)

###
[`v7.43.9`](https://togithub.com/react-hook-form/react-hook-form/releases/tag/v7.43.9):
Version 7.43.9

[Compare
Source](https://togithub.com/react-hook-form/react-hook-form/compare/v7.43.8...v7.43.9)

🍄 close
[#&#8203;10195](https://togithub.com/react-hook-form/react-hook-form/issues/10195)
close async defaultValues not load
([#&#8203;10203](https://togithub.com/react-hook-form/react-hook-form/issues/10203))
Revert "🐞 fix
[#&#8203;10139](https://togithub.com/react-hook-form/react-hook-form/issues/10139)
useFieldArray array error not updating in some cases
([#&#8203;10150](https://togithub.com/react-hook-form/react-hook-form/issues/10150))"

###
[`v7.43.8`](https://togithub.com/react-hook-form/react-hook-form/releases/tag/v7.43.8):
Version 7.43.8

[Compare
Source](https://togithub.com/react-hook-form/react-hook-form/compare/v7.43.7...v7.43.8)

🪡 related
[#&#8203;10143](https://togithub.com/react-hook-form/react-hook-form/issues/10143)
did not update dirty until interacted
([#&#8203;10157](https://togithub.com/react-hook-form/react-hook-form/issues/10157))
🐞 fix
[#&#8203;10139](https://togithub.com/react-hook-form/react-hook-form/issues/10139)
useFieldArray array error not updating in some cases
([#&#8203;10150](https://togithub.com/react-hook-form/react-hook-form/issues/10150))

thanks to [@&#8203;kylemclean](https://togithub.com/kylemclean)

###
[`v7.43.7`](https://togithub.com/react-hook-form/react-hook-form/releases/tag/v7.43.7):
Version 7.43.7

[Compare
Source](https://togithub.com/react-hook-form/react-hook-form/compare/v7.43.6...v7.43.7)

🐞 fix
[#&#8203;10131](https://togithub.com/react-hook-form/react-hook-form/issues/10131)
regression on NaN data type
([#&#8203;10132](https://togithub.com/react-hook-form/react-hook-form/issues/10132))
🐞 fix
[#&#8203;10129](https://togithub.com/react-hook-form/react-hook-form/issues/10129)
useFieldArray unmount fieldArray wihtout register
([#&#8203;10130](https://togithub.com/react-hook-form/react-hook-form/issues/10130))
🦶 upgrade to TS 5.0.0
([#&#8203;9834](https://togithub.com/react-hook-form/react-hook-form/issues/9834))

###
[`v7.43.6`](https://togithub.com/react-hook-form/react-hook-form/releases/tag/v7.43.6):
Version 7.43.6

[Compare
Source](https://togithub.com/react-hook-form/react-hook-form/compare/v7.43.5...v7.43.6)

🐞 fix(appendErrors): incorrect type, it can take an array of errors
([#&#8203;10125](https://togithub.com/react-hook-form/react-hook-form/issues/10125))
✍️ close
[#&#8203;10096](https://togithub.com/react-hook-form/react-hook-form/issues/10096)
react strict mode with mounted field value
([#&#8203;10102](https://togithub.com/react-hook-form/react-hook-form/issues/10102))
🦮 fix: isLoading form state
([#&#8203;10095](https://togithub.com/react-hook-form/react-hook-form/issues/10095))
📝 fix: typos in tsdoc
([#&#8203;10088](https://togithub.com/react-hook-form/react-hook-form/issues/10088))
🩴 close
[#&#8203;10078](https://togithub.com/react-hook-form/react-hook-form/issues/10078)
prevent stabled aysnc validation
([#&#8203;10082](https://togithub.com/react-hook-form/react-hook-form/issues/10082))
🐞 fix
[#&#8203;10064](https://togithub.com/react-hook-form/react-hook-form/issues/10064)
native validation when subscribe to isValid
([#&#8203;10072](https://togithub.com/react-hook-form/react-hook-form/issues/10072))
📝 correct typo in field array type declaration
([#&#8203;10066](https://togithub.com/react-hook-form/react-hook-form/issues/10066))

thanks to [@&#8203;jorisre](https://togithub.com/jorisre)
[@&#8203;chrisbarless](https://togithub.com/chrisbarless)
[@&#8203;mjw-isp](https://togithub.com/mjw-isp) and
[@&#8203;adamtowle](https://togithub.com/adamtowle)

###
[`v7.43.5`](https://togithub.com/react-hook-form/react-hook-form/releases/tag/v7.43.5):
Version 7.43.5

[Compare
Source](https://togithub.com/react-hook-form/react-hook-form/compare/v7.43.4...v7.43.5)

🐰 prevent runtime error with subscribe function
([#&#8203;10052](https://togithub.com/react-hook-form/react-hook-form/issues/10052))
🪔 close
[#&#8203;10045](https://togithub.com/react-hook-form/react-hook-form/issues/10045)
improve `useController` defaultValue restore under strict mode with
double `useEffect`
([#&#8203;10049](https://togithub.com/react-hook-form/react-hook-form/issues/10049))
📷 improve form values state update
([#&#8203;10029](https://togithub.com/react-hook-form/react-hook-form/issues/10029))

###
[`v7.43.4`](https://togithub.com/react-hook-form/react-hook-form/releases/tag/v7.43.4):
Version 7.43.4

[Compare
Source](https://togithub.com/react-hook-form/react-hook-form/compare/v7.43.3...v7.43.4)

🐞 fix
[#&#8203;10021](https://togithub.com/react-hook-form/react-hook-form/issues/10021)
issue with `.next` runtime error and fix cypress action
([#&#8203;10026](https://togithub.com/react-hook-form/react-hook-form/issues/10026))

###
[`v7.43.3`](https://togithub.com/react-hook-form/react-hook-form/releases/tag/v7.43.3):
Version 7.43.3

[Compare
Source](https://togithub.com/react-hook-form/react-hook-form/compare/v7.43.2...v7.43.3)

📐 fix `resetField` defaultValue type and reduce any type
([#&#8203;10024](https://togithub.com/react-hook-form/react-hook-form/issues/10024))
🐞 fix
[#&#8203;9997](https://togithub.com/react-hook-form/react-hook-form/issues/9997)
issue on the mounted state is updated with values prop
([#&#8203;10001](https://togithub.com/react-hook-form/react-hook-form/issues/10001))
Revert "🏍 delete dirty fields node instead of marking as false
([#&#8203;9156](https://togithub.com/react-hook-form/react-hook-form/issues/9156))"
([#&#8203;9996](https://togithub.com/react-hook-form/react-hook-form/issues/9996))
💅 improve state subscription consistency
([#&#8203;9984](https://togithub.com/react-hook-form/react-hook-form/issues/9984))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/elastic/kibana).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNTkuMCIsInVwZGF0ZWRJblZlciI6IjM1LjExMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Patryk Kopyciński <contact@patrykkopycinski.com>
2023-07-12 09:51:50 +02:00
Trevor Pierce
e58c455c56
Upgrade EUI to 83.1.0 (#161490)
`eui@83.0.0`  `83.1.0`

---

## [`83.1.0`](https://github.com/elastic/eui/tree/v83.1.0)

- Added `placeholder` prop to `EuiInlineEdit`
([#6883](https://github.com/elastic/eui/pull/6883))
- Added `sparkles` glyph to `EuiIcon`
([#6898](https://github.com/elastic/eui/pull/6898))

**Bug fixes**

- Fixed Safari-only bug for single-line row `EuiDataGrid`s, where cell
actions on hover would overlap instead of pushing content to the left
([#6881](https://github.com/elastic/eui/pull/6881))
- Fixed `EuiButton` not correctly merging in passed `className`s with
its base `.euiButton` class
([#6887](https://github.com/elastic/eui/pull/6887))
- Fixed `EuiIcon` not correctly passing the `style` prop custom `img`
icons ([#6888](https://github.com/elastic/eui/pull/6888))
- Fixed multiple components with child props (e.g. `buttonProps`,
`iconProps`, etc.) unsetting EUI's Emotion styling if custom `css` was
passed to the child props object
([#6896](https://github.com/elastic/eui/pull/6896))

**CSS-in-JS conversions**

- Converted `EuiHeader` and `EuiHeaderLogo` to Emotion
([#6878](https://github.com/elastic/eui/pull/6878))
- Removed Sass variables `$euiHeaderDarkBackgroundColor`,
`$euiHeaderBorderColor`, and `$euiHeaderBreadcrumbColor`
([#6878](https://github.com/elastic/eui/pull/6878))
- Removed Sass mixin `@euiHeaderDarkTheme`
([#6878](https://github.com/elastic/eui/pull/6878))
2023-07-11 15:51:06 -05:00
Bree Hall
4cf630bfec
Upgrade EUI to 83.0.0 (#160813)
`eui@82.1.0`  `83.0.0`

⚠️ The biggest change in this PR by far is the `EuiButtonEmpty` Emotion
conversion, which changes the DOM structure of the button slightly as
well as several CSS classes around it.

EUI has attempted to convert any custom EuiButtonEmpty CSS overrides
where possible, but would super appreciate it if CODEOWNERS checked
their touched files. If anything other than a snapshot or test was
touched, please double check the display of your button(s) and confirm
everything still looks shipshape. Feel free to ping us for advice if
not.

---

## [`83.0.0`](https://github.com/elastic/eui/tree/v83.0.0)

**Bug fixes**

- Fixed `EuiPaginationButton` styling affected by `EuiButtonEmpty`'s
Emotion conversion ([#6893](https://github.com/elastic/eui/pull/6893))

**Breaking changes**

- Removed `isPlaceholder` prop from `EuiPaginationButton`
([#6893](https://github.com/elastic/eui/pull/6893))

## [`82.2.1`](https://github.com/elastic/eui/tree/v82.2.1)

- Updated supported Node engine versions to allow Node 16, 18 and >=20
([#6884](https://github.com/elastic/eui/pull/6884))

## [`82.2.0`](https://github.com/elastic/eui/tree/v82.2.0)

- Updated EUI's SVG icons library to use latest SVGO v3 optimization
([#6843](https://github.com/elastic/eui/pull/6843))
- Added success color `EuiNotificationBadge`
([#6864](https://github.com/elastic/eui/pull/6864))
- Added `badgeColor` prop to `EuiFilterButton`
([#6864](https://github.com/elastic/eui/pull/6864))
- Updated `EuiBadge` to use CSS-in-JS for named colors instead of inline
styles. Custom colors will still use inline styles.
([#6864](https://github.com/elastic/eui/pull/6864))

**CSS-in-JS conversions**

- Converted `EuiButtonGroup` and `EuiButtonGroupButton` to Emotion
([#6841](https://github.com/elastic/eui/pull/6841))
- Converted `EuiButtonIcon` to Emotion
([#6844](https://github.com/elastic/eui/pull/6844))
- Converted `EuiButtonEmpty` to Emotion
([#6863](https://github.com/elastic/eui/pull/6863))
- Converted `EuiCollapsibleNav` and `EuiCollapsibleNavGroup` to Emotion
([#6865](https://github.com/elastic/eui/pull/6865))
- Removed Sass variables `$euiCollapsibleNavGroupLightBackgroundColor`,
`$euiCollapsibleNavGroupDarkBackgroundColor`, and
`$euiCollapsibleNavGroupDarkHighContrastColor`
([#6865](https://github.com/elastic/eui/pull/6865))

---------

Co-authored-by: Cee Chen <constance.chen@elastic.co>
Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-07-06 12:46:55 -07:00
Sergi Massaneda
f2e773d435
[SecuritySolution] Rename security solution plugins (#161153)
## Summary

closes: https://github.com/elastic/kibana/issues/159685

- Renaming _x-pack/plugins_:
`serverless_security` -> `security_solution_serverless`
`ess_security` -> `security_solution_ess`

- All the related configurations and types have also been renamed.
- i18n translation prefixes updated
- relocation of internal `security_solution_serverless` directories to
be consistent with `security_solution_ess`

### Eslint
I also added the plugins in the `.eslintrc` configuration, defining the
same rules as the `security_solution` plugin.
All eslint errors have been addressed (mainly _type_ imports errors)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-05 13:51:49 +02:00
Marco Antonio Ghiani
abe58cb011
[Logs Shared] Move LogStream and LogView into new shared plugin (#161151)
## 📓 Summary

Closes #159128 

Due to a dependencies issue when disabling a plugin in serverless mode,
the LogStream feature and related logic were disabled for every
consumer.

We decided to split this shared component and endpoint into their own
plugin of shared logs utilities, reducing to the minimum the required
dependency that could disable the plugin.

What we moved can be summarized with:
- `infrastructure-monitoring-log-view` saved object definition and
registration
- LogViews server/client services (exposed with start contract) +
related endpoints
- LogEntries server service + related endpoints
- LogEntriesDomain logic (exposed with start contract)
- `<LogStream />` component
- `<ScrollableLogTextStreamView />` component and related logic
- LogView state machine
- Containers/Hooks to consume the moved APIs.
- Common types/utils definition, now exported and consumed as a
dependency from the `infra` plugin.

## 🤓 Review hints

Most of the changes are just renaming and moving stuff into the new
plugin, but for some operations was required to implement new logic,
which may deserve a more critical review:
- server/public `plugin.ts` files for the `infra` and `logs_shared`
plugins. The new plugin now registers the fallback actions to retrieve a
source configuration if there's no stored log view. It also set the
configuration for the message field and registers the log view saved
object.
- the `logEntriesDomain` has also been moved inside the new plugin, but
is also used by the logs-analysis endpoints, so it is exposed by the
logs_shared plugin and consumed by `infra`.

## 👣 Following steps

We currently are still using the `observability` plugin for consuming
the CoPilot feature on our LogsStream flyout.
The plugin dependency is marked as optional, so disabling the
`observability` plugin in a serverless environment won't disable also
the exposed features in this new plugin, but it'll affect only the
CoPilot feature, which won't be loaded.

In future, would be nice to extract the CoPilot feature into its own
package/plugin, so that also serverless projects can consume it without
depending on `observability.

---------

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-05 10:30:28 +02:00
Zacqary Adam Xeper
e31ede27de
[RAM] Remove third party RRule library, replace with own timezone-compliant lib (#152873)
## Summary

Closes #152630

~Adds a fix for the weird UTC-but-not-really expected inputs in
rrule.js~

This PR removes the third-party `rrule` package and replaces it with
`@kbn/rrule`.

The third party RRule library's functions produced different results
depending on what system timezone you ran it in. It would output local
timestamps in UTC, making it impossible to do reliable math on them.
It's now replaced with our own library that passes all of our own tests
for the limited cross-section of the RRule spec that we need to support.
It's possible that it wouldn't stand up to the rigor of more complex
RRule queries, but it supports the ones that our Recurrence Scheduler UI
supports just fine.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-02 17:03:45 -04:00