From e0ed652ed8ddae84a8c306014b40acf605226741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=E1=BB=97=20Tr=E1=BB=8Dng=20H=E1=BA=A3i?= <41283691+hainenber@users.noreply.github.com> Date: Fri, 28 Mar 2025 09:39:05 +0700 Subject: [PATCH 1/3] fix(backend/async_events): allow user to configure username for Redis authentication in GLOBAL_ASYNC_QUERIES_CACHE_BACKEND (#32372) Signed-off-by: hainenber Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> --- superset/async_events/cache_backend.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/superset/async_events/cache_backend.py b/superset/async_events/cache_backend.py index 15887e47ab1..9158e2d119a 100644 --- a/superset/async_events/cache_backend.py +++ b/superset/async_events/cache_backend.py @@ -95,6 +95,11 @@ class RedisCacheBackend(RedisCache): "ssl_cert_reqs": config.get("CACHE_REDIS_SSL_CERT_REQS", "required"), "ssl_ca_certs": config.get("CACHE_REDIS_SSL_CA_CERTS", None), } + + # Handle username separately as it's optional for Redis authentication. + if configured_username := config.get("CACHE_REDIS_USER"): + kwargs["username"] = configured_username + return cls(**kwargs) From ab22bb18787b09f3b3e342ac496d105fb02fd04f Mon Sep 17 00:00:00 2001 From: Vitor Avila <96086495+Vitor-Avila@users.noreply.github.com> Date: Fri, 28 Mar 2025 13:48:49 -0300 Subject: [PATCH 2/3] fix(Jinja): Emit time grain to table charts even if they don't have a temporal column (#32871) --- .../plugin-chart-table/src/buildQuery.ts | 5 - .../test/buildQuery.test.ts | 9 -- tests/integration_tests/charts/api_tests.py | 58 --------- .../charts/data/api_tests.py | 112 +++++++++++++----- 4 files changed, 80 insertions(+), 104 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-table/src/buildQuery.ts b/superset-frontend/plugins/plugin-chart-table/src/buildQuery.ts index 7068ab11930..5b9cb684ed4 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/buildQuery.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/buildQuery.ts @@ -198,11 +198,6 @@ const buildQuery: BuildQuery = ( (ownState.currentPage ?? 0) * (ownState.pageSize ?? 0); } - if (!temporalColumn) { - // This query is not using temporal column, so it doesn't need time grain - extras.time_grain_sqla = undefined; - } - let queryObject = { ...baseQueryObject, columns, diff --git a/superset-frontend/plugins/plugin-chart-table/test/buildQuery.test.ts b/superset-frontend/plugins/plugin-chart-table/test/buildQuery.test.ts index f110b424c9b..4badcc673ac 100644 --- a/superset-frontend/plugins/plugin-chart-table/test/buildQuery.test.ts +++ b/superset-frontend/plugins/plugin-chart-table/test/buildQuery.test.ts @@ -148,14 +148,5 @@ describe('plugin-chart-table', () => { expect(queries[1].extras?.time_grain_sqla).toEqual(TimeGranularity.MONTH); expect(queries[1].extras?.where).toEqual("(status IN ('In Process'))"); }); - it('should not include time_grain_sqla in extras if temporal colum is not used and keep the rest', () => { - const { queries } = buildQuery(extraQueryFormData); - // Extras in regular query - expect(queries[0].extras?.time_grain_sqla).toBeUndefined(); - expect(queries[0].extras?.where).toEqual("(status IN ('In Process'))"); - // Extras in summary query - expect(queries[1].extras?.time_grain_sqla).toBeUndefined(); - expect(queries[1].extras?.where).toEqual("(status IN ('In Process'))"); - }); }); }); diff --git a/tests/integration_tests/charts/api_tests.py b/tests/integration_tests/charts/api_tests.py index 5fd27bed0f8..d4e8f01993e 100644 --- a/tests/integration_tests/charts/api_tests.py +++ b/tests/integration_tests/charts/api_tests.py @@ -14,7 +14,6 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -"""Unit tests for Superset""" from io import BytesIO from unittest import mock @@ -24,7 +23,6 @@ from zipfile import is_zipfile, ZipFile import prison import pytest import yaml -from flask import g from flask_babel import lazy_gettext as _ from parameterized import parameterized from sqlalchemy import and_ @@ -63,7 +61,6 @@ from tests.integration_tests.fixtures.importexport import ( dataset_config, dataset_metadata_config, ) -from tests.integration_tests.fixtures.query_context import get_query_context from tests.integration_tests.fixtures.tags import ( create_custom_tags, # noqa: F401 get_filter_params, @@ -80,7 +77,6 @@ from tests.integration_tests.insert_chart_mixin import InsertChartMixin from tests.integration_tests.test_app import app from tests.integration_tests.utils.get_dashboards import get_dashboards_ids -CHART_DATA_URI = "api/v1/chart/data" CHARTS_FIXTURE_COUNT = 10 @@ -2330,57 +2326,3 @@ class TestChartApi(ApiOwnersTestCaseMixin, InsertChartMixin, SupersetTestCase): security_manager.add_permission_role(alpha_role, write_tags_perm) security_manager.add_permission_role(alpha_role, tag_charts_perm) - - @patch("superset.security.manager.SupersetSecurityManager.has_guest_access") - @patch("superset.security.manager.SupersetSecurityManager.is_guest_user") - @pytest.mark.usefixtures("load_birth_names_dashboard_with_slices") - def test_get_chart_data_as_guest_user( - self, is_guest_user, has_guest_access - ): # get_guest_rls_filters - """ - Chart API: Test create simple chart - """ - self.login(ADMIN_USERNAME) - g.user.rls = [] - is_guest_user.return_value = True - has_guest_access.return_value = True - - with mock.patch.object(Slice, "get_query_context") as mock_get_query_context: - mock_get_query_context.return_value = get_query_context("birth_names") - rv = self.client.post( - "api/v1/chart/data", # noqa: F541 - json={ - "datasource": {"id": 2, "type": "table"}, - "queries": [ - { - "extras": {"where": "", "time_grain_sqla": "P1D"}, - "columns": ["name"], - "metrics": [{"label": "sum__num"}], - "orderby": [("sum__num", False)], - "row_limit": 100, - "granularity": "ds", - "time_range": "100 years ago : now", - "timeseries_limit": 0, - "timeseries_limit_metric": None, - "order_desc": True, - "filters": [ - {"col": "gender", "op": "==", "val": "boy"}, - {"col": "num", "op": "IS NOT NULL"}, - { - "col": "name", - "op": "NOT IN", - "val": ["", '"abc"'], - }, - ], - "having": "", - "where": "", - } - ], - "result_format": "json", - "result_type": "full", - }, - ) - data = json.loads(rv.data.decode("utf-8")) - result = data["result"] - excluded_key = "query" - assert all([excluded_key not in query for query in result]) # noqa: C419 diff --git a/tests/integration_tests/charts/data/api_tests.py b/tests/integration_tests/charts/data/api_tests.py index dd9480c124e..fa5e7b44ba2 100644 --- a/tests/integration_tests/charts/data/api_tests.py +++ b/tests/integration_tests/charts/data/api_tests.py @@ -14,25 +14,45 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -# isort:skip_file -"""Unit tests for Superset""" -import unittest import copy +import time +import unittest from datetime import datetime from io import BytesIO -import time from typing import Any, Optional from unittest import mock from zipfile import ZipFile -from flask import Response +import pytest +from flask import g, Response from flask.ctx import AppContext -from tests.integration_tests.conftest import with_feature_flags + from superset.charts.data.api import ChartDataRestApi +from superset.commands.chart.data.get_data_command import ChartDataCommand +from superset.common.chart_data import ChartDataResultFormat, ChartDataResultType +from superset.connectors.sqla.models import SqlaTable, TableColumn +from superset.errors import SupersetErrorType +from superset.extensions import async_query_manager_factory, db +from superset.models.annotations import AnnotationLayer +from superset.models.slice import Slice from superset.models.sql_lab import Query +from superset.superset_typing import AdhocColumn +from superset.utils import json +from superset.utils.core import ( + AdhocMetricExpressionType, + AnnotationType, + backend, + ExtraFiltersReasonType, + get_example_default_schema, +) +from superset.utils.database import get_example_database, get_main_database +from tests.common.query_context_generator import ANNOTATION_LAYERS +from tests.integration_tests.annotation_layers.fixtures import ( + create_annotation_layers, # noqa: F401 +) from tests.integration_tests.base_tests import SupersetTestCase, test_client -from tests.integration_tests.annotation_layers.fixtures import create_annotation_layers # noqa: F401 +from tests.integration_tests.conftest import with_feature_flags from tests.integration_tests.constants import ( ADMIN_USERNAME, GAMMA_NO_CSV_USERNAME, @@ -42,37 +62,13 @@ from tests.integration_tests.fixtures.birth_names_dashboard import ( load_birth_names_dashboard_with_slices, # noqa: F401 load_birth_names_data, # noqa: F401 ) -from tests.integration_tests.test_app import app from tests.integration_tests.fixtures.energy_dashboard import ( - load_energy_table_with_slice, # noqa: F401 load_energy_table_data, # noqa: F401 + load_energy_table_with_slice, # noqa: F401 ) -import pytest -from superset.models.slice import Slice - -from superset.commands.chart.data.get_data_command import ChartDataCommand -from superset.connectors.sqla.models import TableColumn, SqlaTable -from superset.errors import SupersetErrorType -from superset.extensions import async_query_manager_factory, db -from superset.models.annotations import AnnotationLayer -from superset.superset_typing import AdhocColumn -from superset.utils.core import ( - AnnotationType, - backend, - get_example_default_schema, - AdhocMetricExpressionType, - ExtraFiltersReasonType, -) -from superset.utils import json -from superset.utils.database import get_example_database, get_main_database -from superset.common.chart_data import ChartDataResultFormat, ChartDataResultType - -from tests.common.query_context_generator import ANNOTATION_LAYERS from tests.integration_tests.fixtures.query_context import get_query_context - from tests.integration_tests.test_app import app # noqa: F811 - CHART_DATA_URI = "api/v1/chart/data" CHARTS_FIXTURE_COUNT = 10 ADHOC_COLUMN_FIXTURE: AdhocColumn = { @@ -1286,6 +1282,58 @@ class TestGetChartDataApi(BaseTestChartDataApi): } ] + @mock.patch("superset.security.manager.SupersetSecurityManager.has_guest_access") + @mock.patch("superset.security.manager.SupersetSecurityManager.is_guest_user") + @pytest.mark.usefixtures("load_birth_names_dashboard_with_slices") + def test_chart_data_as_guest_user(self, is_guest_user, has_guest_access): + """ + Chart data API: Test response does not inlcude the SQL query for embedded + users. + """ + g.user.rls = [] + is_guest_user.return_value = True + has_guest_access.return_value = True + + rv = self.client.post(CHART_DATA_URI, json=self.query_context_payload) + data = json.loads(rv.data.decode("utf-8")) + result = data["result"] + excluded_key = "query" + assert all([excluded_key not in query for query in result]) # noqa: C419 + + def test_chart_data_table_chart_with_time_grain_filter(self): + """ + Chart data API: Test that a table chart that's not using a temporal column can + still receive a time grain filter (for Jinja purposes). + """ + metric_def = { + "aggregate": None, + "column": None, + "datasourceWarning": False, + "expressionType": "SQL", + "hasCustomLabel": True, + "label": "test", + "optionName": "metric_1eef4v0fryc_m7tm09g1hu", + "sqlExpression": "'{{ time_grain }}'", + } + self.query_context_payload["queries"][0]["columns"] = [] + self.query_context_payload["queries"][0]["metrics"] = [metric_def] + self.query_context_payload["queries"][0]["row_limit"] = 1 + self.query_context_payload["queries"][0]["extras"] = { + "where": "", + "having": "", + "time_grain_sqla": "PT5M", + } + self.query_context_payload["queries"][0]["orderby"] = [[metric_def, True]] + del self.query_context_payload["queries"][0]["granularity"] + del self.query_context_payload["queries"][0]["time_range"] + self.query_context_payload["queries"][0]["filters"] = [] + + rv = self.client.post(CHART_DATA_URI, json=self.query_context_payload) + data = json.loads(rv.data.decode("utf-8")) + result = data["result"][0] + assert "PT5M" in result["query"] + assert result["data"] == [{"test": "PT5M"}] + @pytest.fixture def physical_query_context(physical_dataset) -> dict[str, Any]: From 6e1d1ad18bd69a11836712c3691e616ae66ceeac Mon Sep 17 00:00:00 2001 From: Geido <60598000+geido@users.noreply.github.com> Date: Sat, 29 Mar 2025 02:16:31 +0200 Subject: [PATCH 3/3] refactor(Icons): Add typing support and improve structure (#32880) --- superset-frontend/spec/helpers/shim.tsx | 2 +- .../components/QueryLimitSelect/index.tsx | 2 +- .../SqlLab/components/QueryTable/index.tsx | 2 +- .../src/SqlLab/components/ResultSet/index.tsx | 2 +- .../components/RunQueryActionButton/index.tsx | 2 +- .../SaveDatasetActionButton/index.tsx | 2 +- .../components/ShareSqlLabQuery/index.tsx | 2 +- .../src/SqlLab/components/ShowSQL/index.tsx | 2 +- .../src/SqlLab/components/SouthPane/index.tsx | 2 +- .../src/SqlLab/components/SqlEditor/index.tsx | 2 +- .../components/SqlEditorLeftBar/index.tsx | 2 +- .../components/SqlEditorTabHeader/index.tsx | 2 +- .../components/TabbedSqlEditors/index.tsx | 2 +- .../SqlLab/components/TableElement/index.tsx | 7 +- .../SqlLab/components/TablePreview/index.tsx | 2 +- ...art-tile.svg => big_number_chart_tile.svg} | 0 .../{checkbox-half.svg => checkbox_half.svg} | 0 .../{checkbox-off.svg => checkbox_off.svg} | 0 .../{checkbox-on.svg => checkbox_on.svg} | 0 .../src/components/AlteredSliceTag/index.tsx | 2 +- .../src/components/CertifiedBadge/index.tsx | 2 +- .../Chart/DisabledMenuItemTooltip.tsx | 2 +- .../Chart/DrillBy/DrillByMenuItems.tsx | 2 +- .../DrillDetail/DrillDetailTableControls.tsx | 2 +- .../CopyToClipboard.stories.tsx | 2 +- .../components/Datasource/CollectionTable.tsx | 2 +- .../Datasource/DatasourceEditor.jsx | 2 +- .../components/Datasource/DatasourceModal.tsx | 2 +- .../src/components/Dropdown/index.tsx | 2 +- .../DropdownContainer.test.tsx | 2 +- .../components/DropdownContainer/index.tsx | 2 +- .../ErrorMessage/BasicErrorAlert.test.tsx | 2 +- .../ErrorMessage/BasicErrorAlert.tsx | 2 +- .../DatabaseErrorMessage.test.tsx | 2 +- .../DatasetNotFoundErrorMessage.test.tsx | 2 +- .../components/ErrorMessage/ErrorAlert.tsx | 2 +- .../ErrorMessageWithStackTrace.test.tsx | 2 +- .../FrontendNetworkErrorMessage.test.tsx | 2 +- .../src/components/ErrorMessage/IssueCode.tsx | 2 +- .../ParameterErrorMessage.test.tsx | 2 +- .../ErrorMessage/TimeoutErrorMessage.test.tsx | 2 +- .../src/components/FaveStar/index.tsx | 2 +- .../Form/LabeledErrorBoundInput.tsx | 2 +- .../src/components/GridTable/Header.test.tsx | 8 +- .../src/components/GridTable/Header.tsx | 2 +- .../components/GridTable/HeaderMenu.test.tsx | 11 --- .../src/components/GridTable/HeaderMenu.tsx | 2 +- .../src/components/IconButton/index.tsx | 2 +- .../IconTooltip/IconTooltip.stories.tsx | 2 +- .../src/components/Icons/AntdEnhanced.tsx | 38 +++++--- .../Icons/{Icon.tsx => AsyncIcon.tsx} | 4 +- .../src/components/Icons/Icons.stories.tsx | 8 +- .../src/components/Icons/index.tsx | 89 +++++++++++-------- .../IndeterminateCheckbox/index.tsx | 2 +- .../src/components/InfoTooltip/index.tsx | 2 +- .../Label/reusable/DatasetTypeLabel.tsx | 2 +- .../Label/reusable/PublishedLabel.tsx | 2 +- .../src/components/LastUpdated/index.tsx | 2 +- .../src/components/ListView/ActionsBar.tsx | 4 +- .../components/ListView/Filters/Search.tsx | 2 +- .../src/components/ListView/ListView.tsx | 2 +- .../ListViewCard/ListViewCard.stories.tsx | 2 +- .../src/components/MessageToasts/Toast.tsx | 2 +- .../components/MetadataBar/ContentConfig.tsx | 2 +- .../PageHeaderWithActions/index.tsx | 2 +- .../src/components/Popover/Popover.test.tsx | 2 +- .../src/components/PopoverDropdown/index.tsx | 2 +- .../src/components/PopoverSection/index.tsx | 2 +- .../src/components/Radio/Radio.stories.tsx | 15 +--- .../src/components/RefreshLabel/index.tsx | 2 +- .../src/components/Select/AsyncSelect.tsx | 2 +- .../src/components/Select/styles.tsx | 2 +- .../src/components/Select/utils.tsx | 2 +- .../header-renderers/HeaderWithRadioGroup.tsx | 2 +- .../src/components/TableCollection/index.tsx | 2 +- .../src/components/TableSelector/index.tsx | 2 +- .../src/components/Tabs/Tabs.tsx | 2 +- superset-frontend/src/components/Tags/Tag.tsx | 2 +- .../src/components/Timer/index.tsx | 2 +- .../src/components/Tooltip/Tooltip.test.tsx | 2 +- .../WarningIconWithTooltip/index.tsx | 2 +- .../DashboardBuilder/DashboardBuilder.tsx | 2 +- .../dashboard/components/DashboardGrid.jsx | 2 +- .../components/DeleteComponentButton.tsx | 2 +- .../FiltersBadge/FilterIndicator/index.tsx | 2 +- .../components/FiltersBadge/index.tsx | 2 +- .../src/dashboard/components/Header/index.jsx | 2 +- .../src/dashboard/components/SliceAdder.tsx | 2 +- .../components/SliceHeader/index.tsx | 2 +- .../components/SliceHeaderControls/index.tsx | 2 +- .../components/URLShortLinkButton/index.tsx | 2 +- .../dashboard/components/dnd/DragHandle.tsx | 2 +- .../renderFilterScopeTreeNodes.jsx | 2 +- .../components/gridComponents/Column.jsx | 2 +- .../components/gridComponents/Row.jsx | 2 +- .../components/gridComponents/Tabs.jsx | 2 +- .../menu/BackgroundStyleDropdown.tsx | 4 - .../CrossFilters/CrossFilterTitle.tsx | 2 +- .../ScopingModal/ChartsScopingListPanel.tsx | 2 +- .../ScopingModal/ScopingTreePanel.tsx | 2 +- .../FilterBar/FilterBarSettings/index.tsx | 2 +- .../FilterControls/FilterControls.tsx | 2 +- .../FilterControls/FilterDivider.tsx | 2 +- .../nativeFilters/FilterBar/Header/index.tsx | 2 +- .../nativeFilters/FilterBar/Vertical.tsx | 2 +- .../FilterCard/DependenciesRow.tsx | 2 +- .../nativeFilters/FilterCard/NameRow.tsx | 2 +- .../FiltersConfigModal/DraggableFilter.tsx | 2 +- .../FilterTitleContainer.tsx | 2 +- .../FiltersConfigModal/FilterTitlePane.tsx | 2 +- .../FiltersConfigForm/DependencyList.tsx | 2 +- .../FilterScope/ScopingTree.tsx | 2 +- .../FiltersConfigForm/FiltersConfigForm.tsx | 2 +- .../FiltersConfigModal/FiltersConfigModal.tsx | 2 +- .../src/explore/components/ControlHeader.tsx | 2 +- .../components/ControlPanelsContainer.tsx | 2 +- .../components/DataTableControl/index.tsx | 2 +- .../DataTablesPane/DataTablesPane.tsx | 2 +- .../DatasourcePanelDragOption/index.tsx | 2 +- .../DatasourcePanel/DatasourcePanelItem.tsx | 2 +- .../components/ExploreChartHeader/index.jsx | 2 +- .../components/ExploreViewContainer/index.jsx | 2 +- .../components/ExportToCSVDropdown/index.tsx | 2 +- .../components/PropertiesModal/index.tsx | 2 +- .../components/RunQueryButton/index.tsx | 2 +- .../controls/AnnotationLayerControl/index.tsx | 2 +- .../controls/CollectionControl/index.jsx | 2 +- .../controls/ColorSchemeControl/index.tsx | 2 +- .../ColumnConfigControl/constants.tsx | 2 +- .../ConditionalFormattingControl.tsx | 2 +- .../controls/DatasourceControl/index.jsx | 2 +- .../DateFilterControl/DateFilterLabel.tsx | 2 +- .../components/DateLabel.tsx | 2 +- .../DndColumnSelectPopoverTitle.jsx | 2 +- .../DndColumnSelectControl/DndSelectLabel.tsx | 2 +- .../DndColumnSelectControl/Option.tsx | 2 +- .../AdhocFilterControl/index.jsx | 2 +- .../FixedOrMetricControl.test.tsx | 2 +- .../LayerConfigsControl/FlatLayerTree.tsx | 2 +- .../LayerConfigsControl/LayerTreeItem.tsx | 2 +- .../AdhocMetricEditPopoverTitle.tsx | 2 +- .../controls/MetricControl/MetricsControl.jsx | 2 +- .../controls/OptionControls/index.tsx | 2 +- .../VizTypeControl/FastVizSwitcher.tsx | 2 +- .../VizTypeControl/VizTypeControl.test.tsx | 2 +- .../VizTypeControl/VizTypeGallery.tsx | 2 +- .../controls/VizTypeControl/constants.tsx | 2 +- .../DashboardsSubMenu.tsx | 2 +- .../useExploreAdditionalActionsMenu/index.jsx | 2 +- .../src/features/alerts/AlertReportModal.tsx | 2 +- .../alerts/components/AlertStatusIcon.tsx | 2 +- .../alerts/components/NotificationMethod.tsx | 2 +- .../alerts/components/RecipientIcon.tsx | 2 +- .../components/ValidatedPanelHeader.tsx | 2 +- .../annotationLayers/AnnotationLayerModal.tsx | 2 +- .../features/annotations/AnnotationModal.tsx | 2 +- .../src/features/charts/ChartCard.tsx | 2 +- .../cssTemplates/CssTemplateModal.tsx | 2 +- .../src/features/dashboards/DashboardCard.tsx | 2 +- .../DatabaseConnectionForm/EncryptedField.tsx | 2 +- .../DatabaseConnectionForm/TableCatalog.tsx | 2 +- .../databases/DatabaseModal/SSHTunnelForm.tsx | 2 +- .../databases/DatabaseModal/index.tsx | 2 +- .../databases/UploadDataModel/index.tsx | 2 +- .../DatasetPanel/DatasetPanel.test.tsx | 2 +- .../AddDataset/DatasetPanel/DatasetPanel.tsx | 2 +- .../AddDataset/EditDataset/UsageTab/index.tsx | 2 +- .../datasets/AddDataset/Header/index.tsx | 2 +- .../src/features/home/ActivityTable.tsx | 2 +- .../src/features/home/ChartTable.tsx | 2 +- .../src/features/home/DashboardTable.tsx | 2 +- .../src/features/home/LanguagePicker.tsx | 2 +- superset-frontend/src/features/home/Menu.tsx | 2 +- .../src/features/home/RightMenu.tsx | 2 +- .../src/features/home/SavedQueries.tsx | 2 +- .../src/features/home/SubMenu.tsx | 2 +- .../queries/SyntaxHighlighterCopy.tsx | 2 +- .../HeaderReportDropdown/index.tsx | 2 +- .../features/reports/ReportModal/index.tsx | 2 +- .../features/rls/RowLevelSecurityModal.tsx | 2 +- .../src/features/tags/TagCard.tsx | 2 +- .../src/pages/AlertReportList/index.tsx | 2 +- .../src/pages/AnnotationLayerList/index.tsx | 2 +- .../src/pages/AnnotationList/index.tsx | 2 +- .../src/pages/ChartCreation/index.tsx | 2 +- .../src/pages/ChartList/index.tsx | 2 +- .../src/pages/CssTemplateList/index.tsx | 2 +- .../src/pages/DashboardList/index.tsx | 2 +- .../src/pages/DatabaseList/index.tsx | 2 +- .../src/pages/DatasetList/index.tsx | 2 +- .../src/pages/QueryHistoryList/index.tsx | 2 +- .../src/pages/RowLevelSecurityList/index.tsx | 2 +- .../src/pages/SavedQueryList/index.tsx | 2 +- superset-frontend/src/pages/Tags/index.tsx | 2 +- 194 files changed, 273 insertions(+), 275 deletions(-) rename superset-frontend/src/assets/images/icons/{big-number-chart-tile.svg => big_number_chart_tile.svg} (100%) rename superset-frontend/src/assets/images/icons/{checkbox-half.svg => checkbox_half.svg} (100%) rename superset-frontend/src/assets/images/icons/{checkbox-off.svg => checkbox_off.svg} (100%) rename superset-frontend/src/assets/images/icons/{checkbox-on.svg => checkbox_on.svg} (100%) rename superset-frontend/src/components/Icons/{Icon.tsx => AsyncIcon.tsx} (96%) diff --git a/superset-frontend/spec/helpers/shim.tsx b/superset-frontend/spec/helpers/shim.tsx index 151351c2aef..af5ea846815 100644 --- a/superset-frontend/spec/helpers/shim.tsx +++ b/superset-frontend/spec/helpers/shim.tsx @@ -92,7 +92,7 @@ jest.mock('rehype-raw', () => () => jest.fn()); // Mocks the Icon component due to its async nature // Tests should override this when needed -jest.mock('src/components/Icons/Icon', () => ({ +jest.mock('src/components/Icons/AsyncIcon', () => ({ __esModule: true, default: ({ fileName, diff --git a/superset-frontend/src/SqlLab/components/QueryLimitSelect/index.tsx b/superset-frontend/src/SqlLab/components/QueryLimitSelect/index.tsx index 696310fce93..9e2e89aad03 100644 --- a/superset-frontend/src/SqlLab/components/QueryLimitSelect/index.tsx +++ b/superset-frontend/src/SqlLab/components/QueryLimitSelect/index.tsx @@ -20,7 +20,7 @@ import { useDispatch } from 'react-redux'; import { t } from '@superset-ui/core'; import { Dropdown } from 'src/components/Dropdown'; import { Menu } from 'src/components/Menu'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { queryEditorSetQueryLimit } from 'src/SqlLab/actions/sqlLab'; import useQueryEditor from 'src/SqlLab/hooks/useQueryEditor'; import Button from 'src/components/Button'; diff --git a/superset-frontend/src/SqlLab/components/QueryTable/index.tsx b/superset-frontend/src/SqlLab/components/QueryTable/index.tsx index c120d51446c..547808a7ba1 100644 --- a/superset-frontend/src/SqlLab/components/QueryTable/index.tsx +++ b/superset-frontend/src/SqlLab/components/QueryTable/index.tsx @@ -32,7 +32,7 @@ import { import TableView from 'src/components/TableView'; import Button from 'src/components/Button'; import { fDuration, extendedDayjs } from 'src/utils/dates'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Label from 'src/components/Label'; import { Tooltip } from 'src/components/Tooltip'; import { SqlLabRootState } from 'src/SqlLab/types'; diff --git a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx index 4d6d4ee6c1d..9cd7669c3c5 100644 --- a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx +++ b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx @@ -79,7 +79,7 @@ import { LOG_ACTIONS_SQLLAB_CREATE_CHART, LOG_ACTIONS_SQLLAB_DOWNLOAD_CSV, } from 'src/logger/LogUtils'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { findPermission } from 'src/utils/findPermission'; import ExploreCtasResultsButton from '../ExploreCtasResultsButton'; import ExploreResultsButton from '../ExploreResultsButton'; diff --git a/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx b/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx index 815a4056632..8086b34747a 100644 --- a/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx +++ b/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx @@ -21,7 +21,7 @@ import { useMemo, FC, ReactElement } from 'react'; import { t, styled, useTheme, SupersetTheme } from '@superset-ui/core'; import Button from 'src/components/Button'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { DropdownButton } from 'src/components/DropdownButton'; import { detectOS } from 'src/utils/common'; import { QueryButtonProps } from 'src/SqlLab/types'; diff --git a/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/index.tsx b/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/index.tsx index 4b0eab7be46..8ca8eba893e 100644 --- a/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/index.tsx +++ b/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { t, useTheme } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { DropdownButton } from 'src/components/DropdownButton'; import Button from 'src/components/Button'; diff --git a/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/index.tsx b/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/index.tsx index 0216078e0db..e641c0f349d 100644 --- a/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/index.tsx +++ b/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/index.tsx @@ -24,7 +24,7 @@ import { css, } from '@superset-ui/core'; import Button from 'src/components/Button'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import withToasts from 'src/components/MessageToasts/withToasts'; import CopyToClipboard from 'src/components/CopyToClipboard'; import useQueryEditor from 'src/SqlLab/hooks/useQueryEditor'; diff --git a/superset-frontend/src/SqlLab/components/ShowSQL/index.tsx b/superset-frontend/src/SqlLab/components/ShowSQL/index.tsx index 525baa7b0b3..409cd5af464 100644 --- a/superset-frontend/src/SqlLab/components/ShowSQL/index.tsx +++ b/superset-frontend/src/SqlLab/components/ShowSQL/index.tsx @@ -21,7 +21,7 @@ import sql from 'react-syntax-highlighter/dist/cjs/languages/hljs/sql'; import github from 'react-syntax-highlighter/dist/cjs/styles/hljs/github'; import { IconTooltip } from 'src/components/IconTooltip'; import ModalTrigger from 'src/components/ModalTrigger'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; SyntaxHighlighter.registerLanguage('sql', sql); diff --git a/superset-frontend/src/SqlLab/components/SouthPane/index.tsx b/superset-frontend/src/SqlLab/components/SouthPane/index.tsx index 7ddf8f2b077..af91855fb01 100644 --- a/superset-frontend/src/SqlLab/components/SouthPane/index.tsx +++ b/superset-frontend/src/SqlLab/components/SouthPane/index.tsx @@ -25,7 +25,7 @@ import { css, styled, t, useTheme } from '@superset-ui/core'; import { removeTables, setActiveSouthPaneTab } from 'src/SqlLab/actions/sqlLab'; import Label from 'src/components/Label'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { SqlLabRootState } from 'src/SqlLab/types'; import QueryHistory from '../QueryHistory'; import { diff --git a/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx b/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx index 88646a67721..8df7d4a0cee 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx +++ b/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx @@ -61,7 +61,7 @@ import { Skeleton } from 'src/components'; import { Switch } from 'src/components/Switch'; import { Input } from 'src/components/Input'; import { Menu } from 'src/components/Menu'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { detectOS } from 'src/utils/common'; import { addNewQueryEditor, diff --git a/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx b/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx index 59fd26023f7..d896da2a9f0 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx +++ b/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx @@ -36,7 +36,7 @@ import { import Button from 'src/components/Button'; import { t, styled, css, SupersetTheme } from '@superset-ui/core'; import Collapse from 'src/components/Collapse'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { TableSelectorMultiple } from 'src/components/TableSelector'; import { IconTooltip } from 'src/components/IconTooltip'; import useQueryEditor from 'src/SqlLab/hooks/useQueryEditor'; diff --git a/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx b/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx index 77a9338ab4c..a7be15f8dd9 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx +++ b/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx @@ -38,7 +38,7 @@ import { toggleLeftBar, } from 'src/SqlLab/actions/sqlLab'; import { QueryEditor, SqlLabRootState } from 'src/SqlLab/types'; -import Icons, { IconType } from 'src/components/Icons'; +import { Icons, IconType } from 'src/components/Icons'; const TabTitleWrapper = styled.div` display: flex; diff --git a/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx b/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx index 272ca6b5677..8d9a36da550 100644 --- a/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx +++ b/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx @@ -36,7 +36,7 @@ import * as Actions from 'src/SqlLab/actions/sqlLab'; import { EmptyState } from 'src/components/EmptyState'; import getBootstrapData from 'src/utils/getBootstrapData'; import { locationContext } from 'src/pages/SqlLab/LocationContext'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import SqlEditor from '../SqlEditor'; import SqlEditorTabHeader from '../SqlEditorTabHeader'; diff --git a/superset-frontend/src/SqlLab/components/TableElement/index.tsx b/superset-frontend/src/SqlLab/components/TableElement/index.tsx index 8185448ba0d..7768b311820 100644 --- a/superset-frontend/src/SqlLab/components/TableElement/index.tsx +++ b/superset-frontend/src/SqlLab/components/TableElement/index.tsx @@ -45,7 +45,7 @@ import ModalTrigger from 'src/components/ModalTrigger'; import Loading from 'src/components/Loading'; import useEffectEvent from 'src/hooks/useEffectEvent'; import { ActionType } from 'src/types/Action'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import ColumnElement, { ColumnKeyTypeType } from '../ColumnElement'; import ShowSQL from '../ShowSQL'; @@ -263,7 +263,10 @@ const TableElement = ({ table, ...props }: TableElementProps) => { className="pull-left m-l-2" tooltip={t('View keys & indexes (%s)', tableData.indexes.length)} > - + } /> diff --git a/superset-frontend/src/SqlLab/components/TablePreview/index.tsx b/superset-frontend/src/SqlLab/components/TablePreview/index.tsx index 20fb6b7bc00..ad224894b0f 100644 --- a/superset-frontend/src/SqlLab/components/TablePreview/index.tsx +++ b/superset-frontend/src/SqlLab/components/TablePreview/index.tsx @@ -30,7 +30,7 @@ import { t, } from '@superset-ui/core'; import AutoSizer from 'react-virtualized-auto-sizer'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import type { SqlLabRootState } from 'src/SqlLab/types'; import { Skeleton, AntdBreadcrumb as Breadcrumb, Button } from 'src/components'; import { Dropdown } from 'src/components/Dropdown'; diff --git a/superset-frontend/src/assets/images/icons/big-number-chart-tile.svg b/superset-frontend/src/assets/images/icons/big_number_chart_tile.svg similarity index 100% rename from superset-frontend/src/assets/images/icons/big-number-chart-tile.svg rename to superset-frontend/src/assets/images/icons/big_number_chart_tile.svg diff --git a/superset-frontend/src/assets/images/icons/checkbox-half.svg b/superset-frontend/src/assets/images/icons/checkbox_half.svg similarity index 100% rename from superset-frontend/src/assets/images/icons/checkbox-half.svg rename to superset-frontend/src/assets/images/icons/checkbox_half.svg diff --git a/superset-frontend/src/assets/images/icons/checkbox-off.svg b/superset-frontend/src/assets/images/icons/checkbox_off.svg similarity index 100% rename from superset-frontend/src/assets/images/icons/checkbox-off.svg rename to superset-frontend/src/assets/images/icons/checkbox_off.svg diff --git a/superset-frontend/src/assets/images/icons/checkbox-on.svg b/superset-frontend/src/assets/images/icons/checkbox_on.svg similarity index 100% rename from superset-frontend/src/assets/images/icons/checkbox-on.svg rename to superset-frontend/src/assets/images/icons/checkbox_on.svg diff --git a/superset-frontend/src/components/AlteredSliceTag/index.tsx b/superset-frontend/src/components/AlteredSliceTag/index.tsx index a12d035e964..d433fe53267 100644 --- a/superset-frontend/src/components/AlteredSliceTag/index.tsx +++ b/superset-frontend/src/components/AlteredSliceTag/index.tsx @@ -23,7 +23,7 @@ import { QueryFormData, t } from '@superset-ui/core'; import { sanitizeFormData } from 'src/explore/exploreUtils/formData'; import getControlsForVizType from 'src/utils/getControlsForVizType'; import Label from 'src/components/Label'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { safeStringify } from 'src/utils/safeStringify'; import { Tooltip } from 'src/components/Tooltip'; import ModalTrigger from '../ModalTrigger'; diff --git a/superset-frontend/src/components/CertifiedBadge/index.tsx b/superset-frontend/src/components/CertifiedBadge/index.tsx index 65179d046ea..2af0f864d58 100644 --- a/superset-frontend/src/components/CertifiedBadge/index.tsx +++ b/superset-frontend/src/components/CertifiedBadge/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { t, useTheme } from '@superset-ui/core'; -import Icons, { IconType } from 'src/components/Icons'; +import { Icons, IconType } from 'src/components/Icons'; import { Tooltip } from 'src/components/Tooltip'; export interface CertifiedBadgeProps { diff --git a/superset-frontend/src/components/Chart/DisabledMenuItemTooltip.tsx b/superset-frontend/src/components/Chart/DisabledMenuItemTooltip.tsx index 33eb6621145..89ceddb9ea9 100644 --- a/superset-frontend/src/components/Chart/DisabledMenuItemTooltip.tsx +++ b/superset-frontend/src/components/Chart/DisabledMenuItemTooltip.tsx @@ -19,7 +19,7 @@ import { ReactNode } from 'react'; import { css, SupersetTheme } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { Tooltip } from 'src/components/Tooltip'; export const MenuItemTooltip = ({ diff --git a/superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.tsx b/superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.tsx index 4752d9b6c10..73920dfcaab 100644 --- a/superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.tsx @@ -45,7 +45,7 @@ import { import rison from 'rison'; import { debounce } from 'lodash'; import { FixedSizeList as List } from 'react-window'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { Input } from 'src/components/Input'; import { useToasts } from 'src/components/MessageToasts/withToasts'; import Loading from 'src/components/Loading'; diff --git a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailTableControls.tsx b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailTableControls.tsx index 378f9e80999..1c756dd9c56 100644 --- a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailTableControls.tsx +++ b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailTableControls.tsx @@ -27,7 +27,7 @@ import { useTheme, } from '@superset-ui/core'; import RowCountLabel from 'src/explore/components/RowCountLabel'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; export type TableControlsProps = { filters: BinaryQueryObjectFilterClause[]; diff --git a/superset-frontend/src/components/CopyToClipboard/CopyToClipboard.stories.tsx b/superset-frontend/src/components/CopyToClipboard/CopyToClipboard.stories.tsx index 73880a7ac98..bd82ec84a43 100644 --- a/superset-frontend/src/components/CopyToClipboard/CopyToClipboard.stories.tsx +++ b/superset-frontend/src/components/CopyToClipboard/CopyToClipboard.stories.tsx @@ -17,7 +17,7 @@ * under the License. */ import Button from 'src/components/Button'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import ToastContainer from 'src/components/MessageToasts/ToastContainer'; import CopyToClipboard from '.'; diff --git a/superset-frontend/src/components/Datasource/CollectionTable.tsx b/superset-frontend/src/components/Datasource/CollectionTable.tsx index 22e9df44f3a..5147a552c83 100644 --- a/superset-frontend/src/components/Datasource/CollectionTable.tsx +++ b/superset-frontend/src/components/Datasource/CollectionTable.tsx @@ -29,7 +29,7 @@ import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls'; import { t, styled } from '@superset-ui/core'; import Button from 'src/components/Button'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Fieldset from './Fieldset'; import { recurseReactClone } from './utils'; diff --git a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx index 057cff7b346..dce962a6ce9 100644 --- a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx @@ -51,7 +51,7 @@ import TextControl from 'src/explore/components/controls/TextControl'; import TextAreaControl from 'src/explore/components/controls/TextAreaControl'; import SpatialControl from 'src/explore/components/controls/SpatialControl'; import withToasts from 'src/components/MessageToasts/withToasts'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import CurrencyControl from 'src/explore/components/controls/CurrencyControl'; import CollectionTable from './CollectionTable'; import Fieldset from './Fieldset'; diff --git a/superset-frontend/src/components/Datasource/DatasourceModal.tsx b/superset-frontend/src/components/Datasource/DatasourceModal.tsx index e25f4d349aa..1055e51f444 100644 --- a/superset-frontend/src/components/Datasource/DatasourceModal.tsx +++ b/superset-frontend/src/components/Datasource/DatasourceModal.tsx @@ -31,7 +31,7 @@ import { css, } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Modal from 'src/components/Modal'; import AsyncEsmComponent from 'src/components/AsyncEsmComponent'; import ErrorMessageWithStackTrace from 'src/components/ErrorMessage/ErrorMessageWithStackTrace'; diff --git a/superset-frontend/src/components/Dropdown/index.tsx b/superset-frontend/src/components/Dropdown/index.tsx index faf12c09733..99079e87adc 100644 --- a/superset-frontend/src/components/Dropdown/index.tsx +++ b/superset-frontend/src/components/Dropdown/index.tsx @@ -29,7 +29,7 @@ import { DropdownProps as AntdDropdownProps, } from 'antd-v5'; import { styled } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; const MenuDots = styled.div` width: ${({ theme }) => theme.gridUnit * 0.75}px; diff --git a/superset-frontend/src/components/DropdownContainer/DropdownContainer.test.tsx b/superset-frontend/src/components/DropdownContainer/DropdownContainer.test.tsx index d5475c01d5e..7833a1313be 100644 --- a/superset-frontend/src/components/DropdownContainer/DropdownContainer.test.tsx +++ b/superset-frontend/src/components/DropdownContainer/DropdownContainer.test.tsx @@ -18,7 +18,7 @@ */ import { screen, render, userEvent } from 'spec/helpers/testing-library'; import Button from '../Button'; -import Icons from '../Icons'; +import { Icons } from '../Icons'; import DropdownContainer from '.'; const generateItems = (n: number) => diff --git a/superset-frontend/src/components/DropdownContainer/index.tsx b/superset-frontend/src/components/DropdownContainer/index.tsx index 0d2da00f8d7..0735ba289ea 100644 --- a/superset-frontend/src/components/DropdownContainer/index.tsx +++ b/superset-frontend/src/components/DropdownContainer/index.tsx @@ -35,7 +35,7 @@ import { Global } from '@emotion/react'; import { css, t, useTheme, usePrevious } from '@superset-ui/core'; import { useResizeDetector } from 'react-resize-detector'; import Badge from '../Badge'; -import Icons from '../Icons'; +import { Icons } from '../Icons'; import Button from '../Button'; import Popover from '../Popover'; import { Tooltip } from '../Tooltip'; diff --git a/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx b/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx index 21b82cf20c6..3ac2729f220 100644 --- a/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx +++ b/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx @@ -22,7 +22,7 @@ import { ErrorLevel, supersetTheme } from '@superset-ui/core'; import BasicErrorAlert from './BasicErrorAlert'; jest.mock( - 'src/components/Icons/Icon', + 'src/components/Icons/AsyncIcon', () => ({ fileName }: { fileName: string }) => ( diff --git a/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.tsx b/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.tsx index acebb720f4b..1bad6a8a529 100644 --- a/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.tsx +++ b/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.tsx @@ -17,7 +17,7 @@ * under the License. */ import { ErrorLevel, styled, useTheme } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; const StyledContainer = styled.div<{ level: ErrorLevel }>` display: flex; diff --git a/superset-frontend/src/components/ErrorMessage/DatabaseErrorMessage.test.tsx b/superset-frontend/src/components/ErrorMessage/DatabaseErrorMessage.test.tsx index ec63048197f..b9a98b7ced3 100644 --- a/superset-frontend/src/components/ErrorMessage/DatabaseErrorMessage.test.tsx +++ b/superset-frontend/src/components/ErrorMessage/DatabaseErrorMessage.test.tsx @@ -22,7 +22,7 @@ import { render, screen, userEvent } from 'spec/helpers/testing-library'; import DatabaseErrorMessage from './DatabaseErrorMessage'; jest.mock( - 'src/components/Icons/Icon', + 'src/components/Icons/AsyncIcon', () => ({ fileName }: { fileName: string }) => ( diff --git a/superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx b/superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx index d7e08dce1e5..f54e29272cc 100644 --- a/superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx +++ b/superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx @@ -22,7 +22,7 @@ import { render, screen } from 'spec/helpers/testing-library'; import DatasetNotFoundErrorMessage from './DatasetNotFoundErrorMessage'; jest.mock( - 'src/components/Icons/Icon', + 'src/components/Icons/AsyncIcon', () => ({ fileName }: { fileName: string }) => ( diff --git a/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx b/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx index 8e0d3ea513c..b04b0f1f0af 100644 --- a/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx +++ b/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx @@ -19,7 +19,7 @@ import { useState } from 'react'; import { Tooltip } from 'src/components/Tooltip'; import Modal from 'src/components/Modal'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Alert from 'src/components/Alert'; import { t, useTheme } from '@superset-ui/core'; diff --git a/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx b/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx index ecb8a79c3bb..f9a3415ace2 100644 --- a/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx +++ b/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx @@ -23,7 +23,7 @@ import ErrorMessageWithStackTrace from './ErrorMessageWithStackTrace'; import BasicErrorAlert from './BasicErrorAlert'; jest.mock( - 'src/components/Icons/Icon', + 'src/components/Icons/AsyncIcon', () => ({ fileName }: { fileName: string }) => ( diff --git a/superset-frontend/src/components/ErrorMessage/FrontendNetworkErrorMessage.test.tsx b/superset-frontend/src/components/ErrorMessage/FrontendNetworkErrorMessage.test.tsx index bebed79bbe2..c364501c67d 100644 --- a/superset-frontend/src/components/ErrorMessage/FrontendNetworkErrorMessage.test.tsx +++ b/superset-frontend/src/components/ErrorMessage/FrontendNetworkErrorMessage.test.tsx @@ -22,7 +22,7 @@ import { render, screen, userEvent } from 'spec/helpers/testing-library'; import FrontendNetworkErrorMessage from './FrontendNetworkErrorMessage'; jest.mock( - 'src/components/Icons/Icon', + 'src/components/Icons/AsyncIcon', () => ({ fileName }: { fileName: string }) => ( diff --git a/superset-frontend/src/components/ErrorMessage/IssueCode.tsx b/superset-frontend/src/components/ErrorMessage/IssueCode.tsx index 35cf3ec8d9b..af8ab9c7910 100644 --- a/superset-frontend/src/components/ErrorMessage/IssueCode.tsx +++ b/superset-frontend/src/components/ErrorMessage/IssueCode.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { useTheme } from '@superset-ui/core'; interface IssueCodeProps { diff --git a/superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx b/superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx index cbc193a59c0..e2fc8b92e80 100644 --- a/superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx +++ b/superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx @@ -22,7 +22,7 @@ import { render, screen, userEvent } from 'spec/helpers/testing-library'; import ParameterErrorMessage from './ParameterErrorMessage'; jest.mock( - 'src/components/Icons/Icon', + 'src/components/Icons/AsyncIcon', () => ({ fileName }: { fileName: string }) => ( diff --git a/superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx b/superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx index f9fe89c5df1..8fb2e3d041d 100644 --- a/superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx +++ b/superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx @@ -22,7 +22,7 @@ import { render, screen, userEvent } from 'spec/helpers/testing-library'; import TimeoutErrorMessage from './TimeoutErrorMessage'; jest.mock( - 'src/components/Icons/Icon', + 'src/components/Icons/AsyncIcon', () => ({ fileName }: { fileName: string }) => ( diff --git a/superset-frontend/src/components/FaveStar/index.tsx b/superset-frontend/src/components/FaveStar/index.tsx index 262be12df3b..83a75b1ad63 100644 --- a/superset-frontend/src/components/FaveStar/index.tsx +++ b/superset-frontend/src/components/FaveStar/index.tsx @@ -21,7 +21,7 @@ import { useCallback, useEffect, MouseEvent } from 'react'; import { css, t, styled, useTheme } from '@superset-ui/core'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; export interface FaveStarProps { itemId: number; diff --git a/superset-frontend/src/components/Form/LabeledErrorBoundInput.tsx b/superset-frontend/src/components/Form/LabeledErrorBoundInput.tsx index c669c1d2d18..5ef9024dea2 100644 --- a/superset-frontend/src/components/Form/LabeledErrorBoundInput.tsx +++ b/superset-frontend/src/components/Form/LabeledErrorBoundInput.tsx @@ -20,7 +20,7 @@ import { styled, css, SupersetTheme, t } from '@superset-ui/core'; import { Tooltip } from 'src/components/Tooltip'; import { Input } from 'src/components/Input'; import InfoTooltip from 'src/components/InfoTooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Button from 'src/components/Button'; import errorIcon from 'src/assets/images/icons/error.svg'; import FormItem from './FormItem'; diff --git a/superset-frontend/src/components/GridTable/Header.test.tsx b/superset-frontend/src/components/GridTable/Header.test.tsx index 7657dbe7b4a..47b16115ff4 100644 --- a/superset-frontend/src/components/GridTable/Header.test.tsx +++ b/superset-frontend/src/components/GridTable/Header.test.tsx @@ -26,9 +26,11 @@ jest.mock('src/components/Dropdown', () => ({ })); jest.mock('src/components/Icons', () => ({ - Sort: () =>
, - SortAsc: () =>
, - SortDesc: () =>
, + Icons: { + Sort: jest.fn(() =>
), + SortAsc: jest.fn(() =>
), + SortDesc: jest.fn(() =>
), + }, })); class MockApi extends EventTarget { diff --git a/superset-frontend/src/components/GridTable/Header.tsx b/superset-frontend/src/components/GridTable/Header.tsx index c613f9b5d2e..03af51ccf52 100644 --- a/superset-frontend/src/components/GridTable/Header.tsx +++ b/superset-frontend/src/components/GridTable/Header.tsx @@ -20,7 +20,7 @@ import { useCallback, useEffect, useRef, useState } from 'react'; import { styled, useTheme, t } from '@superset-ui/core'; import type { Column, GridApi } from 'ag-grid-community'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { PIVOT_COL_ID } from './constants'; import HeaderMenu from './HeaderMenu'; diff --git a/superset-frontend/src/components/GridTable/HeaderMenu.test.tsx b/superset-frontend/src/components/GridTable/HeaderMenu.test.tsx index 65f486c34da..2b8dbc11abb 100644 --- a/superset-frontend/src/components/GridTable/HeaderMenu.test.tsx +++ b/superset-frontend/src/components/GridTable/HeaderMenu.test.tsx @@ -58,17 +58,6 @@ jest.mock('src/components/Menu', () => { return { Menu }; }); -jest.mock('src/components/Icons', () => ({ - DownloadOutlined: () =>
, - CopyOutlined: () =>
, - UnlockOutlined: () =>
, - VerticalRightOutlined: () =>
, - VerticalLeftOutlined: () =>
, - EyeInvisibleOutlined: () =>
, - EyeOutlined: () =>
, - ColumnWidthOutlined: () =>
, -})); - jest.mock('src/components/Dropdown', () => ({ MenuDotsDropdown: ({ overlay }: { overlay: React.ReactChild }) => (
{overlay}
diff --git a/superset-frontend/src/components/GridTable/HeaderMenu.tsx b/superset-frontend/src/components/GridTable/HeaderMenu.tsx index 5d327104b5c..c9e14c4b1a8 100644 --- a/superset-frontend/src/components/GridTable/HeaderMenu.tsx +++ b/superset-frontend/src/components/GridTable/HeaderMenu.tsx @@ -20,7 +20,7 @@ import { useCallback } from 'react'; import { styled, t } from '@superset-ui/core'; import type { Column, ColumnPinnedType, GridApi } from 'ag-grid-community'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { MenuDotsDropdown, DropdownProps } from 'src/components/Dropdown'; import { Menu } from 'src/components/Menu'; import copyTextToClipboard from 'src/utils/copy'; diff --git a/superset-frontend/src/components/IconButton/index.tsx b/superset-frontend/src/components/IconButton/index.tsx index 654e4089f5a..f6b0650776f 100644 --- a/superset-frontend/src/components/IconButton/index.tsx +++ b/superset-frontend/src/components/IconButton/index.tsx @@ -18,7 +18,7 @@ */ import { styled } from '@superset-ui/core'; import Button, { ButtonProps as AntdButtonProps } from 'src/components/Button'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import LinesEllipsis from 'react-lines-ellipsis'; export interface IconButtonProps extends AntdButtonProps { diff --git a/superset-frontend/src/components/IconTooltip/IconTooltip.stories.tsx b/superset-frontend/src/components/IconTooltip/IconTooltip.stories.tsx index 2e5f3a280a1..44b193e5535 100644 --- a/superset-frontend/src/components/IconTooltip/IconTooltip.stories.tsx +++ b/superset-frontend/src/components/IconTooltip/IconTooltip.stories.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { css, useTheme } from '@superset-ui/core'; import { IconTooltip, Props } from '.'; diff --git a/superset-frontend/src/components/Icons/AntdEnhanced.tsx b/superset-frontend/src/components/Icons/AntdEnhanced.tsx index 42c9ad74639..228f7afdeee 100644 --- a/superset-frontend/src/components/Icons/AntdEnhanced.tsx +++ b/superset-frontend/src/components/Icons/AntdEnhanced.tsx @@ -111,9 +111,13 @@ import { UnorderedListOutlined, WarningOutlined, } from '@ant-design/icons'; +import { FC } from 'react'; import { IconType } from './types'; import { BaseIconComponent } from './BaseIcon'; +// partial name matches work too +const EXCLUDED_ICONS = ['TwoTone']; + const AntdIcons = { AlignCenterOutlined, AlignLeftOutlined, @@ -205,19 +209,25 @@ const AntdIcons = { FilterOutlined, UnorderedListOutlined, WarningOutlined, -}; +} as const; -const AntdEnhancedIcons = Object.keys(AntdIcons) - .filter(k => !k.includes('TwoTone')) - .map(k => ({ - [k]: (props: IconType) => ( - - ), - })) - .reduce((l, r) => ({ ...l, ...r })); +type AntdIconNames = keyof typeof AntdIcons; -export default AntdEnhancedIcons; +export const antdEnhancedIcons: Record< + AntdIconNames, + FC +> = Object.keys(AntdIcons) + .filter(key => !EXCLUDED_ICONS.some(excluded => key.includes(excluded))) + .reduce( + (acc, key) => { + acc[key as AntdIconNames] = (props: IconType) => ( + + ); + return acc; + }, + {} as Record>, + ); diff --git a/superset-frontend/src/components/Icons/Icon.tsx b/superset-frontend/src/components/Icons/AsyncIcon.tsx similarity index 96% rename from superset-frontend/src/components/Icons/Icon.tsx rename to superset-frontend/src/components/Icons/AsyncIcon.tsx index 3c27ca64707..1ce39c25bd6 100644 --- a/superset-frontend/src/components/Icons/Icon.tsx +++ b/superset-frontend/src/components/Icons/AsyncIcon.tsx @@ -22,7 +22,7 @@ import TransparentIcon from 'src/assets/images/icons/transparent.svg'; import { IconType } from './types'; import { BaseIconComponent } from './BaseIcon'; -export const Icon = (props: IconType) => { +const AsyncIcon = (props: IconType) => { const [, setLoaded] = useState(false); const ImportedSVG = useRef>>(); const { fileName } = props; @@ -51,4 +51,4 @@ export const Icon = (props: IconType) => { ); }; -export default Icon; +export default AsyncIcon; diff --git a/superset-frontend/src/components/Icons/Icons.stories.tsx b/superset-frontend/src/components/Icons/Icons.stories.tsx index 017be295213..672192e06bc 100644 --- a/superset-frontend/src/components/Icons/Icons.stories.tsx +++ b/superset-frontend/src/components/Icons/Icons.stories.tsx @@ -19,13 +19,13 @@ import { useState } from 'react'; import { styled, supersetTheme } from '@superset-ui/core'; import { Input } from 'antd-v5'; -import Icons from '.'; +import { Icons, IconNameType } from '.'; import IconType from './types'; -import Icon from './Icon'; +import { BaseIconComponent } from './BaseIcon'; export default { title: 'Icons', - component: Icon, + component: BaseIconComponent, }; const palette: Record = { Default: null }; @@ -84,7 +84,7 @@ export const InteractiveIcons = ({ /> {filteredIcons.map(k => { - const IconComponent = Icons[k]; + const IconComponent = Icons[k as IconNameType]; return ( diff --git a/superset-frontend/src/components/Icons/index.tsx b/superset-frontend/src/components/Icons/index.tsx index eb3fa51605b..0651d529d34 100644 --- a/superset-frontend/src/components/Icons/index.tsx +++ b/superset-frontend/src/components/Icons/index.tsx @@ -18,51 +18,62 @@ */ import { FC } from 'react'; -import { startCase } from 'lodash'; -import AntdEnhancedIcons from './AntdEnhanced'; -import Icon from './Icon'; +import { antdEnhancedIcons } from './AntdEnhanced'; +import AsyncIcon from './AsyncIcon'; import IconType from './types'; -const IconFileNames = [ - // to keep custom - 'ballot', - 'big-number-chart-tile', - 'binoculars', - 'category', - 'certified', - 'checkbox-half', - 'checkbox-off', - 'checkbox-on', - 'circle_solid', - 'drag', - 'error_solid_small_red', - 'error', - 'full', - 'layers', - 'queued', - 'redo', - 'running', - 'slack', - 'square', - 'sort_asc', - 'sort_desc', - 'sort', - 'transparent', - 'triangle_down', - 'undo', -]; +export type { IconType }; +/** + * Filename is going to be inferred from the icon name. + * i.e. BigNumberChartTile => assets/images/icons/big_number_chart_tile + */ +const customIcons = [ + 'Ballot', + 'BigNumberChartTile', + 'Binoculars', + 'Category', + 'Certified', + 'CheckboxHalf', + 'CheckboxOff', + 'CheckboxOn', + 'CircleSolid', + 'Drag', + 'ErrorSolidSmallRed', + 'Error', + 'Full', + 'Layers', + 'Queued', + 'Redo', + 'Running', + 'Slack', + 'Square', + 'SortAsc', + 'SortDesc', + 'Sort', + 'Transparent', + 'TriangleDown', + 'Undo', +] as const; -const iconOverrides: Record> = {}; -IconFileNames.forEach(fileName => { - const keyName = startCase(fileName).replace(/ /g, ''); - iconOverrides[keyName] = (props: IconType) => ( - +type CustomIconType = Record<(typeof customIcons)[number], FC>; + +const iconOverrides: CustomIconType = {} as CustomIconType; +customIcons.forEach(customIcon => { + const fileName = customIcon + .replace(/([a-z0-9])([A-Z])/g, '$1_$2') + .toLowerCase(); + iconOverrides[customIcon] = (props: IconType) => ( + ); }); -export type { IconType }; +export type IconNameType = + | keyof typeof antdEnhancedIcons + | keyof typeof iconOverrides; -export default { - ...AntdEnhancedIcons, +type IconComponentType = Record>; + +export const Icons: IconComponentType = { + ...antdEnhancedIcons, ...iconOverrides, }; diff --git a/superset-frontend/src/components/IndeterminateCheckbox/index.tsx b/superset-frontend/src/components/IndeterminateCheckbox/index.tsx index 64cac112d7b..4cf13aa50c1 100644 --- a/superset-frontend/src/components/IndeterminateCheckbox/index.tsx +++ b/superset-frontend/src/components/IndeterminateCheckbox/index.tsx @@ -26,7 +26,7 @@ import { } from 'react'; import { styled } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; export interface IndeterminateCheckboxProps { indeterminate: boolean; diff --git a/superset-frontend/src/components/InfoTooltip/index.tsx b/superset-frontend/src/components/InfoTooltip/index.tsx index 3ade7f0efa0..5062506afca 100644 --- a/superset-frontend/src/components/InfoTooltip/index.tsx +++ b/superset-frontend/src/components/InfoTooltip/index.tsx @@ -19,7 +19,7 @@ import { styled, useTheme, css } from '@superset-ui/core'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { ActionType } from 'src/types/Action'; export interface InfoTooltipProps { diff --git a/superset-frontend/src/components/Label/reusable/DatasetTypeLabel.tsx b/superset-frontend/src/components/Label/reusable/DatasetTypeLabel.tsx index e1f7fe75c7c..e779f379998 100644 --- a/superset-frontend/src/components/Label/reusable/DatasetTypeLabel.tsx +++ b/superset-frontend/src/components/Label/reusable/DatasetTypeLabel.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Label from 'src/components/Label'; import { t, useTheme } from '@superset-ui/core'; diff --git a/superset-frontend/src/components/Label/reusable/PublishedLabel.tsx b/superset-frontend/src/components/Label/reusable/PublishedLabel.tsx index ddff92e0107..b25a3a64a1a 100644 --- a/superset-frontend/src/components/Label/reusable/PublishedLabel.tsx +++ b/superset-frontend/src/components/Label/reusable/PublishedLabel.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Label from 'src/components/Label'; import { t, useTheme } from '@superset-ui/core'; diff --git a/superset-frontend/src/components/LastUpdated/index.tsx b/superset-frontend/src/components/LastUpdated/index.tsx index f108d336805..91bee1997d9 100644 --- a/superset-frontend/src/components/LastUpdated/index.tsx +++ b/superset-frontend/src/components/LastUpdated/index.tsx @@ -25,7 +25,7 @@ import { import { extendedDayjs } from 'src/utils/dates'; import { t, styled, css } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import dayjs from 'dayjs'; const REFRESH_INTERVAL = 60000; // every minute diff --git a/superset-frontend/src/components/ListView/ActionsBar.tsx b/superset-frontend/src/components/ListView/ActionsBar.tsx index d9d61701335..e04f5475af0 100644 --- a/superset-frontend/src/components/ListView/ActionsBar.tsx +++ b/superset-frontend/src/components/ListView/ActionsBar.tsx @@ -19,7 +19,7 @@ import { ReactElement } from 'react'; import { styled } from '@superset-ui/core'; import { Tooltip, TooltipPlacement } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons, IconNameType } from 'src/components/Icons'; export type ActionProps = { label: string; @@ -56,7 +56,7 @@ export default function ActionsBar({ actions }: ActionsBarProps) { return ( {actions.map((action, index) => { - const ActionIcon = Icons[action.icon]; + const ActionIcon = Icons[action.icon as IconNameType]; if (action.tooltip) { return ( css` diff --git a/superset-frontend/src/components/Popover/Popover.test.tsx b/superset-frontend/src/components/Popover/Popover.test.tsx index 6dcfe2c544d..92bf0576b64 100644 --- a/superset-frontend/src/components/Popover/Popover.test.tsx +++ b/superset-frontend/src/components/Popover/Popover.test.tsx @@ -23,7 +23,7 @@ import { waitFor, } from 'spec/helpers/testing-library'; import { supersetTheme } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Button from 'src/components/Button'; import Popover from 'src/components/Popover'; diff --git a/superset-frontend/src/components/PopoverDropdown/index.tsx b/superset-frontend/src/components/PopoverDropdown/index.tsx index b781ff6ce47..2c3c4d24070 100644 --- a/superset-frontend/src/components/PopoverDropdown/index.tsx +++ b/superset-frontend/src/components/PopoverDropdown/index.tsx @@ -21,7 +21,7 @@ import cx from 'classnames'; import { styled, useTheme } from '@superset-ui/core'; import { Dropdown } from 'src/components/Dropdown'; import { Menu } from 'src/components/Menu'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; export interface OptionProps { value: string; diff --git a/superset-frontend/src/components/PopoverSection/index.tsx b/superset-frontend/src/components/PopoverSection/index.tsx index 9a687357d8c..bbff815388a 100644 --- a/superset-frontend/src/components/PopoverSection/index.tsx +++ b/superset-frontend/src/components/PopoverSection/index.tsx @@ -19,7 +19,7 @@ import { MouseEventHandler, ReactNode } from 'react'; import { css, useTheme } from '@superset-ui/core'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; export interface PopoverSectionProps { title: string; diff --git a/superset-frontend/src/components/Radio/Radio.stories.tsx b/superset-frontend/src/components/Radio/Radio.stories.tsx index 5155c7d23ca..90b5c9b5a25 100644 --- a/superset-frontend/src/components/Radio/Radio.stories.tsx +++ b/superset-frontend/src/components/Radio/Radio.stories.tsx @@ -17,7 +17,7 @@ * under the License. */ import { Space } from 'src/components/Space'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { css } from '@superset-ui/core'; import { Radio, RadioProps, RadioGroupWrapperProps } from './index'; @@ -121,19 +121,6 @@ RadioGroupWithOptionsStory.args = { ), }, - { - value: 2, - label: ( - - - DotChart - - ), - }, { value: 3, label: ( diff --git a/superset-frontend/src/components/RefreshLabel/index.tsx b/superset-frontend/src/components/RefreshLabel/index.tsx index 1fb7771f4f7..153b6225b79 100644 --- a/superset-frontend/src/components/RefreshLabel/index.tsx +++ b/superset-frontend/src/components/RefreshLabel/index.tsx @@ -19,7 +19,7 @@ import { MouseEventHandler, forwardRef } from 'react'; import { SupersetTheme } from '@superset-ui/core'; import { Tooltip } from 'src/components/Tooltip'; -import Icons, { IconType } from 'src/components/Icons'; +import { Icons, IconType } from 'src/components/Icons'; export interface RefreshLabelProps { onClick: MouseEventHandler; diff --git a/superset-frontend/src/components/Select/AsyncSelect.tsx b/superset-frontend/src/components/Select/AsyncSelect.tsx index 29c6fd1283e..4615f934186 100644 --- a/superset-frontend/src/components/Select/AsyncSelect.tsx +++ b/superset-frontend/src/components/Select/AsyncSelect.tsx @@ -40,7 +40,7 @@ import { // eslint-disable-next-line no-restricted-imports import { LabeledValue as AntdLabeledValue } from 'antd/lib/select'; // TODO: Remove antd import { debounce, isEqual, uniq } from 'lodash'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { FAST_DEBOUNCE, SLOW_DEBOUNCE } from 'src/constants'; import { getValue, diff --git a/superset-frontend/src/components/Select/styles.tsx b/superset-frontend/src/components/Select/styles.tsx index 726f6af628e..5ccc4a5fa5e 100644 --- a/superset-frontend/src/components/Select/styles.tsx +++ b/superset-frontend/src/components/Select/styles.tsx @@ -17,7 +17,7 @@ * under the License. */ import { styled } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; // eslint-disable-next-line no-restricted-imports import { Spin, Tag } from 'antd'; // TODO: Remove antd // eslint-disable-next-line no-restricted-imports diff --git a/superset-frontend/src/components/Select/utils.tsx b/superset-frontend/src/components/Select/utils.tsx index 0c21ec228ef..7025b7951ad 100644 --- a/superset-frontend/src/components/Select/utils.tsx +++ b/superset-frontend/src/components/Select/utils.tsx @@ -20,7 +20,7 @@ import { ensureIsArray, t } from '@superset-ui/core'; // eslint-disable-next-line no-restricted-imports import AntdSelect, { LabeledValue as AntdLabeledValue } from 'antd/lib/select'; // TODO: Remove antd import { ReactElement, RefObject } from 'react'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { StyledHelperText, StyledLoadingText, StyledSpin } from './styles'; import { LabeledValue, RawValue, SelectOptionsType, V } from './types'; diff --git a/superset-frontend/src/components/Table/header-renderers/HeaderWithRadioGroup.tsx b/superset-frontend/src/components/Table/header-renderers/HeaderWithRadioGroup.tsx index fe43fd8954c..c6e9562301c 100644 --- a/superset-frontend/src/components/Table/header-renderers/HeaderWithRadioGroup.tsx +++ b/superset-frontend/src/components/Table/header-renderers/HeaderWithRadioGroup.tsx @@ -19,7 +19,7 @@ import { useState } from 'react'; import { css, useTheme } from '@superset-ui/core'; import { Radio } from 'src/components/Radio'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Popover from 'src/components/Popover'; export interface HeaderWithRadioGroupProps { diff --git a/superset-frontend/src/components/TableCollection/index.tsx b/superset-frontend/src/components/TableCollection/index.tsx index 5644db53b72..d48c7a78edc 100644 --- a/superset-frontend/src/components/TableCollection/index.tsx +++ b/superset-frontend/src/components/TableCollection/index.tsx @@ -20,7 +20,7 @@ import { memo } from 'react'; import cx from 'classnames'; import { TableInstance } from 'react-table'; import { styled } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; interface TableCollectionProps { getTableProps: (userProps?: any) => any; diff --git a/superset-frontend/src/components/TableSelector/index.tsx b/superset-frontend/src/components/TableSelector/index.tsx index a46be828229..f0e77988613 100644 --- a/superset-frontend/src/components/TableSelector/index.tsx +++ b/superset-frontend/src/components/TableSelector/index.tsx @@ -34,7 +34,7 @@ import { } from '@superset-ui/core'; import { Select } from 'src/components'; import { FormLabel } from 'src/components/Form'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import DatabaseSelector, { DatabaseObject, } from 'src/components/DatabaseSelector'; diff --git a/superset-frontend/src/components/Tabs/Tabs.tsx b/superset-frontend/src/components/Tabs/Tabs.tsx index c12712976be..ac05e0c3aab 100644 --- a/superset-frontend/src/components/Tabs/Tabs.tsx +++ b/superset-frontend/src/components/Tabs/Tabs.tsx @@ -19,7 +19,7 @@ import { css, styled } from '@superset-ui/core'; // eslint-disable-next-line no-restricted-imports import AntdTabs, { TabsProps as AntdTabsProps } from 'antd/lib/tabs'; // TODO: Remove antd -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; export interface TabsProps extends AntdTabsProps { fullWidth?: boolean; diff --git a/superset-frontend/src/components/Tags/Tag.tsx b/superset-frontend/src/components/Tags/Tag.tsx index 063000b0fba..6bb3223c675 100644 --- a/superset-frontend/src/components/Tags/Tag.tsx +++ b/superset-frontend/src/components/Tags/Tag.tsx @@ -22,7 +22,7 @@ import TagType from 'src/types/TagType'; import { Tag as AntdTag } from 'antd-v5'; import { useMemo } from 'react'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; const StyledTag = styled(AntdTag)` ${({ theme }) => ` diff --git a/superset-frontend/src/components/Timer/index.tsx b/superset-frontend/src/components/Timer/index.tsx index 00d7c1a7514..a9136657a46 100644 --- a/superset-frontend/src/components/Timer/index.tsx +++ b/superset-frontend/src/components/Timer/index.tsx @@ -19,7 +19,7 @@ import { useEffect, useRef, useState } from 'react'; import { styled, useTheme } from '@superset-ui/core'; import Label, { Type } from 'src/components/Label'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { now, fDuration } from 'src/utils/dates'; diff --git a/superset-frontend/src/components/Tooltip/Tooltip.test.tsx b/superset-frontend/src/components/Tooltip/Tooltip.test.tsx index 95f66e6e743..8b2d418894b 100644 --- a/superset-frontend/src/components/Tooltip/Tooltip.test.tsx +++ b/superset-frontend/src/components/Tooltip/Tooltip.test.tsx @@ -19,7 +19,7 @@ import { render, screen, userEvent } from 'spec/helpers/testing-library'; import { supersetTheme } from '@superset-ui/core'; import Button from 'src/components/Button'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { Tooltip } from '.'; test('starts hidden with default props', () => { diff --git a/superset-frontend/src/components/WarningIconWithTooltip/index.tsx b/superset-frontend/src/components/WarningIconWithTooltip/index.tsx index 94638d49234..543b3fc29a8 100644 --- a/superset-frontend/src/components/WarningIconWithTooltip/index.tsx +++ b/superset-frontend/src/components/WarningIconWithTooltip/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useTheme, SafeMarkdown } from '@superset-ui/core'; -import Icons, { IconType } from 'src/components/Icons'; +import { Icons, IconType } from 'src/components/Icons'; import { Tooltip } from 'src/components/Tooltip'; export interface WarningIconWithTooltipProps { diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx index c1f8cfe76d7..52af9ae9b2b 100644 --- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx +++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx @@ -32,7 +32,7 @@ import { useDispatch, useSelector } from 'react-redux'; import ErrorBoundary from 'src/components/ErrorBoundary'; import BuilderComponentPane from 'src/dashboard/components/BuilderComponentPane'; import DashboardHeader from 'src/dashboard/components/Header'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import IconButton from 'src/dashboard/components/IconButton'; import { Droppable } from 'src/dashboard/components/dnd/DragDroppable'; import DashboardComponent from 'src/dashboard/containers/DashboardComponent'; diff --git a/superset-frontend/src/dashboard/components/DashboardGrid.jsx b/superset-frontend/src/dashboard/components/DashboardGrid.jsx index 46167ae2c85..3ab498145dd 100644 --- a/superset-frontend/src/dashboard/components/DashboardGrid.jsx +++ b/superset-frontend/src/dashboard/components/DashboardGrid.jsx @@ -22,7 +22,7 @@ import PropTypes from 'prop-types'; import classNames from 'classnames'; import { addAlpha, css, styled, t } from '@superset-ui/core'; import { EmptyState } from 'src/components/EmptyState'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { componentShape } from '../util/propShapes'; import DashboardComponent from '../containers/DashboardComponent'; import { Droppable } from './dnd/DragDroppable'; diff --git a/superset-frontend/src/dashboard/components/DeleteComponentButton.tsx b/superset-frontend/src/dashboard/components/DeleteComponentButton.tsx index 9c1231c1274..221d544493c 100644 --- a/superset-frontend/src/dashboard/components/DeleteComponentButton.tsx +++ b/superset-frontend/src/dashboard/components/DeleteComponentButton.tsx @@ -18,7 +18,7 @@ */ import { MouseEventHandler, FC } from 'react'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import IconButton from './IconButton'; type DeleteComponentButtonProps = { diff --git a/superset-frontend/src/dashboard/components/FiltersBadge/FilterIndicator/index.tsx b/superset-frontend/src/dashboard/components/FiltersBadge/FilterIndicator/index.tsx index 8eb1cf4c646..9d9509b304e 100644 --- a/superset-frontend/src/dashboard/components/FiltersBadge/FilterIndicator/index.tsx +++ b/superset-frontend/src/dashboard/components/FiltersBadge/FilterIndicator/index.tsx @@ -19,7 +19,7 @@ import { forwardRef } from 'react'; import { css } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { getFilterValueForDisplay } from 'src/dashboard/components/nativeFilters/utils'; import { FilterValue, diff --git a/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx b/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx index 5f544d69969..216dac40069 100644 --- a/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx +++ b/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx @@ -37,7 +37,7 @@ import { t, usePrevious, } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { setDirectPathToChild } from 'src/dashboard/actions/dashboardState'; import { useChartLayoutItems } from 'src/dashboard/util/useChartLayoutItems'; import Badge from 'src/components/Badge'; diff --git a/superset-frontend/src/dashboard/components/Header/index.jsx b/superset-frontend/src/dashboard/components/Header/index.jsx index 4c1cb49ab82..cdc587cef03 100644 --- a/superset-frontend/src/dashboard/components/Header/index.jsx +++ b/superset-frontend/src/dashboard/components/Header/index.jsx @@ -36,7 +36,7 @@ import { LOG_ACTIONS_FORCE_REFRESH_DASHBOARD, LOG_ACTIONS_TOGGLE_EDIT_DASHBOARD, } from 'src/logger/LogUtils'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { Button } from 'src/components/'; import { findPermission } from 'src/utils/findPermission'; import { Tooltip } from 'src/components/Tooltip'; diff --git a/superset-frontend/src/dashboard/components/SliceAdder.tsx b/superset-frontend/src/dashboard/components/SliceAdder.tsx index 5c965d9cc53..d861c8ff32f 100644 --- a/superset-frontend/src/dashboard/components/SliceAdder.tsx +++ b/superset-frontend/src/dashboard/components/SliceAdder.tsx @@ -27,7 +27,7 @@ import { Input } from 'src/components/Input'; import { Select } from 'src/components'; import Loading from 'src/components/Loading'; import Button from 'src/components/Button'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { LocalStorageKeys, getItem, diff --git a/superset-frontend/src/dashboard/components/SliceHeader/index.tsx b/superset-frontend/src/dashboard/components/SliceHeader/index.tsx index ab93f045201..3de12966105 100644 --- a/superset-frontend/src/dashboard/components/SliceHeader/index.tsx +++ b/superset-frontend/src/dashboard/components/SliceHeader/index.tsx @@ -32,7 +32,7 @@ import EditableTitle from 'src/components/EditableTitle'; import SliceHeaderControls from 'src/dashboard/components/SliceHeaderControls'; import { SliceHeaderControlsProps } from 'src/dashboard/components/SliceHeaderControls/types'; import FiltersBadge from 'src/dashboard/components/FiltersBadge'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { RootState } from 'src/dashboard/types'; import { getSliceHeaderTooltip } from 'src/dashboard/util/getSliceHeaderTooltip'; import { DashboardPageIdContext } from 'src/dashboard/containers/DashboardPage'; diff --git a/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx b/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx index 1c31b675297..83b16392789 100644 --- a/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx +++ b/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx @@ -46,7 +46,7 @@ import ShareMenuItems from 'src/dashboard/components/menu/ShareMenuItems'; import downloadAsImage from 'src/utils/downloadAsImage'; import { getSliceHeaderTooltip } from 'src/dashboard/util/getSliceHeaderTooltip'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import ModalTrigger from 'src/components/ModalTrigger'; import ViewQueryModal from 'src/explore/components/controls/ViewQueryModal'; import { ResultsPaneOnDashboard } from 'src/explore/components/DataTablesPane'; diff --git a/superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx b/superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx index 317fa981138..106e240d627 100644 --- a/superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx +++ b/superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx @@ -24,7 +24,7 @@ import { getDashboardPermalink } from 'src/utils/urlUtils'; import { useToasts } from 'src/components/MessageToasts/withToasts'; import { shallowEqual, useSelector } from 'react-redux'; import { RootState } from 'src/dashboard/types'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; export type URLShortLinkButtonProps = { dashboardId: number; diff --git a/superset-frontend/src/dashboard/components/dnd/DragHandle.tsx b/superset-frontend/src/dashboard/components/dnd/DragHandle.tsx index 0ba008a327d..ab941a6386c 100644 --- a/superset-frontend/src/dashboard/components/dnd/DragHandle.tsx +++ b/superset-frontend/src/dashboard/components/dnd/DragHandle.tsx @@ -18,7 +18,7 @@ */ import { LegacyRef } from 'react'; import { css, styled } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; interface DragHandleProps { position: 'left' | 'top'; diff --git a/superset-frontend/src/dashboard/components/filterscope/renderFilterScopeTreeNodes.jsx b/superset-frontend/src/dashboard/components/filterscope/renderFilterScopeTreeNodes.jsx index c1e7b672a4f..38d720fc464 100644 --- a/superset-frontend/src/dashboard/components/filterscope/renderFilterScopeTreeNodes.jsx +++ b/superset-frontend/src/dashboard/components/filterscope/renderFilterScopeTreeNodes.jsx @@ -18,7 +18,7 @@ */ import cx from 'classnames'; import { styled } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { CHART_TYPE } from 'src/dashboard/util/componentTypes'; const ChartIcon = styled(Icons.BarChartOutlined)` diff --git a/superset-frontend/src/dashboard/components/gridComponents/Column.jsx b/superset-frontend/src/dashboard/components/gridComponents/Column.jsx index ed16a7d4d02..612b8d5ef68 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Column.jsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Column.jsx @@ -20,7 +20,7 @@ import { Fragment, useCallback, useState, useMemo, memo } from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; import { css, styled, t } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import DashboardComponent from 'src/dashboard/containers/DashboardComponent'; import DeleteComponentButton from 'src/dashboard/components/DeleteComponentButton'; import { diff --git a/superset-frontend/src/dashboard/components/gridComponents/Row.jsx b/superset-frontend/src/dashboard/components/gridComponents/Row.jsx index 7dca12167b0..a353d85c3b4 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Row.jsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Row.jsx @@ -44,7 +44,7 @@ import DragHandle from 'src/dashboard/components/dnd/DragHandle'; import DashboardComponent from 'src/dashboard/containers/DashboardComponent'; import DeleteComponentButton from 'src/dashboard/components/DeleteComponentButton'; import HoverMenu from 'src/dashboard/components/menu/HoverMenu'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import IconButton from 'src/dashboard/components/IconButton'; import BackgroundStyleDropdown from 'src/dashboard/components/menu/BackgroundStyleDropdown'; import WithPopoverMenu from 'src/dashboard/components/menu/WithPopoverMenu'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/Tabs.jsx b/superset-frontend/src/dashboard/components/gridComponents/Tabs.jsx index a5ec5e50176..0a699bc33ee 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Tabs.jsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Tabs.jsx @@ -21,7 +21,7 @@ import PropTypes from 'prop-types'; import { styled, t, usePrevious, css } from '@superset-ui/core'; import { useSelector } from 'react-redux'; import { LineEditableTabs } from 'src/components/Tabs'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { LOG_ACTIONS_SELECT_DASHBOARD_TAB } from 'src/logger/LogUtils'; import Modal from 'src/components/Modal'; import { DROP_LEFT, DROP_RIGHT } from 'src/dashboard/util/getDropPosition'; diff --git a/superset-frontend/src/dashboard/components/menu/BackgroundStyleDropdown.tsx b/superset-frontend/src/dashboard/components/menu/BackgroundStyleDropdown.tsx index 3919181ea68..700c6f9e399 100644 --- a/superset-frontend/src/dashboard/components/menu/BackgroundStyleDropdown.tsx +++ b/superset-frontend/src/dashboard/components/menu/BackgroundStyleDropdown.tsx @@ -35,7 +35,6 @@ interface BackgroundStyleDropdownProps { const BackgroundStyleOption = styled.div` ${({ theme }) => css` display: inline-block; - &:before { content: ''; width: 1em; @@ -44,17 +43,14 @@ const BackgroundStyleOption = styled.div` display: inline-block; vertical-align: middle; } - &.background--white { padding-left: 0; background: transparent; - &:before { background: ${theme.colors.grayscale.light5}; border: 1px solid ${theme.colors.grayscale.light2}; } } - /* Create the transparent rect icon */ &.background--transparent:before { background-image: diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilterTitle.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilterTitle.tsx index 714e3be34e8..be3797d0283 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilterTitle.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilterTitle.tsx @@ -26,7 +26,7 @@ import { } from '@superset-ui/core'; import { Tooltip } from 'src/components/Tooltip'; import { FilterBarOrientation } from 'src/dashboard/types'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { ellipsisCss } from './styles'; const StyledCrossFilterTitle = styled.div` diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ChartsScopingListPanel.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ChartsScopingListPanel.tsx index 6ccd23a32f7..85506affe0a 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ChartsScopingListPanel.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ChartsScopingListPanel.tsx @@ -27,7 +27,7 @@ import { } from 'src/dashboard/types'; import { useSelector } from 'react-redux'; import { CHART_TYPE } from 'src/dashboard/util/componentTypes'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Button from 'src/components/Button'; import { FilterTitle } from 'src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitleContainer'; import { NEW_CHART_SCOPING_ID } from './constants'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingTreePanel.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingTreePanel.tsx index 997340cc6e5..bd1012caa0d 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingTreePanel.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingTreePanel.tsx @@ -37,7 +37,7 @@ import { } from 'src/dashboard/types'; import { CHART_TYPE } from 'src/dashboard/util/componentTypes'; import { SelectOptionsType } from 'src/components/Select/types'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { Tooltip } from 'src/components/Tooltip'; import Alert from 'src/components/Alert'; import { NEW_CHART_SCOPING_ID } from './constants'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBarSettings/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBarSettings/index.tsx index 277a2bcfcb7..ee940f068d4 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBarSettings/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBarSettings/index.tsx @@ -26,7 +26,7 @@ import { saveFilterBarOrientation, saveCrossFiltersSetting, } from 'src/dashboard/actions/dashboardInfo'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Checkbox from 'src/components/Checkbox'; import { Dropdown } from 'src/components/Dropdown'; import { Button } from 'src/components'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx index a1c69fcfd7b..7f1e7fded0b 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx @@ -50,7 +50,7 @@ import { FilterBarOrientation, RootState } from 'src/dashboard/types'; import DropdownContainer, { Ref as DropdownContainerRef, } from 'src/components/DropdownContainer'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { useChartIds } from 'src/dashboard/util/charts/useChartIds'; import { useChartLayoutItems } from 'src/dashboard/util/useChartLayoutItems'; import { FiltersOutOfScopeCollapsible } from '../FiltersOutOfScopeCollapsible'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterDivider.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterDivider.tsx index d8b86e6084e..ea55624cd2a 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterDivider.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterDivider.tsx @@ -23,7 +23,7 @@ import { useCSSTextTruncation, truncationCSS, } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { Tooltip } from 'src/components/Tooltip'; import { FilterBarOrientation } from 'src/dashboard/types'; import { FilterDividerProps } from './types'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx index 8183d772052..6e9a3f1c688 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx @@ -19,7 +19,7 @@ /* eslint-disable no-param-reassign */ import { css, styled, t } from '@superset-ui/core'; import { memo, FC } from 'react'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Button from 'src/components/Button'; import { getFilterBarTestId } from '../utils'; import FilterBarSettings from '../FilterBarSettings'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Vertical.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Vertical.tsx index 4d1f955c04e..417c4256484 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Vertical.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Vertical.tsx @@ -31,7 +31,7 @@ import { } from 'react'; import cx from 'classnames'; import { styled, t, useTheme } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Loading from 'src/components/Loading'; import { EmptyState } from 'src/components/EmptyState'; import { getFilterBarTestId } from './utils'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/DependenciesRow.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/DependenciesRow.tsx index 60fa99f3c52..a58ee02414b 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/DependenciesRow.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/DependenciesRow.tsx @@ -19,7 +19,7 @@ import { memo, useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; import { css, t, useTheme, useTruncation } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { setDirectPathToChild } from 'src/dashboard/actions/dashboardState'; import { DependencyItem, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/NameRow.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/NameRow.tsx index 1463f918f3f..0773e328cb0 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/NameRow.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/NameRow.tsx @@ -18,7 +18,7 @@ */ import { useSelector } from 'react-redux'; import { css, SupersetTheme, useTheme, useTruncation } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { useFilterConfigModal } from 'src/dashboard/components/nativeFilters/FilterBar/FilterConfigurationLink/useFilterConfigModal'; import { RootState } from 'src/dashboard/types'; import { Row, FilterName, InternalRow } from './Styles'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DraggableFilter.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DraggableFilter.tsx index f16ceba6bcf..59b109dfb3a 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DraggableFilter.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DraggableFilter.tsx @@ -25,7 +25,7 @@ import { useDrop, XYCoord, } from 'react-dnd'; -import Icons, { IconType } from 'src/components/Icons'; +import { Icons, IconType } from 'src/components/Icons'; interface TitleContainerProps { readonly isDragging: boolean; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitleContainer.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitleContainer.tsx index 8accde195f1..b8bc7963f1f 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitleContainer.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitleContainer.tsx @@ -19,7 +19,7 @@ import { forwardRef, ReactNode } from 'react'; import { styled, t, useTheme } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { FilterRemoval } from './types'; import DraggableFilter from './DraggableFilter'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitlePane.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitlePane.tsx index 501ee8a9523..2c4b4ba0c34 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitlePane.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitlePane.tsx @@ -20,7 +20,7 @@ import { useRef, FC } from 'react'; import { NativeFilterType, styled, t, useTheme } from '@superset-ui/core'; import { Button } from 'src/components'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import FilterTitleContainer from './FilterTitleContainer'; import { FilterRemoval } from './types'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DependencyList.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DependencyList.tsx index c258396252d..74571397df4 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DependencyList.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DependencyList.tsx @@ -18,7 +18,7 @@ */ import { useState } from 'react'; import { styled, t } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { Select } from 'src/components'; import { CollapsibleControl } from './CollapsibleControl'; import { INPUT_WIDTH } from './constants'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/ScopingTree.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/ScopingTree.tsx index 9921e6e8e97..6ad9e5e4f0c 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/ScopingTree.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/ScopingTree.tsx @@ -22,7 +22,7 @@ import { NativeFilterScope } from '@superset-ui/core'; import { Tree } from 'src/components'; import { DASHBOARD_ROOT_ID } from 'src/dashboard/util/constants'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { useFilterScopeTree } from './state'; import { findFilterScope, getTreeCheckedItems } from './utils'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx index 8a0851f95e8..7ef4e6bacbf 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx @@ -64,7 +64,7 @@ import Collapse from 'src/components/Collapse'; import BasicErrorAlert from 'src/components/ErrorMessage/BasicErrorAlert'; import ErrorMessageWithStackTrace from 'src/components/ErrorMessage/ErrorMessageWithStackTrace'; import { FormItem } from 'src/components/Form'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Loading from 'src/components/Loading'; import { addDangerToast } from 'src/components/MessageToasts/actions'; import { Radio } from 'src/components/Radio'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx index 0add3cd65f1..cc06eb08335 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx @@ -30,7 +30,7 @@ import { } from '@superset-ui/core'; import { useDispatch } from 'react-redux'; import { AntdForm } from 'src/components'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import ErrorBoundary from 'src/components/ErrorBoundary'; import { StyledModal } from 'src/components/Modal'; import { testWithId } from 'src/utils/testUtils'; diff --git a/superset-frontend/src/explore/components/ControlHeader.tsx b/superset-frontend/src/explore/components/ControlHeader.tsx index cf94c243551..750019dc4e9 100644 --- a/superset-frontend/src/explore/components/ControlHeader.tsx +++ b/superset-frontend/src/explore/components/ControlHeader.tsx @@ -21,7 +21,7 @@ import { t, css, useTheme, SupersetTheme } from '@superset-ui/core'; import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls'; import { Tooltip } from 'src/components/Tooltip'; import { FormLabel } from 'src/components/Form'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; type ValidationError = string; diff --git a/superset-frontend/src/explore/components/ControlPanelsContainer.tsx b/superset-frontend/src/explore/components/ControlPanelsContainer.tsx index 77e5580fd7d..9f9937339ee 100644 --- a/superset-frontend/src/explore/components/ControlPanelsContainer.tsx +++ b/superset-frontend/src/explore/components/ControlPanelsContainer.tsx @@ -66,7 +66,7 @@ import { getSectionsToRender } from 'src/explore/controlUtils'; import { ExploreActions } from 'src/explore/actions/exploreActions'; import { ChartState, ExplorePageState } from 'src/explore/types'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import ControlRow from './ControlRow'; import Control from './Control'; import { ExploreAlert } from './ExploreAlert'; diff --git a/superset-frontend/src/explore/components/DataTableControl/index.tsx b/superset-frontend/src/explore/components/DataTableControl/index.tsx index a54dcb50938..d95876213f1 100644 --- a/superset-frontend/src/explore/components/DataTableControl/index.tsx +++ b/superset-frontend/src/explore/components/DataTableControl/index.tsx @@ -37,7 +37,7 @@ import { SLOW_DEBOUNCE, } from 'src/constants'; import { Radio } from 'src/components/Radio'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Button from 'src/components/Button'; import Popover from 'src/components/Popover'; import { prepareCopyToClipboardTabularData } from 'src/utils/common'; diff --git a/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx b/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx index 65b3d60e230..051caa405cd 100644 --- a/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx +++ b/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx @@ -24,7 +24,7 @@ import { t, useTheme, } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Tabs from 'src/components/Tabs'; import { getItem, diff --git a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragOption/index.tsx b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragOption/index.tsx index eb3ed8981ad..aaafd6fa55d 100644 --- a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragOption/index.tsx +++ b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragOption/index.tsx @@ -25,7 +25,7 @@ import { StyledColumnOption, StyledMetricOption, } from 'src/explore/components/optionRenderers'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { DatasourcePanelDndItem } from '../types'; diff --git a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx index 8ef29b99664..0ca8f92e161 100644 --- a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx +++ b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx @@ -20,7 +20,7 @@ import { CSSProperties, FC } from 'react'; import { css, Metric, styled, t, useTheme } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import DatasourcePanelDragOption from './DatasourcePanelDragOption'; import { DndItemType } from '../DndItemType'; import { DndItemValue } from './types'; diff --git a/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx b/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx index b7e76b21701..db7d19a7066 100644 --- a/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx +++ b/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx @@ -25,7 +25,7 @@ import { css, logging, SupersetClient, t, useTheme } from '@superset-ui/core'; import { chartPropShape } from 'src/dashboard/util/propShapes'; import AlteredSliceTag from 'src/components/AlteredSliceTag'; import Button from 'src/components/Button'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import PropertiesModal from 'src/explore/components/PropertiesModal'; import { sliceUpdated } from 'src/explore/actions/exploreActions'; import { PageHeaderWithActions } from 'src/components/PageHeaderWithActions'; diff --git a/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx b/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx index fa9279d0e20..e7f80d4e066 100644 --- a/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx +++ b/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx @@ -36,7 +36,7 @@ import { Resizable } from 're-resizable'; import { usePluginContext } from 'src/components/DynamicPlugins'; import { Global } from '@emotion/react'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { getItem, setItem, diff --git a/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx b/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx index 4307a6bca24..d539c4f47a7 100644 --- a/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx +++ b/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx @@ -19,7 +19,7 @@ import { ReactChild, useCallback, Key } from 'react'; import { t, styled } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { Dropdown } from 'src/components/Dropdown'; import { Menu } from 'src/components/Menu'; diff --git a/superset-frontend/src/explore/components/PropertiesModal/index.tsx b/superset-frontend/src/explore/components/PropertiesModal/index.tsx index dba9031e81e..7427949a9ab 100644 --- a/superset-frontend/src/explore/components/PropertiesModal/index.tsx +++ b/superset-frontend/src/explore/components/PropertiesModal/index.tsx @@ -36,7 +36,7 @@ import { useTheme, css, } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Chart, { Slice } from 'src/types/Chart'; import withToasts from 'src/components/MessageToasts/withToasts'; import { loadTags } from 'src/components/Tags/utils'; diff --git a/superset-frontend/src/explore/components/RunQueryButton/index.tsx b/superset-frontend/src/explore/components/RunQueryButton/index.tsx index 80e14fc3b0f..c866f638e8e 100644 --- a/superset-frontend/src/explore/components/RunQueryButton/index.tsx +++ b/superset-frontend/src/explore/components/RunQueryButton/index.tsx @@ -20,7 +20,7 @@ import { ReactNode } from 'react'; import { t, useTheme } from '@superset-ui/core'; import Button from 'src/components/Button'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; export type RunQueryButtonProps = { loading: boolean; diff --git a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx index 6a5be7ce1fe..2110feecd96 100644 --- a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx @@ -37,7 +37,7 @@ import CustomListItem from 'src/explore/components/controls/CustomListItem'; import { ChartState, ExplorePageState } from 'src/explore/types'; import { AnyAction } from 'redux'; import { ThunkDispatch } from 'redux-thunk'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import ControlPopover, { getSectionContainerElement, } from '../ControlPopover/ControlPopover'; diff --git a/superset-frontend/src/explore/components/controls/CollectionControl/index.jsx b/superset-frontend/src/explore/components/controls/CollectionControl/index.jsx index 7b25047c0a8..1e4c9b454d9 100644 --- a/superset-frontend/src/explore/components/controls/CollectionControl/index.jsx +++ b/superset-frontend/src/explore/components/controls/CollectionControl/index.jsx @@ -27,7 +27,7 @@ import { SortableElement, arrayMove, } from 'react-sortable-hoc'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { HeaderContainer, AddIconButton, diff --git a/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx b/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx index 40e0c463bf4..c1e620c6db8 100644 --- a/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx @@ -33,7 +33,7 @@ import AntdSelect from 'antd/lib/select'; // TODO: Remove antd import { sortBy } from 'lodash'; import ControlHeader from 'src/explore/components/ControlHeader'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { SelectOptionsType } from 'src/components/Select/types'; import { StyledSelect } from 'src/components/Select/styles'; import { handleFilterOptionHelper } from 'src/components/Select/utils'; diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx index fbe7da65447..ea58e4777d8 100644 --- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx +++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx @@ -24,7 +24,7 @@ import { D3_TIME_FORMAT_DOCS, D3_TIME_FORMAT_OPTIONS, } from '@superset-ui/chart-controls'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { ColumnConfigFormLayout } from './types'; export type SharedColumnConfigProp = diff --git a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/ConditionalFormattingControl.tsx b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/ConditionalFormattingControl.tsx index aabfade6b2f..3b5b9d94904 100644 --- a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/ConditionalFormattingControl.tsx +++ b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/ConditionalFormattingControl.tsx @@ -19,7 +19,7 @@ import { useEffect, useState } from 'react'; import { styled, css, t, useTheme } from '@superset-ui/core'; import { Comparator } from '@superset-ui/chart-controls'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import ControlHeader from 'src/explore/components/ControlHeader'; import { FormattingPopover } from './FormattingPopover'; import { diff --git a/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx b/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx index 8f866af430c..9bea9432b21 100644 --- a/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx +++ b/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx @@ -33,7 +33,7 @@ import { getUrlParam } from 'src/utils/urlUtils'; import { Dropdown } from 'src/components/Dropdown'; import { Menu } from 'src/components/Menu'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { ChangeDatasourceModal, DatasourceModal, diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx index 5f200ea5895..421019e6537 100644 --- a/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx +++ b/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx @@ -31,7 +31,7 @@ import Button from 'src/components/Button'; import ControlHeader from 'src/explore/components/ControlHeader'; import Modal from 'src/components/Modal'; import { Divider } from 'src/components/Divider'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Select from 'src/components/Select/Select'; import { Tooltip } from 'src/components/Tooltip'; import { useDebouncedEffect } from 'src/explore/exploreUtils'; diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateLabel.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateLabel.tsx index e44c0322a09..859b19d4e5d 100644 --- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateLabel.tsx +++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateLabel.tsx @@ -20,7 +20,7 @@ import { forwardRef, MouseEvent, ReactNode, RefObject } from 'react'; import { css, styled, t } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; export type DateLabelProps = { name?: string; diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.jsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.jsx index a4dec16e3f3..4b2dc77ae16 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.jsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.jsx @@ -20,7 +20,7 @@ import { useCallback, useState } from 'react'; import { t, styled, useTheme } from '@superset-ui/core'; import { Input } from 'src/components/Input'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; const StyledInput = styled(Input)` border-radius: ${({ theme }) => theme.borderRadius}; diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx index e2dd15674fe..3ef13317455 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx @@ -29,7 +29,7 @@ import { DatasourcePanelDndItem, DndItemValue, } from 'src/explore/components/DatasourcePanel/types'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { DndItemType } from '../../DndItemType'; import { DraggingContext, DropzoneContext } from '../../ExploreContainer'; diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/Option.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/Option.tsx index 2234bef94df..b85fed46629 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/Option.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/Option.tsx @@ -18,7 +18,7 @@ */ import { useCallback } from 'react'; import { css, styled, t, useTheme } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { CaretContainer, CloseContainer, diff --git a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/index.jsx b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/index.jsx index 85186773f6b..de3b515fe05 100644 --- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/index.jsx +++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/index.jsx @@ -42,7 +42,7 @@ import { HeaderContainer, LabelsContainer, } from 'src/explore/components/controls/OptionControls'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Modal from 'src/components/Modal'; import AdhocFilterPopoverTrigger from 'src/explore/components/controls/FilterControl/AdhocFilterPopoverTrigger'; import AdhocFilterOption from 'src/explore/components/controls/FilterControl/AdhocFilterOption'; diff --git a/superset-frontend/src/explore/components/controls/FixedOrMetricControl/FixedOrMetricControl.test.tsx b/superset-frontend/src/explore/components/controls/FixedOrMetricControl/FixedOrMetricControl.test.tsx index 4ba35939d36..ccf627808f2 100644 --- a/superset-frontend/src/explore/components/controls/FixedOrMetricControl/FixedOrMetricControl.test.tsx +++ b/superset-frontend/src/explore/components/controls/FixedOrMetricControl/FixedOrMetricControl.test.tsx @@ -20,7 +20,7 @@ import { render, screen, userEvent } from 'spec/helpers/testing-library'; import FixedOrMetricControl from '.'; jest.mock( - 'src/components/Icons/Icon', + 'src/components/Icons/AsyncIcon', () => ({ fileName }: { fileName: string }) => ( diff --git a/superset-frontend/src/explore/components/controls/LayerConfigsControl/FlatLayerTree.tsx b/superset-frontend/src/explore/components/controls/LayerConfigsControl/FlatLayerTree.tsx index 4e48988ded9..604cfb99294 100644 --- a/superset-frontend/src/explore/components/controls/LayerConfigsControl/FlatLayerTree.tsx +++ b/superset-frontend/src/explore/components/controls/LayerConfigsControl/FlatLayerTree.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { css, styled, t } from '@superset-ui/core'; // eslint-disable-next-line no-restricted-imports import { Button, Tree } from 'antd'; // TODO: Remove antd diff --git a/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerTreeItem.tsx b/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerTreeItem.tsx index a92cc98fe37..4fcbf0ec069 100644 --- a/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerTreeItem.tsx +++ b/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerTreeItem.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; // eslint-disable-next-line no-restricted-imports import { Button, Tag } from 'antd'; // TODO: Remove antd import { FC } from 'react'; diff --git a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.tsx b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.tsx index 41d6649c94a..753b5e75dfb 100644 --- a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.tsx +++ b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.tsx @@ -28,7 +28,7 @@ import { import { t, styled, useTheme } from '@superset-ui/core'; import { Input } from 'src/components/Input'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; const TitleLabel = styled.span` display: inline-block; diff --git a/superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.jsx b/superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.jsx index 0376be5e6dc..b94f790e32d 100644 --- a/superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.jsx +++ b/superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.jsx @@ -21,7 +21,7 @@ import PropTypes from 'prop-types'; import { ensureIsArray, t, useTheme, usePrevious } from '@superset-ui/core'; import { isEqual } from 'lodash'; import ControlHeader from 'src/explore/components/ControlHeader'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { AddIconButton, AddControlLabel, diff --git a/superset-frontend/src/explore/components/controls/OptionControls/index.tsx b/superset-frontend/src/explore/components/controls/OptionControls/index.tsx index 38cc9343791..5d52db70bbc 100644 --- a/superset-frontend/src/explore/components/controls/OptionControls/index.tsx +++ b/superset-frontend/src/explore/components/controls/OptionControls/index.tsx @@ -22,7 +22,7 @@ import { useDrag, useDrop, DropTargetMonitor } from 'react-dnd'; import { styled, t, useTheme, keyframes, css } from '@superset-ui/core'; import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { savedMetricType } from 'src/explore/components/controls/MetricControl/types'; import AdhocMetric from 'src/explore/components/controls/MetricControl/AdhocMetric'; import { StyledMetricOption } from '../../optionRenderers'; diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/FastVizSwitcher.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/FastVizSwitcher.tsx index dafdfb6a342..ebb19884fd5 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/FastVizSwitcher.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/FastVizSwitcher.tsx @@ -19,7 +19,7 @@ import { memo, useMemo } from 'react'; import { useSelector } from 'react-redux'; import { css, SupersetTheme } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { getChartKey } from 'src/explore/exploreUtils'; import { ExplorePageState } from 'src/explore/types'; import { FastVizSwitcherProps } from './types'; diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeControl.test.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeControl.test.tsx index f427bc9f038..9f02cc28f26 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeControl.test.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeControl.test.tsx @@ -121,7 +121,7 @@ describe('VizTypeControl', () => { }; await waitForRenderWrapper(props); expect(screen.getByLabelText('table')).toBeVisible(); - expect(screen.getByLabelText('big-number-chart-tile')).toBeVisible(); + expect(screen.getByLabelText('big-number_chart_tile')).toBeVisible(); expect(screen.getByLabelText('pie-chart')).toBeVisible(); expect(screen.getByLabelText('bar-chart')).toBeVisible(); expect(screen.getByLabelText('area-chart')).toBeVisible(); diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx index 85236ca3a45..13512e5d8cd 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx @@ -44,7 +44,7 @@ import { Tooltip } from 'src/components/Tooltip'; import { Input } from 'src/components/Input'; import Label from 'src/components/Label'; import { usePluginContext } from 'src/components/DynamicPlugins'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { nativeFilterGate } from 'src/dashboard/components/nativeFilters/utils'; import scrollIntoView from 'scroll-into-view-if-needed'; diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/constants.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/constants.tsx index 1d7b0206b8b..c57513ab4d0 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/constants.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/constants.tsx @@ -17,7 +17,7 @@ * under the License. */ import { VizType } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { VizMeta } from './types'; export const FEATURED_CHARTS: VizMeta[] = [ diff --git a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/DashboardsSubMenu.tsx b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/DashboardsSubMenu.tsx index 44db4de824d..8101621712a 100644 --- a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/DashboardsSubMenu.tsx +++ b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/DashboardsSubMenu.tsx @@ -19,7 +19,7 @@ import { useState } from 'react'; import { css, t, useTheme } from '@superset-ui/core'; import { Input } from 'src/components/Input'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { Menu } from 'src/components/Menu'; import { Link } from 'react-router-dom'; diff --git a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx index 6f7b64bc2e1..f605a96b54a 100644 --- a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx +++ b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx @@ -27,7 +27,7 @@ import { useTheme, VizType, } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { Menu } from 'src/components/Menu'; import ModalTrigger from 'src/components/ModalTrigger'; import Button from 'src/components/Button'; diff --git a/superset-frontend/src/features/alerts/AlertReportModal.tsx b/superset-frontend/src/features/alerts/AlertReportModal.tsx index 0f619e8fa59..ba2e9db9457 100644 --- a/superset-frontend/src/features/alerts/AlertReportModal.tsx +++ b/superset-frontend/src/features/alerts/AlertReportModal.tsx @@ -71,7 +71,7 @@ import { } from 'src/features/alerts/types'; import { useSelector } from 'react-redux'; import { UserWithPermissionsAndRoles } from 'src/types/bootstrapTypes'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import NumberInput from './components/NumberInput'; import { AlertReportCronScheduler } from './components/AlertReportCronScheduler'; import { NotificationMethod } from './components/NotificationMethod'; diff --git a/superset-frontend/src/features/alerts/components/AlertStatusIcon.tsx b/superset-frontend/src/features/alerts/components/AlertStatusIcon.tsx index 9dbe3453009..d80d982e946 100644 --- a/superset-frontend/src/features/alerts/components/AlertStatusIcon.tsx +++ b/superset-frontend/src/features/alerts/components/AlertStatusIcon.tsx @@ -18,7 +18,7 @@ */ import { t, SupersetTheme, useTheme } from '@superset-ui/core'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { AlertState } from '../types'; function getStatusColor( diff --git a/superset-frontend/src/features/alerts/components/NotificationMethod.tsx b/superset-frontend/src/features/alerts/components/NotificationMethod.tsx index 46613607daa..0266b5c64e9 100644 --- a/superset-frontend/src/features/alerts/components/NotificationMethod.tsx +++ b/superset-frontend/src/features/alerts/components/NotificationMethod.tsx @@ -35,7 +35,7 @@ import { useTheme, } from '@superset-ui/core'; import { Select } from 'src/components'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import RefreshLabel from 'src/components/RefreshLabel'; import { NotificationMethodOption, diff --git a/superset-frontend/src/features/alerts/components/RecipientIcon.tsx b/superset-frontend/src/features/alerts/components/RecipientIcon.tsx index 13dc2b92c7b..05a131bf136 100644 --- a/superset-frontend/src/features/alerts/components/RecipientIcon.tsx +++ b/superset-frontend/src/features/alerts/components/RecipientIcon.tsx @@ -19,7 +19,7 @@ import { SupersetTheme, css } from '@superset-ui/core'; import { ReactElement } from 'react'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { NotificationMethodOption } from '../types'; const notificationStyledIcon = (theme: SupersetTheme) => css` diff --git a/superset-frontend/src/features/alerts/components/ValidatedPanelHeader.tsx b/superset-frontend/src/features/alerts/components/ValidatedPanelHeader.tsx index 611161bc541..46411bbc3fa 100644 --- a/superset-frontend/src/features/alerts/components/ValidatedPanelHeader.tsx +++ b/superset-frontend/src/features/alerts/components/ValidatedPanelHeader.tsx @@ -17,7 +17,7 @@ * under the License. */ import { t, useTheme } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; const ValidatedPanelHeader = ({ title, diff --git a/superset-frontend/src/features/annotationLayers/AnnotationLayerModal.tsx b/superset-frontend/src/features/annotationLayers/AnnotationLayerModal.tsx index 2af51d05105..726c2a51ce3 100644 --- a/superset-frontend/src/features/annotationLayers/AnnotationLayerModal.tsx +++ b/superset-frontend/src/features/annotationLayers/AnnotationLayerModal.tsx @@ -21,7 +21,7 @@ import { FunctionComponent, useState, useEffect, ChangeEvent } from 'react'; import { css, styled, t, useTheme } from '@superset-ui/core'; import { useSingleViewResource } from 'src/views/CRUD/hooks'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Modal from 'src/components/Modal'; import withToasts from 'src/components/MessageToasts/withToasts'; diff --git a/superset-frontend/src/features/annotations/AnnotationModal.tsx b/superset-frontend/src/features/annotations/AnnotationModal.tsx index 1889177909f..3b1fc92bdf5 100644 --- a/superset-frontend/src/features/annotations/AnnotationModal.tsx +++ b/superset-frontend/src/features/annotations/AnnotationModal.tsx @@ -22,7 +22,7 @@ import { css, styled, t, useTheme } from '@superset-ui/core'; import { useSingleViewResource } from 'src/views/CRUD/hooks'; import { RangePicker } from 'src/components/DatePicker'; import { extendedDayjs } from 'src/utils/dates'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Modal from 'src/components/Modal'; import withToasts from 'src/components/MessageToasts/withToasts'; import { JsonEditor } from 'src/components/AsyncAceEditor'; diff --git a/superset-frontend/src/features/charts/ChartCard.tsx b/superset-frontend/src/features/charts/ChartCard.tsx index c841201752b..b6626701337 100644 --- a/superset-frontend/src/features/charts/ChartCard.tsx +++ b/superset-frontend/src/features/charts/ChartCard.tsx @@ -19,7 +19,7 @@ import { isFeatureEnabled, FeatureFlag, t, css } from '@superset-ui/core'; import { Link, useHistory } from 'react-router-dom'; import ConfirmStatusChange from 'src/components/ConfirmStatusChange'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Chart from 'src/types/Chart'; import ListViewCard from 'src/components/ListViewCard'; diff --git a/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx b/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx index e325b08fd38..85a90d60898 100644 --- a/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx +++ b/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx @@ -21,7 +21,7 @@ import { FunctionComponent, useState, useEffect, ChangeEvent } from 'react'; import { css, styled, t, useTheme } from '@superset-ui/core'; import { useSingleViewResource } from 'src/views/CRUD/hooks'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Modal from 'src/components/Modal'; import withToasts from 'src/components/MessageToasts/withToasts'; import { CssEditor } from 'src/components/AsyncAceEditor'; diff --git a/superset-frontend/src/features/dashboards/DashboardCard.tsx b/superset-frontend/src/features/dashboards/DashboardCard.tsx index edfd28f6d09..fb5bae9c111 100644 --- a/superset-frontend/src/features/dashboards/DashboardCard.tsx +++ b/superset-frontend/src/features/dashboards/DashboardCard.tsx @@ -28,7 +28,7 @@ import { CardStyles } from 'src/views/CRUD/utils'; import { Dropdown } from 'src/components/Dropdown'; import { Menu } from 'src/components/Menu'; import ListViewCard from 'src/components/ListViewCard'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { PublishedLabel } from 'src/components/Label'; import FacePile from 'src/components/FacePile'; import FaveStar from 'src/components/FaveStar'; diff --git a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx index 93b9ce7cb3d..c10859993a2 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx @@ -20,7 +20,7 @@ import { useRef, useState } from 'react'; import { SupersetTheme, t } from '@superset-ui/core'; import { Button, AntdSelect } from 'src/components'; import FormLabel from 'src/components/Form/FormLabel'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { DatabaseParameters, FieldPropTypes } from '../../types'; import { infoTooltip, CredentialInfoForm } from '../styles'; diff --git a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/TableCatalog.tsx b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/TableCatalog.tsx index 91b6a63c0bc..cb300543647 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/TableCatalog.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/TableCatalog.tsx @@ -19,7 +19,7 @@ import { css, SupersetTheme, t } from '@superset-ui/core'; import ValidatedInput from 'src/components/Form/LabeledErrorBoundInput'; import FormLabel from 'src/components/Form/FormLabel'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { StyledFooterButton, StyledCatalogTable } from '../styles'; import { CatalogObject, FieldPropTypes } from '../../types'; diff --git a/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx b/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx index 7a4a72ff538..2a1daf4823b 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx @@ -24,7 +24,7 @@ import { Radio } from 'src/components/Radio'; import { Input, TextArea } from 'src/components/Input'; // eslint-disable-next-line no-restricted-imports import { Input as AntdInput, Tooltip } from 'antd'; // TODO: Remove antd -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { DatabaseObject, FieldPropTypes } from '../types'; import { AuthType } from '.'; diff --git a/superset-frontend/src/features/databases/DatabaseModal/index.tsx b/superset-frontend/src/features/databases/DatabaseModal/index.tsx index 055c97ebd96..6efe47bdd26 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/index.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/index.tsx @@ -51,7 +51,7 @@ import withToasts from 'src/components/MessageToasts/withToasts'; import ValidatedInput from 'src/components/Form/LabeledErrorBoundInput'; import ErrorMessageWithStackTrace from 'src/components/ErrorMessage/ErrorMessageWithStackTrace'; import ErrorAlert from 'src/components/ImportModal/ErrorAlert'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { testDatabaseConnection, useSingleViewResource, diff --git a/superset-frontend/src/features/databases/UploadDataModel/index.tsx b/superset-frontend/src/features/databases/UploadDataModel/index.tsx index 39dd14f82d4..55681b5c1b8 100644 --- a/superset-frontend/src/features/databases/UploadDataModel/index.tsx +++ b/superset-frontend/src/features/databases/UploadDataModel/index.tsx @@ -43,7 +43,7 @@ import { Select, Upload, } from 'src/components'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { Input, InputNumber } from 'src/components/Input'; import rison from 'rison'; // eslint-disable-next-line no-restricted-imports diff --git a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.test.tsx b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.test.tsx index 7e5376fcfd6..8e553632761 100644 --- a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.test.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.test.tsx @@ -36,7 +36,7 @@ import { } from './MessageContent'; jest.mock( - 'src/components/Icons/Icon', + 'src/components/Icons/AsyncIcon', () => ({ fileName }: { fileName: string }) => ( diff --git a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx index 103467b629a..f838c86f071 100644 --- a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx @@ -17,7 +17,7 @@ * under the License. */ import { t, styled } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Alert from 'src/components/Alert'; import Table, { ColumnsType, TableSize } from 'src/components/Table'; // @ts-ignore diff --git a/superset-frontend/src/features/datasets/AddDataset/EditDataset/UsageTab/index.tsx b/superset-frontend/src/features/datasets/AddDataset/EditDataset/UsageTab/index.tsx index 289a67f5aa9..32786105b96 100644 --- a/superset-frontend/src/features/datasets/AddDataset/EditDataset/UsageTab/index.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/EditDataset/UsageTab/index.tsx @@ -34,7 +34,7 @@ import Table, { } from 'src/components/Table'; import { EmptyState } from 'src/components/EmptyState'; import ChartImage from 'src/assets/images/chart.svg'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { useToasts } from 'src/components/MessageToasts/withToasts'; import { useListViewResource } from 'src/views/CRUD/hooks'; import { FilterOperator } from 'src/components/ListView'; diff --git a/superset-frontend/src/features/datasets/AddDataset/Header/index.tsx b/superset-frontend/src/features/datasets/AddDataset/Header/index.tsx index b2f8f475aa5..60fc8a22a6c 100644 --- a/superset-frontend/src/features/datasets/AddDataset/Header/index.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/Header/index.tsx @@ -20,7 +20,7 @@ import { Dispatch } from 'react'; import { t } from '@superset-ui/core'; import { PageHeaderWithActions } from 'src/components/PageHeaderWithActions'; import Button from 'src/components/Button'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { Menu } from 'src/components/Menu'; import { TooltipPlacement } from 'src/components/Tooltip'; import { diff --git a/superset-frontend/src/features/home/ActivityTable.tsx b/superset-frontend/src/features/home/ActivityTable.tsx index c6a6d2359a2..5974855e70d 100644 --- a/superset-frontend/src/features/home/ActivityTable.tsx +++ b/superset-frontend/src/features/home/ActivityTable.tsx @@ -30,7 +30,7 @@ import { getEditedObjects, } from 'src/views/CRUD/utils'; import { Chart } from 'src/types/Chart'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import SubMenu from './SubMenu'; import EmptyState from './EmptyState'; import { WelcomeTable, RecentActivity } from './types'; diff --git a/superset-frontend/src/features/home/ChartTable.tsx b/superset-frontend/src/features/home/ChartTable.tsx index 38ec8642594..66222d6755d 100644 --- a/superset-frontend/src/features/home/ChartTable.tsx +++ b/superset-frontend/src/features/home/ChartTable.tsx @@ -44,7 +44,7 @@ import Chart from 'src/types/Chart'; import handleResourceExport from 'src/utils/export'; import Loading from 'src/components/Loading'; import ErrorBoundary from 'src/components/ErrorBoundary'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import EmptyState from './EmptyState'; import { WelcomeTable } from './types'; import SubMenu from './SubMenu'; diff --git a/superset-frontend/src/features/home/DashboardTable.tsx b/superset-frontend/src/features/home/DashboardTable.tsx index 56a65a5cb40..7dfab696524 100644 --- a/superset-frontend/src/features/home/DashboardTable.tsx +++ b/superset-frontend/src/features/home/DashboardTable.tsx @@ -40,7 +40,7 @@ import Loading from 'src/components/Loading'; import DeleteModal from 'src/components/DeleteModal'; import PropertiesModal from 'src/dashboard/components/PropertiesModal'; import DashboardCard from 'src/features/dashboards/DashboardCard'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import EmptyState from './EmptyState'; import SubMenu from './SubMenu'; import { WelcomeTable } from './types'; diff --git a/superset-frontend/src/features/home/LanguagePicker.tsx b/superset-frontend/src/features/home/LanguagePicker.tsx index da181d3821f..90a492062ee 100644 --- a/superset-frontend/src/features/home/LanguagePicker.tsx +++ b/superset-frontend/src/features/home/LanguagePicker.tsx @@ -18,7 +18,7 @@ */ import { MainNav as Menu } from 'src/components/Menu'; import { styled, css, useTheme } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; const { SubMenu } = Menu; export interface Languages { diff --git a/superset-frontend/src/features/home/Menu.tsx b/superset-frontend/src/features/home/Menu.tsx index 4d24fcb4328..3a15f4ff5e8 100644 --- a/superset-frontend/src/features/home/Menu.tsx +++ b/superset-frontend/src/features/home/Menu.tsx @@ -25,7 +25,7 @@ import { MainNav, MenuMode } from 'src/components/Menu'; import { Tooltip } from 'src/components/Tooltip'; import { NavLink, useLocation } from 'react-router-dom'; import { GenericLink } from 'src/components/GenericLink/GenericLink'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { useUiConfig } from 'src/components/UiConfigContext'; import { URL_PARAMS } from 'src/constants'; import { diff --git a/superset-frontend/src/features/home/RightMenu.tsx b/superset-frontend/src/features/home/RightMenu.tsx index d798d037e71..8d35c6a64a7 100644 --- a/superset-frontend/src/features/home/RightMenu.tsx +++ b/superset-frontend/src/features/home/RightMenu.tsx @@ -37,7 +37,7 @@ import { } from '@superset-ui/core'; import { Menu } from 'src/components/Menu'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Label from 'src/components/Label'; import { findPermission } from 'src/utils/findPermission'; import { isUserAdmin } from 'src/dashboard/util/permissionUtils'; diff --git a/superset-frontend/src/features/home/SavedQueries.tsx b/superset-frontend/src/features/home/SavedQueries.tsx index 7258e6d4017..65c34a8bfc4 100644 --- a/superset-frontend/src/features/home/SavedQueries.tsx +++ b/superset-frontend/src/features/home/SavedQueries.tsx @@ -30,7 +30,7 @@ import { Menu } from 'src/components/Menu'; import { copyQueryLink, useListViewResource } from 'src/views/CRUD/hooks'; import ListViewCard from 'src/components/ListViewCard'; import DeleteModal from 'src/components/DeleteModal'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { User } from 'src/types/bootstrapTypes'; import { CardContainer, diff --git a/superset-frontend/src/features/home/SubMenu.tsx b/superset-frontend/src/features/home/SubMenu.tsx index 7f917a14a85..7945e76da9b 100644 --- a/superset-frontend/src/features/home/SubMenu.tsx +++ b/superset-frontend/src/features/home/SubMenu.tsx @@ -26,7 +26,7 @@ import { debounce } from 'lodash'; import { Row } from 'src/components'; import { Menu, MenuMode, MainNav } from 'src/components/Menu'; import Button, { OnClickHandler } from 'src/components/Button'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { MenuObjectProps } from 'src/types/bootstrapTypes'; const StyledHeader = styled.div` diff --git a/superset-frontend/src/features/queries/SyntaxHighlighterCopy.tsx b/superset-frontend/src/features/queries/SyntaxHighlighterCopy.tsx index b144d71c41f..6a019141c14 100644 --- a/superset-frontend/src/features/queries/SyntaxHighlighterCopy.tsx +++ b/superset-frontend/src/features/queries/SyntaxHighlighterCopy.tsx @@ -24,7 +24,7 @@ import markdownSyntax from 'react-syntax-highlighter/dist/cjs/languages/hljs/mar import jsonSyntax from 'react-syntax-highlighter/dist/cjs/languages/hljs/json'; import github from 'react-syntax-highlighter/dist/cjs/styles/hljs/github'; import SyntaxHighlighter from 'react-syntax-highlighter/dist/cjs/light'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { ToastProps } from 'src/components/MessageToasts/withToasts'; import copyTextToClipboard from 'src/utils/copy'; diff --git a/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx b/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx index ad2b2fa8624..2fff224dbc7 100644 --- a/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx +++ b/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx @@ -29,7 +29,7 @@ import { getExtensionsRegistry, usePrevious, } from '@superset-ui/core'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { Switch } from 'src/components/Switch'; import { AlertObject } from 'src/features/alerts/types'; import { Menu } from 'src/components/Menu'; diff --git a/superset-frontend/src/features/reports/ReportModal/index.tsx b/superset-frontend/src/features/reports/ReportModal/index.tsx index aa84619eba5..2d7e6c85fd9 100644 --- a/superset-frontend/src/features/reports/ReportModal/index.tsx +++ b/superset-frontend/src/features/reports/ReportModal/index.tsx @@ -39,7 +39,7 @@ import { import Alert from 'src/components/Alert'; import TimezoneSelector from 'src/components/TimezoneSelector'; import LabeledErrorBoundInput from 'src/components/Form/LabeledErrorBoundInput'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { CronError } from 'src/components/CronPicker'; import { Radio, RadioChangeEvent } from 'src/components/Radio'; import { Input } from 'src/components/Input'; diff --git a/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx b/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx index 6f155afe840..70461fc412a 100644 --- a/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx +++ b/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx @@ -20,7 +20,7 @@ import { css, styled, SupersetClient, useTheme, t } from '@superset-ui/core'; import Modal from 'src/components/Modal'; import { useCallback, useEffect, useMemo, useState } from 'react'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import Select from 'src/components/Select/Select'; import { TextArea } from 'src/components/Input'; import AsyncSelect from 'src/components/Select/AsyncSelect'; diff --git a/superset-frontend/src/features/tags/TagCard.tsx b/superset-frontend/src/features/tags/TagCard.tsx index 0bf1008f464..2da403bc720 100644 --- a/superset-frontend/src/features/tags/TagCard.tsx +++ b/superset-frontend/src/features/tags/TagCard.tsx @@ -23,7 +23,7 @@ import { Dropdown } from 'src/components/Dropdown'; import { Menu } from 'src/components/Menu'; import ConfirmStatusChange from 'src/components/ConfirmStatusChange'; import ListViewCard from 'src/components/ListViewCard'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { Tag } from 'src/views/CRUD/types'; import { deleteTags } from 'src/features/tags/tags'; import { Button } from 'src/components'; diff --git a/superset-frontend/src/pages/AlertReportList/index.tsx b/superset-frontend/src/pages/AlertReportList/index.tsx index c33743fb0c2..2d24444d240 100644 --- a/superset-frontend/src/pages/AlertReportList/index.tsx +++ b/superset-frontend/src/pages/AlertReportList/index.tsx @@ -57,7 +57,7 @@ import AlertReportModal from 'src/features/alerts/AlertReportModal'; import { AlertObject, AlertState } from 'src/features/alerts/types'; import { ModifiedInfo } from 'src/components/AuditInfo'; import { QueryObjectColumns } from 'src/views/CRUD/types'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; const extensionsRegistry = getExtensionsRegistry(); diff --git a/superset-frontend/src/pages/AnnotationLayerList/index.tsx b/superset-frontend/src/pages/AnnotationLayerList/index.tsx index 652dff17632..253d33c0d33 100644 --- a/superset-frontend/src/pages/AnnotationLayerList/index.tsx +++ b/superset-frontend/src/pages/AnnotationLayerList/index.tsx @@ -37,7 +37,7 @@ import AnnotationLayerModal from 'src/features/annotationLayers/AnnotationLayerM import { AnnotationLayerObject } from 'src/features/annotationLayers/types'; import { ModifiedInfo } from 'src/components/AuditInfo'; import { QueryObjectColumns } from 'src/views/CRUD/types'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; const PAGE_SIZE = 25; diff --git a/superset-frontend/src/pages/AnnotationList/index.tsx b/superset-frontend/src/pages/AnnotationList/index.tsx index 171204e9cd0..70a41024f6d 100644 --- a/superset-frontend/src/pages/AnnotationList/index.tsx +++ b/superset-frontend/src/pages/AnnotationList/index.tsx @@ -41,7 +41,7 @@ import { createErrorHandler } from 'src/views/CRUD/utils'; import { AnnotationObject } from 'src/features/annotations/types'; import AnnotationModal from 'src/features/annotations/AnnotationModal'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; const PAGE_SIZE = 25; diff --git a/superset-frontend/src/pages/ChartCreation/index.tsx b/superset-frontend/src/pages/ChartCreation/index.tsx index 17fa9908e13..77e86a3b99c 100644 --- a/superset-frontend/src/pages/ChartCreation/index.tsx +++ b/superset-frontend/src/pages/ChartCreation/index.tsx @@ -45,7 +45,7 @@ import { Dataset, DatasetSelectLabel, } from 'src/features/datasets/DatasetSelectLabel'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; export interface ChartCreationProps extends RouteComponentProps { user: UserWithPermissionsAndRoles; diff --git a/superset-frontend/src/pages/ChartList/index.tsx b/superset-frontend/src/pages/ChartList/index.tsx index b2158b09a2b..197e0a425f2 100644 --- a/superset-frontend/src/pages/ChartList/index.tsx +++ b/superset-frontend/src/pages/ChartList/index.tsx @@ -62,7 +62,7 @@ import ImportModelsModal from 'src/components/ImportModal/index'; import Chart from 'src/types/Chart'; import Tag from 'src/types/TagType'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { nativeFilterGate } from 'src/dashboard/components/nativeFilters/utils'; import InfoTooltip from 'src/components/InfoTooltip'; import CertifiedBadge from 'src/components/CertifiedBadge'; diff --git a/superset-frontend/src/pages/CssTemplateList/index.tsx b/superset-frontend/src/pages/CssTemplateList/index.tsx index e1853ad89ed..13ad661c45c 100644 --- a/superset-frontend/src/pages/CssTemplateList/index.tsx +++ b/superset-frontend/src/pages/CssTemplateList/index.tsx @@ -37,7 +37,7 @@ import CssTemplateModal from 'src/features/cssTemplates/CssTemplateModal'; import { TemplateObject } from 'src/features/cssTemplates/types'; import { ModifiedInfo } from 'src/components/AuditInfo'; import { QueryObjectColumns } from 'src/views/CRUD/types'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; const PAGE_SIZE = 25; diff --git a/superset-frontend/src/pages/DashboardList/index.tsx b/superset-frontend/src/pages/DashboardList/index.tsx index 3543cde0f00..2331dffdfc0 100644 --- a/superset-frontend/src/pages/DashboardList/index.tsx +++ b/superset-frontend/src/pages/DashboardList/index.tsx @@ -52,7 +52,7 @@ import Owner from 'src/types/Owner'; import Tag from 'src/types/TagType'; import withToasts from 'src/components/MessageToasts/withToasts'; import FacePile from 'src/components/FacePile'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import DeleteModal from 'src/components/DeleteModal'; import FaveStar from 'src/components/FaveStar'; import PropertiesModal from 'src/dashboard/components/PropertiesModal'; diff --git a/superset-frontend/src/pages/DatabaseList/index.tsx b/superset-frontend/src/pages/DatabaseList/index.tsx index 3d15141d71f..c1a83dc8f14 100644 --- a/superset-frontend/src/pages/DatabaseList/index.tsx +++ b/superset-frontend/src/pages/DatabaseList/index.tsx @@ -42,7 +42,7 @@ import DeleteModal from 'src/components/DeleteModal'; import { getUrlParam } from 'src/utils/urlUtils'; import { URL_PARAMS } from 'src/constants'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { isUserAdmin } from 'src/dashboard/util/permissionUtils'; import ListView, { FilterOperator, Filters } from 'src/components/ListView'; import handleResourceExport from 'src/utils/export'; diff --git a/superset-frontend/src/pages/DatasetList/index.tsx b/superset-frontend/src/pages/DatasetList/index.tsx index 5ae4bdb5ee6..fbd07fb2364 100644 --- a/superset-frontend/src/pages/DatasetList/index.tsx +++ b/superset-frontend/src/pages/DatasetList/index.tsx @@ -49,7 +49,7 @@ import SubMenu, { SubMenuProps, ButtonProps } from 'src/features/home/SubMenu'; import Owner from 'src/types/Owner'; import withToasts from 'src/components/MessageToasts/withToasts'; import { Tooltip } from 'src/components/Tooltip'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import FacePile from 'src/components/FacePile'; import CertifiedBadge from 'src/components/CertifiedBadge'; import InfoTooltip from 'src/components/InfoTooltip'; diff --git a/superset-frontend/src/pages/QueryHistoryList/index.tsx b/superset-frontend/src/pages/QueryHistoryList/index.tsx index 20d610e27dd..3986291aeaa 100644 --- a/superset-frontend/src/pages/QueryHistoryList/index.tsx +++ b/superset-frontend/src/pages/QueryHistoryList/index.tsx @@ -50,7 +50,7 @@ import github from 'react-syntax-highlighter/dist/cjs/styles/hljs/github'; import { DATETIME_WITH_TIME_ZONE, TIME_WITH_MS } from 'src/constants'; import { QueryObject, QueryObjectColumns } from 'src/views/CRUD/types'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import QueryPreviewModal from 'src/features/queries/QueryPreviewModal'; import { addSuccessToast } from 'src/components/MessageToasts/actions'; import getOwnerName from 'src/utils/getOwnerName'; diff --git a/superset-frontend/src/pages/RowLevelSecurityList/index.tsx b/superset-frontend/src/pages/RowLevelSecurityList/index.tsx index 8a2383772c6..ac08540cf89 100644 --- a/superset-frontend/src/pages/RowLevelSecurityList/index.tsx +++ b/superset-frontend/src/pages/RowLevelSecurityList/index.tsx @@ -19,7 +19,7 @@ import { t, styled, SupersetClient, useTheme, css } from '@superset-ui/core'; import { useMemo, useState } from 'react'; import ConfirmStatusChange from 'src/components/ConfirmStatusChange'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import ListView, { FetchDataConfig, FilterOperator, diff --git a/superset-frontend/src/pages/SavedQueryList/index.tsx b/superset-frontend/src/pages/SavedQueryList/index.tsx index bfae5047210..9a4ca9df7a2 100644 --- a/superset-frontend/src/pages/SavedQueryList/index.tsx +++ b/superset-frontend/src/pages/SavedQueryList/index.tsx @@ -57,7 +57,7 @@ import Tag from 'src/types/TagType'; import ImportModelsModal from 'src/components/ImportModal/index'; import { ModifiedInfo } from 'src/components/AuditInfo'; import { loadTags } from 'src/components/Tags/utils'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { UserWithPermissionsAndRoles } from 'src/types/bootstrapTypes'; import SavedQueryPreviewModal from 'src/features/queries/SavedQueryPreviewModal'; import { findPermission } from 'src/utils/findPermission'; diff --git a/superset-frontend/src/pages/Tags/index.tsx b/superset-frontend/src/pages/Tags/index.tsx index 95e782bd748..448afad88f8 100644 --- a/superset-frontend/src/pages/Tags/index.tsx +++ b/superset-frontend/src/pages/Tags/index.tsx @@ -39,7 +39,7 @@ import ListView, { } from 'src/components/ListView'; import { dangerouslyGetItemDoNotUse } from 'src/utils/localStorageHelpers'; import withToasts from 'src/components/MessageToasts/withToasts'; -import Icons from 'src/components/Icons'; +import { Icons } from 'src/components/Icons'; import { Tooltip } from 'src/components/Tooltip'; import { Link } from 'react-router-dom'; import { deleteTags } from 'src/features/tags/tags';