@odigos/ui-kit 0.0.15 → 0.0.16

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.
Files changed (140) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/lib/components/data-tab/index.d.ts +18 -6
  3. package/lib/components/icon-group/index.d.ts +1 -0
  4. package/lib/components.js +8 -8
  5. package/lib/constants.js +3 -3
  6. package/lib/containers/data-flow-actions-menu/filters/index.d.ts +0 -3
  7. package/lib/containers/data-flow-actions-menu/index.d.ts +0 -3
  8. package/lib/containers/dropdowns/namespace-dropdown/index.d.ts +0 -3
  9. package/lib/containers/source-modal/index.d.ts +1 -3
  10. package/lib/containers/source-selection-form/fast/list/index.d.ts +0 -1
  11. package/lib/containers/source-selection-form/index.d.ts +1 -3
  12. package/lib/containers/source-selection-form/simple/controls/index.d.ts +0 -2
  13. package/lib/containers/source-selection-form/simple/list/index.d.ts +0 -1
  14. package/lib/containers/table-cell-conditions/index.d.ts +1 -0
  15. package/lib/containers.js +109 -48
  16. package/lib/data/destinations/index.d.ts +1 -1
  17. package/lib/functions/get-destination-icon/index.d.ts +5 -1
  18. package/lib/functions.js +7 -17
  19. package/lib/hooks/useSourceSelectionFormData.d.ts +1 -2
  20. package/lib/hooks.js +5 -5
  21. package/lib/icons/destinations/app-dynamics-logo/index.d.ts +2 -0
  22. package/lib/icons/destinations/aws-cloudwatch-logo/aws-cloudwatch-logo.stories.d.ts +8 -0
  23. package/lib/icons/destinations/aws-cloudwatch-logo/index.d.ts +2 -0
  24. package/lib/icons/destinations/aws-s3-logo/aws-s3-logo.stories.d.ts +8 -0
  25. package/lib/icons/destinations/aws-s3-logo/index.d.ts +2 -0
  26. package/lib/icons/destinations/aws-xray-logo/aws-xray-logo.stories.d.ts +8 -0
  27. package/lib/icons/destinations/aws-xray-logo/index.d.ts +2 -0
  28. package/lib/icons/destinations/axiom-logo/axiom-logo.stories.d.ts +8 -0
  29. package/lib/icons/destinations/axiom-logo/index.d.ts +2 -0
  30. package/lib/icons/destinations/better-stack-logo/better-stack-logo.stories.d.ts +8 -0
  31. package/lib/icons/destinations/better-stack-logo/index.d.ts +2 -0
  32. package/lib/icons/destinations/blob-storage-logo/blob-storage-logo.stories.d.ts +8 -0
  33. package/lib/icons/destinations/blob-storage-logo/index.d.ts +2 -0
  34. package/lib/icons/destinations/causely-logo/causely-logo.stories.d.ts +8 -0
  35. package/lib/icons/destinations/causely-logo/index.d.ts +2 -0
  36. package/lib/icons/destinations/chronosphere-logo/chronosphere-logo.stories.d.ts +8 -0
  37. package/lib/icons/destinations/chronosphere-logo/index.d.ts +2 -0
  38. package/lib/icons/destinations/clickhouse-logo/clickhouse-logo.stories.d.ts +8 -0
  39. package/lib/icons/destinations/clickhouse-logo/index.d.ts +2 -0
  40. package/lib/icons/destinations/coralogix-logo/coralogix-logo.stories.d.ts +8 -0
  41. package/lib/icons/destinations/coralogix-logo/index.d.ts +2 -0
  42. package/lib/icons/destinations/dash0-logo/dash0-logo.stories.d.ts +8 -0
  43. package/lib/icons/destinations/dash0-logo/index.d.ts +2 -0
  44. package/lib/icons/destinations/datadog-logo/datadog-logo.stories.d.ts +8 -0
  45. package/lib/icons/destinations/datadog-logo/index.d.ts +2 -0
  46. package/lib/icons/destinations/dynatrace-logo/dynatrace-logo.stories.d.ts +8 -0
  47. package/lib/icons/destinations/dynatrace-logo/index.d.ts +2 -0
  48. package/lib/icons/destinations/elastic-apm-logo/elastic-apm-logo.stories.d.ts +8 -0
  49. package/lib/icons/destinations/elastic-apm-logo/index.d.ts +2 -0
  50. package/lib/icons/destinations/elastic-search-logo/elastic-search-logo.stories.d.ts +8 -0
  51. package/lib/icons/destinations/elastic-search-logo/index.d.ts +2 -0
  52. package/lib/icons/destinations/gigapipe-logo/gigapipe-logo.stories.d.ts +8 -0
  53. package/lib/icons/destinations/gigapipe-logo/index.d.ts +2 -0
  54. package/lib/icons/destinations/google-cloud-platform-logo/google-cloud-platform-logo.stories.d.ts +8 -0
  55. package/lib/icons/destinations/google-cloud-platform-logo/index.d.ts +2 -0
  56. package/lib/icons/destinations/google-cloud-storage-logo/google-cloud-storage-logo.stories.d.ts +8 -0
  57. package/lib/icons/destinations/google-cloud-storage-logo/index.d.ts +2 -0
  58. package/lib/icons/destinations/grafana-logo/grafana-logo.stories.d.ts +8 -0
  59. package/lib/icons/destinations/grafana-logo/index.d.ts +2 -0
  60. package/lib/icons/destinations/groundcover-logo/groundcover-logo.stories.d.ts +8 -0
  61. package/lib/icons/destinations/groundcover-logo/index.d.ts +2 -0
  62. package/lib/icons/destinations/honeycomb-logo/honeycomb-logo.stories.d.ts +8 -0
  63. package/lib/icons/destinations/honeycomb-logo/index.d.ts +2 -0
  64. package/lib/icons/destinations/hyperdx-logo/hyperdx-logo.stories.d.ts +8 -0
  65. package/lib/icons/destinations/hyperdx-logo/index.d.ts +2 -0
  66. package/lib/icons/destinations/index.d.ts +46 -0
  67. package/lib/icons/destinations/instana-logo/index.d.ts +2 -0
  68. package/lib/icons/destinations/instana-logo/instana-logo.stories.d.ts +8 -0
  69. package/lib/icons/destinations/jaeger-logo/index.d.ts +2 -0
  70. package/lib/icons/destinations/jaeger-logo/jaeger-logo.stories.d.ts +8 -0
  71. package/lib/icons/destinations/kafka-logo/kafka-logo.stories.d.ts +8 -0
  72. package/lib/icons/destinations/kloudmate-logo/index.d.ts +2 -0
  73. package/lib/icons/destinations/kloudmate-logo/kloudmate-logo.stories.d.ts +8 -0
  74. package/lib/icons/destinations/last9-logo/index.d.ts +2 -0
  75. package/lib/icons/destinations/last9-logo/last9-logo.stories.d.ts +8 -0
  76. package/lib/icons/destinations/lightstep-logo/index.d.ts +2 -0
  77. package/lib/icons/destinations/lightstep-logo/lightstep-logo.stories.d.ts +8 -0
  78. package/lib/icons/destinations/logzio-logo/index.d.ts +2 -0
  79. package/lib/icons/destinations/logzio-logo/logzio-logo.stories.d.ts +8 -0
  80. package/lib/icons/destinations/loki-logo/index.d.ts +2 -0
  81. package/lib/icons/destinations/loki-logo/loki-logo.stories.d.ts +8 -0
  82. package/lib/icons/destinations/lumigo-logo/index.d.ts +2 -0
  83. package/lib/icons/destinations/lumigo-logo/lumigo-logo.stories.d.ts +8 -0
  84. package/lib/icons/destinations/middleware-logo/index.d.ts +2 -0
  85. package/lib/icons/destinations/middleware-logo/middleware-logo.stories.d.ts +8 -0
  86. package/lib/icons/destinations/new-relic-logo/index.d.ts +2 -0
  87. package/lib/icons/destinations/new-relic-logo/new-relic-logo.stories.d.ts +8 -0
  88. package/lib/icons/destinations/open-telemetry-logo/index.d.ts +2 -0
  89. package/lib/icons/destinations/open-telemetry-logo/open-telemetry-logo.stories.d.ts +8 -0
  90. package/lib/icons/destinations/ops-verse-logo/index.d.ts +2 -0
  91. package/lib/icons/destinations/ops-verse-logo/ops-verse-logo.stories.d.ts +8 -0
  92. package/lib/icons/destinations/prometheus-logo/index.d.ts +2 -0
  93. package/lib/icons/destinations/prometheus-logo/prometheus-logo.stories.d.ts +8 -0
  94. package/lib/icons/destinations/qryn-logo/index.d.ts +2 -0
  95. package/lib/icons/destinations/qryn-logo/qryn-logo.stories.d.ts +8 -0
  96. package/lib/icons/destinations/quickwit-logo/index.d.ts +2 -0
  97. package/lib/icons/destinations/quickwit-logo/quickwit-logo.stories.d.ts +8 -0
  98. package/lib/icons/destinations/sentry-logo/index.d.ts +2 -0
  99. package/lib/icons/destinations/sentry-logo/sentry-logo.stories.d.ts +8 -0
  100. package/lib/icons/destinations/signoz-logo/index.d.ts +2 -0
  101. package/lib/icons/destinations/signoz-logo/signoz-logo.stories.d.ts +8 -0
  102. package/lib/icons/destinations/splunk-logo/index.d.ts +2 -0
  103. package/lib/icons/destinations/splunk-logo/splunk-logo.stories.d.ts +8 -0
  104. package/lib/icons/destinations/sumo-logic-logo/index.d.ts +2 -0
  105. package/lib/icons/destinations/sumo-logic-logo/sumo-logic-logo.stories.d.ts +8 -0
  106. package/lib/icons/destinations/tempo-logo/index.d.ts +2 -0
  107. package/lib/icons/destinations/tempo-logo/tempo-logo.stories.d.ts +8 -0
  108. package/lib/icons/destinations/traceloop-logo/index.d.ts +2 -0
  109. package/lib/icons/destinations/traceloop-logo/traceloop-logo.stories.d.ts +8 -0
  110. package/lib/icons/destinations/uptrace-logo/index.d.ts +2 -0
  111. package/lib/icons/destinations/uptrace-logo/uptrace-logo.stories.d.ts +8 -0
  112. package/lib/icons/index.d.ts +1 -0
  113. package/lib/icons/overview/index.d.ts +1 -0
  114. package/lib/icons/overview/namespaces-icon/index.d.ts +2 -0
  115. package/lib/icons/overview/namespaces-icon/namespaces-icon.stories.d.ts +8 -0
  116. package/lib/icons/programming-languages/index.d.ts +0 -1
  117. package/lib/icons.js +29 -5
  118. package/lib/{index-CYn62h8x.js → index-CKtl8KxE.js} +2 -2
  119. package/lib/{index-Db_ZDrEr.js → index-CLOUNx6Z.js} +1 -1
  120. package/lib/{index-zMKRaKMY.js → index-D6cZdmUs.js} +40 -32
  121. package/lib/index-DB8Djrsy.js +487 -0
  122. package/lib/{index-3KUV6Vlt.js → index-DH2zLaey.js} +5 -2
  123. package/lib/{index-BtuW12KL.js → index-DiEc-llU.js} +68 -5
  124. package/lib/{index-DYEcdkUF.js → index-IvGLauAo.js} +49 -37
  125. package/lib/{index-CJKFedQi.js → index-lL1o2K_5.js} +2 -2
  126. package/lib/store/useEntityStore.d.ts +4 -2
  127. package/lib/store/useSetupStore.d.ts +2 -3
  128. package/lib/store.js +1 -1
  129. package/lib/theme.js +1 -1
  130. package/lib/types/common/index.d.ts +1 -0
  131. package/lib/types/destinations/index.d.ts +50 -3
  132. package/lib/types.js +53 -1
  133. package/lib/{useSourceSelectionFormData-BnlRp8m3.js → useSourceSelectionFormData-R_uK7F7W.js} +6 -4
  134. package/lib/{useTransition-CFmm4scp.js → useTransition-hWYVBuSi.js} +2 -2
  135. package/package.json +12 -12
  136. package/lib/index-BjJpYtF1.js +0 -42
  137. package/lib/containers/data-flow-actions-menu/{data-flow.stories.d.ts → data-flow-actions-menu.stories.d.ts} +0 -0
  138. package/lib/icons/{programming-languages/kafka-logo/kafka-logo.stories.d.ts → destinations/app-dynamics-logo/app-dynamics-logo.stories.d.ts} +0 -0
  139. package/lib/icons/{programming-languages → destinations}/kafka-logo/index.d.ts +0 -0
  140. package/lib/{index-9ObpINp4.js → index-DM8CZWtL.js} +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.16](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.15...ui-kit-v0.0.16) (2025-03-25)
