diff --git a/packages/kbn-search-connectors/types/native_connectors.ts b/packages/kbn-search-connectors/types/native_connectors.ts index c5ef7beab0ba5..96af7ea581e6c 100644 --- a/packages/kbn-search-connectors/types/native_connectors.ts +++ b/packages/kbn-search-connectors/types/native_connectors.ts @@ -107,6 +107,9 @@ const PERSONAL_ACCESS_TOKEN = 'personal_access_token'; const GITHUB_APP = 'github_app'; +const BOX_FREE = 'box_free'; +const BOX_ENTERPRISE = 'box_enterprise'; + export const NATIVE_CONNECTOR_DEFINITIONS: Record = { azure_blob_storage: { configuration: { @@ -246,31 +249,42 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record) => (event: React.MouseEvent) => { @@ -131,6 +119,21 @@ export const PresentationPanelHoverActions = ({ const rightHoverActionsRef = useRef(null); const [combineHoverActions, setCombineHoverActions] = useState(false); + + const { euiTheme } = useEuiTheme(); + + const EDIT_MODE_OUTLINE = `${euiTheme.border.width.thin} dashed ${euiTheme.colors.borderBaseFormsControl}`; + const VIEW_MODE_OUTLINE = `${euiTheme.border.width.thin} solid ${euiTheme.colors.borderBasePlain}`; + + const ALL_ROUNDED_CORNERS = ` + border-radius: ${euiTheme.border.radius.medium}; +`; + const TOP_ROUNDED_CORNERS = ` + border-top-left-radius: ${euiTheme.border.radius.medium}; + border-top-right-radius: ${euiTheme.border.radius.medium}; + border-bottom: 0px; +`; + const [borderStyles, setBorderStyles] = useState(TOP_ROUNDED_CORNERS); const updateCombineHoverActions = () => { @@ -142,11 +145,11 @@ export const PresentationPanelHoverActions = ({ const hoverActionsWidth = (rightHoverActionsRef.current?.offsetWidth ?? 0) + (dragHandleRef.current?.offsetWidth ?? 0) + - parseInt(euiThemeVars.euiSize, 10) * 2; + parseInt(euiTheme.size.base, 10) * 2; const hoverActionsHeight = rightHoverActionsRef.current?.offsetHeight ?? 0; // Left align hover actions when they would get cut off by the right edge of the window - if (anchorLeft - (hoverActionsWidth - anchorWidth) <= parseInt(euiThemeVars.euiSize, 10)) { + if (anchorLeft - (hoverActionsWidth - anchorWidth) <= parseInt(euiTheme.size.base, 10)) { dragHandleRef.current?.style.removeProperty('right'); dragHandleRef.current?.style.setProperty('left', '0'); } else { @@ -164,9 +167,9 @@ export const PresentationPanelHoverActions = ({ if (willGetCutOff) { hoverActionsRef.current.style.setProperty('position', 'absolute'); - hoverActionsRef.current.style.setProperty('top', `-${euiThemeVars.euiSizeS}`); + hoverActionsRef.current.style.setProperty('top', `-${euiTheme.size.s}`); } else if (shouldCombine) { - hoverActionsRef.current.style.setProperty('top', `-${euiThemeVars.euiSizeL}`); + hoverActionsRef.current.style.setProperty('top', `-${euiTheme.size.l}`); } else { hoverActionsRef.current.style.removeProperty('position'); hoverActionsRef.current.style.removeProperty('top'); @@ -396,7 +399,7 @@ export const PresentationPanelHoverActions = ({ notification.execute({ embeddable: api, trigger: panelNotificationTrigger }) } @@ -422,7 +425,7 @@ export const PresentationPanelHoverActions = ({ return notificationComponent; }); - }, [api, notifications, showNotifications]); + }, [api, euiTheme.size.xs, notifications, showNotifications]); const contextMenuClasses = classNames({ // eslint-disable-next-line @typescript-eslint/naming-convention @@ -463,12 +466,12 @@ export const PresentationPanelHoverActions = ({ })} data-test-subj="embeddablePanelDragHandle" css={css` - margin: ${euiThemeVars.euiSizeXS}; + margin: ${euiTheme.size.xs}; `} /> ), - [setDragHandle] + [setDragHandle, euiTheme.size.xs] ); const hasHoverActions = quickActionElements.length || contextMenuPanels.lastIndexOf.length; @@ -487,26 +490,26 @@ export const PresentationPanelHoverActions = ({ '' )}`} css={css` - border-radius: ${euiThemeVars.euiBorderRadius}; + border-radius: ${euiTheme.border.radius.medium}; position: relative; height: 100%; .embPanel { ${showBorder ? ` - outline: ${viewMode === 'edit' ? DASHED_OUTLINE : SOLID_OUTLINE}; + outline: ${viewMode === 'edit' ? EDIT_MODE_OUTLINE : VIEW_MODE_OUTLINE}; ` : ''} } .embPanel__hoverActions { opacity: 0; - padding: calc(${euiThemeVars.euiSizeXS} - 1px); + padding: calc(${euiTheme.size.xs} - 1px); display: flex; flex-wrap: nowrap; - background-color: ${euiThemeVars.euiColorEmptyShade}; - height: ${euiThemeVars.euiSizeXL}; + background-color: ${euiTheme.colors.backgroundBasePlain}; + height: ${euiTheme.size.xl}; pointer-events: all; // Re-enable pointer-events for hover actions } @@ -515,12 +518,12 @@ export const PresentationPanelHoverActions = ({ &:focus-within, &.embPanel__hoverActionsAnchor--lockHoverActions { .embPanel { - outline: ${viewMode === 'edit' ? DASHED_OUTLINE : SOLID_OUTLINE}; - z-index: ${euiThemeVars.euiZLevel2}; + outline: ${viewMode === 'edit' ? EDIT_MODE_OUTLINE : VIEW_MODE_OUTLINE}; + z-index: ${euiTheme.levels.menu}; } .embPanel__hoverActionsWrapper { - z-index: ${euiThemeVars.euiZLevel9}; - top: -${euiThemeVars.euiSizeXL}; + z-index: ${euiTheme.levels.toast}; + top: -${euiTheme.size.xl}; .embPanel__hoverActions { opacity: 1; @@ -535,12 +538,12 @@ export const PresentationPanelHoverActions = ({ ref={hoverActionsRef} className="embPanel__hoverActionsWrapper" css={css` - height: ${euiThemeVars.euiSizeXL}; + height: ${euiTheme.size.xl}; position: absolute; top: 0; display: flex; justify-content: space-between; - padding: 0 ${euiThemeVars.euiSize}; + padding: 0 ${euiTheme.size.base}; flex-wrap: nowrap; min-width: 100%; z-index: -1; @@ -556,7 +559,7 @@ export const PresentationPanelHoverActions = ({ className )} css={css` - border: ${viewMode === 'edit' ? DASHED_OUTLINE : SOLID_OUTLINE}; + border: ${viewMode === 'edit' ? EDIT_MODE_OUTLINE : VIEW_MODE_OUTLINE}; ${borderStyles} `} > @@ -575,7 +578,7 @@ export const PresentationPanelHoverActions = ({ className )} css={css` - border: ${viewMode === 'edit' ? DASHED_OUTLINE : SOLID_OUTLINE}; + border: ${viewMode === 'edit' ? EDIT_MODE_OUTLINE : VIEW_MODE_OUTLINE}; ${borderStyles} `} > diff --git a/src/plugins/presentation_panel/public/panel_component/panel_header/use_presentation_panel_header_actions.tsx b/src/plugins/presentation_panel/public/panel_component/panel_header/use_presentation_panel_header_actions.tsx index 795fd6b566a9b..062cc4d1b58a4 100644 --- a/src/plugins/presentation_panel/public/panel_component/panel_header/use_presentation_panel_header_actions.tsx +++ b/src/plugins/presentation_panel/public/panel_component/panel_header/use_presentation_panel_header_actions.tsx @@ -7,8 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import { EuiBadge, EuiNotificationBadge, EuiToolTip } from '@elastic/eui'; -import { euiThemeVars } from '@kbn/ui-theme'; +import { EuiBadge, EuiNotificationBadge, EuiToolTip, useEuiTheme } from '@elastic/eui'; import React, { useEffect, useMemo, useState } from 'react'; import { Subscription } from 'rxjs'; @@ -35,6 +34,8 @@ export const usePresentationPanelHeaderActions = < const [badges, setBadges] = useState([]); const [notifications, setNotifications] = useState([]); + const { euiTheme } = useEuiTheme(); + /** * Get all actions once on mount of the panel. Any actions that are Frequent Compatibility * Change Actions need to be subscribed to so they can change over the lifetime of this panel. @@ -167,7 +168,7 @@ export const usePresentationPanelHeaderActions = < notification.execute({ embeddable: api, trigger: panelNotificationTrigger }) } @@ -193,7 +194,7 @@ export const usePresentationPanelHeaderActions = < return notificationComponent; }); - }, [api, notifications, showNotifications]); + }, [api, euiTheme.size.xs, notifications, showNotifications]); return { badgeElements, notificationElements }; }; diff --git a/src/plugins/presentation_panel/public/panel_component/presentation_panel.tsx b/src/plugins/presentation_panel/public/panel_component/presentation_panel.tsx index 3f509ebdc0a6c..5de70f3a9b4cf 100644 --- a/src/plugins/presentation_panel/public/panel_component/presentation_panel.tsx +++ b/src/plugins/presentation_panel/public/panel_component/presentation_panel.tsx @@ -9,13 +9,12 @@ import './_presentation_panel.scss'; -import { EuiErrorBoundary, EuiFlexGroup } from '@elastic/eui'; +import { EuiErrorBoundary, EuiFlexGroup, useEuiTheme } from '@elastic/eui'; import { PanelLoader } from '@kbn/panel-loader'; import { isPromise } from '@kbn/std'; import React from 'react'; import useAsync from 'react-use/lib/useAsync'; import { css } from '@emotion/react'; -import { euiThemeVars } from '@kbn/ui-theme'; import { untilPluginStartServicesReady } from '../kibana_services'; import { PresentationPanelError } from './presentation_panel_error'; import { DefaultPresentationPanelApi, PresentationPanelProps } from './types'; @@ -30,6 +29,7 @@ export const PresentationPanel = < } ) => { const { Component, hidePanelChrome, ...passThroughProps } = props; + const { euiTheme } = useEuiTheme(); const { loading, value, error } = useAsync(async () => { if (hidePanelChrome) { return { @@ -58,7 +58,7 @@ export const PresentationPanel = < showShadow={props.showShadow} showBorder={props.showBorder} css={css` - border-radius: ${euiThemeVars.euiBorderRadius}; + border-radius: ${euiTheme.border.radius.medium}; `} dataTestSubj="embed dablePanelLoadingIndicator" diff --git a/src/plugins/presentation_panel/tsconfig.json b/src/plugins/presentation_panel/tsconfig.json index 255e4fd4eccde..eb600c8e3e0cc 100644 --- a/src/plugins/presentation_panel/tsconfig.json +++ b/src/plugins/presentation_panel/tsconfig.json @@ -18,7 +18,6 @@ "@kbn/unified-search-plugin", "@kbn/inspector-plugin", "@kbn/std", - "@kbn/ui-theme", "@kbn/expressions-plugin", "@kbn/utility-types", "@kbn/content-management-plugin", diff --git a/src/plugins/visualizations/public/legacy/embeddable/visualize_embeddable.tsx b/src/plugins/visualizations/public/legacy/embeddable/visualize_embeddable.tsx index 3ef1947dc5d3d..02f816a5983ba 100644 --- a/src/plugins/visualizations/public/legacy/embeddable/visualize_embeddable.tsx +++ b/src/plugins/visualizations/public/legacy/embeddable/visualize_embeddable.tsx @@ -21,8 +21,8 @@ import { TimefilterContract } from '@kbn/data-plugin/public'; import type { DataView } from '@kbn/data-views-plugin/public'; import { Warnings } from '@kbn/charts-plugin/public'; import { hasUnsupportedDownsampledAggregationFailure } from '@kbn/search-response-warnings'; +import { Adapters } from '@kbn/inspector-plugin/public'; import { - Adapters, Embeddable, EmbeddableInput, EmbeddableOutput, diff --git a/x-pack/platform/plugins/private/translations/translations/fr-FR.json b/x-pack/platform/plugins/private/translations/translations/fr-FR.json index 69d2c6e81b4aa..16a3d2d2071c4 100644 --- a/x-pack/platform/plugins/private/translations/translations/fr-FR.json +++ b/x-pack/platform/plugins/private/translations/translations/fr-FR.json @@ -6941,15 +6941,8 @@ "searchConnectors.nativeConnectors.azureBlobStorage.blobEndpointLabel": "Point de terminaison Blob", "searchConnectors.nativeConnectors.azureBlobStorage.containerNameLabel": "Liste des conteneurs", "searchConnectors.nativeConnectors.azureBlobStorage.name": "Stockage Blob Azure", - "searchConnectors.nativeConnectors.box.appKeyLabel": "Clé d’application", - "searchConnectors.nativeConnectors.box.appSecretLabel": "Secret d’application", - "searchConnectors.nativeConnectors.box.includeInheritedUsersLabel": "Inclure les groupes et les utilisateurs hérités", - "searchConnectors.nativeConnectors.box.includeInheritedUsersTooltip": "Incluez les groupes et les utilisateurs hérités lors de l'indexation des autorisations. L'activation de ce champ configurable entraînera une dégradation significative des performances.", "searchConnectors.nativeConnectors.box.name": "Box", - "searchConnectors.nativeConnectors.box.pathLabel": "Chemin permettant de récupérer les fichiers/dossiers", - "searchConnectors.nativeConnectors.box.pathTooltip": "Le chemin est ignoré lorsque des règles de synchronisation avancées sont appliquées.", "searchConnectors.nativeConnectors.box.refreshTokenLabel": "Token d'actualisation", - "searchConnectors.nativeConnectors.boxTooltip.name": "Box", "searchConnectors.nativeConnectors.confluence.indexLabelsLabel": "Activer les étiquettes d'indexation", "searchConnectors.nativeConnectors.confluence.indexLabelsTooltip": "Activer cette option augmentera le nombre d'appels réseau vers la source et peut diminuer les performances", "searchConnectors.nativeConnectors.confluence.name": "Confluence", diff --git a/x-pack/platform/plugins/private/translations/translations/ja-JP.json b/x-pack/platform/plugins/private/translations/translations/ja-JP.json index 869a312c8b5e6..80eaefdc765a9 100644 --- a/x-pack/platform/plugins/private/translations/translations/ja-JP.json +++ b/x-pack/platform/plugins/private/translations/translations/ja-JP.json @@ -6820,15 +6820,8 @@ "searchConnectors.nativeConnectors.azureBlobStorage.blobEndpointLabel": "Blobエンドポイント", "searchConnectors.nativeConnectors.azureBlobStorage.containerNameLabel": "コンテナーのリスト", "searchConnectors.nativeConnectors.azureBlobStorage.name": "Azure Blob Storage", - "searchConnectors.nativeConnectors.box.appKeyLabel": "アプリキー", - "searchConnectors.nativeConnectors.box.appSecretLabel": "アプリシークレット", - "searchConnectors.nativeConnectors.box.includeInheritedUsersLabel": "グループと継承されたユーザーを含める", - "searchConnectors.nativeConnectors.box.includeInheritedUsersTooltip": "権限をインデックス化するときに、グループと検証されたユーザーを含めます。この構成可能なフィールドを有効化すると、重大なパフォーマンスの劣化が発生します。", "searchConnectors.nativeConnectors.box.name": "Box", - "searchConnectors.nativeConnectors.box.pathLabel": "ファイル/フォルダーを取得するためのパス", - "searchConnectors.nativeConnectors.box.pathTooltip": "詳細同期ルールが使用されている場合、パスは無視されます。", "searchConnectors.nativeConnectors.box.refreshTokenLabel": "トークンの更新", - "searchConnectors.nativeConnectors.boxTooltip.name": "Box", "searchConnectors.nativeConnectors.confluence.indexLabelsLabel": "ラベルのインデックス化を有効化", "searchConnectors.nativeConnectors.confluence.indexLabelsTooltip": "これを有効化すると、ソースに対するネットワーク呼び出しの回数が増え、パフォーマンスが低下する可能性があります", "searchConnectors.nativeConnectors.confluence.name": "Confluence", diff --git a/x-pack/platform/plugins/private/translations/translations/zh-CN.json b/x-pack/platform/plugins/private/translations/translations/zh-CN.json index 6aa6ced5cbc4d..b76799b380d54 100644 --- a/x-pack/platform/plugins/private/translations/translations/zh-CN.json +++ b/x-pack/platform/plugins/private/translations/translations/zh-CN.json @@ -6703,15 +6703,8 @@ "searchConnectors.nativeConnectors.azureBlobStorage.blobEndpointLabel": "Blob 终端", "searchConnectors.nativeConnectors.azureBlobStorage.containerNameLabel": "容器列表", "searchConnectors.nativeConnectors.azureBlobStorage.name": "Azure Blob 存储", - "searchConnectors.nativeConnectors.box.appKeyLabel": "应用密钥", - "searchConnectors.nativeConnectors.box.appSecretLabel": "应用机密", - "searchConnectors.nativeConnectors.box.includeInheritedUsersLabel": "包括组和继承的用户", - "searchConnectors.nativeConnectors.box.includeInheritedUsersTooltip": "在索引权限时包括组和继承的用户。启用这个可配置字段会导致性能大幅降级。", "searchConnectors.nativeConnectors.box.name": "Box", - "searchConnectors.nativeConnectors.box.pathLabel": "用于提取文件/文件夹的路径", - "searchConnectors.nativeConnectors.box.pathTooltip": "使用高级同步规则时,将忽略路径。", "searchConnectors.nativeConnectors.box.refreshTokenLabel": "刷新令牌", - "searchConnectors.nativeConnectors.boxTooltip.name": "Box", "searchConnectors.nativeConnectors.confluence.indexLabelsLabel": "启用索引标签", "searchConnectors.nativeConnectors.confluence.indexLabelsTooltip": "启用此项将增加对源的网络调用的数量,并可能会降低性能", "searchConnectors.nativeConnectors.confluence.name": "Confluence", diff --git a/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx b/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx index 94c993c6aeff4..22ba9698ab8d7 100644 --- a/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx +++ b/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx @@ -15,7 +15,7 @@ import { KibanaExecutionContext, ScopedHistory, } from '@kbn/core/public'; -import { Adapters } from '@kbn/embeddable-plugin/public'; +import { Adapters } from '@kbn/inspector-plugin/public'; import { Subscription } from 'rxjs'; import { type Filter, FilterStateStore, type Query, type TimeRange } from '@kbn/es-query'; import type { DataViewSpec } from '@kbn/data-views-plugin/public';