@odigos/ui-kit 0.0.79 → 0.0.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.80](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.79...ui-kit-v0.0.80) (2025-08-10)
4
+
5
+
6
+ ### Features
7
+
8
+ * align no-data to center ([#315](https://github.com/odigos-io/ui-kit/issues/315)) ([158e3f8](https://github.com/odigos-io/ui-kit/commit/158e3f831a1edc1d8ca6547c1901cf639db0314c))
9
+ * enhance tooltip rendering to support strong text formatting ([#305](https://github.com/odigos-io/ui-kit/issues/305)) ([f6e0e20](https://github.com/odigos-io/ui-kit/commit/f6e0e20120dbdaef3ce98d1471e0c18d2a8fe273))
10
+ * **search:** integrate search results into action, destination, instrumentation rule, and source tables ([#314](https://github.com/odigos-io/ui-kit/issues/314)) ([c3d6f8c](https://github.com/odigos-io/ui-kit/commit/c3d6f8c93afcc74dd87aef31ca533799325de9e7))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **search:** state management for search input and results display ([#308](https://github.com/odigos-io/ui-kit/issues/308)) ([68a9006](https://github.com/odigos-io/ui-kit/commit/68a9006a9c9346904f071bff9f54167f22176d0a))
16
+ * **source-drawer:** prevent fetching source if already fetched and reset state on delete/update ([#307](https://github.com/odigos-io/ui-kit/issues/307)) ([094d791](https://github.com/odigos-io/ui-kit/commit/094d79170a8a6b717e7837ab20fb306655c8e921))
17
+
3
18
  ## [0.0.79](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.78...ui-kit-v0.0.79) (2025-08-06)
4
19
 
5
20
 
@@ -11,12 +11,14 @@ export declare const FlexColumn: import("styled-components/dist/types").IStyledC
11
11
  $justifyContent?: CSSProperties["justifyContent"];
12
12
  $wrap?: CSSProperties["flexWrap"];
13
13
  }>> & string;
14
- export declare const CenterThis: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$gap" | "$alignItems" | "$justifyContent" | "$wrap"> & {
14
+ export declare const CenterThis: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$gap" | "$alignItems" | "$justifyContent" | "$wrap"> & {
15
15
  $gap?: number;
16
16
  $alignItems?: CSSProperties["alignItems"];
17
17
  $justifyContent?: CSSProperties["justifyContent"];
18
18
  $wrap?: CSSProperties["flexWrap"];
19
- }, never>> & string;
19
+ }, {
20
+ $height?: CSSProperties["height"];
21
+ }>> & string;
20
22
  export declare const VerticalScroll: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
21
23
  export declare const Overlay: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
22
24
  export declare const ModalBody: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
@@ -1,4 +1,5 @@
1
1
  import { type DetailedHTMLProps, type FC, type HTMLAttributes, type ReactNode } from 'react';
2
+ import { DefaultTheme } from 'styled-components';
2
3
  interface TextProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
3
4
  children?: ReactNode;
4
5
  color?: string;
@@ -9,5 +10,15 @@ interface TextProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HT
9
10
  opacity?: number;
10
11
  decoration?: string;
11
12
  }
13
+ declare const getLinksFromText: (text: string) => {
14
+ original: string;
15
+ href: string;
16
+ label: string;
17
+ }[] | undefined;
18
+ declare const getStrongsFromText: (text: string) => {
19
+ original: string;
20
+ label: string;
21
+ }[] | undefined;
22
+ declare const renderText: (text: string, theme: DefaultTheme) => ReactNode;
12
23
  declare const Text: FC<TextProps>;
13
- export { Text, type TextProps };
24
+ export { Text, type TextProps, getLinksFromText, getStrongsFromText, renderText };
package/lib/components.js CHANGED
@@ -1,6 +1,6 @@
1
- import { B as Button } from './index-b674f184.js';
2
- export { A as AutocompleteInput, a as Badge, a6 as CenterThis, C as Checkbox, b as Code, c as ConditionDetails, D as DataCard, e as DataCardFieldTypes, d as DataCardFields, f as DataFinger, g as DataTab, h as DescribeRow, i as Divider, j as DocsButton, k as Drawer, m as DrawerFooter, l as DrawerHeader, n as Dropdown, E as ExtendArrow, F as FadeLoader, o as FieldError, p as FieldLabel, a5 as FlexColumn, a4 as FlexRow, H as Header, I as IconButton, q as IconGroup, r as IconTitleBadge, s as IconWrapped, t as IconsNav, u as ImageControlled, v as Input, w as InputList, x as InputTable, y as InteractiveTable, K as KeyValueInputsList, M as Modal, a9 as ModalBody, z as MonitorsCheckboxes, G as MonitorsIcons, N as NavigationButtons, J as NoDataFound, L as NotificationNote, a8 as Overlay, P as Popup, O as PopupForm, S as ScrollX, Q as SectionTitle, R as Segment, U as SelectionButton, V as SkeletonLoader, W as Status, X as Stepper, Y as TabList, aa as TableContainer, ab as TableTitleWrap, ac as TableWrap, Z as Tag, _ as Text, $ as TextArea, a0 as Toggle, T as ToggleCodeComponent, a1 as Tooltip, a2 as TraceLoader, a7 as VerticalScroll, a3 as WarningModal } from './index-b674f184.js';
3
- export { C as CancelWarning, D as DeleteWarning } from './index-845f2100.js';
1
+ import { B as Button } from './index-192794e8.js';
2
+ export { A as AutocompleteInput, a as Badge, a9 as CenterThis, C as Checkbox, b as Code, c as ConditionDetails, D as DataCard, e as DataCardFieldTypes, d as DataCardFields, f as DataFinger, g as DataTab, h as DescribeRow, i as Divider, j as DocsButton, k as Drawer, m as DrawerFooter, l as DrawerHeader, n as Dropdown, E as ExtendArrow, F as FadeLoader, o as FieldError, p as FieldLabel, a8 as FlexColumn, a7 as FlexRow, H as Header, I as IconButton, q as IconGroup, r as IconTitleBadge, s as IconWrapped, t as IconsNav, u as ImageControlled, v as Input, w as InputList, x as InputTable, y as InteractiveTable, K as KeyValueInputsList, M as Modal, ac as ModalBody, z as MonitorsCheckboxes, G as MonitorsIcons, N as NavigationButtons, J as NoDataFound, L as NotificationNote, ab as Overlay, P as Popup, O as PopupForm, S as ScrollX, Q as SectionTitle, R as Segment, U as SelectionButton, V as SkeletonLoader, W as Status, X as Stepper, Y as TabList, ad as TableContainer, ae as TableTitleWrap, af as TableWrap, Z as Tag, _ as Text, a2 as TextArea, a3 as Toggle, T as ToggleCodeComponent, a4 as Tooltip, a5 as TraceLoader, aa as VerticalScroll, a6 as WarningModal, $ as getLinksFromText, a0 as getStrongsFromText, a1 as renderText } from './index-192794e8.js';
3
+ export { C as CancelWarning, D as DeleteWarning } from './index-e4e75973.js';
4
4
  import React, { createContext, Component, createElement } from 'react';
5
5
  import { T as Theme } from './index-90ccd949.js';
6
6
  import 'styled-components';
@@ -3,6 +3,7 @@ import { EntityTypes } from '@/types';
3
3
  import { DataStreamSelectProps } from './data-stream-select';
4
4
  interface DataFlowActionsMenuProps extends DataStreamSelectProps {
5
5
  addEntity?: EntityTypes;
6
+ preventSearchPopup?: boolean;
6
7
  }
7
8
  declare const DataFlowActionsMenu: React.FC<DataFlowActionsMenuProps>;
8
9
  export { DataFlowActionsMenu, type DataFlowActionsMenuProps };
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
- type SearchProps = object;
2
+ interface SearchProps {
3
+ preventPopup?: boolean;
4
+ }
3
5
  export declare const Search: React.FC<SearchProps>;
4
6
  export {};
@@ -16,7 +16,7 @@ export declare const buildSearchResults: ({ instrumentationRules, sources, actio
16
16
  entities: InstrumentationRule[] | Source[] | Action[] | Destination[];
17
17
  }[];
18
18
  searchResults: {
19
- entities: Source[] | Destination[] | Action[] | InstrumentationRule[];
19
+ entities: Action[] | Destination[] | Source[] | InstrumentationRule[];
20
20
  category: Category;
21
21
  label: string;
22
22
  count: number;
@@ -1,6 +1,5 @@
1
1
  import { type FC } from 'react';
2
2
  interface Props {
3
- searchText: string;
4
3
  onClose: () => void;
5
4
  }
6
5
  export declare const SearchResults: FC<Props>;
package/lib/containers.js CHANGED
@@ -2,14 +2,14 @@ import React, { useState, useEffect, forwardRef, useRef, useImperativeHandle, us
2
2
  import styled, { css } from 'styled-components';
3
3
  import { b as DISPLAY_TITLES, T as Theme, U as usePendingStore, V as useNotificationStore, O as useDrawerStore, B as BUTTON_TEXTS, W as useEntityStore, A as ACTION_OPTIONS, g as getActionIcon, z as useModalStore, F as FORM_ALERTS, X as useFilterStore, D as DISPLAY_LANGUAGES, M as MONITORS_OPTIONS, d as getInstrumentationRuleIcon, Y as useDataStreamStore, Z as useInstrumentStore, c as getEntityId, S as STORAGE_KEYS, a as DEFAULT_DATA_STREAM_NAME, _ as useSetupStore, e as getProgrammingLanguageIcon, I as INSTRUMENTATION_RULE_OPTIONS, $ as useSelectedStore, j as ImageErrorIcon, a0 as useDarkMode } from './index-90ccd949.js';
4
4
  import { ActionType, ActionKeyTypes, InputTypes, FieldTypes, EntityTypes, StatusType, Crud, OtherStatus, NodeTypes, EdgeTypes, AddNodeTypes, SignalType, HeadersCollectionKeyTypes, CustomInstrumentationsKeyTypes, CodeAttributesKeyTypes, PayloadCollectionKeyTypes, InstrumentationRuleType, K8sResourceKind, ProgrammingLanguages, MountMethod, AgentEnvVarsInjectionMethod, Profile, InstallationMethod } from './types.js';
5
- import { e as DataCardFieldTypes, p as FieldLabel, C as Checkbox, o as FieldError, v as Input, x as InputTable, K as KeyValueInputsList, w as InputList, _ as Text, R as Segment, Q as SectionTitle, j as DocsButton, z as MonitorsCheckboxes, $ as TextArea, k as Drawer, c as ConditionDetails, D as DataCard, a5 as FlexColumn, M as Modal, N as NavigationButtons, a9 as ModalBody, L as NotificationNote, A as AutocompleteInput, i as Divider, W as Status, a4 as FlexRow, a1 as Tooltip, s as IconWrapped, G as MonitorsIcons, aa as TableContainer, ab as TableTitleWrap, r as IconTitleBadge, ac as TableWrap, y as InteractiveTable, a6 as CenterThis, J as NoDataFound, a2 as TraceLoader, a as Badge, E as ExtendArrow, a7 as VerticalScroll, U as SelectionButton, B as Button, n as Dropdown, ad as nodeConfig, ae as useNodesState, af as useEdgesState, ag as Flow, ah as applyNodeChanges, P as Popup, a0 as Toggle, I as IconButton, ai as AddButton, F as FadeLoader, g as DataTab, X as Stepper, d as DataCardFields, Z as Tag, aj as MarkerType, t as IconsNav, ak as CopyText, h as DescribeRow, al as PodContainer, am as SourceContainer, q as IconGroup, O as PopupForm } from './index-b674f184.js';
5
+ import { e as DataCardFieldTypes, p as FieldLabel, C as Checkbox, o as FieldError, v as Input, x as InputTable, K as KeyValueInputsList, w as InputList, _ as Text, R as Segment, Q as SectionTitle, j as DocsButton, z as MonitorsCheckboxes, a2 as TextArea, k as Drawer, c as ConditionDetails, D as DataCard, a8 as FlexColumn, M as Modal, N as NavigationButtons, ac as ModalBody, L as NotificationNote, A as AutocompleteInput, i as Divider, W as Status, a7 as FlexRow, a4 as Tooltip, s as IconWrapped, G as MonitorsIcons, ad as TableContainer, ae as TableTitleWrap, r as IconTitleBadge, af as TableWrap, y as InteractiveTable, a9 as CenterThis, J as NoDataFound, a5 as TraceLoader, a as Badge, E as ExtendArrow, aa as VerticalScroll, U as SelectionButton, B as Button, n as Dropdown, ag as nodeConfig, ah as useNodesState, ai as useEdgesState, aj as Flow, ak as applyNodeChanges, P as Popup, a3 as Toggle, I as IconButton, al as AddButton, F as FadeLoader, g as DataTab, X as Stepper, d as DataCardFields, Z as Tag, am as MarkerType, t as IconsNav, an as CopyText, h as DescribeRow, ao as PodContainer, ap as SourceContainer, q as IconGroup, O as PopupForm } from './index-192794e8.js';
6
6
  import { i as isEmpty, s as safeJsonParse, d as deepClone } from './index-5e5f7bda.js';
7
7
  import { C as CheckCircledIcon, O as OdigosLogo } from './index-6034549d.js';
8
8
  import { C as CrossCircledIcon, O as OdigosLogoText, a as OverviewIcon, F as FilterIcon, D as DataStreamsIcon, A as ArrowIcon, R as RefreshLeftArrowIcon, N as NotificationIcon, U as UserIcon, S as SlackLogo, K as KeyIcon, T as TerminalIcon, G as GearIcon } from './index-c8aab9c4.js';
9
9
  import { useActionFormData, useSessionStorage, useDataStreamFormData, useDestinationFormData, useClickNotification, useSourceFormData, useSourceSelectionFormData } from './hooks.js';
10
10
  import { u as useKeyDown, a as useOnClickOutside, b as useContainerSize, c as useClickNode, d as usePopup, e as useInstrumentationRuleFormData, f as useTransition, g as useTimeAgo, h as useCopy, i as useGenericForm } from './useTransition-807be8bc.js';
11
11
  import { E as EditIcon, T as TrashIcon, S as SearchIcon, h as CheckIcon, P as PlusIcon, a as CopyIcon } from './index-19b8f8bc.js';
12
- import { D as DeleteWarning, C as CancelWarning } from './index-845f2100.js';
12
+ import { D as DeleteWarning, C as CancelWarning } from './index-e4e75973.js';
13
13
  import { g as getConditionsBooleans, m as mapConditions, b as getStatusIcon, h as splitCamelString, c as capitalizeFirstLetter, i as isStringABoolean, p as parseBooleanFromString } from './index-a067d6e9.js';
14
14
  import { f as filterActions, l as getEntityLabel, k as getEntityIcon, v as sleep, n as getPlatformIcon, o as getPlatformLabel, g as formatBytes, i as getContainersIcons, p as getValueForRange, j as getDestinationIcon, e as filterSourcesByStream, d as filterSources, b as filterDestinationsByStream, a as filterDestinations, u as mapDestinationFieldsForDisplay, c as compareCondition, r as getYamlFieldsForDestination, m as getMetricForEntity, q as getWorkloadId, s as hasUnhealthyInstances, h as getContainersInstrumentedCount, t as isOverTime } from './index-ba4f9a19.js';
15
15
  import { m as mapExportedSignals } from './index-6a6bea6e.js';
@@ -875,6 +875,64 @@ const ConditionsStatuses = ({ conditions, id }) => {
875
875
  })));
876
876
  };
877
877
 
878
+ const buildSearchResults = ({ instrumentationRules, sources, actions, destinations, searchText, selectedCategory }) => {
879
+ const filteredRules = !searchText ? instrumentationRules : instrumentationRules.filter((rule) => rule.type?.toLowerCase().includes(searchText) || rule.ruleName?.toLowerCase().includes(searchText));
880
+ const filteredSources = !searchText
881
+ ? sources
882
+ : sources.filter((source) => source.name?.toLowerCase().includes(searchText) || source.otelServiceName?.toLowerCase().includes(searchText) || source.namespace?.toLowerCase().includes(searchText));
883
+ const filteredActions = !searchText ? actions : actions.filter((action) => action.type?.toLowerCase().includes(searchText) || action.spec.actionName?.toLowerCase().includes(searchText));
884
+ const filteredDestinations = !searchText
885
+ ? destinations
886
+ : destinations.filter((destination) => destination.destinationType.displayName?.toLowerCase().includes(searchText) || destination.name?.toLowerCase().includes(searchText));
887
+ const categories = [
888
+ {
889
+ category: EntityTypes.Source,
890
+ label: 'Sources',
891
+ count: filteredSources.length,
892
+ entities: [],
893
+ },
894
+ {
895
+ category: EntityTypes.Action,
896
+ label: 'Actions',
897
+ count: filteredActions.length,
898
+ entities: [],
899
+ },
900
+ {
901
+ category: EntityTypes.Destination,
902
+ label: 'Destinations',
903
+ count: filteredDestinations.length,
904
+ entities: [],
905
+ },
906
+ {
907
+ category: EntityTypes.InstrumentationRule,
908
+ label: 'Instrumentation Rules',
909
+ count: filteredRules.length,
910
+ entities: [],
911
+ },
912
+ ];
913
+ categories.unshift({
914
+ category: 'all',
915
+ label: 'All',
916
+ count: filteredRules.length + filteredSources.length + filteredActions.length + filteredDestinations.length,
917
+ entities: [],
918
+ });
919
+ const searchResults = categories
920
+ .filter(({ count, category }) => !!count && category !== 'all' && ['all', category].includes(selectedCategory))
921
+ .map((item) => ({
922
+ ...item,
923
+ entities: item.category === EntityTypes.InstrumentationRule
924
+ ? filteredRules
925
+ : item.category === EntityTypes.Source
926
+ ? filteredSources
927
+ : item.category === EntityTypes.Action
928
+ ? filteredActions
929
+ : item.category === EntityTypes.Destination
930
+ ? filteredDestinations
931
+ : [],
932
+ }));
933
+ return { categories, searchResults };
934
+ };
935
+
878
936
  const columns$3 = [
879
937
  { key: 'icon', title: '' },
880
938
  { key: 'name', title: DISPLAY_TITLES.NAME, sortable: true },
@@ -890,7 +948,14 @@ const ActionTable = ({ maxHeight, maxWidth }) => {
890
948
  const filters = useFilterStore();
891
949
  const { actions, actionsLoading } = useEntityStore();
892
950
  const { setDrawerType, setDrawerEntityId } = useDrawerStore();
893
- const filtered = useMemo(() => filterActions(actions, filters), [actions, filters]);
951
+ const filtered = useMemo(() => (buildSearchResults({
952
+ instrumentationRules: [],
953
+ sources: [],
954
+ actions: filterActions(actions, filters),
955
+ destinations: [],
956
+ searchText: filters.searchText,
957
+ selectedCategory: EntityTypes.Action,
958
+ }).searchResults.find(({ category }) => category === EntityTypes.Action)?.entities || []), [actions, filters]);
894
959
  const rows = useMemo(() => filtered.map((act) => {
895
960
  const { hasErrors, hasWarnings, hasDisableds } = getConditionsBooleans(act.conditions || []);
896
961
  return {
@@ -942,8 +1007,18 @@ const ActionTable = ({ maxHeight, maxWidth }) => {
942
1007
  ],
943
1008
  };
944
1009
  }), [filtered]);
945
- const badge = useMemo(() => (filtered.length !== actions.length ? `${filtered.length}/${actions.length}` : actions.length), [filtered, actions]);
946
- const badgeTooltip = useMemo(() => (filtered.length !== actions.length ? DISPLAY_TITLES.FILTERED_COUNT_TOOLTIP : undefined), [filtered, actions]);
1010
+ const { badge, badgeTooltip } = useMemo(() => {
1011
+ if (filtered.length !== actions.length) {
1012
+ return {
1013
+ badge: `${filtered.length}/${actions.length}`,
1014
+ badgeTooltip: DISPLAY_TITLES.FILTERED_COUNT_TOOLTIP,
1015
+ };
1016
+ }
1017
+ return {
1018
+ badge: actions.length,
1019
+ badgeTooltip: undefined,
1020
+ };
1021
+ }, [filtered, actions]);
947
1022
  return (React.createElement(TableContainer, { "$maxWidth": maxWidth },
948
1023
  React.createElement(TableTitleWrap, null,
949
1024
  React.createElement(IconTitleBadge, { icon: getEntityIcon(EntityTypes.Action), title: DISPLAY_TITLES.ACTIONS, badge: badge, badgeTooltip: badgeTooltip, loading: actionsLoading })),
@@ -1902,72 +1977,15 @@ styled.div `
1902
1977
  border-radius: 24px;
1903
1978
  `;
1904
1979
 
1905
- const buildSearchResults = ({ instrumentationRules, sources, actions, destinations, searchText, selectedCategory }) => {
1906
- const filteredRules = !searchText ? instrumentationRules : instrumentationRules.filter((rule) => rule.type?.toLowerCase().includes(searchText) || rule.ruleName?.toLowerCase().includes(searchText));
1907
- const filteredSources = !searchText
1908
- ? sources
1909
- : sources.filter((source) => source.name?.toLowerCase().includes(searchText) || source.otelServiceName?.toLowerCase().includes(searchText) || source.namespace?.toLowerCase().includes(searchText));
1910
- const filteredActions = !searchText ? actions : actions.filter((action) => action.type?.toLowerCase().includes(searchText) || action.spec.actionName?.toLowerCase().includes(searchText));
1911
- const filteredDestinations = !searchText
1912
- ? destinations
1913
- : destinations.filter((destination) => destination.destinationType.displayName?.toLowerCase().includes(searchText) || destination.name?.toLowerCase().includes(searchText));
1914
- const categories = [
1915
- {
1916
- category: EntityTypes.Source,
1917
- label: 'Sources',
1918
- count: filteredSources.length,
1919
- entities: [],
1920
- },
1921
- {
1922
- category: EntityTypes.Action,
1923
- label: 'Actions',
1924
- count: filteredActions.length,
1925
- entities: [],
1926
- },
1927
- {
1928
- category: EntityTypes.Destination,
1929
- label: 'Destinations',
1930
- count: filteredDestinations.length,
1931
- entities: [],
1932
- },
1933
- {
1934
- category: EntityTypes.InstrumentationRule,
1935
- label: 'Instrumentation Rules',
1936
- count: filteredRules.length,
1937
- entities: [],
1938
- },
1939
- ];
1940
- categories.unshift({
1941
- category: 'all',
1942
- label: 'All',
1943
- count: filteredRules.length + filteredSources.length + filteredActions.length + filteredDestinations.length,
1944
- entities: [],
1945
- });
1946
- const searchResults = categories
1947
- .filter(({ count, category }) => !!count && category !== 'all' && ['all', category].includes(selectedCategory))
1948
- .map((item) => ({
1949
- ...item,
1950
- entities: item.category === EntityTypes.InstrumentationRule
1951
- ? filteredRules
1952
- : item.category === EntityTypes.Source
1953
- ? filteredSources
1954
- : item.category === EntityTypes.Action
1955
- ? filteredActions
1956
- : item.category === EntityTypes.Destination
1957
- ? filteredDestinations
1958
- : [],
1959
- }));
1960
- return { categories, searchResults };
1961
- };
1962
-
1963
1980
  const HorizontalScroll = styled.div `
1964
1981
  display: flex;
1965
1982
  align-items: center;
1966
1983
  overflow-x: scroll;
1967
1984
  `;
1968
- const SearchResults = ({ searchText, onClose }) => {
1985
+ const SearchResults = ({ onClose }) => {
1969
1986
  const theme = Theme.useTheme();
1970
1987
  const { onClickNode } = useClickNode();
1988
+ const { searchText } = useFilterStore();
1971
1989
  const { selectedStreamName } = useDataStreamStore();
1972
1990
  const { sources, destinations, actions, instrumentationRules } = useEntityStore();
1973
1991
  const { popupRef, popupOpen, setPopupOpen, popupPosition, handlePosition } = usePopup();
@@ -2002,19 +2020,20 @@ const SearchResults = ({ searchText, onClose }) => {
2002
2020
  React.createElement(Divider, { thickness: catIdx === searchResults.length - 1 ? 0 : 1, length: '90%', margin: '8px auto' }))))));
2003
2021
  };
2004
2022
 
2005
- const Search = () => {
2006
- const [input, setInput] = useState('');
2023
+ const Search = ({ preventPopup = false }) => {
2024
+ const { searchText, setSearchText } = useFilterStore();
2007
2025
  const [focused, setFocused] = useState(false);
2026
+ const isOpen = !!searchText || focused;
2008
2027
  const onClose = () => {
2009
- setInput('');
2028
+ setSearchText('');
2010
2029
  setFocused(false);
2011
2030
  };
2012
2031
  const containerRef = useRef(null);
2013
- useOnClickOutside(containerRef, () => setFocused(false));
2014
- useKeyDown({ key: 'Escape', active: !!input || focused }, onClose);
2032
+ useOnClickOutside(containerRef, onClose);
2033
+ useKeyDown({ key: 'Escape', active: isOpen }, onClose);
2015
2034
  return (React.createElement(RelativeContainer$2, { ref: containerRef },
2016
- React.createElement(Input, { placeholder: 'Search', icon: SearchIcon, value: input, onChange: (e) => setInput(e.target.value.toLowerCase()), onFocus: () => setFocused(true) }),
2017
- !!input || focused ? React.createElement(SearchResults, { searchText: input, onClose: onClose }) : null));
2035
+ React.createElement(Input, { placeholder: 'Search', icon: SearchIcon, value: searchText, onChange: (e) => setSearchText(e.target.value.toLowerCase()), onFocus: () => setFocused(true) }),
2036
+ isOpen && !preventPopup ? React.createElement(SearchResults, { onClose: onClose }) : null));
2018
2037
  };
2019
2038
 
2020
2039
  const FormWrapper = styled.div `
@@ -2248,11 +2267,11 @@ const Container$c = styled.div `
2248
2267
  const PushToEnd = styled.div `
2249
2268
  margin-left: auto;
2250
2269
  `;
2251
- const DataFlowActionsMenu = ({ addEntity, onClickNewDataStream, updateDataStream, deleteDataStream }) => {
2270
+ const DataFlowActionsMenu = ({ addEntity, preventSearchPopup, onClickNewDataStream, updateDataStream, deleteDataStream }) => {
2252
2271
  const { setCurrentModal } = useModalStore();
2253
2272
  return (React.createElement(Container$c, null,
2254
2273
  React.createElement(DataStreamSelect, { onClickNewDataStream: onClickNewDataStream, updateDataStream: updateDataStream, deleteDataStream: deleteDataStream }),
2255
- React.createElement(Search, null),
2274
+ React.createElement(Search, { preventPopup: preventSearchPopup }),
2256
2275
  React.createElement(Filters$1, null),
2257
2276
  addEntity && (React.createElement(PushToEnd, null,
2258
2277
  React.createElement(AddButton, { "data-id": `add-${addEntity}`, onClick: () => setCurrentModal(addEntity), label: `${BUTTON_TEXTS.ADD} ${addEntity}`, variant: 'primary' })))));
@@ -2972,8 +2991,15 @@ const DestinationTable = ({ metrics, maxHeight, maxWidth }) => {
2972
2991
  const { setDrawerType, setDrawerEntityId } = useDrawerStore();
2973
2992
  const { destinations, destinationsLoading } = useEntityStore();
2974
2993
  const destinationsByStream = useMemo(() => filterDestinationsByStream(destinations, selectedStreamName), [destinations, selectedStreamName]);
2975
- const filteredDestinations = useMemo(() => filterDestinations(destinationsByStream, filters), [destinationsByStream, filters]);
2976
- const rows = useMemo(() => filteredDestinations.map((dest) => {
2994
+ const filtered = useMemo(() => (buildSearchResults({
2995
+ instrumentationRules: [],
2996
+ sources: [],
2997
+ actions: [],
2998
+ destinations: filterDestinations(destinationsByStream, filters),
2999
+ searchText: filters.searchText,
3000
+ selectedCategory: EntityTypes.Destination,
3001
+ }).searchResults.find(({ category }) => category === EntityTypes.Destination)?.entities || []), [destinationsByStream, filters]);
3002
+ const rows = useMemo(() => filtered.map((dest) => {
2977
3003
  const { hasErrors, hasWarnings, hasDisableds } = getConditionsBooleans(dest.conditions || []);
2978
3004
  const { icon, iconSrc } = getDestinationIcon(dest.destinationType.type);
2979
3005
  return {
@@ -3017,11 +3043,11 @@ const DestinationTable = ({ metrics, maxHeight, maxWidth }) => {
3017
3043
  },
3018
3044
  ],
3019
3045
  };
3020
- }), [filteredDestinations, metrics]);
3046
+ }), [filtered, metrics]);
3021
3047
  const { badge, badgeTooltip } = useMemo(() => {
3022
- if (filteredDestinations.length !== destinationsByStream.length) {
3048
+ if (filtered.length !== destinationsByStream.length) {
3023
3049
  return {
3024
- badge: `${filteredDestinations.length}/${destinationsByStream.length}`,
3050
+ badge: `${filtered.length}/${destinationsByStream.length}`,
3025
3051
  badgeTooltip: DISPLAY_TITLES.FILTERED_COUNT_TOOLTIP,
3026
3052
  };
3027
3053
  }
@@ -3029,13 +3055,13 @@ const DestinationTable = ({ metrics, maxHeight, maxWidth }) => {
3029
3055
  badge: destinationsByStream.length,
3030
3056
  badgeTooltip: undefined,
3031
3057
  };
3032
- }, [filteredDestinations, destinationsByStream]);
3058
+ }, [filtered, destinationsByStream]);
3033
3059
  return (React.createElement(TableContainer, { "$maxWidth": maxWidth },
3034
3060
  React.createElement(TableTitleWrap, null,
3035
3061
  React.createElement(IconTitleBadge, { icon: getEntityIcon(EntityTypes.Destination), title: DISPLAY_TITLES.DESTINATIONS, badge: badge, badgeTooltip: badgeTooltip, loading: destinationsLoading })),
3036
3062
  React.createElement(TableWrap, { "$maxHeight": maxHeight },
3037
3063
  React.createElement(InteractiveTable, { columns: columns$2, rows: rows })),
3038
- !filteredDestinations.length && (React.createElement(CenterThis, { style: { marginTop: '2rem' } },
3064
+ !filtered.length && (React.createElement(CenterThis, { style: { marginTop: '2rem' } },
3039
3065
  React.createElement(NoDataFound, null)))));
3040
3066
  };
3041
3067
 
@@ -3496,11 +3522,20 @@ const columns$1 = [
3496
3522
  ];
3497
3523
  const InstrumentationRuleTable = ({ maxHeight, maxWidth }) => {
3498
3524
  const theme = Theme.useTheme();
3525
+ const filters = useFilterStore();
3499
3526
  const { setDrawerType, setDrawerEntityId } = useDrawerStore();
3500
3527
  const { instrumentationRules, instrumentationRulesLoading } = useEntityStore();
3528
+ const filtered = useMemo(() => (buildSearchResults({
3529
+ instrumentationRules,
3530
+ sources: [],
3531
+ actions: [],
3532
+ destinations: [],
3533
+ searchText: filters.searchText,
3534
+ selectedCategory: EntityTypes.InstrumentationRule,
3535
+ }).searchResults.find(({ category }) => category === EntityTypes.InstrumentationRule)?.entities || []), [instrumentationRules, filters]);
3501
3536
  const rows = useMemo(() =>
3502
3537
  // note: rules do not have filters yet
3503
- instrumentationRules.map((rule) => {
3538
+ filtered.map((rule) => {
3504
3539
  return {
3505
3540
  onClick: () => {
3506
3541
  setDrawerType(EntityTypes.InstrumentationRule);
@@ -3549,13 +3584,25 @@ const InstrumentationRuleTable = ({ maxHeight, maxWidth }) => {
3549
3584
  },
3550
3585
  ],
3551
3586
  };
3552
- }), [instrumentationRules]);
3587
+ }), [filtered]);
3588
+ const { badge, badgeTooltip } = useMemo(() => {
3589
+ if (filtered.length !== instrumentationRules.length) {
3590
+ return {
3591
+ badge: `${filtered.length}/${instrumentationRules.length}`,
3592
+ badgeTooltip: DISPLAY_TITLES.FILTERED_COUNT_TOOLTIP,
3593
+ };
3594
+ }
3595
+ return {
3596
+ badge: instrumentationRules.length,
3597
+ badgeTooltip: undefined,
3598
+ };
3599
+ }, [filtered, instrumentationRules]);
3553
3600
  return (React.createElement(TableContainer, { "$maxWidth": maxWidth },
3554
3601
  React.createElement(TableTitleWrap, null,
3555
- React.createElement(IconTitleBadge, { icon: getEntityIcon(EntityTypes.Action), title: DISPLAY_TITLES.INSTRUMENTATION_RULES, badge: instrumentationRules.length, loading: instrumentationRulesLoading })),
3602
+ React.createElement(IconTitleBadge, { icon: getEntityIcon(EntityTypes.Action), title: DISPLAY_TITLES.INSTRUMENTATION_RULES, badge: badge, badgeTooltip: badgeTooltip, loading: instrumentationRulesLoading })),
3556
3603
  React.createElement(TableWrap, { "$maxHeight": maxHeight },
3557
3604
  React.createElement(InteractiveTable, { columns: columns$1, rows: rows })),
3558
- !instrumentationRules.length && (React.createElement(CenterThis, { style: { marginTop: '2rem' } },
3605
+ !filtered.length && (React.createElement(CenterThis, { style: { marginTop: '2rem' } },
3559
3606
  React.createElement(NoDataFound, null)))));
3560
3607
  };
3561
3608
 
@@ -4262,11 +4309,11 @@ const Describe$1 = ({ source, fetchSourceDescribe }) => {
4262
4309
  });
4263
4310
  }, [fetchSourceDescribe, source]);
4264
4311
  if (!describe && !failed) {
4265
- return (React.createElement(CenterThis, null,
4312
+ return (React.createElement(CenterThis, { "$height": '70vh' },
4266
4313
  React.createElement(FadeLoader, null)));
4267
4314
  }
4268
- return (React.createElement(FlexColumn, { "$gap": 12 }, failed ? (React.createElement(CenterThis, null,
4269
- React.createElement(NoDataFound, { subTitle: 'Could not fetch describe for this source' }))) : !describe?.pods?.length ? (React.createElement(CenterThis, null,
4315
+ return (React.createElement(FlexColumn, { "$gap": 12 }, failed ? (React.createElement(CenterThis, { "$height": '70vh' },
4316
+ React.createElement(NoDataFound, { subTitle: 'Could not fetch describe for this source' }))) : !describe?.pods?.length ? (React.createElement(CenterThis, { "$height": '70vh' },
4270
4317
  React.createElement(NoDataFound, { subTitle: 'Check if you have any running pods and try again' }))) : (describe.pods.map(({ podName, nodeName, phase, agentInjected, runningLatestWorkloadRevision, containers }) => {
4271
4318
  const podHasErrors = phase.status !== StatusType.Success || hasUnhealthyInstances(containers);
4272
4319
  const podStatus = podHasErrors ? StatusType.Error : StatusType.Success;
@@ -4330,11 +4377,11 @@ const Libraries = ({ source, fetchSourceLibraries }) => {
4330
4377
  });
4331
4378
  }, [fetchSourceLibraries, source]);
4332
4379
  if (!libraries && !failed) {
4333
- return (React.createElement(CenterThis, null,
4380
+ return (React.createElement(CenterThis, { "$height": '70vh' },
4334
4381
  React.createElement(FadeLoader, null)));
4335
4382
  }
4336
- return (React.createElement(FlexColumn, { "$gap": 12 }, failed ? (React.createElement(CenterThis, null,
4337
- React.createElement(NoDataFound, { subTitle: 'Could not fetch libraries for this source' }))) : !libraries?.length ? (React.createElement(CenterThis, { "$gap": 12 },
4383
+ return (React.createElement(FlexColumn, { "$gap": 12 }, failed ? (React.createElement(CenterThis, { "$height": '70vh' },
4384
+ React.createElement(NoDataFound, { subTitle: 'Could not fetch libraries for this source' }))) : !libraries?.length ? (React.createElement(CenterThis, { "$height": '70vh', "$gap": 12 },
4338
4385
  React.createElement(NoDataFound, { title: 'No libraries found', subTitle: '' }),
4339
4386
  React.createElement(NotificationNote, { type: StatusType.Warning, message: 'This feature is in early development, and has very limited support' }))) : (React.createElement(DataCard, { title: 'Instrumented Libraries' }, libraries.map(({ name, nonIdentifyingAttributes }, i) => (React.createElement(Fragment, { key: `library-${name}` },
4340
4387
  React.createElement(Row, null,
@@ -4387,10 +4434,10 @@ const SourceDrawer = ({ persistSources, updateSource, restartWorkloads, fetchSou
4387
4434
  const [fetchedSource, setFetchedSource] = useState(null);
4388
4435
  // this is used to fetch the source on drawer open, so we ensure we have the latest data
4389
4436
  useEffect(() => {
4390
- if (!isOpen || !drawerEntityId)
4437
+ if (!isOpen || !drawerEntityId || !!fetchedSource)
4391
4438
  return;
4392
4439
  fetchSourceById(drawerEntityId).then((source) => setFetchedSource(source || null));
4393
- }, [isOpen, drawerEntityId]);
4440
+ }, [isOpen, drawerEntityId, fetchedSource]);
4394
4441
  const { formData, handleFormChange, resetFormData, loadFormWithDrawerItem } = useSourceFormData();
4395
4442
  const thisItem = useMemo(() => {
4396
4443
  if (!isOpen)
@@ -4446,6 +4493,7 @@ const SourceDrawer = ({ persistSources, updateSource, restartWorkloads, fetchSou
4446
4493
  const handleDelete = async () => {
4447
4494
  const { namespace } = thisItem;
4448
4495
  persistSources({ [namespace]: [{ ...thisItem, selected: false, currentStreamName: selectedStreamName }] }, {});
4496
+ setFetchedSource(null);
4449
4497
  setIsFormDirty(false);
4450
4498
  setIsEditing(false);
4451
4499
  resetFormData();
@@ -4456,6 +4504,7 @@ const SourceDrawer = ({ persistSources, updateSource, restartWorkloads, fetchSou
4456
4504
  const title = formData.otelServiceName !== thisItem.name ? formData.otelServiceName : '';
4457
4505
  handleFormChange('otelServiceName', title);
4458
4506
  await updateSource(drawerEntityId, { ...formData, otelServiceName: title });
4507
+ setFetchedSource(null);
4459
4508
  setIsFormDirty(false);
4460
4509
  setIsEditing(false);
4461
4510
  };
@@ -4567,7 +4616,14 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
4567
4616
  return 1;
4568
4617
  }, [sourcesToCreate, sourcesCreated, sourcesToDelete, sourcesDeleted]);
4569
4618
  const sourcesByStream = useMemo(() => filterSourcesByStream(sources, selectedStreamName), [sources, selectedStreamName]);
4570
- const filteredSources = useMemo(() => filterSources(sourcesByStream, filters), [sourcesByStream, filters]);
4619
+ const filtered = useMemo(() => (buildSearchResults({
4620
+ instrumentationRules: [],
4621
+ sources: filterSources(sourcesByStream, filters),
4622
+ actions: [],
4623
+ destinations: [],
4624
+ searchText: filters.searchText,
4625
+ selectedCategory: EntityTypes.Source,
4626
+ }).searchResults.find(({ category }) => category === EntityTypes.Source)?.entities || []), [sourcesByStream, filters]);
4571
4627
  const [hasSelected, totalSelectedSources] = useMemo(() => {
4572
4628
  let num = 0;
4573
4629
  Object.values(selectedSources).forEach((selectedSources) => {
@@ -4578,7 +4634,7 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
4578
4634
  const onSelectAll = useCallback((bool) => {
4579
4635
  if (bool) {
4580
4636
  const payload = {};
4581
- filteredSources.forEach((source) => {
4637
+ filtered.forEach((source) => {
4582
4638
  const id = { namespace: source.namespace, name: source.name, kind: source.kind };
4583
4639
  const isPending = isThisPending({ entityType: EntityTypes.Source, entityId: id });
4584
4640
  if (!isPending) {
@@ -4595,7 +4651,7 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
4595
4651
  else {
4596
4652
  setSelectedSources({});
4597
4653
  }
4598
- }, [filteredSources]);
4654
+ }, [filtered]);
4599
4655
  const onSelectOne = useCallback((source) => {
4600
4656
  const { namespace, name, kind } = source;
4601
4657
  const payload = { ...selectedSources };
@@ -4610,7 +4666,7 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
4610
4666
  }
4611
4667
  setSelectedSources(payload);
4612
4668
  }, [selectedSources]);
4613
- const rows = useMemo(() => filteredSources.map((source) => {
4669
+ const rows = useMemo(() => filtered.map((source) => {
4614
4670
  const id = getWorkloadId(source);
4615
4671
  const idString = JSON.stringify(id);
4616
4672
  const { hasErrors, hasWarnings, hasDisableds } = getConditionsBooleans(source.conditions || []);
@@ -4660,11 +4716,11 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
4660
4716
  },
4661
4717
  ],
4662
4718
  };
4663
- }), [filteredSources, selectedSources, metrics, onSelectOne]);
4719
+ }), [filtered, selectedSources, metrics, onSelectOne]);
4664
4720
  const { badge, badgeTooltip } = useMemo(() => {
4665
- if (filteredSources.length !== sourcesByStream.length) {
4721
+ if (filtered.length !== sourcesByStream.length) {
4666
4722
  return {
4667
- badge: `${filteredSources.length}/${sourcesByStream.length}`,
4723
+ badge: `${filtered.length}/${sourcesByStream.length}`,
4668
4724
  badgeTooltip: DISPLAY_TITLES.FILTERED_COUNT_TOOLTIP,
4669
4725
  };
4670
4726
  }
@@ -4672,10 +4728,10 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
4672
4728
  badge: sourcesByStream.length,
4673
4729
  badgeTooltip: undefined,
4674
4730
  };
4675
- }, [filteredSources, sourcesByStream]);
4731
+ }, [filtered, sourcesByStream]);
4676
4732
  return (React.createElement(TableContainer, { "$maxWidth": maxWidth },
4677
4733
  React.createElement(TableTitleWrap, null,
4678
- React.createElement(Checkbox, { partiallyChecked: hasSelected && filteredSources?.length !== totalSelectedSources, value: hasSelected && filteredSources?.length === totalSelectedSources, onChange: onSelectAll, disabled: !filteredSources?.length }),
4734
+ React.createElement(Checkbox, { partiallyChecked: hasSelected && filtered?.length !== totalSelectedSources, value: hasSelected && filtered?.length === totalSelectedSources, onChange: onSelectAll, disabled: !filtered?.length }),
4679
4735
  React.createElement(IconTitleBadge, { icon: getEntityIcon(EntityTypes.Source), title: DISPLAY_TITLES.SOURCES, badge: badge, badgeTooltip: badgeTooltip, loading: sourcesLoading && !isAwaitingInstrumentation })),
4680
4736
  React.createElement(TableWrap, { "$maxHeight": maxHeight },
4681
4737
  React.createElement(InteractiveTable, { columns: columns, rows: isAwaitingInstrumentation ? [] : rows })),
@@ -4685,7 +4741,7 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
4685
4741
  React.createElement(Text, { color: theme.text.info },
4686
4742
  !!sourcesToCreate ? 'Instrumenting' : 'Uninstrumenting',
4687
4743
  " workloads..."),
4688
- React.createElement(Badge, { label: `${instrumentingPercent}%` })))) : !filteredSources.length ? (React.createElement(CenterThis, { style: { marginTop: '2rem' } },
4744
+ React.createElement(Badge, { label: `${instrumentingPercent}%` })))) : !filtered.length ? (React.createElement(CenterThis, { style: { marginTop: '2rem' } },
4689
4745
  React.createElement(NoDataFound, null))) : null));
4690
4746
  };
4691
4747
 
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect, useRef, forwardRef, useMemo, Fragment, createElement, useCallback, createContext, memo, useContext, useLayoutEffect } from 'react';
1
+ import React, { Fragment, useMemo, useState, useEffect, useRef, forwardRef, createElement, useCallback, createContext, memo, useContext, useLayoutEffect } from 'react';
2
2
  import { T as Theme, B as BUTTON_TEXTS, j as ImageErrorIcon, M as MONITORS_OPTIONS, a1 as styleInject, U as usePendingStore, $ as useSelectedStore, Z as useInstrumentStore, Q as useActiveNodeStore, V as useNotificationStore, b as DISPLAY_TITLES, L as LANGUAGE_OPTIONS, F as FORM_ALERTS, D as DISPLAY_LANGUAGES, e as getProgrammingLanguageIcon } from './index-90ccd949.js';
3
3
  import styled, { css } from 'styled-components';
4
4
  import { M as MinusIcon$1, h as CheckIcon, L as ListIcon, C as CodeIcon, c as ExtendArrowIcon, P as PlusIcon$1, a as CopyIcon, E as EditIcon, b as EditedIcon, e as SortArrowsIcon, d as NotebookIcon, X as XIcon, f as EyeClosedIcon, g as EyeOpenIcon, N as NoDataIcon, i as CrossIcon, S as SearchIcon, T as TrashIcon } from './index-19b8f8bc.js';
@@ -19,8 +19,73 @@ const TextWrapper$2 = styled.div `
19
19
  text-transform: ${({ $family }) => ($family === 'secondary' ? 'uppercase' : 'none')};
20
20
  font-family: ${({ theme, $family = 'primary' }) => theme.font_family[$family]};
21
21
  `;
22
+ const getLinksFromText = (text) => {
23
+ const links = text.match(/<a[^>]*href="([^"]*)"[^>]*>(.*?)<\/a>/g);
24
+ return links?.map((link) => {
25
+ const [_, href, label] = link.split('"');
26
+ const labelWithoutTags = label.replace('</a>', '').replace('>', '');
27
+ return {
28
+ original: link,
29
+ href,
30
+ label: labelWithoutTags,
31
+ };
32
+ });
33
+ };
34
+ const getStrongsFromText = (text) => {
35
+ const strongs = text.match(/<strong[^>]*>(.*?)<\/strong>/g);
36
+ return strongs?.map((strong) => {
37
+ const label = strong.replace(/<strong[^>]*>/, '').replace(/<\/strong>/, '');
38
+ return {
39
+ original: strong,
40
+ label,
41
+ };
42
+ });
43
+ };
44
+ const renderText = (text, theme) => {
45
+ const links = getLinksFromText(text);
46
+ links?.forEach((link, i) => {
47
+ text = text.replace(link.original, `LINK-${i}###`);
48
+ });
49
+ const strongs = getStrongsFromText(text);
50
+ strongs?.forEach((strong, i) => {
51
+ text = text.replace(strong.original, `STRONG-${i}###`);
52
+ });
53
+ const mappedText = text.split(' ').map((word) => {
54
+ if (word.includes('LINK-')) {
55
+ const [linkId, postLabel] = word.split('###');
56
+ const entry = links?.[parseInt(linkId.replace('LINK-', ''))];
57
+ return (React.createElement(Fragment, { key: word },
58
+ React.createElement("a", { href: entry?.href, target: '_blank', style: { color: theme.colors.majestic_blue_soft } }, entry?.label),
59
+ postLabel ? `${postLabel} ` : ' '));
60
+ }
61
+ if (word.includes('STRONG-')) {
62
+ const [strongId, postLabel] = word.split('###');
63
+ const entry = strongs?.[parseInt(strongId.replace('STRONG-', ''))];
64
+ return (React.createElement(Fragment, { key: word },
65
+ React.createElement("strong", { style: { fontWeight: 600 } }, entry?.label),
66
+ postLabel ? `${postLabel} ` : ' '));
67
+ }
68
+ return word + ' ';
69
+ });
70
+ return mappedText;
71
+ };
22
72
  const Text = ({ children, color, size, weight, align, family, opacity, decoration, ...props }) => {
23
- return (React.createElement(TextWrapper$2, { "$color": color, "$size": size, "$weight": weight, "$align": align, "$family": family, "$opacity": opacity, "$decoration": decoration, ...props }, children));
73
+ const theme = Theme.useTheme();
74
+ const textArray = useMemo(() => {
75
+ const str = typeof children === 'string'
76
+ ? children
77
+ : Array.isArray(children)
78
+ ? // eslint-disable-next-line @typescript-eslint/no-explicit-any
79
+ children
80
+ .map((x) => (typeof x === 'object' && Object.hasOwn(x, 'props') ? x.props.children : x))
81
+ .filter((x) => x && typeof x === 'string')
82
+ .join(' ')
83
+ : '';
84
+ return str.split('\n');
85
+ }, [children]);
86
+ return (React.createElement(TextWrapper$2, { "$color": color, "$size": size, "$weight": weight, "$align": align, "$family": family, "$opacity": opacity, "$decoration": decoration, ...props }, textArray.map((str, i) => (React.createElement(Fragment, { key: `text-${i}-${str}` },
87
+ renderText(str, theme),
88
+ i !== textArray.length - 1 ? React.createElement("br", null) : null)))));
24
89
  };
25
90
 
26
91
  const ErrorWrapper = styled.div `
@@ -409,6 +474,7 @@ const FlexColumn = styled.div `
409
474
  `;
410
475
  const CenterThis = styled(FlexColumn) `
411
476
  width: 100%;
477
+ height: ${({ $height }) => $height || 'unset'};
412
478
  align-items: center;
413
479
  justify-content: center;
414
480
  `;
@@ -463,42 +529,13 @@ const TextBreakWord = styled(Text) `
463
529
  word-break: break-word;
464
530
  white-space: pre-wrap;
465
531
  `;
466
- const getLinksFromText = (text) => {
467
- const links = text.match(/<a[^>]*href="([^"]*)"[^>]*>(.*?)<\/a>/g);
468
- return links?.map((link) => {
469
- const [_, href, label] = link.split('"');
470
- const labelWithoutTags = label.replace('</a>', '').replace('>', '');
471
- return {
472
- original: link,
473
- href,
474
- label: labelWithoutTags,
475
- };
476
- });
477
- };
478
- const renderText = (text, theme) => {
479
- const links = getLinksFromText(text);
480
- links?.forEach((link, i) => {
481
- text = text.replace(link.original, `LINK-${i}###`);
482
- });
483
- const mappedText = text.split(' ').map((word) => {
484
- if (word.includes('LINK-')) {
485
- const [linkId, postLabel] = word.split('###');
486
- const entry = links?.[parseInt(linkId.replace('LINK-', ''))];
487
- return (React.createElement(Fragment, { key: word },
488
- React.createElement("a", { href: entry?.href, target: '_blank', style: { color: theme.colors.majestic_blue_soft } }, entry?.label),
489
- postLabel ? `${postLabel} ` : ''));
490
- }
491
- return word + ' ';
492
- });
493
- return { mappedText, hasLinks: !!links?.length };
494
- };
495
532
  const Tooltip = ({ withIcon, titleIcon: TitleIcon, title, text, timestamp, children }) => {
496
533
  const theme = Theme.useTheme();
497
534
  const { popupRef, popupOpen, setPopupOpen, popupPosition, handlePosition } = usePopup({
498
535
  defaultClientHeight: 40,
499
536
  defaultClientwidth: Math.min((text?.length || 0) * 7.5, 300),
500
537
  });
501
- const { mappedText, hasLinks } = useMemo(() => renderText(text || '', theme), [text, theme]);
538
+ const hasLinks = useMemo(() => !!getLinksFromText(text || '')?.length, [text]);
502
539
  const handleMouseEvent = (e) => {
503
540
  const { type, clientX, clientY } = e;
504
541
  if (hasLinks) {
@@ -521,7 +558,7 @@ const Tooltip = ({ withIcon, titleIcon: TitleIcon, title, text, timestamp, child
521
558
  title && React.createElement(React.Fragment, null,
522
559
  title,
523
560
  "\u00A0-\u00A0"))),
524
- React.createElement(TextBreakWord, { size: 12, color: theme.text.info }, mappedText),
561
+ React.createElement(TextBreakWord, { size: 12, color: theme.text.info }, text),
525
562
  !!timestamp && (React.createElement(Text, { size: 10, color: theme.text.darker_grey, family: 'secondary', style: { marginTop: '8px' } }, new Date(timestamp).toLocaleString()))))));
526
563
  };
527
564
 
@@ -38449,4 +38486,4 @@ const WarningModal = ({ isOpen, noOverlay, title = '', description = '', note, a
38449
38486
  React.createElement(FooterButton, { "data-id": 'deny', variant: denyButton.variant || 'secondary', onClick: onDeny }, denyButton.text)))));
38450
38487
  };
38451
38488
 
38452
- export { TextArea as $, AutocompleteInput as A, Button$4 as B, Checkbox as C, DataCard as D, ExtendArrow as E, FadeLoader as F, MonitorsIcons as G, Header as H, IconButton as I, NoDataFound as J, KeyValueInputsList as K, NotificationNote as L, Modal as M, NavigationButtons as N, PopupForm as O, Popup as P, SectionTitle as Q, Segment as R, ScrollX as S, ToggleCodeComponent as T, SelectionButton as U, SkeletonLoader as V, Status as W, Stepper as X, TabList as Y, Tag as Z, Text as _, Badge as a, Toggle as a0, Tooltip as a1, TraceLoader as a2, WarningModal as a3, FlexRow as a4, FlexColumn as a5, CenterThis as a6, VerticalScroll as a7, Overlay as a8, ModalBody as a9, TableContainer as aa, TableTitleWrap as ab, TableWrap as ac, nodeConfig as ad, useNodesState as ae, useEdgesState as af, Flow as ag, applyNodeChanges as ah, AddButton$1 as ai, MarkerType as aj, CopyText as ak, PodContainer as al, SourceContainer as am, AddNode as an, BaseNode as ao, EdgedNode as ap, FrameNode as aq, HeaderNode as ar, MapItemNode as as, NoDataNode as at, ScrollNode as au, SkeletonNode as av, LabeledEdge as aw, Code as b, ConditionDetails as c, DataCardFields as d, DataCardFieldTypes as e, DataFinger as f, DataTab as g, DescribeRow as h, Divider as i, DocsButton as j, Drawer as k, DrawerHeader as l, DrawerFooter as m, Dropdown as n, FieldError as o, FieldLabel as p, IconGroup as q, IconTitleBadge as r, IconWrapped as s, IconsNav as t, ImageControlled as u, Input as v, InputList as w, InputTable as x, InteractiveTable as y, MonitorsCheckboxes as z };
38489
+ export { getLinksFromText as $, AutocompleteInput as A, Button$4 as B, Checkbox as C, DataCard as D, ExtendArrow as E, FadeLoader as F, MonitorsIcons as G, Header as H, IconButton as I, NoDataFound as J, KeyValueInputsList as K, NotificationNote as L, Modal as M, NavigationButtons as N, PopupForm as O, Popup as P, SectionTitle as Q, Segment as R, ScrollX as S, ToggleCodeComponent as T, SelectionButton as U, SkeletonLoader as V, Status as W, Stepper as X, TabList as Y, Tag as Z, Text as _, Badge as a, getStrongsFromText as a0, renderText as a1, TextArea as a2, Toggle as a3, Tooltip as a4, TraceLoader as a5, WarningModal as a6, FlexRow as a7, FlexColumn as a8, CenterThis as a9, VerticalScroll as aa, Overlay as ab, ModalBody as ac, TableContainer as ad, TableTitleWrap as ae, TableWrap as af, nodeConfig as ag, useNodesState as ah, useEdgesState as ai, Flow as aj, applyNodeChanges as ak, AddButton$1 as al, MarkerType as am, CopyText as an, PodContainer as ao, SourceContainer as ap, AddNode as aq, BaseNode as ar, EdgedNode as as, FrameNode as at, HeaderNode as au, MapItemNode as av, NoDataNode as aw, ScrollNode as ax, SkeletonNode as ay, LabeledEdge as az, Code as b, ConditionDetails as c, DataCardFields as d, DataCardFieldTypes as e, DataFinger as f, DataTab as g, DescribeRow as h, Divider as i, DocsButton as j, Drawer as k, DrawerHeader as l, DrawerFooter as m, Dropdown as n, FieldError as o, FieldLabel as p, IconGroup as q, IconTitleBadge as r, IconWrapped as s, IconsNav as t, ImageControlled as u, Input as v, InputList as w, InputTable as x, InteractiveTable as y, MonitorsCheckboxes as z };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { a3 as WarningModal } from './index-b674f184.js';
2
+ import { a6 as WarningModal } from './index-192794e8.js';
3
3
  import { StatusType, EntityTypes } from './types.js';
4
4
  import './index-90ccd949.js';
5
5
  import 'styled-components';
package/lib/snippets.js CHANGED
@@ -1,5 +1,5 @@
1
- import { B as Button, _ as Text, L as NotificationNote } from './index-b674f184.js';
2
- export { ai as AddButton, an as AddNode, ao as BaseNode, ak as CopyText, ap as EdgedNode, ag as Flow, aq as FrameNode, ar as HeaderNode, aw as LabeledEdge, as as MapItemNode, at as NoDataNode, al as PodContainer, au as ScrollNode, av as SkeletonNode, am as SourceContainer, ad as nodeConfig } from './index-b674f184.js';
1
+ import { B as Button, _ as Text, L as NotificationNote } from './index-192794e8.js';
2
+ export { al as AddButton, aq as AddNode, ar as BaseNode, an as CopyText, as as EdgedNode, aj as Flow, at as FrameNode, au as HeaderNode, az as LabeledEdge, av as MapItemNode, aw as NoDataNode, ao as PodContainer, ax as ScrollNode, ay as SkeletonNode, ap as SourceContainer, ag as nodeConfig } from './index-192794e8.js';
3
3
  import React from 'react';
4
4
  import { T as Theme, B as BUTTON_TEXTS, b as DISPLAY_TITLES } from './index-90ccd949.js';
5
5
  import { E as EditIcon } from './index-19b8f8bc.js';
@@ -1,6 +1,6 @@
1
1
  import type { DropdownProps } from '@/components';
2
2
  export interface FiltersState {
3
- searchText?: string;
3
+ searchText: string;
4
4
  statuses?: DropdownProps['options'];
5
5
  platformTypes?: DropdownProps['options'];
6
6
  namespaces?: DropdownProps['options'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odigos/ui-kit",
3
- "version": "0.0.79",
3
+ "version": "0.0.80",
4
4
  "author": "Odigos",
5
5
  "repository": {
6
6
  "type": "git",
@@ -108,7 +108,7 @@
108
108
  "@storybook/addon-docs": "^9.1.1",
109
109
  "@storybook/addon-webpack5-compiler-babel": "^3.0.6",
110
110
  "@storybook/react-webpack5": "9.1.1",
111
- "@types/node": "^24.2.0",
111
+ "@types/node": "^24.2.1",
112
112
  "@types/react": "^19.1.9",
113
113
  "@types/react-dom": "^19.1.7",
114
114
  "babel-loader": "^10.0.0",