Skip to content

Commit d2179b8

Browse files
committed
Merge commit '1cfc9356bd36c54b8005089decc36970c11c101d' into lens/axis-colors
2 parents 81c0ba9 + 1cfc935 commit d2179b8

File tree

467 files changed

+13910
-6310
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

467 files changed

+13910
-6310
lines changed

docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.getalltypes.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
## SavedObjectTypeRegistry.getAllTypes() method
66

7-
Return all [types](./kibana-plugin-core-server.savedobjectstype.md) currently registered.
7+
Return all [types](./kibana-plugin-core-server.savedobjectstype.md) currently registered, including the hidden ones.
8+
9+
To only get the visible types (which is the most common use case), use `getVisibleTypes` instead.
810

911
<b>Signature:</b>
1012

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectTypeRegistry](./kibana-plugin-core-server.savedobjecttyperegistry.md) &gt; [getVisibleTypes](./kibana-plugin-core-server.savedobjecttyperegistry.getvisibletypes.md)
4+
5+
## SavedObjectTypeRegistry.getVisibleTypes() method
6+
7+
Returns all visible [types](./kibana-plugin-core-server.savedobjectstype.md)<!-- -->.
8+
9+
A visible type is a type that doesn't explicitly define `hidden=true` during registration.
10+
11+
<b>Signature:</b>
12+
13+
```typescript
14+
getVisibleTypes(): SavedObjectsType[];
15+
```
16+
<b>Returns:</b>
17+
18+
`SavedObjectsType[]`
19+

docs/development/core/server/kibana-plugin-core-server.savedobjecttyperegistry.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ export declare class SavedObjectTypeRegistry
1616

1717
| Method | Modifiers | Description |
1818
| --- | --- | --- |
19-
| [getAllTypes()](./kibana-plugin-core-server.savedobjecttyperegistry.getalltypes.md) | | Return all [types](./kibana-plugin-core-server.savedobjectstype.md) currently registered. |
19+
| [getAllTypes()](./kibana-plugin-core-server.savedobjecttyperegistry.getalltypes.md) | | Return all [types](./kibana-plugin-core-server.savedobjectstype.md) currently registered, including the hidden ones.<!-- -->To only get the visible types (which is the most common use case), use <code>getVisibleTypes</code> instead. |
2020
| [getImportableAndExportableTypes()](./kibana-plugin-core-server.savedobjecttyperegistry.getimportableandexportabletypes.md) | | Return all [types](./kibana-plugin-core-server.savedobjectstype.md) currently registered that are importable/exportable. |
2121
| [getIndex(type)](./kibana-plugin-core-server.savedobjecttyperegistry.getindex.md) | | Returns the <code>indexPattern</code> property for given type, or <code>undefined</code> if the type is not registered. |
2222
| [getType(type)](./kibana-plugin-core-server.savedobjecttyperegistry.gettype.md) | | Return the [type](./kibana-plugin-core-server.savedobjectstype.md) definition for given type name. |
23+
| [getVisibleTypes()](./kibana-plugin-core-server.savedobjecttyperegistry.getvisibletypes.md) | | Returns all visible [types](./kibana-plugin-core-server.savedobjectstype.md)<!-- -->.<!-- -->A visible type is a type that doesn't explicitly define <code>hidden=true</code> during registration. |
2324
| [isHidden(type)](./kibana-plugin-core-server.savedobjecttyperegistry.ishidden.md) | | Returns the <code>hidden</code> property for given type, or <code>false</code> if the type is not registered. |
2425
| [isImportableAndExportable(type)](./kibana-plugin-core-server.savedobjecttyperegistry.isimportableandexportable.md) | | Returns the <code>management.importableAndExportable</code> property for given type, or <code>false</code> if the type is not registered or does not define a management section. |
2526
| [isMultiNamespace(type)](./kibana-plugin-core-server.savedobjecttyperegistry.ismultinamespace.md) | | Returns whether the type is multi-namespace (shareable); resolves to <code>false</code> if the type is not registered |

packages/eslint-config-kibana/typescript.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ module.exports = {
124124
}],
125125
'@typescript-eslint/no-var-requires': 'error',
126126
'@typescript-eslint/unified-signatures': 'error',
127-
'@typescript-eslint/prefer-ts-expect-error': 'warn',
128127
'constructor-super': 'error',
129128
'dot-notation': 'error',
130129
'eqeqeq': ['error', 'always', {'null': 'ignore'}],

packages/kbn-ui-shared-deps/entry.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,8 @@ if (window.__kbnThemeVersion__ === 'v7') {
6161
ElasticEuiDarkTheme = require('@elastic/eui/dist/eui_theme_amsterdam_dark.json');
6262
}
6363

64+
import * as Theme from './theme.ts';
65+
export { Theme };
66+
6467
// massive deps that we should really get rid of or reduce in size substantially
6568
export const ElasticsearchBrowser = require('elasticsearch-browser/elasticsearch.js');

