Revert "[Lens] Move custom chart icons into lens package (#138101)"

This reverts commit d89b2cb903.
This commit is contained in:
Jonathan Budzenski 2022-08-09 09:30:44 -05:00
parent c5e78fed88
commit b3a38c4137
72 changed files with 65 additions and 525 deletions

View file

@ -17,7 +17,6 @@ const STORYBOOKS = [
'ci_composite',
'cloud',
'coloring',
'lens_icons',
'controls',
'custom_integrations',
'dashboard_enhanced',

View file

@ -271,7 +271,6 @@
"@kbn/jsonc": "link:bazel-bin/packages/kbn-jsonc",
"@kbn/kibana-manifest-parser": "link:bazel-bin/packages/kbn-kibana-manifest-parser",
"@kbn/kibana-manifest-schema": "link:bazel-bin/packages/kbn-kibana-manifest-schema",
"@kbn/lens-icons": "link:bazel-bin/x-pack/packages/lens/icons",
"@kbn/logging": "link:bazel-bin/packages/kbn-logging",
"@kbn/logging-mocks": "link:bazel-bin/packages/kbn-logging-mocks",
"@kbn/mapbox-gl": "link:bazel-bin/packages/kbn-mapbox-gl",
@ -927,7 +926,6 @@
"@types/kbn__kbn-ci-stats-performance-metrics": "link:bazel-bin/packages/kbn-kbn-ci-stats-performance-metrics/npm_module_types",
"@types/kbn__kibana-manifest-parser": "link:bazel-bin/packages/kbn-kibana-manifest-parser/npm_module_types",
"@types/kbn__kibana-manifest-schema": "link:bazel-bin/packages/kbn-kibana-manifest-schema/npm_module_types",
"@types/kbn__lens-icons": "link:bazel-bin/x-pack/packages/lens/icons/npm_module_types",
"@types/kbn__logging": "link:bazel-bin/packages/kbn-logging/npm_module_types",
"@types/kbn__logging-mocks": "link:bazel-bin/packages/kbn-logging-mocks/npm_module_types",
"@types/kbn__managed-vscode-config": "link:bazel-bin/packages/kbn-managed-vscode-config/npm_module_types",

View file

@ -262,7 +262,6 @@ filegroup(
"//packages/shared-ux/prompt/no_data_views/mocks:build",
"//packages/shared-ux/prompt/no_data_views/types:build",
"//packages/shared-ux/storybook/mock:build",
"//x-pack/packages/lens/icons:build",
"//x-pack/packages/ml/agg_utils:build",
"//x-pack/packages/ml/aiops_components:build",
"//x-pack/packages/ml/aiops_utils:build",
@ -506,7 +505,6 @@ filegroup(
"//packages/shared-ux/prompt/no_data_views/impl:build_types",
"//packages/shared-ux/prompt/no_data_views/mocks:build_types",
"//packages/shared-ux/storybook/mock:build_types",
"//x-pack/packages/lens/icons:build_types",
"//x-pack/packages/ml/agg_utils:build_types",
"//x-pack/packages/ml/aiops_components:build_types",
"//x-pack/packages/ml/aiops_utils:build_types",

View file

@ -30,7 +30,6 @@ export const BAZEL_PACKAGE_DIRS = [
'packages/core/*',
'packages/home',
'x-pack/packages/ml',
'x-pack/packages/lens',
];
/**

View file

@ -13,7 +13,6 @@ export const storybookAliases = {
ci_composite: '.ci/.storybook',
cloud: 'x-pack/plugins/cloud/.storybook',
coloring: 'packages/kbn-coloring/.storybook',
lens_icons: 'x-pack/packages/lens/icons/.storybook',
controls: 'src/plugins/controls/storybook',
custom_integrations: 'src/plugins/custom_integrations/storybook',
dashboard_enhanced: 'x-pack/plugins/dashboard_enhanced/.storybook',

View file

@ -1,8 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
module.exports = require('@kbn/storybook').defaultConfig;

View file

@ -1,136 +0,0 @@
load("@npm//@bazel/typescript:index.bzl", "ts_config")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")
PKG_DIRNAME = "icons"
PKG_REQUIRE_NAME = "@kbn/lens-icons"
SOURCE_FILES = glob(
[
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.svg",
"src/**/*.scss"
],
exclude = [
"**/*.test.*",
"**/*.stories.*"
],
)
SRCS = SOURCE_FILES
filegroup(
name = "srcs",
srcs = SRCS,
)
NPM_MODULE_EXTRA_FILES = [
"package.json",
]
# In this array place runtime dependencies, including other packages and NPM packages
# which must be available for this code to run.
#
# To reference other packages use:
# "//repo/relative/path/to/package"
# eg. "//packages/kbn-utils"
#
# To reference a NPM package use:
# "@npm//name-of-package"
# eg. "@npm//lodash"
RUNTIME_DEPS = [
"@npm//react",
"@npm//@elastic/eui",
"@npm//classnames",
]
# In this array place dependencies necessary to build the types, which will include the
# :npm_module_types target of other packages and packages from NPM, including @types/*
# packages.
#
# To reference the types for another package use:
# "//repo/relative/path/to/package:npm_module_types"
# eg. "//packages/kbn-utils:npm_module_types"
#
# References to NPM packages work the same as RUNTIME_DEPS
TYPES_DEPS = [
"@npm//@types/node",
"@npm//@types/jest",
"@npm//@types/react",
"@npm//@types/classnames",
"@npm//@elastic/eui",
]
jsts_transpiler(
name = "target_node",
srcs = SRCS,
build_pkg_name = package_name(),
)
jsts_transpiler(
name = "target_web",
srcs = SRCS,
build_pkg_name = package_name(),
web = True,
additional_args = [
"--copy-files",
"--quiet"
],
)
ts_config(
name = "tsconfig",
src = "tsconfig.json",
deps = [
"//:tsconfig.base.json",
"//:tsconfig.bazel.json",
],
)
ts_project(
name = "tsc_types",
args = ['--pretty'],
srcs = SRCS,
deps = TYPES_DEPS,
declaration = True,
declaration_map = True,
emit_declaration_only = True,
out_dir = "target_types",
root_dir = "src",
tsconfig = ":tsconfig",
)
js_library(
name = PKG_DIRNAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = RUNTIME_DEPS + [":target_node", ":target_web"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
pkg_npm(
name = "npm_module",
deps = [":" + PKG_DIRNAME],
)
filegroup(
name = "build",
srcs = [":npm_module"],
visibility = ["//visibility:public"],
)
pkg_npm_types(
name = "npm_module_types",
srcs = SRCS,
deps = [":tsc_types"],
package_name = PKG_REQUIRE_NAME,
tsconfig = ":tsconfig",
visibility = ["//visibility:public"],
)
filegroup(
name = "build_types",
srcs = [":npm_module_types"],
visibility = ["//visibility:public"],
)

View file

@ -1,5 +0,0 @@
# @kbn/lens-icons
This package contains lens svg shared assets
It can be removes when the [EuiIllustrations](https://github.com/elastic/eui/discussions/5546) initiative is shipped.

View file

@ -1,12 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
module.exports = {
preset: '@kbn/test',
rootDir: '../../../..',
roots: ['<rootDir>/x-pack/packages/lens/icons'],
};

View file

@ -1,8 +0,0 @@
{
"name": "@kbn/lens-icons",
"private": true,
"version": "1.0.0",
"main": "./target_node/index.js",
"browser": "./target_web/index.js",
"license": "SSPL-1.0 OR Elastic License 2.0"
}

View file

@ -1,205 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import React, { FC, ComponentType } from 'react';
import { EuiFlexItem, EuiFlexGroup, EuiEmptyPrompt, EuiForm, IconType } from '@elastic/eui';
import { ComponentStory } from '@storybook/react';
import {
IconCircle,
IconTriangle,
EuiIconAxisBottom,
EuiIconAxisLeft,
EuiIconAxisRight,
EuiIconAxisTop,
LensIconChartArea,
LensIconChartAreaPercentage,
LensIconChartAreaStacked,
LensIconChartBar,
LensIconChartBarAnnotations,
LensIconChartBarHorizontal,
LensIconChartBarHorizontalPercentage,
LensIconChartBarHorizontalStacked,
LensIconChartBarPercentage,
LensIconChartBarReferenceLine,
LensIconChartBarStacked,
LensIconChartDatatable,
LensIconChartDonut,
LensIconChartLine,
LensIconChartMetric,
LensIconChartMixedXy,
LensIconChartMosaic,
LensIconChartPie,
LensIconChartTreemap,
LensIconChartWaffle,
DropIllustration,
GlobeIllustration,
EuiIconLegend,
LensIconRegionMap,
} from '..';
export default {
title: 'Lens Icons',
decorators: [(story: Function) => <EuiForm>{story()}</EuiForm>],
};
const IconsArray: Array<{
title: string;
Component: ComponentType<{ title: string; titleId: string }>;
}> = [
{
title: 'EuiIconAxisBottom',
Component: EuiIconAxisBottom,
},
{
title: 'EuiIconAxisLeft',
Component: EuiIconAxisLeft,
},
{
title: 'EuiIconAxisRight',
Component: EuiIconAxisRight,
},
{
title: 'EuiIconAxisTop',
Component: EuiIconAxisTop,
},
{
title: 'LensIconChartArea',
Component: LensIconChartArea,
},
{
title: 'LensIconChartAreaPercentage',
Component: LensIconChartAreaPercentage,
},
{
title: 'LensIconChartAreaStacked',
Component: LensIconChartAreaStacked,
},
{
title: 'LensIconChartBar',
Component: LensIconChartBar,
},
{
title: 'LensIconChartBarAnnotations',
Component: LensIconChartBarAnnotations,
},
{
title: 'LensIconChartBarHorizontal',
Component: LensIconChartBarHorizontal,
},
{
title: 'LensIconChartBarHorizontalPercentage',
Component: LensIconChartBarHorizontalPercentage,
},
{
title: 'LensIconChartBarHorizontalStacked',
Component: LensIconChartBarHorizontalStacked,
},
{
title: 'LensIconChartBarPercentage',
Component: LensIconChartBarPercentage,
},
{
title: 'LensIconChartBarReferenceLine',
Component: LensIconChartBarReferenceLine,
},
{
title: 'LensIconChartBarStacked',
Component: LensIconChartBarStacked,
},
{
title: 'LensIconChartDatatable',
Component: LensIconChartDatatable,
},
{
title: 'LensIconChartDonut',
Component: LensIconChartDonut,
},
{
title: 'LensIconChartLine',
Component: LensIconChartLine,
},
{
title: 'LensIconChartMetric',
Component: LensIconChartMetric,
},
{
title: 'LensIconChartMixedXy',
Component: LensIconChartMixedXy,
},
{
title: 'LensIconChartMosaic',
Component: LensIconChartMosaic,
},
{
title: 'LensIconChartPie',
Component: LensIconChartPie,
},
{
title: 'LensIconChartTreemap',
Component: LensIconChartTreemap,
},
{
title: 'LensIconChartWaffle',
Component: LensIconChartWaffle,
},
{
title: 'DropIllustration',
Component: DropIllustration,
},
{
title: 'GlobeIllustration',
Component: GlobeIllustration,
},
{
title: 'EuiIconLegend',
Component: EuiIconLegend,
},
{
title: 'IconCircle',
Component: IconCircle,
},
{
title: 'IconTriangle',
Component: IconTriangle,
},
{
title: 'LensIconRegionMap',
Component: LensIconRegionMap,
},
];
interface RootComponentProps {
icons: typeof IconsArray;
}
function RootComponent(props: RootComponentProps) {
return (
<EuiFlexGroup direction={'row'} responsive={false} wrap={true}>
{props.icons.map((i) => (
<EuiFlexItem>
<EuiEmptyPrompt
style={{ minWidth: '250px' }}
hasBorder={true}
hasShadow={true}
iconType={i.Component as IconType}
title={<>{i.title}</>}
titleSize={'s'}
/>
</EuiFlexItem>
))}
</EuiFlexGroup>
);
}
const Template: ComponentStory<FC<RootComponentProps>> = (args) => <RootComponent {...args} />;
export const Default = Template.bind({});
Default.args = {
icons: IconsArray,
};

View file

@ -1,15 +0,0 @@
.lensChartIcon__subdued {
fill: $euiTextSubduedColor;
.lnsLayerChartSwitch__item-isSelected & {
fill: currentColor;
}
}
.lensChartIcon__accent {
fill: $euiColorVis0;
.lnsLayerChartSwitch__item-isSelected & {
fill: makeGraphicContrastColor($euiColorVis0, $euiColorDarkShade);
}
}

View file

@ -1,39 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import './index.scss';
export { IconCircle, IconTriangle } from './annotation_icons';
export { EuiIconAxisBottom } from './axis_bottom';
export { EuiIconAxisLeft } from './axis_left';
export { EuiIconAxisRight } from './axis_right';
export { EuiIconAxisTop } from './axis_top';
export { LensIconChartArea } from './chart_area';
export { LensIconChartAreaPercentage } from './chart_area_percentage';
export { LensIconChartAreaStacked } from './chart_area_stacked';
export { LensIconChartBar } from './chart_bar';
export { LensIconChartBarAnnotations } from './chart_bar_annotations';
export { LensIconChartBarHorizontal } from './chart_bar_horizontal';
export { LensIconChartBarHorizontalPercentage } from './chart_bar_horizontal_percentage';
export { LensIconChartBarHorizontalStacked } from './chart_bar_horizontal_stacked';
export { LensIconChartBarPercentage } from './chart_bar_percentage';
export { LensIconChartBarReferenceLine } from './chart_bar_reference_line';
export { LensIconChartBarStacked } from './chart_bar_stacked';
export { LensIconChartDatatable } from './chart_datatable';
export { LensIconChartDonut } from './chart_donut';
export { LensIconChartLine } from './chart_line';
export { LensIconChartMetric } from './chart_metric';
export { LensIconChartMixedXy } from './chart_mixed_xy';
export { LensIconChartMosaic } from './chart_mosaic';
export { LensIconChartPie } from './chart_pie';
export { LensIconChartTreemap } from './chart_treemap';
export { LensIconChartWaffle } from './chart_waffle';
export { DropIllustration } from './drop_illustration';
export { GlobeIllustration } from './globe_illustration';
export { EuiIconLegend } from './legend';
export { LensIconRegionMap } from './region_map';

View file

@ -1,8 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
export * from './assets';

View file

@ -1,18 +0,0 @@
{
"extends": "../../../../tsconfig.bazel.json",
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"outDir": "target_types",
"rootDir": "src",
"types": [
"jest",
"node",
"react",
],
},
"include": [
"src/**/*",
]
}

View file

@ -19,6 +19,21 @@
flex-grow: 1;
}
.lensChartIcon__subdued {
fill: $euiTextSubduedColor;
.lnsLayerChartSwitch__item-isSelected & {
fill: currentColor;
}
}
.lensChartIcon__accent {
fill: $euiColorVis0;
.lnsLayerChartSwitch__item-isSelected & {
fill: makeGraphicContrastColor($euiColorVis0, $euiColorDarkShade);
}
}
.lensAnnotationIconNoFill {
fill: none;
}

View file

@ -19,7 +19,7 @@ import { ReactExpressionRendererType } from '@kbn/expressions-plugin/public';
import { SuggestionPanel, SuggestionPanelProps, SuggestionPanelWrapper } from './suggestion_panel';
import { getSuggestions } from './suggestion_helpers';
import { EuiIcon, EuiPanel, EuiToolTip, EuiAccordion } from '@elastic/eui';
import { LensIconChartDatatable } from '@kbn/lens-icons';
import { LensIconChartDatatable } from '../../assets/chart_datatable';
import { mountWithProvider } from '../../mocks';
import {
applyChanges,

View file

@ -10,9 +10,9 @@ import { EuiPageContentBody, EuiText } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { i18n } from '@kbn/i18n';
import { UiActionsStart, VISUALIZE_GEO_FIELD_TRIGGER } from '@kbn/ui-actions-plugin/public';
import { GlobeIllustration } from '@kbn/lens-icons';
import { getVisualizeGeoFieldMessage } from '../../../utils';
import { DragDrop } from '../../../drag_drop';
import { GlobeIllustration } from '../../../assets/globe_illustration';
import { APP_ID } from '../../../../common/constants';
import './geo_field_workspace_panel.scss';

View file

@ -35,7 +35,6 @@ import type { UiActionsStart } from '@kbn/ui-actions-plugin/public';
import { VIS_EVENT_TO_TRIGGER } from '@kbn/visualizations-plugin/public';
import type { DefaultInspectorAdapters } from '@kbn/expressions-plugin/common';
import type { Datatable } from '@kbn/expressions-plugin/public';
import { DropIllustration } from '@kbn/lens-icons';
import { trackUiCounterEvents } from '../../../lens_ui_telemetry';
import {
FramePublicAPI,
@ -52,6 +51,7 @@ import { DragDrop, DragContext, DragDropIdentifier } from '../../../drag_drop';
import { switchToSuggestion } from '../suggestion_helpers';
import { buildExpression } from '../expression_helpers';
import { WorkspacePanelWrapper } from './workspace_panel_wrapper';
import { DropIllustration } from '../../../assets/drop_illustration';
import applyChangesIllustrationDark from '../../../assets/render_dark@2x.png';
import applyChangesIllustrationLight from '../../../assets/render_light@2x.png';
import {

View file

@ -9,7 +9,7 @@ import './toolbar_popover.scss';
import React, { useState } from 'react';
import { EuiFlexItem, EuiPopover, EuiIcon, EuiPopoverTitle, IconType } from '@elastic/eui';
import { ToolbarButton, ToolbarButtonProps } from '@kbn/kibana-react-plugin/public';
import { EuiIconLegend } from '@kbn/lens-icons';
import { EuiIconLegend } from '../assets/legend';
const typeToIconMap: { [type: string]: string | IconType } = {
legend: EuiIconLegend as IconType,

View file

@ -14,7 +14,7 @@ import { IAggType } from '@kbn/data-plugin/public';
import { IFieldFormat, SerializedFieldFormat } from '@kbn/field-formats-plugin/common';
import { VisualizationContainer } from '../../../visualization_container';
import { EmptyPlaceholder } from '@kbn/charts-plugin/public';
import { LensIconChartDatatable } from '@kbn/lens-icons';
import { LensIconChartDatatable } from '../../../assets/chart_datatable';
import { DataContext, DatatableComponent } from './table_basic';
import { DatatableProps } from '../../../../common/expressions';
import { chartPluginMock } from '@kbn/charts-plugin/public/mocks';

View file

@ -29,12 +29,12 @@ import {
} from '@elastic/eui';
import { EmptyPlaceholder } from '@kbn/charts-plugin/public';
import { ClickTriggerEvent } from '@kbn/charts-plugin/public';
import { LensIconChartDatatable } from '@kbn/lens-icons';
import type { LensTableRowContextMenuEvent } from '../../../types';
import type { FormatFactory } from '../../../../common';
import type { LensGridDirection } from '../../../../common/expressions';
import { VisualizationContainer } from '../../../visualization_container';
import { findMinMaxByColumnId } from '../../../shared_components';
import { LensIconChartDatatable } from '../../../assets/chart_datatable';
import type {
DataContextType,
DatatableRenderProps,

View file

@ -14,13 +14,13 @@ import { PaletteRegistry, CUSTOM_PALETTE } from '@kbn/coloring';
import { ThemeServiceStart } from '@kbn/core/public';
import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
import { VIS_EVENT_TO_TRIGGER } from '@kbn/visualizations-plugin/public';
import { LensIconChartDatatable } from '@kbn/lens-icons';
import type {
SuggestionRequest,
Visualization,
VisualizationSuggestion,
DatasourceLayers,
} from '../../types';
import { LensIconChartDatatable } from '../../assets/chart_datatable';
import { TableDimensionEditor } from './components/dimension_editor';
import { TableDimensionEditorAdditionalSection } from './components/dimension_editor_addtional_section';
import { LayerType, layerTypes } from '../../../common';

View file

@ -10,7 +10,6 @@ import { EuiFlexGroup, EuiFlexItem, IconType } from '@elastic/eui';
import { Position } from '@elastic/charts';
import { i18n } from '@kbn/i18n';
import { LegendSize } from '@kbn/visualizations-plugin/public';
import { EuiIconAxisLeft, EuiIconAxisBottom } from '@kbn/lens-icons';
import type { VisualizationToolbarProps } from '../../types';
import {
LegendSettingsPopover,
@ -19,6 +18,8 @@ import {
AxisTitleSettings,
TooltipWrapper,
} from '../../shared_components';
import { EuiIconAxisLeft } from '../../assets/axis_left';
import { EuiIconAxisBottom } from '../../assets/axis_bottom';
import type { HeatmapVisualizationState } from './types';
import { getDefaultVisualValuesForLayer } from '../../shared_components/datasource_default_values';
import './toolbar_component.scss';

View file

@ -5,10 +5,10 @@
* 2.0.
*/
import { LensIconChartMetric } from '@kbn/lens-icons';
import { SuggestionRequest, VisualizationSuggestion, TableSuggestion } from '../../types';
import type { MetricState } from '../../../common/types';
import { layerTypes } from '../../../common';
import { LensIconChartMetric } from '../../assets/chart_metric';
import { legacyMetricSupportedTypes } from './visualization';
/**

View file

@ -14,8 +14,8 @@ import { ThemeServiceStart } from '@kbn/core/public';
import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
import { ColorMode, CustomPaletteState } from '@kbn/charts-plugin/common';
import { VIS_EVENT_TO_TRIGGER } from '@kbn/visualizations-plugin/public';
import { LensIconChartMetric } from '@kbn/lens-icons';
import { getSuggestions } from './metric_suggestions';
import { LensIconChartMetric } from '../../assets/chart_metric';
import { Visualization, OperationMetadata, DatasourceLayers } from '../../types';
import type { MetricState } from '../../../common/types';
import { layerTypes } from '../../../common';

View file

@ -8,7 +8,7 @@
import { getSuggestions } from './suggestions';
import { layerTypes } from '../../../common';
import { MetricVisualizationState } from './visualization';
import { LensIconChartMetric } from '@kbn/lens-icons';
import { LensIconChartMetric } from '../../assets/chart_metric';
const metricColumn = {
columnId: 'metric-column',

View file

@ -5,8 +5,8 @@
* 2.0.
*/
import { LensIconChartMetric } from '@kbn/lens-icons';
import type { TableSuggestion, Visualization } from '../../types';
import { LensIconChartMetric } from '../../assets/chart_metric';
import { layerTypes } from '../../../common';
import { metricLabel, MetricVisualizationState, supportedDataTypes } from './visualization';

View file

@ -16,9 +16,9 @@ import { VIS_EVENT_TO_TRIGGER } from '@kbn/visualizations-plugin/public';
import { LayoutDirection } from '@elastic/charts';
import { euiLightVars, euiThemeVars } from '@kbn/ui-theme';
import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
import { LensIconChartMetric } from '@kbn/lens-icons';
import { LayerType } from '../../../common';
import { getSuggestions } from './suggestions';
import { LensIconChartMetric } from '../../assets/chart_metric';
import { Visualization, OperationMetadata, DatasourceLayers, AccessorConfig } from '../../types';
import { layerTypes } from '../../../common';
import { GROUP_ID, LENS_METRIC_ID } from './constants';

View file

@ -9,13 +9,11 @@ import { i18n } from '@kbn/i18n';
import type { EuiIconProps } from '@elastic/eui';
import type { DatatableColumn } from '@kbn/expressions-plugin/common';
import {
LensIconChartDonut,
LensIconChartPie,
LensIconChartTreemap,
LensIconChartMosaic,
LensIconChartWaffle,
} from '@kbn/lens-icons';
import { LensIconChartDonut } from '../../assets/chart_donut';
import { LensIconChartPie } from '../../assets/chart_pie';
import { LensIconChartTreemap } from '../../assets/chart_treemap';
import { LensIconChartMosaic } from '../../assets/chart_mosaic';
import { LensIconChartWaffle } from '../../assets/chart_waffle';
import {
CategoryDisplay,
NumberDisplay,

View file

@ -13,7 +13,6 @@ import {
isRangeAnnotation,
} from '@kbn/event-annotation-plugin/public';
import { EventAnnotationConfig } from '@kbn/event-annotation-plugin/common';
import { LensIconChartBarAnnotations } from '@kbn/lens-icons';
import { layerTypes } from '../../../../common';
import type { FramePublicAPI, Visualization } from '../../../types';
import { isHorizontalChart } from '../state_helpers';
@ -25,6 +24,7 @@ import {
getDataLayers,
isAnnotationsLayer,
} from '../visualization_helpers';
import { LensIconChartBarAnnotations } from '../../../assets/chart_bar_annotations';
import { generateId } from '../../../id_generator';
const MAX_DATE = 8640000000000000;

View file

@ -8,7 +8,6 @@
import { groupBy, partition } from 'lodash';
import { i18n } from '@kbn/i18n';
import { Datatable } from '@kbn/expressions-plugin/public';
import { LensIconChartBarReferenceLine } from '@kbn/lens-icons';
import { layerTypes } from '../../../common';
import type { DatasourceLayers, FramePublicAPI, Visualization } from '../../types';
import { groupAxesByType } from './axes_configuration';
@ -29,6 +28,7 @@ import {
isReferenceLayer,
} from './visualization_helpers';
import { generateId } from '../../id_generator';
import { LensIconChartBarReferenceLine } from '../../assets/chart_bar_reference_line';
import { defaultReferenceLineColor } from './color_assignment';
export interface ReferenceLineBase {

View file

@ -22,18 +22,16 @@ import type {
YAxisConfig,
} from '@kbn/expression-xy-plugin/common';
import { EventAnnotationConfig } from '@kbn/event-annotation-plugin/common';
import {
LensIconChartArea,
LensIconChartLine,
LensIconChartAreaStacked,
LensIconChartBarHorizontalStacked,
LensIconChartBarHorizontalPercentage,
LensIconChartAreaPercentage,
LensIconChartBar,
LensIconChartBarStacked,
LensIconChartBarPercentage,
LensIconChartBarHorizontal,
} from '@kbn/lens-icons';
import { LensIconChartArea } from '../../assets/chart_area';
import { LensIconChartAreaStacked } from '../../assets/chart_area_stacked';
import { LensIconChartAreaPercentage } from '../../assets/chart_area_percentage';
import { LensIconChartBar } from '../../assets/chart_bar';
import { LensIconChartBarStacked } from '../../assets/chart_bar_stacked';
import { LensIconChartBarPercentage } from '../../assets/chart_bar_percentage';
import { LensIconChartBarHorizontal } from '../../assets/chart_bar_horizontal';
import { LensIconChartBarHorizontalStacked } from '../../assets/chart_bar_horizontal_stacked';
import { LensIconChartBarHorizontalPercentage } from '../../assets/chart_bar_horizontal_percentage';
import { LensIconChartLine } from '../../assets/chart_line';
import type { VisualizationType, Suggestion } from '../../types';
import type { ValueLabelConfig } from '../../../common/types';

View file

@ -26,7 +26,7 @@ import type {
import { createDatatableUtilitiesMock } from '@kbn/data-plugin/common/mocks';
import { layerTypes } from '../../../common';
import { createMockDatasource, createMockFramePublicAPI } from '../../mocks';
import { LensIconChartBar } from '@kbn/lens-icons';
import { LensIconChartBar } from '../../assets/chart_bar';
import type { VisualizeEditorLayersContext } from '@kbn/visualizations-plugin/public';
import { chartPluginMock } from '@kbn/charts-plugin/public/mocks';
import { fieldFormatsServiceMock } from '@kbn/field-formats-plugin/public/mocks';

View file

@ -7,11 +7,6 @@
import { i18n } from '@kbn/i18n';
import { uniq } from 'lodash';
import {
LensIconChartBarHorizontal,
LensIconChartMixedXy,
LensIconChartBarStacked,
} from '@kbn/lens-icons';
import { DatasourceLayers, OperationMetadata, VisualizationType } from '../../types';
import {
State,
@ -25,6 +20,9 @@ import {
} from './types';
import { isHorizontalChart } from './state_helpers';
import { layerTypes } from '../..';
import { LensIconChartBarHorizontal } from '../../assets/chart_bar_horizontal';
import { LensIconChartMixedXy } from '../../assets/chart_mixed_xy';
import { LensIconChartBarStacked } from '../../assets/chart_bar_stacked';
import { LayerType } from '../../../common';
export function getAxisName(

View file

@ -7,7 +7,7 @@
import { i18n } from '@kbn/i18n';
import { AvailableAnnotationIcon } from '@kbn/event-annotation-plugin/common';
import { IconTriangle, IconCircle } from '@kbn/lens-icons';
import { IconTriangle, IconCircle } from '../../../../assets/annotation_icons';
import { IconSet } from '../shared/icon_select';
export const annotationsIconSet: IconSet<AvailableAnnotationIcon> = [

View file

@ -18,13 +18,7 @@ import { i18n } from '@kbn/i18n';
import { isEqual } from 'lodash';
import { AxisExtentConfig, YScaleType } from '@kbn/expression-xy-plugin/common';
import { ToolbarButtonProps } from '@kbn/kibana-react-plugin/public';
import {
EuiIconAxisBottom,
EuiIconAxisLeft,
EuiIconAxisRight,
EuiIconAxisTop,
} from '@kbn/lens-icons';
import { isHorizontalChart } from '../state_helpers';
import { XYLayerConfig, AxesSettingsConfig } from '../types';
import {
ToolbarPopover,
useDebouncedValue,
@ -32,7 +26,11 @@ import {
RangeInputField,
BucketAxisBoundsControl,
} from '../../../shared_components';
import { XYLayerConfig, AxesSettingsConfig } from '../types';
import { isHorizontalChart } from '../state_helpers';
import { EuiIconAxisBottom } from '../../../assets/axis_bottom';
import { EuiIconAxisLeft } from '../../../assets/axis_left';
import { EuiIconAxisRight } from '../../../assets/axis_right';
import { EuiIconAxisTop } from '../../../assets/axis_top';
import { validateExtent } from '../axes_configuration';
import './axis_settings_popover.scss';

View file

@ -9,11 +9,12 @@ import React, { useState } from 'react';
import { i18n } from '@kbn/i18n';
import { EuiIcon, EuiPopover, EuiSelectable, EuiText, EuiPopoverTitle } from '@elastic/eui';
import { ToolbarButton } from '@kbn/kibana-react-plugin/public';
import { LensIconChartBarReferenceLine, LensIconChartBarAnnotations } from '@kbn/lens-icons';
import type { VisualizationLayerWidgetProps, VisualizationType } from '../../../types';
import { State, visualizationTypes, SeriesType } from '../types';
import { isHorizontalChart, isHorizontalSeries } from '../state_helpers';
import { StaticHeader } from '../../../shared_components';
import { LensIconChartBarReferenceLine } from '../../../assets/chart_bar_reference_line';
import { LensIconChartBarAnnotations } from '../../../assets/chart_bar_annotations';
import { updateLayer } from '.';
import { isAnnotationsLayer, isDataLayer, isReferenceLayer } from '../visualization_helpers';

View file

@ -8,7 +8,7 @@
import React, { FunctionComponent } from 'react';
import type { EuiIconProps } from '@elastic/eui';
export const LensIconRegionMap: FunctionComponent = ({
export const Icon: FunctionComponent = ({
title,
titleId,
...props

View file

@ -9,8 +9,8 @@ import { partition } from 'lodash';
import { i18n } from '@kbn/i18n';
import type { FileLayer } from '@elastic/ems-client';
import type { SuggestionRequest, VisualizationSuggestion } from '@kbn/lens-plugin/public';
import { LensIconRegionMap } from '@kbn/lens-icons';
import type { ChoroplethChartState } from './types';
import { Icon } from './icon';
import { getEmsSuggestion } from './get_ems_suggestion';
/**
@ -72,7 +72,7 @@ export function getSuggestions(
valueAccessor: metric.columnId,
regionAccessor: bucket.columnId,
},
previewIcon: LensIconRegionMap,
previewIcon: Icon,
});
}
}

View file

@ -15,9 +15,9 @@ import { ThemeServiceStart } from '@kbn/core/public';
import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
import { layerTypes } from '@kbn/lens-plugin/public';
import type { OperationMetadata, SuggestionRequest, Visualization } from '@kbn/lens-plugin/public';
import { LensIconRegionMap } from '@kbn/lens-icons';
import { getSuggestions } from './suggestions';
import type { ChoroplethChartState } from './types';
import { Icon } from './icon';
import { RegionKeyEditor } from './region_key_editor';
const REGION_KEY_GROUP_ID = 'region_key';
@ -41,7 +41,7 @@ export const getVisualization = ({
visualizationTypes: [
{
id: 'lnsChoropleth',
icon: LensIconRegionMap,
icon: Icon,
label: CHART_LABEL,
groupLabel: i18n.translate('xpack.maps.lens.groupLabel', {
defaultMessage: 'Map',
@ -70,7 +70,7 @@ export const getVisualization = ({
getDescription() {
return {
icon: LensIconRegionMap,
icon: Icon,
label: CHART_LABEL,
};
},

View file

@ -3591,10 +3591,6 @@
version "0.0.0"
uid ""
"@kbn/lens-icons@link:bazel-bin/x-pack/packages/lens/icons":
version "0.0.0"
uid ""
"@kbn/logging-mocks@link:bazel-bin/packages/kbn-logging-mocks":
version "0.0.0"
uid ""
@ -7511,10 +7507,6 @@
version "0.0.0"
uid ""
"@types/kbn__lens-icons@link:bazel-bin/x-pack/packages/lens/icons/npm_module_types":
version "0.0.0"
uid ""
"@types/kbn__logging-mocks@link:bazel-bin/packages/kbn-logging-mocks/npm_module_types":
version "0.0.0"
uid ""