4
+
5
+
6
+ ### Features
7
+
8
+ * destination icons as imported SVGs ([#51](https://github.com/odigos-io/ui-kit/issues/51)) ([9351568](https://github.com/odigos-io/ui-kit/commit/93515684b7fa464f526159092061f63a4b8675fb))
9
+ * kill `crypto.randomUUID` (after killing `useId`) ([#49](https://github.com/odigos-io/ui-kit/issues/49)) ([f668cf7](https://github.com/odigos-io/ui-kit/commit/f668cf719c44ebf267138b6c565c81701f135a86))
10
+ * move namespaces into entity store ([#47](https://github.com/odigos-io/ui-kit/issues/47)) ([4c96c3f](https://github.com/odigos-io/ui-kit/commit/4c96c3f746fcd2192e7b3c7cd69cf0d9c2dc6f6d))
11
+ * refactor data-tab props ([#48](https://github.com/odigos-io/ui-kit/issues/48)) ([d81559a](https://github.com/odigos-io/ui-kit/commit/d81559ae8fc0268c52ab52fd4171fedd63060fb2))
12
+
3
13
  ## [0.0.15](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.14...ui-kit-v0.0.15) (2025-03-24)
4
14
 
5
15
 
@@ -1,30 +1,42 @@
1
1
  import { type CSSProperties, type FC, type ReactNode } from 'react';
2
2
  import type { SVG } from '@/types';
3
3
  import { StatusType, SignalType } from '@/types';
4
- interface DataTabProps {
5
- title: string;
6
- subTitle?: string;
4
+ interface IconProps {
7
5
  icon?: SVG;
8
6
  icons?: SVG[];
9
7
  iconSrc?: string;
10
8
  iconSrcs?: string[];
11
- hoverText?: string;
9
+ }
10
+ interface VisualProps {
12
11
  status?: StatusType;
13
12
  faded?: boolean;
14
13
  bgColor?: CSSProperties['backgroundColor'];
15
14
  bgColorHover?: CSSProperties['backgroundColor'];
15
+ isActive?: boolean;
16
16
  monitors?: SignalType[];
17
17
  monitorsWithLabels?: boolean;
18
- isActive?: boolean;
18
+ }
19
+ interface CheckboxProps {
19
20
  withCheckbox?: boolean;
20
21
  isCheckboxDisabled?: boolean;
21
22
  isChecked?: boolean;
22
23
  onCheckboxChange?: (value: boolean) => void;
24
+ }
25
+ interface ExtendableProps {
23
26
  withExtend?: boolean;
24
27
  isExtended?: boolean;
25
28
  renderExtended?: () => ReactNode;
26
- renderActions?: () => ReactNode;
29
+ }
30
+ interface DataTabProps {
31
+ title: string;
32
+ subTitle?: string;
33
+ hoverText?: string;
27
34
  onClick?: () => void;
35
+ renderActions?: () => ReactNode;
36
+ iconProps?: IconProps;
37
+ visualProps?: VisualProps;
38
+ checkboxProps?: CheckboxProps;
39
+ extendableProps?: ExtendableProps;
28
40
  }
29
41
  declare const DataTab: FC<DataTabProps>;
30
42
  export { DataTab, type DataTabProps };
@@ -6,6 +6,7 @@ interface IconGroupProps {
6
6
  iconSrcs?: string[];
7
7
  status?: StatusType;
8
8
  size?: number;
9
+ id: string;
9
10
  }
10
11
  declare const IconGroup: FC<IconGroupProps>;
11
12
  export { IconGroup, type IconGroupProps };
package/lib/components.js CHANGED
@@ -1,18 +1,18 @@
1
- import { B as Button } from './index-zMKRaKMY.js';
2
- export { A as AutocompleteInput, a as Badge, C as CancelWarning, a0 as CenterThis, b as Checkbox, c as Code, d as ConditionDetails, D as DataCard, f as DataCardFieldTypes, e as DataCardFields, g as DataTab, h as DeleteWarning, 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, $ as FlexColumn, _ 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, a2 as ModalBody, z as MonitorsCheckboxes, G as MonitorsIcons, N as NavigationButtons, J as NoDataFound, L as NotificationNote, a1 as Overlay, S as SectionTitle, O as Segment, P as SkeletonLoader, Q as Status, R as Stepper, a3 as TableContainer, a4 as TableTitleWrap, a5 as TableWrap, U as Text, V as TextArea, W as Toggle, T as ToggleCodeComponent, X as Tooltip, Y as TraceLoader, Z as WarningModal } from './index-zMKRaKMY.js';
1
+ import { B as Button } from './index-D6cZdmUs.js';
2
+ export { A as AutocompleteInput, a as Badge, C as CancelWarning, a0 as CenterThis, b as Checkbox, c as Code, d as ConditionDetails, D as DataCard, f as DataCardFieldTypes, e as DataCardFields, g as DataTab, h as DeleteWarning, 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, $ as FlexColumn, _ 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, a2 as ModalBody, z as MonitorsCheckboxes, G as MonitorsIcons, N as NavigationButtons, J as NoDataFound, L as NotificationNote, a1 as Overlay, S as SectionTitle, O as Segment, P as SkeletonLoader, Q as Status, R as Stepper, a3 as TableContainer, a4 as TableTitleWrap, a5 as TableWrap, U as Text, V as TextArea, W as Toggle, T as ToggleCodeComponent, X as Tooltip, Y as TraceLoader, Z as WarningModal } from './index-D6cZdmUs.js';
3
3
  import React, { Component, createElement, createContext } from 'react';
4
4
  import Theme from './theme.js';
5
5
  import './types.js';
6
- import './index-DYEcdkUF.js';
6
+ import './index-IvGLauAo.js';
7
7
  import 'styled-components';
8
- import './index-CYn62h8x.js';
8
+ import './index-CKtl8KxE.js';
9
9
  import './index-BGlk5VhF.js';
10
- import './index-9ObpINp4.js';
10
+ import './index-DM8CZWtL.js';
11
11
  import './index-BZS1ijMm.js';
12
12
  import './index-D_Qn2U89.js';
13
- import './index-CJKFedQi.js';
14
- import './index-Db_ZDrEr.js';
15
- import './useTransition-CFmm4scp.js';
13
+ import './index-lL1o2K_5.js';
14
+ import './index-CLOUNx6Z.js';
15
+ import './useTransition-hWYVBuSi.js';
16
16
  import 'react-dom';
17
17
  import 'babel-runtime/helpers/extends';
18
18
  import 'babel-runtime/core-js/object/get-prototype-of';
package/lib/constants.js CHANGED
@@ -1,11 +1,11 @@
1
- export { A as ACTION_OPTIONS, I as INSTRUMENTATION_RULE_OPTIONS, M as MONITORS_OPTIONS } from './index-CJKFedQi.js';
1
+ export { A as ACTION_OPTIONS, I as INSTRUMENTATION_RULE_OPTIONS, M as MONITORS_OPTIONS } from './index-lL1o2K_5.js';
2
2
  export { D as DISPLAY_TITLES, F as FORM_ALERTS } from './index-C_0J5P9M.js';
3
3
  import './types.js';
4
- import './index-Db_ZDrEr.js';
4
+ import './index-CLOUNx6Z.js';
5
5
  import './index-BGlk5VhF.js';
6
6
  import 'react';
7
7
  import './theme.js';
8
- import './index-DYEcdkUF.js';
8
+ import './index-IvGLauAo.js';
9
9
  import 'styled-components';
10
10
 
11
11
  const TOKEN_ABOUT_TO_EXPIRE = 604800000; // 7 days in milliseconds
@@ -1,8 +1,5 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
- namespaces: {
4
- name: string;
5
- }[];
6
3
  }
7
4
  export declare const Filters: React.FC<Props>;
8
5
  export {};
@@ -1,9 +1,6 @@
1
1
  import React from 'react';
2
2
  import { EntityTypes } from '@/types';
3
3
  interface DataFlowActionsMenuProps {
4
- namespaces: {
5
- name: string;
6
- }[];
7
4
  addEntity?: EntityTypes;
8
5
  }
9
6
  declare const DataFlowActionsMenu: React.FC<DataFlowActionsMenuProps>;
@@ -1,9 +1,6 @@
1
1
  import { type FC } from 'react';
2
2
  import { type DropdownProps } from '@/components';
3
3
  interface NamespaceDropdownProps {
4
- namespaces: {
5
- name: string;
6
- }[];
7
4
  title?: string;
8
5
  value?: DropdownProps['options'];
9
6
  onSelect: (val: DropdownProps['options'][0]) => void;
@@ -3,11 +3,9 @@ import { type Namespace, type PersistSources } from '@/types';
3
3
  import { type SourceSelectionFormProps } from '../source-selection-form';
4
4
  interface SourceModalProps {
5
5
  componentType?: SourceSelectionFormProps['componentType'];
6
- namespaces: Namespace[];
7
- namespace?: Namespace;
8
- namespacesLoading: boolean;
9
6
  selectedNamespace: string;
10
7
  setSelectedNamespace: Dispatch<SetStateAction<string>>;
8
+ namespace?: Namespace;
11
9
  persistSources: PersistSources;
12
10
  }
13
11
  declare const SourceModal: FC<SourceModalProps>;
@@ -2,7 +2,6 @@ import { type FC } from 'react';
2
2
  import type { UseSourceSelectionFormData } from '@/hooks';
3
3
  interface ListProps extends UseSourceSelectionFormData {
4
4
  isModal?: boolean;
5
- namespacesLoading: boolean;
6
5
  selectedNamespace: string;
7
6
  onSelectNamespace: (namespace: string) => void;
8
7
  }
@@ -4,11 +4,9 @@ import type { AvailableSourcesByNamespace, NamespaceSelectionFormData, SourceSel
4
4
  interface SourceSelectionFormProps {
5
5
  componentType: 'SIMPLE' | 'FAST';
6
6
  isModal?: boolean;
7
- namespaces: Namespace[];
8
- namespace?: Namespace;
9
- namespacesLoading: boolean;
10
7
  selectedNamespace: string;
11
8
  onSelectNamespace: (namespace: string) => void;
9
+ namespace?: Namespace;
12
10
  }
13
11
  interface SourceSelectionFormRef {
14
12
  getFormValues: () => {
@@ -1,9 +1,7 @@
1
1
  import { type FC } from 'react';
2
- import type { Namespace } from '@/types';
3
2
  import type { UseSourceSelectionFormData } from '@/hooks';
4
3
  interface ControlsProps extends UseSourceSelectionFormData {
5
4
  isModal?: boolean;
6
- namespaces: Namespace[];
7
5
  selectedNamespace: string;
8
6
  onSelectNamespace: (namespace: string) => void;
9
7
  }
@@ -2,7 +2,6 @@ import { type FC } from 'react';
2
2
  import type { UseSourceSelectionFormData } from '@/hooks';
3
3
  interface ListProps extends UseSourceSelectionFormData {
4
4
  isModal?: boolean;
5
- namespacesLoading: boolean;
6
5
  selectedNamespace: string;
7
6
  }
8
7
  declare const List: FC<ListProps>;
@@ -2,6 +2,7 @@ import { type FC } from 'react';
2
2
  import { type Condition } from '@/types';
3
3
  interface TableCellConditionsProps {
4
4
  conditions: Condition[];
5
+ id: string;
5
6
  }
6
7
  declare const TableCellConditions: FC<TableCellConditionsProps>;
7
8
  export { TableCellConditions, type TableCellConditionsProps };
package/lib/containers.js CHANGED
@@ -1,24 +1,24 @@
1
1
  import React, { useState, useEffect, forwardRef, useRef, useImperativeHandle, useMemo, memo, useContext, createContext, useCallback, useLayoutEffect, Fragment } from 'react';
2
2
  import styled, { css } from 'styled-components';
3
- import { A as ACTION_OPTIONS, M as MONITORS_OPTIONS, I as INSTRUMENTATION_RULE_OPTIONS } from './index-CJKFedQi.js';
3
+ import { A as ACTION_OPTIONS, M as MONITORS_OPTIONS, I as INSTRUMENTATION_RULE_OPTIONS } from './index-lL1o2K_5.js';
4
4
  import { D as DISPLAY_TITLES, F as FORM_ALERTS } from './index-C_0J5P9M.js';
5
5
  import { ActionType, EntityTypes, StatusType, Crud, OtherStatus, NodeTypes, AddNodeTypes, EdgeTypes, FieldTypes, SignalType, CodeAttributesKeyTypes, PayloadCollectionKeyTypes, InstrumentationRuleType } from './types.js';
6
- import { f as DataCardFieldTypes, p as FieldLabel, b as Checkbox, o as FieldError, v as Input, x as InputTable, K as KeyValueInputsList, w as InputList, U as Text, O as Segment, S as SectionTitle, j as DocsButton, z as MonitorsCheckboxes, V as TextArea, k as Drawer, h as DeleteWarning, C as CancelWarning, d as ConditionDetails, D as DataCard, M as Modal, N as NavigationButtons, a2 as ModalBody, A as AutocompleteInput, i as Divider, Q as Status, _ as FlexRow, X as Tooltip, s as IconWrapped, G as MonitorsIcons, a3 as TableContainer, a4 as TableTitleWrap, r as IconTitleBadge, a5 as TableWrap, y as InteractiveTable, a0 as CenterThis, J as NoDataFound, $ as FlexColumn, Y as TraceLoader, a as Badge, B as Button, E as ExtendArrow, n as Dropdown, a6 as getDefaultExportFromCjs, F as FadeLoader, g as DataTab, P as SkeletonLoader, W as Toggle, L as NotificationNote, R as Stepper, I as IconButton, e as DataCardFields, t as IconsNav, q as IconGroup } from './index-zMKRaKMY.js';
7
- import { g as usePendingStore, f as useNotificationStore, a as useDrawerStore, b as useEntityStore, e as useModalStore, c as useFilterStore, s as styleInject, h as useSelectedStore, d as useInstrumentStore, k as getEntityId, i as useSetupStore, u as useDarkMode } from './index-DYEcdkUF.js';
6
+ import { f as DataCardFieldTypes, p as FieldLabel, b as Checkbox, o as FieldError, v as Input, x as InputTable, K as KeyValueInputsList, w as InputList, U as Text, O as Segment, S as SectionTitle, j as DocsButton, z as MonitorsCheckboxes, V as TextArea, k as Drawer, h as DeleteWarning, C as CancelWarning, d as ConditionDetails, D as DataCard, M as Modal, N as NavigationButtons, a2 as ModalBody, A as AutocompleteInput, i as Divider, Q as Status, _ as FlexRow, X as Tooltip, s as IconWrapped, G as MonitorsIcons, a3 as TableContainer, a4 as TableTitleWrap, r as IconTitleBadge, a5 as TableWrap, y as InteractiveTable, a0 as CenterThis, J as NoDataFound, $ as FlexColumn, Y as TraceLoader, a as Badge, B as Button, E as ExtendArrow, n as Dropdown, a6 as getDefaultExportFromCjs, F as FadeLoader, g as DataTab, P as SkeletonLoader, W as Toggle, L as NotificationNote, R as Stepper, I as IconButton, e as DataCardFields, t as IconsNav, q as IconGroup } from './index-D6cZdmUs.js';
7
+ import { g as usePendingStore, f as useNotificationStore, a as useDrawerStore, b as useEntityStore, e as useModalStore, c as useFilterStore, s as styleInject, h as useSelectedStore, d as useInstrumentStore, j as getEntityId, i as useSetupStore, u as useDarkMode } from './index-IvGLauAo.js';
8
8
  import Theme from './theme.js';
9
9
  import { i as isEmpty, s as safeJsonParse } from './index-BZS1ijMm.js';
10
- import { i as CheckCircledIcon, h as ErrorTriangleIcon, W as WarningTriangleIcon } from './index-9ObpINp4.js';
11
- import { C as CrossCircledIcon, E as EditIcon, O as OdigosLogoText, b as OverviewIcon, F as FilterIcon, N as NotificationIcon, S as SlackLogo, a as FolderIcon, K as KeyIcon, T as TerminalIcon } from './index-3KUV6Vlt.js';
12
- import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-Db_ZDrEr.js';
13
- import { u as useActionFormData, a as useClickNode, c as useDestinationFormData, b as useClickNotification, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-BnlRp8m3.js';
14
- import { d as useKeyDown, e as useOnClickOutside, u as useContainerSize, c as useInstrumentationRuleFormData, g as useTransition, f as useTimeAgo, a as useCopy } from './useTransition-CFmm4scp.js';
10
+ import { i as CheckCircledIcon, h as ErrorTriangleIcon, W as WarningTriangleIcon } from './index-DM8CZWtL.js';
11
+ import { C as CrossCircledIcon, E as EditIcon, O as OdigosLogoText, b as OverviewIcon, F as FilterIcon, N as NotificationIcon, S as SlackLogo, a as FolderIcon, K as KeyIcon, T as TerminalIcon } from './index-DH2zLaey.js';
12
+ import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-CLOUNx6Z.js';
13
+ import { u as useActionFormData, a as useClickNode, c as useDestinationFormData, b as useClickNotification, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-R_uK7F7W.js';
14
+ import { d as useKeyDown, e as useOnClickOutside, u as useContainerSize, c as useInstrumentationRuleFormData, g as useTransition, f as useTimeAgo, a as useCopy } from './useTransition-hWYVBuSi.js';
15
15
  import { T as TrashIcon, S as SearchIcon, P as PlusIcon$1, A as ArrowIcon, a as CopyIcon, f as CheckIcon, g as CrossIcon } from './index-D_Qn2U89.js';
16
- import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-CYn62h8x.js';
17
- import { f as filterActions, g as getConditionsBooleans, j as getEntityLabel, i as getEntityIcon, s as sleep$1, l as getPlatformIcon, m as getPlatformLabel, d as formatBytes, h as getContainersIcons, n as getValueForRange, b as filterSources, a as filterDestinations, c as compareCondition, k as getMetricForEntity, e as getContainersInstrumentedCount, o as isOverTime } from './index-BtuW12KL.js';
16
+ import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-CKtl8KxE.js';
17
+ import { f as filterActions, g as getConditionsBooleans, k as getEntityLabel, j as getEntityIcon, s as sleep$1, m as getPlatformIcon, n as getPlatformLabel, d as formatBytes, h as getContainersIcons, o as getValueForRange, i as getDestinationIcon, b as filterSources, a as filterDestinations, c as compareCondition, l as getMetricForEntity, p as getWorkloadId, e as getContainersInstrumentedCount, q as isOverTime } from './index-DiEc-llU.js';
18
18
  import require$$1 from 'use-sync-external-store/shim';
19
19
  import { createPortal } from 'react-dom';
20
20
  import { O as OdigosLogo } from './index-BGlk5VhF.js';
21
- import { R as RulesIcon, S as SourcesIcon, A as ActionsIcon, D as DestinationsIcon } from './index-BjJpYtF1.js';
21
+ import { R as RulesIcon, W as SourcesIcon, y as ActionsIcon, z as DestinationsIcon } from './index-DB8Djrsy.js';
22
22
  import 'babel-runtime/helpers/extends';
23
23
  import 'babel-runtime/core-js/object/get-prototype-of';
24
24
  import 'babel-runtime/helpers/classCallCheck';
@@ -643,20 +643,27 @@ const buildSpecCell$1 = (action) => {
643
643
  return str;
644
644
  };
645
645
 
646
- const TableCellConditions = ({ conditions }) => {
646
+ const TableCellConditions = ({ conditions, id }) => {
647
647
  const errors = useMemo(() => conditions?.filter(({ status }) => status === StatusType.Error) || [], [conditions]);
648
648
  const warnings = useMemo(() => conditions?.filter(({ status }) => status === StatusType.Warning) || [], [conditions]);
649
649
  const disableds = useMemo(() => conditions?.filter(({ status }) => status === OtherStatus.Disabled) || [], [conditions]);
650
650
  const isLoading = useMemo(() => !conditions?.length || !!conditions?.find(({ status }) => status === OtherStatus.Loading), [conditions]);
651
- return (React.createElement("div", { style: { lineHeight: 1 } }, errors.length > 0 ? (React.createElement(ConditionsStatuses, { conditions: errors })) : warnings.length > 0 ? (React.createElement(ConditionsStatuses, { conditions: warnings })) : disableds.length > 0 ? (React.createElement(ConditionsStatuses, { conditions: disableds })) : isLoading ? (React.createElement(Status, { status: OtherStatus.Loading, title: OtherStatus.Loading, withBorder: true, withIcon: true })) : (React.createElement(Status, { status: StatusType.Success, title: StatusType.Success, withBorder: true, withIcon: true }))));
651
+ const conditionsToShow = errors.length > 0 ? errors : warnings.length > 0 ? warnings : disableds.length > 0 ? disableds : [];
652
+ if (conditionsToShow.length > 0) {
653
+ return (React.createElement("div", { style: { lineHeight: 1 } },
654
+ React.createElement(ConditionsStatuses, { conditions: conditionsToShow, id: id })));
655
+ }
656
+ const elseStatus = isLoading ? OtherStatus.Loading : StatusType.Success;
657
+ return (React.createElement("div", { style: { lineHeight: 1 } },
658
+ React.createElement(Status, { status: elseStatus, title: elseStatus, withBorder: true, withIcon: true })));
652
659
  };
653
- const ConditionsStatuses = ({ conditions }) => {
660
+ const ConditionsStatuses = ({ conditions, id }) => {
654
661
  const theme = Theme.useTheme();
655
- return (React.createElement(FlexRow, null, mapConditions(conditions).map(({ status, type, reason, message, lastTransitionTime }) => {
662
+ return (React.createElement(FlexRow, null, mapConditions(conditions).map(({ status, type, reason, message, lastTransitionTime }, i) => {
656
663
  if (status === 'loading' || status === 'disabled')
657
664
  status = StatusType.Info;
658
665
  const icon = getStatusIcon(status, theme);
659
- return (React.createElement(Tooltip, { key: crypto.randomUUID(), titleIcon: icon, title: type, text: message || reason || '', timestamp: lastTransitionTime },
666
+ return (React.createElement(Tooltip, { key: `condition-${id}-${status}-${type}-${i}`, titleIcon: icon, title: type, text: message || reason || '', timestamp: lastTransitionTime },
660
667
  React.createElement(Status, { status: status, title: reason || type, withBorder: true, withIcon: true })));
661
668
  })));
662
669
  };
@@ -718,7 +725,7 @@ const ActionTable = ({ maxHeight, maxWidth }) => {
718
725
  },
719
726
  {
720
727
  columnKey: 'conditions',
721
- component: () => React.createElement(TableCellConditions, { conditions: act.conditions || [] }),
728
+ component: () => React.createElement(TableCellConditions, { conditions: act.conditions || [], id: act.id }),
722
729
  },
723
730
  {
724
731
  columnKey: 'active-status',
@@ -1025,7 +1032,8 @@ const MonitorDropdown = ({ title = 'Monitors', value, onSelect, onDeselect, ...p
1025
1032
  return React.createElement(Dropdown, { disabled: !options?.length, title: title, placeholder: 'All', options: options, value: value, onSelect: onSelect, onDeselect: onDeselect, ...props });
1026
1033
  };
1027
1034
 
1028
- const NamespaceDropdown = ({ namespaces, title = 'Namespace', value, onSelect, onDeselect, ...props }) => {
1035
+ const NamespaceDropdown = ({ title = 'Namespace', value, onSelect, onDeselect, ...props }) => {
1036
+ const { namespaces } = useEntityStore();
1029
1037
  const options = useMemo(() => {
1030
1038
  const payload = [];
1031
1039
  namespaces?.forEach(({ name }) => {
@@ -12717,7 +12725,22 @@ const BaseNode = memo(({ id: nodeId, data }) => {
12717
12725
  setSelectedSources(namespaces);
12718
12726
  };
12719
12727
  return (React.createElement(Container$i, { "data-id": nodeId, "$nodeWidth": nodeWidth, className: 'nowheel nodrag' },
12720
- React.createElement(DataTab, { title: title, subTitle: subTitle, icon: icon, icons: icons, iconSrc: iconSrc, iconSrcs: iconSrcs, status: status, faded: faded, monitors: monitors, isActive: isActive, withCheckbox: isSource, isChecked: sourceIndex !== -1, onCheckboxChange: onSelectSource, isCheckboxDisabled: isPending, renderActions: renderActions, onClick: () => { } }),
12728
+ React.createElement(DataTab, { title: title, subTitle: subTitle, onClick: () => { }, renderActions: renderActions, iconProps: {
12729
+ icon: icon,
12730
+ icons: icons,
12731
+ iconSrc: iconSrc,
12732
+ iconSrcs: iconSrcs,
12733
+ }, visualProps: {
12734
+ status: status,
12735
+ faded: faded,
12736
+ monitors: monitors,
12737
+ isActive: isActive,
12738
+ }, checkboxProps: {
12739
+ withCheckbox: isSource,
12740
+ isChecked: sourceIndex !== -1,
12741
+ onCheckboxChange: onSelectSource,
12742
+ isCheckboxDisabled: isPending,
12743
+ } }),
12721
12744
  React.createElement(Handle, { type: 'target', position: Position.Left, style: { visibility: 'hidden' } }),
12722
12745
  React.createElement(Handle, { type: 'source', position: Position.Right, style: { visibility: 'hidden' } })));
12723
12746
  });
@@ -13349,6 +13372,10 @@ const getNodePositions = ({ containerWidth }) => {
13349
13372
  const endX = (containerWidth <= 1500 ? 1500 : containerWidth) - nodeWidth$1 - startX;
13350
13373
  const getY = (idx) => nodeHeight * ((idx || 0) + 1);
13351
13374
  const positions = {
13375
+ [EntityTypes.Namespace]: {
13376
+ x: 0,
13377
+ y: () => 0,
13378
+ },
13352
13379
  [EntityTypes.InstrumentationRule]: {
13353
13380
  x: startX,
13354
13381
  y: getY,
@@ -13378,6 +13405,7 @@ const getNodePositions = ({ containerWidth }) => {
13378
13405
  const { nodeWidth } = nodeConfig;
13379
13406
  const mapToNodeData = (entity) => {
13380
13407
  const { hasDisableds, priorotizedStatus } = getConditionsBooleans(entity.conditions || []);
13408
+ const { icon, iconSrc } = getDestinationIcon(entity.destinationType.type);
13381
13409
  return {
13382
13410
  nodeWidth,
13383
13411
  id: entity.id,
@@ -13386,7 +13414,8 @@ const mapToNodeData = (entity) => {
13386
13414
  faded: hasDisableds,
13387
13415
  title: getEntityLabel(entity, EntityTypes.Destination, { prioritizeDisplayName: true }),
13388
13416
  subTitle: entity.destinationType.displayName,
13389
- iconSrc: entity.destinationType.imageUrl,
13417
+ icon,
13418
+ iconSrc,
13390
13419
  monitors: Object.keys(entity.exportedSignals).filter((signal) => entity.exportedSignals[signal] === true),
13391
13420
  raw: entity,
13392
13421
  };
@@ -13693,7 +13722,7 @@ const getFilterCount = (params) => {
13693
13722
  count++;
13694
13723
  return count;
13695
13724
  };
13696
- const Filters$1 = ({ namespaces: namespaceItems }) => {
13725
+ const Filters$1 = () => {
13697
13726
  const theme = Theme.useTheme();
13698
13727
  const { namespaces, kinds, monitors, languages, errors, onlyErrors, setAll, clearAll, getEmptyState } = useFilterStore();
13699
13728
  // We need local state, because we want to keep the filters in the store only when the user clicks on apply
@@ -13735,7 +13764,7 @@ const Filters$1 = ({ namespaces: namespaceItems }) => {
13735
13764
  React.createElement(SelectionButton, { label: 'Filters', icon: FilterIcon, badgeLabel: filterCount, badgeFilled: !!filterCount, withBorder: true, color: 'transparent', onClick: toggleFocused }),
13736
13765
  React.createElement(AbsoluteContainer$1, { "$hidden": !focused },
13737
13766
  React.createElement(FormWrapper, null,
13738
- React.createElement(NamespaceDropdown, { namespaces: namespaceItems, value: filters['namespaces'], onSelect: (val) => setFilters((prev) => ({ ...prev, namespaces: [...(prev.namespaces || []), val] })), onDeselect: (val) => setFilters((prev) => ({ ...prev, namespaces: (prev.namespaces || []).filter((opt) => opt.id !== val.id) })), showSearch: true, required: true, isMulti: true }),
13767
+ React.createElement(NamespaceDropdown, { value: filters['namespaces'], onSelect: (val) => setFilters((prev) => ({ ...prev, namespaces: [...(prev.namespaces || []), val] })), onDeselect: (val) => setFilters((prev) => ({ ...prev, namespaces: (prev.namespaces || []).filter((opt) => opt.id !== val.id) })), showSearch: true, required: true, isMulti: true }),
13739
13768
  React.createElement(KindDropdown, { value: filters['kinds'], onSelect: (val) => setFilters((prev) => ({ ...prev, kinds: [...(prev.kinds || []), val] })), onDeselect: (val) => setFilters((prev) => ({ ...prev, kinds: (prev.kinds || []).filter((opt) => opt.id !== val.id) })), showSearch: true, required: true, isMulti: true }),
13740
13769
  React.createElement(LanguageDropdown, { value: filters['languages'], onSelect: (val) => setFilters((prev) => ({ ...prev, languages: [...(prev.languages || []), val] })), onDeselect: (val) => setFilters((prev) => ({ ...prev, languages: (prev.languages || []).filter((opt) => opt.id !== val.id) })), showSearch: true, required: true, isMulti: true }),
13741
13770
  React.createElement(MonitorDropdown, { value: filters['monitors'], onSelect: (val) => setFilters((prev) => ({ ...prev, monitors: [...(prev.monitors || []), val] })), onDeselect: (val) => setFilters((prev) => ({ ...prev, monitors: (prev.monitors || []).filter((opt) => opt.id !== val.id) })), showSearch: true, required: true, isMulti: true }),
@@ -13768,12 +13797,12 @@ const AddButton = styled(Button) `
13768
13797
  min-width: 160px;
13769
13798
  padding-right: 24px;
13770
13799
  `;
13771
- const DataFlowActionsMenu = ({ namespaces, addEntity }) => {
13800
+ const DataFlowActionsMenu = ({ addEntity }) => {
13772
13801
  const theme = Theme.useTheme();
13773
13802
  const { setCurrentModal } = useModalStore();
13774
13803
  return (React.createElement(Container$b, null,
13775
13804
  React.createElement(Search, null),
13776
- React.createElement(Filters$1, { namespaces: namespaces }),
13805
+ React.createElement(Filters$1, null),
13777
13806
  addEntity && (React.createElement(PushToEnd, null,
13778
13807
  React.createElement(AddButton, { "data-id": `add-${addEntity}`, onClick: () => setCurrentModal(addEntity) },
13779
13808
  React.createElement(PlusIcon$1, { fill: theme.colors.primary }),
@@ -14041,6 +14070,7 @@ const DestinationDrawer = ({ categories, updateDestination, deleteDestination, t
14041
14070
  if (!thisItem)
14042
14071
  return null;
14043
14072
  const thisOptionType = categories.map(({ items }) => items.filter(({ type }) => type === thisItem.destinationType.type)).filter((arr) => !!arr.length)?.[0]?.[0];
14073
+ const { icon, iconSrc } = getDestinationIcon(thisOptionType.type);
14044
14074
  const handleEdit = (bool) => {
14045
14075
  setIsEditing(typeof bool === 'boolean' ? bool : true);
14046
14076
  };
@@ -14066,7 +14096,7 @@ const DestinationDrawer = ({ categories, updateDestination, deleteDestination, t
14066
14096
  setIsFormDirty(false);
14067
14097
  }
14068
14098
  };
14069
- return (React.createElement(OverviewDrawer, { ref: drawerRef, title: thisItem.name || thisItem.destinationType.displayName, iconSrc: thisItem.destinationType.imageUrl, isEdit: isEditing, isFormDirty: isFormDirty, onEdit: handleEdit, onSave: handleSave, onDelete: handleDelete, onCancel: handleCancel, isLastItem: destinations.length === 1 }, isEditing ? (React.createElement(FormContainer$2, null,
14099
+ return (React.createElement(OverviewDrawer, { ref: drawerRef, title: thisItem.name || thisItem.destinationType.displayName, icon: icon, iconSrc: iconSrc, isEdit: isEditing, isFormDirty: isFormDirty, onEdit: handleEdit, onSave: handleSave, onDelete: handleDelete, onCancel: handleCancel, isLastItem: destinations.length === 1 }, isEditing ? (React.createElement(FormContainer$2, null,
14070
14100
  React.createElement(DestinationForm, { isUpdate: true, categoryItem: thisOptionType, formData: formData, formErrors: formErrors, handleFormChange: (...params) => {
14071
14101
  setIsFormDirty(true);
14072
14102
  handleFormChange(...params);
@@ -14087,7 +14117,16 @@ const DestinationsList = ({ items, setSelectedItem }) => {
14087
14117
  return items.map((category) => {
14088
14118
  return (React.createElement(ListsWrapper$1, { key: `category-${category.name}` },
14089
14119
  React.createElement(SectionTitle, { size: 'small', title: capitalizeFirstLetter(category.name), description: category.description }),
14090
- category.items.map((item, idx) => (React.createElement(DataTab, { key: `select-destination-${item.type}-${idx}`, "data-id": `select-destination-${item.type}`, title: item.displayName, iconSrc: item.imageUrl, hoverText: 'Select', monitors: Object.keys(item.supportedSignals).filter((signal) => item.supportedSignals[signal].supported), monitorsWithLabels: true, onClick: () => setSelectedItem(item) })))));
14120
+ category.items.map((item, idx) => {
14121
+ const { icon, iconSrc } = getDestinationIcon(item.type);
14122
+ return (React.createElement(DataTab, { key: `select-destination-${item.type}-${idx}`, "data-id": `select-destination-${item.type}`, title: item.displayName, hoverText: 'Select', onClick: () => setSelectedItem(item), iconProps: {
14123
+ icon,
14124
+ iconSrc,
14125
+ }, visualProps: {
14126
+ monitors: Object.keys(item.supportedSignals).filter((signal) => item.supportedSignals[signal].supported),
14127
+ monitorsWithLabels: true,
14128
+ } }));
14129
+ })));
14091
14130
  });
14092
14131
  };
14093
14132
 
@@ -14101,7 +14140,16 @@ const PotentialDestinationsList = ({ items, setSelectedItem }) => {
14101
14140
  return null;
14102
14141
  return (React.createElement(ListsWrapper, null,
14103
14142
  React.createElement(SectionTitle, { size: 'small', icon: OdigosLogo, title: 'Detected by Odigos', description: 'Odigos detects destinations for which automatic connection is available. All data will be filled out automatically.' }),
14104
- items.map((item, idx) => (React.createElement(DataTab, { key: `select-potential-destination-${item.type}-${idx}`, "data-id": `select-potential-destination-${item.type}`, title: item.displayName, iconSrc: item.imageUrl, hoverText: 'Select', monitors: Object.keys(item.supportedSignals).filter((signal) => item.supportedSignals[signal].supported), monitorsWithLabels: true, onClick: () => setSelectedItem(item) })))));
14143
+ items.map((item, idx) => {
14144
+ const { icon, iconSrc } = getDestinationIcon(item.type);
14145
+ return (React.createElement(DataTab, { key: `select-potential-destination-${item.type}-${idx}`, "data-id": `select-potential-destination-${item.type}`, title: item.displayName, hoverText: 'Select', onClick: () => setSelectedItem(item), iconProps: {
14146
+ icon,
14147
+ iconSrc,
14148
+ }, visualProps: {
14149
+ monitors: Object.keys(item.supportedSignals).filter((signal) => item.supportedSignals[signal].supported),
14150
+ monitorsWithLabels: true,
14151
+ } }));
14152
+ })));
14105
14153
  };
14106
14154
 
14107
14155
  const Container$9 = styled.div `
@@ -14223,9 +14271,8 @@ const DestinationModal = ({ isOnboarding, categories, potentialDestinations, cre
14223
14271
  value: formData.name,
14224
14272
  });
14225
14273
  const storedDestination = {
14226
- type: selectedItem?.type || '',
14227
- displayName: selectedItem?.displayName || '',
14228
- imageUrl: selectedItem?.imageUrl || '',
14274
+ type: selectedItem.type,
14275
+ displayName: selectedItem.displayName,
14229
14276
  exportedSignals: formData.exportedSignals,
14230
14277
  destinationTypeDetails,
14231
14278
  category: '', // Could be handled in a more dynamic way if needed
@@ -14284,12 +14331,22 @@ const ConfiguredList = () => {
14284
14331
  const { configuredDestinations } = useSetupStore();
14285
14332
  return (React.createElement(Container$7, null, configuredDestinations.map(({ stored }, idx) => (React.createElement(ListItem$1, { key: `selected-destination-${stored.type}-${idx}`, "data-id": `selected-destination-${stored.type}`, item: stored, isLastItem: configuredDestinations.length === 1 })))));
14286
14333
  };
14287
- const ListItem$1 = ({ item, isLastItem, ...props }) => {
14334
+ const ListItem$1 = ({ item, isLastItem }) => {
14288
14335
  const { removeConfiguredDestination } = useSetupStore();
14289
14336
  const [deleteWarning, setDeleteWarning] = useState(false);
14337
+ const { icon, iconSrc } = getDestinationIcon(item.type);
14290
14338
  return (React.createElement(React.Fragment, null,
14291
- React.createElement(DataTab, { title: item.displayName, iconSrc: item.imageUrl, monitors: Object.keys(item.exportedSignals).filter((signal) => item.exportedSignals[signal] === true), monitorsWithLabels: true, withExtend: true, renderExtended: () => React.createElement(DataCardFields, { data: item.destinationTypeDetails }), renderActions: () => (React.createElement(IconButton, { onClick: () => setDeleteWarning(true) },
14292
- React.createElement(TrashIcon, null))), ...props }),
14339
+ React.createElement(DataTab, { title: item.displayName, iconProps: {
14340
+ icon,
14341
+ iconSrc,
14342
+ }, visualProps: {
14343
+ monitors: Object.keys(item.exportedSignals).filter((signal) => item.exportedSignals[signal] === true),
14344
+ monitorsWithLabels: true,
14345
+ }, extendableProps: {
14346
+ withExtend: true,
14347
+ renderExtended: () => React.createElement(DataCardFields, { data: item.destinationTypeDetails }),
14348
+ }, renderActions: () => (React.createElement(IconButton, { onClick: () => setDeleteWarning(true) },
14349
+ React.createElement(TrashIcon, null))) }),
14293
14350
  React.createElement(DeleteWarning, { isOpen: deleteWarning, name: item.displayName || item.type, type: EntityTypes.Destination, isLastItem: isLastItem, onApprove: () => removeConfiguredDestination(item), onDeny: () => setDeleteWarning(false) })));
14294
14351
  };
14295
14352
 
@@ -14347,6 +14404,7 @@ const DestinationTable = ({ metrics, maxHeight, maxWidth }) => {
14347
14404
  const filtered = useMemo(() => filterDestinations(destinations, filters), [destinations, filters]);
14348
14405
  const rows = useMemo(() => filtered.map((dest) => {
14349
14406
  const { hasErrors, hasWarnings, hasDisableds } = getConditionsBooleans(dest.conditions || []);
14407
+ const { icon, iconSrc } = getDestinationIcon(dest.destinationType.type);
14350
14408
  return {
14351
14409
  status: hasErrors ? StatusType.Error : hasWarnings ? StatusType.Warning : undefined,
14352
14410
  faded: hasDisableds,
@@ -14357,7 +14415,7 @@ const DestinationTable = ({ metrics, maxHeight, maxWidth }) => {
14357
14415
  cells: [
14358
14416
  {
14359
14417
  columnKey: 'icon',
14360
- component: () => React.createElement(IconWrapped, { src: dest.destinationType.imageUrl }),
14418
+ component: () => React.createElement(IconWrapped, { icon: icon, src: iconSrc }),
14361
14419
  },
14362
14420
  {
14363
14421
  columnKey: 'name',
@@ -14375,7 +14433,7 @@ const DestinationTable = ({ metrics, maxHeight, maxWidth }) => {
14375
14433
  },
14376
14434
  {
14377
14435
  columnKey: 'conditions',
14378
- component: () => React.createElement(TableCellConditions, { conditions: dest.conditions || [] }),
14436
+ component: () => React.createElement(TableCellConditions, { conditions: dest.conditions || [], id: dest.id }),
14379
14437
  },
14380
14438
  {
14381
14439
  columnKey: 'signals',
@@ -15348,9 +15406,10 @@ const NoDataFoundWrapper$1 = styled.div `
15348
15406
  max-height: calc(100vh - 360px);
15349
15407
  overflow-y: auto;
15350
15408
  `;
15351
- const List$1 = ({ isModal = false, filterNamespaces, filterSources, namespacesLoading, selectedNamespace, onSelectNamespace, selectedSources, onSelectSource, selectedFutureApps, onSelectFutureApps, onSelectAll, }) => {
15409
+ const List$1 = ({ isModal = false, filterNamespaces, filterSources, selectedNamespace, onSelectNamespace, selectedSources, onSelectSource, selectedFutureApps, onSelectFutureApps, onSelectAll, }) => {
15352
15410
  const theme = Theme.useTheme();
15353
15411
  const namespaces = filterNamespaces();
15412
+ const { namespacesLoading } = useEntityStore();
15354
15413
  if (!namespaces.length) {
15355
15414
  return React.createElement(NoDataFoundWrapper$1, null, namespacesLoading ? React.createElement(FadeLoader, { scale: 2 }) : React.createElement(NoDataFound, { title: 'No namespaces found' }));
15356
15415
  }
@@ -15467,7 +15526,8 @@ const NoDataFoundWrapper = styled.div `
15467
15526
  max-height: calc(100vh - 360px);
15468
15527
  overflow-y: auto;
15469
15528
  `;
15470
- const List = ({ isModal = false, namespacesLoading, selectedNamespace, selectedSources, onSelectSource, filterSources, }) => {
15529
+ const List = ({ isModal = false, selectedNamespace, selectedSources, onSelectSource, filterSources, }) => {
15530
+ const { namespacesLoading } = useEntityStore();
15471
15531
  const sources = selectedSources[selectedNamespace] || [];
15472
15532
  if (!sources.length) {
15473
15533
  return React.createElement(NoDataFoundWrapper, null, namespacesLoading ? React.createElement(FadeLoader, { scale: 2 }) : React.createElement(NoDataFound, { title: 'No sources found' }));
@@ -15501,7 +15561,7 @@ const ToggleWrapper = styled.div `
15501
15561
  align-items: center;
15502
15562
  gap: 32px;
15503
15563
  `;
15504
- const Controls = ({ namespaces, selectedNamespace, onSelectNamespace, selectedSources, onSelectAll, selectedFutureApps, onSelectFutureApps, searchText, setSearchText, showSelectedOnly, setShowSelectedOnly, }) => {
15564
+ const Controls = ({ selectedNamespace, onSelectNamespace, selectedSources, onSelectAll, selectedFutureApps, onSelectFutureApps, searchText, setSearchText, showSelectedOnly, setShowSelectedOnly, }) => {
15505
15565
  const futureApps = selectedFutureApps[selectedNamespace] || false;
15506
15566
  const sources = selectedSources[selectedNamespace] || [];
15507
15567
  const selectedAppsCount = sources.filter(({ selected }) => selected).length;
@@ -15509,7 +15569,7 @@ const Controls = ({ namespaces, selectedNamespace, onSelectNamespace, selectedSo
15509
15569
  React.createElement(SectionTitle, { title: 'Choose sources', description: "Apps will be automatically instrumented, and data will be sent to the relevant APM's destinations." }),
15510
15570
  React.createElement(FlexContainer, { style: { marginTop: 24 } },
15511
15571
  React.createElement(Input, { placeholder: 'Search for sources', icon: SearchIcon, value: searchText, onChange: (e) => setSearchText(e.target.value.toLowerCase()) }),
15512
- React.createElement(NamespaceDropdown, { namespaces: namespaces, title: '', value: selectedNamespace ? [{ value: selectedNamespace, id: selectedNamespace }] : [], onSelect: ({ id }) => !!id && onSelectNamespace(id), onDeselect: ({ id }) => !!id && onSelectNamespace(id) })),
15572
+ React.createElement(NamespaceDropdown, { title: '', value: selectedNamespace ? [{ value: selectedNamespace, id: selectedNamespace }] : [], onSelect: ({ id }) => !!id && onSelectNamespace(id), onDeselect: ({ id }) => !!id && onSelectNamespace(id) })),
15513
15573
  React.createElement(Divider, { margin: '16px 0' }),
15514
15574
  React.createElement(FlexContainer, null,
15515
15575
  React.createElement(FlexContainer, null,
@@ -15528,8 +15588,8 @@ const Simple = (props) => {
15528
15588
  React.createElement(List, { ...props })));
15529
15589
  };
15530
15590
 
15531
- const SourceSelectionForm = forwardRef(({ componentType, isModal, namespaces, namespace, namespacesLoading, selectedNamespace, onSelectNamespace }, ref) => {
15532
- const formState = useSourceSelectionFormData({ namespaces, namespace, selectedNamespace, onSelectNamespace });
15591
+ const SourceSelectionForm = forwardRef(({ componentType, isModal, selectedNamespace, onSelectNamespace, namespace }, ref) => {
15592
+ const formState = useSourceSelectionFormData({ selectedNamespace, onSelectNamespace, namespace });
15533
15593
  const { recordedInitialSources, getApiSourcesPayload, getApiFutureAppsPayload } = formState;
15534
15594
  useImperativeHandle(ref, () => ({
15535
15595
  getFormValues: () => ({
@@ -15540,15 +15600,15 @@ const SourceSelectionForm = forwardRef(({ componentType, isModal, namespaces, na
15540
15600
  }));
15541
15601
  switch (componentType) {
15542
15602
  case 'SIMPLE':
15543
- return React.createElement(Simple, { isModal: isModal, namespaces: namespaces, namespacesLoading: namespacesLoading, selectedNamespace: selectedNamespace, onSelectNamespace: onSelectNamespace, ...formState });
15603
+ return React.createElement(Simple, { isModal: isModal, selectedNamespace: selectedNamespace, onSelectNamespace: onSelectNamespace, ...formState });
15544
15604
  case 'FAST':
15545
- return React.createElement(Fast, { isModal: isModal, namespacesLoading: namespacesLoading, selectedNamespace: selectedNamespace, onSelectNamespace: onSelectNamespace, ...formState });
15605
+ return React.createElement(Fast, { isModal: isModal, selectedNamespace: selectedNamespace, onSelectNamespace: onSelectNamespace, ...formState });
15546
15606
  default:
15547
15607
  return null;
15548
15608
  }
15549
15609
  });
15550
15610
 
15551
- const SourceModal = ({ componentType = 'FAST', namespaces, namespace, namespacesLoading, selectedNamespace, setSelectedNamespace, persistSources }) => {
15611
+ const SourceModal = ({ componentType = 'FAST', selectedNamespace, setSelectedNamespace, namespace, persistSources }) => {
15552
15612
  const { currentModal, setCurrentModal } = useModalStore();
15553
15613
  const isOpen = currentModal === EntityTypes.Source;
15554
15614
  const onSelectNamespace = (ns) => {
@@ -15574,7 +15634,7 @@ const SourceModal = ({ componentType = 'FAST', namespaces, namespace, namespaces
15574
15634
  onClick: handleSubmit,
15575
15635
  },
15576
15636
  ] }) },
15577
- React.createElement(SourceSelectionForm, { ref: formRef, componentType: componentType, isModal: true, namespaces: namespaces, namespace: namespace, namespacesLoading: namespacesLoading, selectedNamespace: selectedNamespace, onSelectNamespace: onSelectNamespace })));
15637
+ React.createElement(SourceSelectionForm, { ref: formRef, componentType: componentType, isModal: true, selectedNamespace: selectedNamespace, onSelectNamespace: onSelectNamespace, namespace: namespace })));
15578
15638
  };
15579
15639
 
15580
15640
  const columns = [
@@ -15646,7 +15706,8 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15646
15706
  setSelectedSources(payload);
15647
15707
  }, [selectedSources]);
15648
15708
  const rows = useMemo(() => filtered.map((source) => {
15649
- const id = { namespace: source.namespace, name: source.name, kind: source.kind };
15709
+ const id = getWorkloadId(source);
15710
+ const idString = JSON.stringify(id);
15650
15711
  const { hasErrors, hasWarnings, hasDisableds } = getConditionsBooleans(source.conditions || []);
15651
15712
  const isPending = isThisPending({ entityType: EntityTypes.Source, entityId: id });
15652
15713
  const isChecked = !!selectedSources[id.namespace]?.find((x) => x.namespace === id.namespace && x.name === id.name && x.kind === id.kind);
@@ -15662,7 +15723,7 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15662
15723
  columnKey: 'checkbox-and-icon',
15663
15724
  component: () => (React.createElement(FlexRow, { "$gap": 16 },
15664
15725
  React.createElement(Checkbox, { disabled: isPending, value: isChecked, onChange: () => onSelectOne(source) }),
15665
- React.createElement(IconGroup, { icons: getContainersIcons(source.containers) }))),
15726
+ React.createElement(IconGroup, { icons: getContainersIcons(source.containers), id: idString }))),
15666
15727
  },
15667
15728
  {
15668
15729
  columnKey: 'name',
@@ -15685,7 +15746,7 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15685
15746
  },
15686
15747
  {
15687
15748
  columnKey: 'conditions',
15688
- component: () => React.createElement(TableCellConditions, { conditions: source.conditions || [] }),
15749
+ component: () => React.createElement(TableCellConditions, { conditions: source.conditions || [], id: idString }),
15689
15750
  },
15690
15751
  {
15691
15752
  columnKey: 'containers',