packages/kbn-ui-shared-deps/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ exports.externals = {
4444
'react-router-dom': '__kbnSharedDeps__.ReactRouterDom',
4545
'styled-components': '__kbnSharedDeps__.StyledComponents',
4646
'@kbn/monaco': '__kbnSharedDeps__.KbnMonaco',
47+
'@kbn/ui-shared-deps/theme': '__kbnSharedDeps__.Theme',
4748
// this is how plugins/consumers from npm load monaco
4849
'monaco-editor/esm/vs/editor/editor.api': '__kbnSharedDeps__.MonacoBarePluginApi',
4950

@@ -59,8 +60,8 @@ exports.externals = {
5960
'@elastic/eui/lib/services': '__kbnSharedDeps__.ElasticEuiLibServices',
6061
'@elastic/eui/lib/services/format': '__kbnSharedDeps__.ElasticEuiLibServicesFormat',
6162
'@elastic/eui/dist/eui_charts_theme': '__kbnSharedDeps__.ElasticEuiChartsTheme',
62-
'@elastic/eui/dist/eui_theme_light.json': '__kbnSharedDeps__.ElasticEuiLightTheme',
63-
'@elastic/eui/dist/eui_theme_dark.json': '__kbnSharedDeps__.ElasticEuiDarkTheme',
63+
'@elastic/eui/dist/eui_theme_light.json': '__kbnSharedDeps__.Theme.euiLightVars',
64+
'@elastic/eui/dist/eui_theme_dark.json': '__kbnSharedDeps__.Theme.euiDarkVars',
6465

6566
/**
6667
* massive deps that we should really get rid of or reduce in size substantially
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import LightTheme from '@elastic/eui/dist/eui_theme_light.json';
21+
22+
const globals: any = typeof window === 'undefined' ? {} : window;
23+
24+
export type Theme = typeof LightTheme;
25+
26+
export let euiLightVars: Theme;
27+
export let euiDarkVars: Theme;
28+
if (globals.__kbnThemeVersion__ === 'v7') {
29+
euiLightVars = require('@elastic/eui/dist/eui_theme_light.json');
30+
euiDarkVars = require('@elastic/eui/dist/eui_theme_dark.json');
31+
} else {
32+
euiLightVars = require('@elastic/eui/dist/eui_theme_amsterdam_light.json');
33+
euiDarkVars = require('@elastic/eui/dist/eui_theme_amsterdam_dark.json');
34+
}
35+
36+
/**
37+
* EUI Theme vars that automatically adjust to light/dark theme
38+
*/
39+
export let euiThemeVars: Theme;
40+
if (globals.__kbnDarkTheme__) {
41+
euiThemeVars = euiDarkVars;
42+
} else {
43+
euiThemeVars = euiLightVars;
44+
}
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": ["index.d.ts", "./monaco"]
3+
"include": [
4+
"index.d.ts",
5+
"theme.ts"
6+
]
47
}

packages/kbn-ui-shared-deps/webpack.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,17 @@ exports.getWebpackConfig = ({ dev = false } = {}) => ({
7878
test: /\.css$/,
7979
use: [MiniCssExtractPlugin.loader, 'css-loader'],
8080
},
81+
{
82+
include: [require.resolve('./theme.ts')],
83+
use: [
84+
{
85+
loader: 'babel-loader',
86+
options: {
87+
presets: [require.resolve('@kbn/babel-preset/webpack_preset')],
88+
},
89+
},
90+
],
91+
},
8192
],
8293
},
8394

src/core/public/chrome/chrome_service.tsx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -185,27 +185,27 @@ export class ChromeService {
185185
/>
186186
),
187187
});
188+
}
188189

189-
if (isIE()) {
190-
notifications.toasts.addWarning({
191-
title: mountReactNode(
192-
<FormattedMessage
193-
id="core.chrome.browserDeprecationWarning"
194-
defaultMessage="Support for Internet Explorer will be dropped in future versions of this software, please check {link}."
195-
values={{
196-
link: (
197-
<EuiLink target="_blank" href="https://www.elastic.co/support/matrix" external>
198-
<FormattedMessage
199-
id="core.chrome.browserDeprecationLink"
200-
defaultMessage="the support matrix on our website"
201-
/>
202-
</EuiLink>
203-
),
204-
}}
205-
/>
206-
),
207-
});
208-
}
190+
if (isIE()) {
191+
notifications.toasts.addWarning({
192+
title: mountReactNode(
193+
<FormattedMessage
194+
id="core.chrome.browserDeprecationWarning"
195+
defaultMessage="Support for Internet Explorer will be dropped in future versions of this software, please check {link}."
196+
values={{
197+
link: (
198+
<EuiLink target="_blank" href="https://www.elastic.co/support/matrix" external>
199+
<FormattedMessage
200+
id="core.chrome.browserDeprecationLink"
201+
defaultMessage="the support matrix on our website"
202+
/>
203+
</EuiLink>
204+
),
205+
}}
206+
/>
207+
),
208+
});
209209
}
210210

211211
return {

0 commit comments

Comments
 (0)