@odigos/ui-kit 0.0.7 → 0.0.8

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 (37) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/lib/components/dropdown/dropdown.stories.d.ts +3 -2
  3. package/lib/components/error-boundary/error-boundary.stories.d.ts +9 -0
  4. package/lib/components/error-boundary/index.d.ts +5 -0
  5. package/lib/components/icon-title-badge/index.d.ts +1 -0
  6. package/lib/components/index.d.ts +1 -0
  7. package/lib/components.js +159 -8
  8. package/lib/constants.js +3 -3
  9. package/lib/containers/compute-platform-select/index.d.ts +4 -4
  10. package/lib/containers/compute-platforms/index.d.ts +3 -3
  11. package/lib/containers/compute-platforms-actions-menu/index.d.ts +2 -2
  12. package/lib/containers/data-flow/nodes/header-node.d.ts +2 -1
  13. package/lib/containers/dropdowns/connection-status-dropdown/index.d.ts +2 -2
  14. package/lib/containers/dropdowns/connection-type-dropdown/connection-type-dropdown.stories.d.ts +9 -0
  15. package/lib/containers/dropdowns/{platform-types-dropdown → connection-type-dropdown}/index.d.ts +5 -5
  16. package/lib/containers/dropdowns/index.d.ts +1 -1
  17. package/lib/containers.js +52 -42
  18. package/lib/data/sources/index.d.ts +1 -0
  19. package/lib/functions.js +4 -4
  20. package/lib/hooks/useCopy.d.ts +1 -1
  21. package/lib/hooks.js +5 -5
  22. package/lib/icons.js +1 -1
  23. package/lib/{index-4tCBQ2pl.js → index-BulCzWQI.js} +1 -1
  24. package/lib/{index-BhCi-TxF.js → index-BumPE6cF.js} +1 -1
  25. package/lib/{index-DUW6bkzG.js → index-CKD2OX24.js} +2 -2
  26. package/lib/{index-COMxdOJo.js → index-CKUgKtl0.js} +18 -15
  27. package/lib/{index-Byh3BO6S.js → index-CZe2VX28.js} +2 -2
  28. package/lib/{index-DRT_7tQl.js → index-DIcomki-.js} +12 -0
  29. package/lib/store/useEntityStore.d.ts +1 -0
  30. package/lib/store.js +1 -1
  31. package/lib/theme.js +1 -1
  32. package/lib/types/{compute-platform → connection}/index.d.ts +1 -1
  33. package/lib/types/index.d.ts +1 -1
  34. package/lib/{useSourceSelectionFormData-ClorQ_WP.js → useSourceSelectionFormData-BY6B70Kf.js} +5 -4
  35. package/lib/{useTransition-5w3VnEhL.js → useTransition-Dfxjcy-C.js} +25 -4
  36. package/package.json +4 -1
  37. package/lib/containers/dropdowns/platform-types-dropdown/platform-types-dropdown.stories.d.ts +0 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.8](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.7...ui-kit-v0.0.8) (2025-03-16)
4
+
5
+
6
+ ### Features
7
+
8
+ * add error-boundary ([#13](https://github.com/odigos-io/ui-kit/issues/13)) ([8e8e7c8](https://github.com/odigos-io/ui-kit/commit/8e8e7c813a72da550f9d312bfb9f032c391e0aa9))
9
+ * add tooltip to filtered-count ([#16](https://github.com/odigos-io/ui-kit/issues/16)) ([9b7af73](https://github.com/odigos-io/ui-kit/commit/9b7af731cd73e9348dba1ed72ab2b34de28e102b))
10
+ * handle reset inside entity store ([#11](https://github.com/odigos-io/ui-kit/issues/11)) ([09ab02e](https://github.com/odigos-io/ui-kit/commit/09ab02e69d5534c15b0b0e9fa63f6d188c1b9da6))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * cannot read "writeText" of undefined ([#18](https://github.com/odigos-io/ui-kit/issues/18)) ([1382940](https://github.com/odigos-io/ui-kit/commit/13829401d5afdf2b51e2a597a52590ecfa3e7e7c))
16
+ * copy CLI command text overflowed ([#17](https://github.com/odigos-io/ui-kit/issues/17)) ([96a0d67](https://github.com/odigos-io/ui-kit/commit/96a0d67fbfec883739c1335a2b47dd797f69c98d))
17
+ * dropdown multi-option click area ([#9](https://github.com/odigos-io/ui-kit/issues/9)) ([43fb125](https://github.com/odigos-io/ui-kit/commit/43fb125cb3dd4c6dc53c8984917061fb51f7b9ea))
18
+ * icon size for CP select ([#8](https://github.com/odigos-io/ui-kit/issues/8)) ([d316e8b](https://github.com/odigos-io/ui-kit/commit/d316e8bdda5a75275e690e1bd4dbe15381a471fa))
19
+ * numberOfInstances in source selection ([#15](https://github.com/odigos-io/ui-kit/issues/15)) ([9b41658](https://github.com/odigos-io/ui-kit/commit/9b416583079839094a76c9be1992ab0b730fe81a))
20
+ * side-nav click area, and bigger icons ([#10](https://github.com/odigos-io/ui-kit/issues/10)) ([63b741a](https://github.com/odigos-io/ui-kit/commit/63b741abe28d8b8d9881109ce9459a4be9dd1215))
21
+
3
22
  ## [0.0.7](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.6...ui-kit-v0.0.7) (2025-03-13)
4
23
 
5
24
 
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
- import type { StoryFn } from '@storybook/react';
2
+ import type { StoryObj } from '@storybook/react';
3
3
  import { type DropdownProps } from '.';
4
4
  declare const _default: {
5
5
  title: string;
6
6
  component: React.FC<DropdownProps>;
7
7
  };
8
8
  export default _default;
9
- export declare const Default: StoryFn<DropdownProps>;
9
+ export declare const Default: StoryObj<DropdownProps>;
10
+ export declare const Multi: StoryObj<DropdownProps>;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { StoryFn } from '@storybook/react';
3
+ import { type ErrorBoundaryProps } from '.';
4
+ declare const _default: {
5
+ title: string;
6
+ component: React.FC<ErrorBoundaryProps>;
7
+ };
8
+ export default _default;
9
+ export declare const Default: StoryFn<ErrorBoundaryProps>;
@@ -0,0 +1,5 @@
1
+ import { type FC, type PropsWithChildren } from 'react';
2
+ interface ErrorBoundaryProps extends PropsWithChildren {
3
+ }
4
+ declare const ErrorBoundary: FC<ErrorBoundaryProps>;
5
+ export { ErrorBoundary, type ErrorBoundaryProps };
@@ -4,6 +4,7 @@ interface IconTitleBadgeProps {
4
4
  icon?: SVG;
5
5
  title: string;
6
6
  badge?: string | number;
7
+ badgeTooltip?: string;
7
8
  loading?: boolean;
8
9
  }
9
10
  declare const IconTitleBadge: FC<IconTitleBadgeProps>;
@@ -12,6 +12,7 @@ export * from './divider/index';
12
12
  export * from './docs-button/index';
13
13
  export * from './drawer/index';
14
14
  export * from './dropdown/index';
15
+ export * from './error-boundary/index';
15
16
  export * from './extend-arrow/index';
16
17
  export * from './fade-loader/index';
17
18
  export * from './field-error/index';
package/lib/components.js CHANGED
@@ -1,17 +1,18 @@
1
- export { A as AutocompleteInput, B as Badge, a as Button, C as CancelWarning, a0 as CenterThis, b as Checkbox, c as Code, d as ConditionDetails, f as DATA_CARD_FIELD_TYPES, D as DataCard, 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, U as Text, V as TextArea, W as Toggle, T as ToggleCodeComponent, X as Tooltip, Y as TraceLoader, Z as WarningModal } from './index-COMxdOJo.js';
2
- import 'react';
1
+ import { B as Button } from './index-CKUgKtl0.js';
2
+ export { A as AutocompleteInput, a as Badge, C as CancelWarning, a0 as CenterThis, b as Checkbox, c as Code, d as ConditionDetails, f as DATA_CARD_FIELD_TYPES, D as DataCard, 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, U as Text, V as TextArea, W as Toggle, T as ToggleCodeComponent, X as Tooltip, Y as TraceLoader, Z as WarningModal } from './index-CKUgKtl0.js';
3
+ import React, { Component, createElement, createContext } from 'react';
4
+ import Theme from './theme.js';
3
5
  import './types.js';
4
- import './index-DRT_7tQl.js';
6
+ import './index-DIcomki-.js';
5
7
  import 'styled-components';
6
- import './theme.js';
7
- import './index-4tCBQ2pl.js';
8
+ import './index-BulCzWQI.js';
8
9
  import './index-DLKEpJJm.js';
9
10
  import './index-BGlk5VhF.js';
10
11
  import './index-BZS1ijMm.js';
11
12
  import './index-BJxaoI0G.js';
12
- import './index-Byh3BO6S.js';
13
- import './index-BhCi-TxF.js';
14
- import './useTransition-5w3VnEhL.js';
13
+ import './index-CZe2VX28.js';
14
+ import './index-BumPE6cF.js';
15
+ import './useTransition-Dfxjcy-C.js';
15
16
  import 'react-dom';
16
17
  import 'babel-runtime/helpers/extends';
17
18
  import 'babel-runtime/core-js/object/get-prototype-of';
@@ -20,3 +21,153 @@ import 'babel-runtime/helpers/createClass';
20
21
  import 'babel-runtime/helpers/possibleConstructorReturn';
21
22
  import 'babel-runtime/helpers/inherits';
22
23
  import 'object-assign';
24
+
25
+ const ErrorBoundaryContext = createContext(null);
26
+
27
+ const initialState = {
28
+ didCatch: false,
29
+ error: null
30
+ };
31
+ let ErrorBoundary$1 = class ErrorBoundary extends Component {
32
+ constructor(props) {
33
+ super(props);
34
+ this.resetErrorBoundary = this.resetErrorBoundary.bind(this);
35
+ this.state = initialState;
36
+ }
37
+ static getDerivedStateFromError(error) {
38
+ return {
39
+ didCatch: true,
40
+ error
41
+ };
42
+ }
43
+ resetErrorBoundary() {
44
+ const {
45
+ error
46
+ } = this.state;
47
+ if (error !== null) {
48
+ var _this$props$onReset, _this$props;
49
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
50
+ args[_key] = arguments[_key];
51
+ }
52
+ (_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 ? void 0 : _this$props$onReset.call(_this$props, {
53
+ args,
54
+ reason: "imperative-api"
55
+ });
56
+ this.setState(initialState);
57
+ }
58
+ }
59
+ componentDidCatch(error, info) {
60
+ var _this$props$onError, _this$props2;
61
+ (_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 ? void 0 : _this$props$onError.call(_this$props2, error, info);
62
+ }
63
+ componentDidUpdate(prevProps, prevState) {
64
+ const {
65
+ didCatch
66
+ } = this.state;
67
+ const {
68
+ resetKeys
69
+ } = this.props;
70
+
71
+ // There's an edge case where if the thing that triggered the error happens to *also* be in the resetKeys array,
72
+ // we'd end up resetting the error boundary immediately.
73
+ // This would likely trigger a second error to be thrown.
74
+ // So we make sure that we don't check the resetKeys on the first call of cDU after the error is set.
75
+
76
+ if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {
77
+ var _this$props$onReset2, _this$props3;
78
+ (_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 ? void 0 : _this$props$onReset2.call(_this$props3, {
79
+ next: resetKeys,
80
+ prev: prevProps.resetKeys,
81
+ reason: "keys"
82
+ });
83
+ this.setState(initialState);
84
+ }
85
+ }
86
+ render() {
87
+ const {
88
+ children,
89
+ fallbackRender,
90
+ FallbackComponent,
91
+ fallback
92
+ } = this.props;
93
+ const {
94
+ didCatch,
95
+ error
96
+ } = this.state;
97
+ let childToRender = children;
98
+ if (didCatch) {
99
+ const props = {
100
+ error,
101
+ resetErrorBoundary: this.resetErrorBoundary
102
+ };
103
+ if (typeof fallbackRender === "function") {
104
+ childToRender = fallbackRender(props);
105
+ } else if (FallbackComponent) {
106
+ childToRender = createElement(FallbackComponent, props);
107
+ } else if (fallback !== undefined) {
108
+ childToRender = fallback;
109
+ } else {
110
+ throw error;
111
+ }
112
+ }
113
+ return createElement(ErrorBoundaryContext.Provider, {
114
+ value: {
115
+ didCatch,
116
+ error,
117
+ resetErrorBoundary: this.resetErrorBoundary
118
+ }
119
+ }, childToRender);
120
+ }
121
+ };
122
+ function hasArrayChanged() {
123
+ let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
124
+ let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
125
+ return a.length !== b.length || a.some((item, index) => !Object.is(item, b[index]));
126
+ }
127
+
128
+ const ErrorFallback = ({ error }) => {
129
+ const theme = Theme.useTheme();
130
+ const styles = {
131
+ container: {
132
+ display: 'flex',
133
+ flexDirection: 'column',
134
+ alignItems: 'center',
135
+ textAlign: 'center',
136
+ color: theme.text.error,
137
+ fontFamily: theme.font_family.primary,
138
+ },
139
+ errorMessage: {
140
+ padding: 10,
141
+ borderRadius: 5,
142
+ whiteSpace: 'pre-wrap',
143
+ background: theme.colors.error,
144
+ },
145
+ errorStack: {
146
+ whiteSpace: 'pre-wrap',
147
+ fontSize: '12px',
148
+ },
149
+ errorStackWrapper: {
150
+ textAlign: 'left',
151
+ marginTop: 10,
152
+ },
153
+ infoText: {
154
+ marginTop: 100,
155
+ color: theme.text.secondary,
156
+ fontSize: '14px',
157
+ },
158
+ };
159
+ return (React.createElement("div", { style: styles.container },
160
+ React.createElement("h2", null, "Something went wrong!"),
161
+ React.createElement("pre", { style: styles.errorMessage }, error?.message || 'Unknown Error'),
162
+ React.createElement("details", { style: styles.errorStackWrapper },
163
+ React.createElement("summary", null, "Stack Trace"),
164
+ React.createElement("pre", { style: styles.errorStack }, error?.stack || 'Unknown Stack')),
165
+ React.createElement("p", { style: styles.infoText }, "Try refreshing the page or contact support"),
166
+ React.createElement(Button, { variant: 'secondary', onClick: () => window.location.reload(), style: { fontSize: '1rem' } }, "Reload")));
167
+ };
168
+ const ErrorBoundary = ({ children }) => {
169
+ return (React.createElement(ErrorBoundary$1, { FallbackComponent: (props) => (React.createElement(Theme.Provider, null,
170
+ React.createElement(ErrorFallback, { ...props }))) }, children));
171
+ };
172
+
173
+ export { Button, ErrorBoundary };
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-Byh3BO6S.js';
1
+ export { A as ACTION_OPTIONS, I as INSTRUMENTATION_RULE_OPTIONS, M as MONITORS_OPTIONS } from './index-CZe2VX28.js';
2
2
  export { D as DISPLAY_TITLES, F as FORM_ALERTS } from './index-Cu2uHOuh.js';
3
3
  import './types.js';
4
- import './index-BhCi-TxF.js';
4
+ import './index-BumPE6cF.js';
5
5
  import './index-BGlk5VhF.js';
6
6
  import 'react';
7
7
  import './theme.js';
8
- import './index-DRT_7tQl.js';
8
+ import './index-DIcomki-.js';
9
9
  import 'styled-components';
10
10
 
11
11
  const TOKEN_ABOUT_TO_EXPIRE = 604800000; // 7 days in milliseconds
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { type Platform } from '@/types';
2
+ import { type Connection } from '@/types';
3
3
  interface ComputePlatformSelectProps {
4
- computePlatforms: Platform[];
5
- selected?: Platform;
6
- onSelect: (payload: Platform) => void;
4
+ connections: Connection[];
5
+ selected?: Connection;
6
+ onSelect: (payload: Connection) => void;
7
7
  onViewAll: () => void;
8
8
  }
9
9
  declare const ComputePlatformSelect: React.FC<ComputePlatformSelectProps>;
@@ -1,8 +1,8 @@
1
1
  import { type FC } from 'react';
2
- import { type Platform } from '@/types';
2
+ import { type Connection } from '@/types';
3
3
  interface ComputePlatformsProps {
4
- computePlatforms: Platform[];
5
- onSelect: (payload: Platform) => void;
4
+ connections: Connection[];
5
+ onSelect: (payload: Connection) => void;
6
6
  }
7
7
  declare const ComputePlatforms: FC<ComputePlatformsProps>;
8
8
  export { ComputePlatforms, type ComputePlatformsProps };
@@ -1,7 +1,7 @@
1
1
  import { type FC } from 'react';
2
- import type { Platform } from '@/types';
2
+ import type { Connection } from '@/types';
3
3
  interface ComputePlatformsActionsMenuProps {
4
- computePlatforms: Platform[];
4
+ connections: Connection[];
5
5
  }
6
6
  declare const ComputePlatformsActionsMenu: FC<ComputePlatformsActionsMenuProps>;
7
7
  export { ComputePlatformsActionsMenu, type ComputePlatformsActionsMenuProps };
@@ -5,7 +5,8 @@ export interface HeaderNodeProps extends NodeProps<Node<{
5
5
  nodeWidth: number;
6
6
  icon: SVG;
7
7
  title: string;
8
- tagValue: string | number;
8
+ badge: string | number;
9
+ badgeTooltip?: string;
9
10
  isFetching?: boolean;
10
11
  sources?: Source[];
11
12
  }, NODE_TYPES.HEADER>> {
@@ -1,8 +1,8 @@
1
1
  import { type FC } from 'react';
2
- import type { Platform } from '@/types';
2
+ import type { Connection } from '@/types';
3
3
  import { type DropdownProps } from '@/components';
4
4
  interface ConnectionStatusDropdownProps {
5
- computePlatforms: Platform[];
5
+ connections: Connection[];
6
6
  title?: string;
7
7
  value?: DropdownProps['options'];
8
8
  onSelect: (val: DropdownProps['options'][0]) => void;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { StoryFn } from '@storybook/react';
3
+ import { type ConnectionTypeDropdownProps } from '.';
4
+ declare const _default: {
5
+ title: string;
6
+ component: React.FC<ConnectionTypeDropdownProps>;
7
+ };
8
+ export default _default;
9
+ export declare const Default: StoryFn<ConnectionTypeDropdownProps>;
@@ -1,8 +1,8 @@
1
1
  import { type FC } from 'react';
2
- import type { Platform } from '@/types';
2
+ import type { Connection } from '@/types';
3
3
  import { type DropdownProps } from '@/components';
4
- interface PlatformTypesDropdownProps {
5
- computePlatforms: Platform[];
4
+ interface ConnectionTypeDropdownProps {
5
+ connections: Connection[];
6
6
  title?: string;
7
7
  value?: DropdownProps['options'];
8
8
  onSelect: (val: DropdownProps['options'][0]) => void;
@@ -11,5 +11,5 @@ interface PlatformTypesDropdownProps {
11
11
  required?: boolean;
12
12
  showSearch?: boolean;
13
13
  }
14
- declare const PlatformTypesDropdown: FC<PlatformTypesDropdownProps>;
15
- export { PlatformTypesDropdown, type PlatformTypesDropdownProps };
14
+ declare const ConnectionTypeDropdown: FC<ConnectionTypeDropdownProps>;
15
+ export { ConnectionTypeDropdown, type ConnectionTypeDropdownProps };
@@ -1,7 +1,7 @@
1
1
  export * from './connection-status-dropdown/index';
2
+ export * from './connection-type-dropdown/index';
2
3
  export * from './error-dropdown/index';
3
4
  export * from './language-dropdown/index';
4
5
  export * from './monitor-dropdown/index';
5
6
  export * from './namespace-dropdown/index';
6
- export * from './platform-types-dropdown/index';
7
7
  export * from './kind-dropdown/index';
package/lib/containers.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import React, { useState, useEffect, forwardRef, useImperativeHandle, useRef, useMemo, useId, 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-Byh3BO6S.js';
3
+ import { A as ACTION_OPTIONS, M as MONITORS_OPTIONS, I as INSTRUMENTATION_RULE_OPTIONS } from './index-CZe2VX28.js';
4
4
  import { D as DISPLAY_TITLES, F as FORM_ALERTS } from './index-Cu2uHOuh.js';
5
5
  import { ACTION_TYPE, ENTITY_TYPES, NOTIFICATION_TYPE, CRUD, OTHER_STATUS, NODE_TYPES, ADD_NODE_TYPES, EDGE_TYPES, FIELD_TYPES, SIGNAL_TYPE, CODE_ATTRIBUTES_KEY_TYPES, PAYLOAD_COLLECTION_KEY_TYPES, INSTRUMENTATION_RULE_TYPE } from './types.js';
6
- import { f as DATA_CARD_FIELD_TYPES, 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, $ as FlexColumn, r as IconTitleBadge, y as InteractiveTable, a0 as CenterThis, J as NoDataFound, Y as TraceLoader, B as Badge, a as Button, E as ExtendArrow, n as Dropdown, a3 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-COMxdOJo.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-DRT_7tQl.js';
6
+ import { f as DATA_CARD_FIELD_TYPES, 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, $ as FlexColumn, r as IconTitleBadge, y as InteractiveTable, a0 as CenterThis, J as NoDataFound, Y as TraceLoader, a as Badge, B as Button, E as ExtendArrow, n as Dropdown, a3 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-CKUgKtl0.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-DIcomki-.js';
8
8
  import Theme from './theme.js';
9
9
  import { i as isEmpty, s as safeJsonParse } from './index-BZS1ijMm.js';
10
10
  import { C as CheckCircledIcon, E as ErrorTriangleIcon, W as WarningTriangleIcon } from './index-DLKEpJJm.js';
11
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-BhCi-TxF.js';
13
- import { u as useActionFormData, a as useClickNode, c as useDestinationFormData, b as useClickNotification, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-ClorQ_WP.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-5w3VnEhL.js';
12
+ import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-BumPE6cF.js';
13
+ import { u as useActionFormData, a as useClickNode, c as useDestinationFormData, b as useClickNotification, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-BY6B70Kf.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-Dfxjcy-C.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-BJxaoI0G.js';
16
- import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-4tCBQ2pl.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-DUW6bkzG.js';
16
+ import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-BulCzWQI.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-CKD2OX24.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';
@@ -800,11 +800,19 @@ const StyledButton = styled(Button) `
800
800
  background-color: ${({ theme }) => theme.colors.majestic_blue + Theme.opacity.hex['048']};
801
801
  }
802
802
  `;
803
+ const TextLimited = styled(Text) `
804
+ white-space: nowrap;
805
+ overflow: hidden;
806
+ text-overflow: ellipsis;
807
+ font-size: 14px;
808
+ `;
803
809
  const SelectionButton = ({ label, onClick, icon: Icon, iconSrc, badgeLabel, badgeFilled, isSelected, withBorder, color, hoverColor, style }) => {
804
810
  return (React.createElement(StyledButton, { onClick: onClick, className: isSelected ? 'selected' : 'not-selected', "$withBorder": withBorder, "$color": color, "$hoverColor": hoverColor, style: style },
805
- Icon && React.createElement(Icon, null),
806
- iconSrc && React.createElement("img", { src: iconSrc, alt: '', width: 16, height: 16 }),
807
- React.createElement(Text, { size: 14, style: { whiteSpace: 'nowrap' } }, label),
811
+ Icon && (React.createElement("div", null,
812
+ React.createElement(Icon, null))),
813
+ iconSrc && (React.createElement("div", null,
814
+ React.createElement("img", { src: iconSrc, alt: '', width: 16, height: 16 }))),
815
+ React.createElement(TextLimited, null, label),
808
816
  badgeLabel !== undefined && React.createElement(Badge, { label: badgeLabel, filled: badgeFilled || isSelected })));
809
817
  };
810
818
 
@@ -867,7 +875,7 @@ const FootWrap = styled.div `
867
875
  border-top: ${({ theme }) => `1px solid ${theme.colors.border}`};
868
876
  padding: 12px;
869
877
  `;
870
- const ComputePlatformSelect = ({ computePlatforms, selected, onSelect, onViewAll }) => {
878
+ const ComputePlatformSelect = ({ connections, selected, onSelect, onViewAll }) => {
871
879
  const theme = Theme.useTheme();
872
880
  const { addNotification } = useNotificationStore();
873
881
  const [isOpen, setIsOpen] = useState(false);
@@ -878,8 +886,8 @@ const ComputePlatformSelect = ({ computePlatforms, selected, onSelect, onViewAll
878
886
  const containerRef = useRef(null);
879
887
  useOnClickOutside(containerRef, onClose);
880
888
  useKeyDown({ key: 'Escape', active: isOpen }, onClose);
881
- const withSelect = !!computePlatforms.length;
882
- const filtered = computePlatforms.filter(({ id }) => id.toLowerCase().includes(searchText));
889
+ const withSelect = !!connections.length;
890
+ const filtered = connections.filter(({ id }) => id.toLowerCase().includes(searchText));
883
891
  const Icon = !!selected?.type ? getPlatformIcon(selected.type) : null;
884
892
  return (React.createElement(RelativeContainer$2, { ref: containerRef },
885
893
  React.createElement(Tab, { "$withSelect": withSelect, onClick: () => setIsOpen((prev) => !prev) },
@@ -908,9 +916,9 @@ const ComputePlatformSelect = ({ computePlatforms, selected, onSelect, onViewAll
908
916
  React.createElement(Button, { variant: 'secondary', style: { width: '100%' }, onClick: onViewAll }, "VIEW ALL"))))));
909
917
  };
910
918
 
911
- const ComputePlatforms = ({ computePlatforms, onSelect }) => {
919
+ const ComputePlatforms = ({ connections, onSelect }) => {
912
920
  const { searchText, platformTypes, statuses } = useFilterStore();
913
- const filtered = computePlatforms.filter(({ id, type, connectionStatus }) => (!searchText || id.toLowerCase().includes(searchText)) &&
921
+ const filtered = connections.filter(({ id, type, connectionStatus }) => (!searchText || id.toLowerCase().includes(searchText)) &&
914
922
  (!platformTypes?.length || platformTypes.find((opt) => opt.id === type)) &&
915
923
  (!statuses?.length || statuses.find((opt) => opt.id === connectionStatus)));
916
924
  return (React.createElement(React.Fragment, null,
@@ -937,19 +945,32 @@ const ComputePlatforms = ({ computePlatforms, onSelect }) => {
937
945
  React.createElement(NoDataFound, null)))));
938
946
  };
939
947
 
940
- const ConnectionStatusDropdown = ({ computePlatforms, title = '', value, onSelect, onDeselect, ...props }) => {
948
+ const ConnectionStatusDropdown = ({ connections, title = '', value, onSelect, onDeselect, ...props }) => {
941
949
  const options = useMemo(() => {
942
950
  const payload = [];
943
- computePlatforms?.forEach(({ connectionStatus }) => {
951
+ connections?.forEach(({ connectionStatus }) => {
944
952
  if (!payload.find((opt) => opt.id === connectionStatus)) {
945
953
  payload.push({ id: connectionStatus, value: connectionStatus });
946
954
  }
947
955
  });
948
956
  return payload;
949
- }, [computePlatforms]);
957
+ }, [connections]);
950
958
  return React.createElement(Dropdown, { disabled: !options?.length, title: title, placeholder: 'All Statuses', options: options, value: value, onSelect: onSelect, onDeselect: onDeselect, ...props });
951
959
  };
952
960
 
961
+ const ConnectionTypeDropdown = ({ connections, title = '', value, onSelect, onDeselect, ...props }) => {
962
+ const options = useMemo(() => {
963
+ const payload = [];
964
+ connections?.forEach(({ type }) => {
965
+ if (!payload.find((opt) => opt.id === type)) {
966
+ payload.push({ id: type, value: type });
967
+ }
968
+ });
969
+ return payload;
970
+ }, [connections]);
971
+ return React.createElement(Dropdown, { disabled: !options?.length, title: title, placeholder: 'All Types', options: options, value: value, onSelect: onSelect, onDeselect: onDeselect, ...props });
972
+ };
973
+
953
974
  const ErrorDropdown = ({ title = 'Error Message', value, onSelect, onDeselect, disabled, ...props }) => {
954
975
  const { sources } = useEntityStore();
955
976
  const options = useMemo(() => {
@@ -1017,19 +1038,6 @@ const NamespaceDropdown = ({ namespaces, title = 'Namespace', value, onSelect, o
1017
1038
  return React.createElement(Dropdown, { disabled: !options?.length, title: title, placeholder: 'Select namespace', options: options, value: value, onSelect: onSelect, onDeselect: onDeselect, ...props });
1018
1039
  };
1019
1040
 
1020
- const PlatformTypesDropdown = ({ computePlatforms, title = '', value, onSelect, onDeselect, ...props }) => {
1021
- const options = useMemo(() => {
1022
- const payload = [];
1023
- computePlatforms?.forEach(({ type }) => {
1024
- if (!payload.find((opt) => opt.id === type)) {
1025
- payload.push({ id: type, value: type });
1026
- }
1027
- });
1028
- return payload;
1029
- }, [computePlatforms]);
1030
- return React.createElement(Dropdown, { disabled: !options?.length, title: title, placeholder: 'All Types', options: options, value: value, onSelect: onSelect, onDeselect: onDeselect, ...props });
1031
- };
1032
-
1033
1041
  const KindDropdown = ({ title = 'Kind', value, onSelect, onDeselect, ...props }) => {
1034
1042
  const { sources } = useEntityStore();
1035
1043
  const options = useMemo(() => {
@@ -1058,7 +1066,7 @@ const Title$1 = styled(Text) `
1058
1066
  const SearchAndFilterWrapper = styled.div `
1059
1067
  width: 200px;
1060
1068
  `;
1061
- const ComputePlatformsActionsMenu = ({ computePlatforms }) => {
1069
+ const ComputePlatformsActionsMenu = ({ connections }) => {
1062
1070
  const { searchText, setSearchText, statuses, setStatuses, clearAll } = useFilterStore();
1063
1071
  // cleanup filters on unmount
1064
1072
  useEffect(() => {
@@ -1068,12 +1076,12 @@ const ComputePlatformsActionsMenu = ({ computePlatforms }) => {
1068
1076
  React.createElement(FlexRow, { "$gap": 16 },
1069
1077
  React.createElement(FlexRow, { "$gap": 12 },
1070
1078
  React.createElement(Title$1, null, "Compute platforms"),
1071
- React.createElement(Badge, { label: computePlatforms.length, filled: !!computePlatforms.length })),
1079
+ React.createElement(Badge, { label: connections.length, filled: !!connections.length })),
1072
1080
  React.createElement(Divider, { orientation: 'vertical', length: '20px', margin: '0' }),
1073
1081
  React.createElement(SearchAndFilterWrapper, null,
1074
1082
  React.createElement(Input, { placeholder: 'Search...', icon: SearchIcon, value: searchText, onChange: (e) => setSearchText(e.target.value.toLowerCase()) })),
1075
1083
  React.createElement(SearchAndFilterWrapper, null,
1076
- React.createElement(ConnectionStatusDropdown, { computePlatforms: computePlatforms, value: statuses, onSelect: (val) => setStatuses([...(statuses || []), val]), onDeselect: (val) => setStatuses((statuses || []).filter((opt) => opt.id !== val.id)), showSearch: true, required: true, isMulti: true })))));
1084
+ React.createElement(ConnectionStatusDropdown, { connections: connections, value: statuses, onSelect: (val) => setStatuses([...(statuses || []), val]), onDeselect: (val) => setStatuses((statuses || []).filter((opt) => opt.id !== val.id)), showSearch: true, required: true, isMulti: true })))));
1077
1085
  };
1078
1086
 
1079
1087
  var css_248z = "/* this gets exported as style.css and can be used for the default theming */\n/* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */\n.react-flow {\n direction: ltr;\n\n --xy-edge-stroke-default: #b1b1b7;\n --xy-edge-stroke-width-default: 1;\n --xy-edge-stroke-selected-default: #555;\n\n --xy-connectionline-stroke-default: #b1b1b7;\n --xy-connectionline-stroke-width-default: 1;\n\n --xy-attribution-background-color-default: rgba(255, 255, 255, 0.5);\n\n --xy-minimap-background-color-default: #fff;\n --xy-minimap-mask-background-color-default: rgb(240, 240, 240, 0.6);\n --xy-minimap-mask-stroke-color-default: transparent;\n --xy-minimap-mask-stroke-width-default: 1;\n --xy-minimap-node-background-color-default: #e2e2e2;\n --xy-minimap-node-stroke-color-default: transparent;\n --xy-minimap-node-stroke-width-default: 2;\n\n --xy-background-color-default: transparent;\n --xy-background-pattern-dots-color-default: #91919a;\n --xy-background-pattern-lines-color-default: #eee;\n --xy-background-pattern-cross-color-default: #e2e2e2;\n background-color: var(--xy-background-color, var(--xy-background-color-default));\n --xy-node-color-default: inherit;\n --xy-node-border-default: 1px solid #1a192b;\n --xy-node-background-color-default: #fff;\n --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);\n --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);\n --xy-node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;\n --xy-node-border-radius-default: 3px;\n\n --xy-handle-background-color-default: #1a192b;\n --xy-handle-border-color-default: #fff;\n\n --xy-selection-background-color-default: rgba(0, 89, 220, 0.08);\n --xy-selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);\n\n --xy-controls-button-background-color-default: #fefefe;\n --xy-controls-button-background-color-hover-default: #f4f4f4;\n --xy-controls-button-color-default: inherit;\n --xy-controls-button-color-hover-default: inherit;\n --xy-controls-button-border-color-default: #eee;\n --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n\n --xy-edge-label-background-color-default: #ffffff;\n --xy-edge-label-color-default: inherit;\n --xy-resize-background-color-default: #3367d9;\n}\n.react-flow.dark {\n --xy-edge-stroke-default: #3e3e3e;\n --xy-edge-stroke-width-default: 1;\n --xy-edge-stroke-selected-default: #727272;\n\n --xy-connectionline-stroke-default: #b1b1b7;\n --xy-connectionline-stroke-width-default: 1;\n\n --xy-attribution-background-color-default: rgba(150, 150, 150, 0.25);\n\n --xy-minimap-background-color-default: #141414;\n --xy-minimap-mask-background-color-default: rgb(60, 60, 60, 0.6);\n --xy-minimap-mask-stroke-color-default: transparent;\n --xy-minimap-mask-stroke-width-default: 1;\n --xy-minimap-node-background-color-default: #2b2b2b;\n --xy-minimap-node-stroke-color-default: transparent;\n --xy-minimap-node-stroke-width-default: 2;\n\n --xy-background-color-default: #141414;\n --xy-background-pattern-dots-color-default: #777;\n --xy-background-pattern-lines-color-default: #777;\n --xy-background-pattern-cross-color-default: #777;\n --xy-node-color-default: #f8f8f8;\n --xy-node-border-default: 1px solid #3c3c3c;\n --xy-node-background-color-default: #1e1e1e;\n --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);\n --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, 0.08);\n --xy-node-boxshadow-selected-default: 0 0 0 0.5px #999;\n\n --xy-handle-background-color-default: #bebebe;\n --xy-handle-border-color-default: #1e1e1e;\n\n --xy-selection-background-color-default: rgba(200, 200, 220, 0.08);\n --xy-selection-border-default: 1px dotted rgba(200, 200, 220, 0.8);\n\n --xy-controls-button-background-color-default: #2b2b2b;\n --xy-controls-button-background-color-hover-default: #3e3e3e;\n --xy-controls-button-color-default: #f8f8f8;\n --xy-controls-button-color-hover-default: #fff;\n --xy-controls-button-border-color-default: #5b5b5b;\n --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n\n --xy-edge-label-background-color-default: #141414;\n --xy-edge-label-color-default: #f8f8f8;\n}\n.react-flow__background {\n background-color: var(--xy-background-color, var(--xy-background-color-props, var(--xy-background-color-default)));\n pointer-events: none;\n z-index: -1;\n}\n.react-flow__container {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n.react-flow__pane {\n z-index: 1;\n}\n.react-flow__pane.draggable {\n cursor: grab;\n }\n.react-flow__pane.dragging {\n cursor: grabbing;\n }\n.react-flow__pane.selection {\n cursor: pointer;\n }\n.react-flow__viewport {\n transform-origin: 0 0;\n z-index: 2;\n pointer-events: none;\n}\n.react-flow__renderer {\n z-index: 4;\n}\n.react-flow__selection {\n z-index: 6;\n}\n.react-flow__nodesselection-rect:focus,\n.react-flow__nodesselection-rect:focus-visible {\n outline: none;\n}\n.react-flow__edge-path {\n stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));\n stroke-width: var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));\n fill: none;\n}\n.react-flow__connection-path {\n stroke: var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));\n stroke-width: var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));\n fill: none;\n}\n.react-flow .react-flow__edges {\n position: absolute;\n}\n.react-flow .react-flow__edges svg {\n overflow: visible;\n position: absolute;\n pointer-events: none;\n }\n.react-flow__edge {\n pointer-events: visibleStroke;\n}\n.react-flow__edge.selectable {\n cursor: pointer;\n }\n.react-flow__edge.animated path {\n stroke-dasharray: 5;\n animation: dashdraw 0.5s linear infinite;\n }\n.react-flow__edge.animated path.react-flow__edge-interaction {\n stroke-dasharray: none;\n animation: none;\n }\n.react-flow__edge.inactive {\n pointer-events: none;\n }\n.react-flow__edge.selected,\n .react-flow__edge:focus,\n .react-flow__edge:focus-visible {\n outline: none;\n }\n.react-flow__edge.selected .react-flow__edge-path,\n .react-flow__edge.selectable:focus .react-flow__edge-path,\n .react-flow__edge.selectable:focus-visible .react-flow__edge-path {\n stroke: var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default));\n }\n.react-flow__edge-textwrapper {\n pointer-events: all;\n }\n.react-flow__edge .react-flow__edge-text {\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n.react-flow__connection {\n pointer-events: none;\n}\n.react-flow__connection .animated {\n stroke-dasharray: 5;\n animation: dashdraw 0.5s linear infinite;\n }\nsvg.react-flow__connectionline {\n z-index: 1001;\n overflow: visible;\n position: absolute;\n}\n.react-flow__nodes {\n pointer-events: none;\n transform-origin: 0 0;\n}\n.react-flow__node {\n position: absolute;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n pointer-events: all;\n transform-origin: 0 0;\n box-sizing: border-box;\n cursor: default;\n}\n.react-flow__node.selectable {\n cursor: pointer;\n }\n.react-flow__node.draggable {\n cursor: grab;\n pointer-events: all;\n }\n.react-flow__node.draggable.dragging {\n cursor: grabbing;\n }\n.react-flow__nodesselection {\n z-index: 3;\n transform-origin: left top;\n pointer-events: none;\n}\n.react-flow__nodesselection-rect {\n position: absolute;\n pointer-events: all;\n cursor: grab;\n }\n.react-flow__handle {\n position: absolute;\n pointer-events: none;\n min-width: 5px;\n min-height: 5px;\n width: 6px;\n height: 6px;\n background-color: var(--xy-handle-background-color, var(--xy-handle-background-color-default));\n border: 1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));\n border-radius: 100%;\n}\n.react-flow__handle.connectingfrom {\n pointer-events: all;\n }\n.react-flow__handle.connectionindicator {\n pointer-events: all;\n cursor: crosshair;\n }\n.react-flow__handle-bottom {\n top: auto;\n left: 50%;\n bottom: 0;\n transform: translate(-50%, 50%);\n }\n.react-flow__handle-top {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n.react-flow__handle-left {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n }\n.react-flow__handle-right {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n }\n.react-flow__edgeupdater {\n cursor: move;\n pointer-events: all;\n}\n.react-flow__panel {\n position: absolute;\n z-index: 5;\n margin: 15px;\n}\n.react-flow__panel.top {\n top: 0;\n }\n.react-flow__panel.bottom {\n bottom: 0;\n }\n.react-flow__panel.left {\n left: 0;\n }\n.react-flow__panel.right {\n right: 0;\n }\n.react-flow__panel.center {\n left: 50%;\n transform: translateX(-50%);\n }\n.react-flow__attribution {\n font-size: 10px;\n background: var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));\n padding: 2px 3px;\n margin: 0;\n}\n.react-flow__attribution a {\n text-decoration: none;\n color: #999;\n }\n@keyframes dashdraw {\n from {\n stroke-dashoffset: 10;\n }\n}\n.react-flow__edgelabel-renderer {\n position: absolute;\n width: 100%;\n height: 100%;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n left: 0;\n top: 0;\n}\n.react-flow__viewport-portal {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.react-flow__minimap {\n background: var(\n --xy-minimap-background-color-props,\n var(--xy-minimap-background-color, var(--xy-minimap-background-color-default))\n );\n}\n.react-flow__minimap-svg {\n display: block;\n }\n.react-flow__minimap-mask {\n fill: var(\n --xy-minimap-mask-background-color-props,\n var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default))\n );\n stroke: var(\n --xy-minimap-mask-stroke-color-props,\n var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default))\n );\n stroke-width: var(\n --xy-minimap-mask-stroke-width-props,\n var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default))\n );\n }\n.react-flow__minimap-node {\n fill: var(\n --xy-minimap-node-background-color-props,\n var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default))\n );\n stroke: var(\n --xy-minimap-node-stroke-color-props,\n var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default))\n );\n stroke-width: var(\n --xy-minimap-node-stroke-width-props,\n var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default))\n );\n }\n.react-flow__background-pattern.dots {\n fill: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default))\n );\n }\n.react-flow__background-pattern.lines {\n stroke: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default))\n );\n }\n.react-flow__background-pattern.cross {\n stroke: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default))\n );\n }\n.react-flow__controls {\n display: flex;\n flex-direction: column;\n box-shadow: var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default));\n}\n.react-flow__controls.horizontal {\n flex-direction: row;\n }\n.react-flow__controls-button {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 26px;\n width: 26px;\n padding: 4px;\n border: none;\n background: var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));\n border-bottom: 1px solid\n var(\n --xy-controls-button-border-color-props,\n var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))\n );\n color: var(\n --xy-controls-button-color-props,\n var(--xy-controls-button-color, var(--xy-controls-button-color-default))\n );\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n.react-flow__controls-button svg {\n width: 100%;\n max-width: 12px;\n max-height: 12px;\n fill: currentColor;\n }\n.react-flow__edge.updating .react-flow__edge-path {\n stroke: #777;\n }\n.react-flow__edge-text {\n font-size: 10px;\n }\n.react-flow__node.selectable:focus,\n .react-flow__node.selectable:focus-visible {\n outline: none;\n }\n.react-flow__node-input,\n.react-flow__node-default,\n.react-flow__node-output,\n.react-flow__node-group {\n padding: 10px;\n border-radius: var(--xy-node-border-radius, var(--xy-node-border-radius-default));\n width: 150px;\n font-size: 12px;\n color: var(--xy-node-color, var(--xy-node-color-default));\n text-align: center;\n border: var(--xy-node-border, var(--xy-node-border-default));\n background-color: var(--xy-node-background-color, var(--xy-node-background-color-default));\n}\n.react-flow__node-input.selectable:hover, .react-flow__node-default.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {\n box-shadow: var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default));\n }\n.react-flow__node-input.selectable.selected,\n .react-flow__node-input.selectable:focus,\n .react-flow__node-input.selectable:focus-visible,\n .react-flow__node-default.selectable.selected,\n .react-flow__node-default.selectable:focus,\n .react-flow__node-default.selectable:focus-visible,\n .react-flow__node-output.selectable.selected,\n .react-flow__node-output.selectable:focus,\n .react-flow__node-output.selectable:focus-visible,\n .react-flow__node-group.selectable.selected,\n .react-flow__node-group.selectable:focus,\n .react-flow__node-group.selectable:focus-visible {\n box-shadow: var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default));\n }\n.react-flow__node-group {\n background-color: var(--xy-node-group-background-color, var(--xy-node-group-background-color-default));\n}\n.react-flow__nodesselection-rect,\n.react-flow__selection {\n background: var(--xy-selection-background-color, var(--xy-selection-background-color-default));\n border: var(--xy-selection-border, var(--xy-selection-border-default));\n}\n.react-flow__nodesselection-rect:focus,\n .react-flow__nodesselection-rect:focus-visible,\n .react-flow__selection:focus,\n .react-flow__selection:focus-visible {\n outline: none;\n }\n.react-flow__controls-button:hover {\n background: var(\n --xy-controls-button-background-color-hover-props,\n var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default))\n );\n color: var(\n --xy-controls-button-color-hover-props,\n var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default))\n );\n }\n.react-flow__controls-button:disabled {\n pointer-events: none;\n }\n.react-flow__controls-button:disabled svg {\n fill-opacity: 0.4;\n }\n.react-flow__controls-button:last-child {\n border-bottom: none;\n }\n.react-flow__resize-control {\n position: absolute;\n}\n.react-flow__resize-control.left,\n.react-flow__resize-control.right {\n cursor: ew-resize;\n}\n.react-flow__resize-control.top,\n.react-flow__resize-control.bottom {\n cursor: ns-resize;\n}\n.react-flow__resize-control.top.left,\n.react-flow__resize-control.bottom.right {\n cursor: nwse-resize;\n}\n.react-flow__resize-control.bottom.left,\n.react-flow__resize-control.top.right {\n cursor: nesw-resize;\n}\n/* handle styles */\n.react-flow__resize-control.handle {\n width: 4px;\n height: 4px;\n border: 1px solid #fff;\n border-radius: 1px;\n background-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));\n transform: translate(-50%, -50%);\n}\n.react-flow__resize-control.handle.left {\n left: 0;\n top: 50%;\n}\n.react-flow__resize-control.handle.right {\n left: 100%;\n top: 50%;\n}\n.react-flow__resize-control.handle.top {\n left: 50%;\n top: 0;\n}\n.react-flow__resize-control.handle.bottom {\n left: 50%;\n top: 100%;\n}\n.react-flow__resize-control.handle.top.left {\n left: 0;\n}\n.react-flow__resize-control.handle.bottom.left {\n left: 0;\n}\n.react-flow__resize-control.handle.top.right {\n left: 100%;\n}\n.react-flow__resize-control.handle.bottom.right {\n left: 100%;\n}\n/* line styles */\n.react-flow__resize-control.line {\n border-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));\n border-width: 0;\n border-style: solid;\n}\n.react-flow__resize-control.line.left,\n.react-flow__resize-control.line.right {\n width: 1px;\n transform: translate(-50%, 0);\n top: 0;\n height: 100%;\n}\n.react-flow__resize-control.line.left {\n left: 0;\n border-left-width: 1px;\n}\n.react-flow__resize-control.line.right {\n left: 100%;\n border-right-width: 1px;\n}\n.react-flow__resize-control.line.top,\n.react-flow__resize-control.line.bottom {\n height: 1px;\n transform: translate(0, -50%);\n left: 0;\n width: 100%;\n}\n.react-flow__resize-control.line.top {\n top: 0;\n border-top-width: 1px;\n}\n.react-flow__resize-control.line.bottom {\n border-bottom-width: 1px;\n top: 100%;\n}\n.react-flow__edge-textbg {\n fill: var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default));\n}\n.react-flow__edge-text {\n fill: var(--xy-edge-label-color, var(--xy-edge-label-color-default));\n}\n";
@@ -12844,7 +12852,7 @@ const Progress = styled.div `
12844
12852
  transition: width 0.3s;
12845
12853
  `;
12846
12854
  const HeaderNode = memo(({ id: nodeId, data }) => {
12847
- const { nodeWidth, title, icon: Icon, tagValue, isFetching, sources } = data;
12855
+ const { nodeWidth, title, icon: Icon, badge, badgeTooltip, isFetching, sources } = data;
12848
12856
  const entityType = nodeId.split('-')[0];
12849
12857
  const { isAwaitingInstrumentation, sourcesToCreate, sourcesCreated, sourcesToDelete, sourcesDeleted } = useInstrumentStore();
12850
12858
  const isSourceAwaitingInstrumentation = entityType === ENTITY_TYPES.SOURCE && isAwaitingInstrumentation;
@@ -12882,7 +12890,7 @@ const HeaderNode = memo(({ id: nodeId, data }) => {
12882
12890
  return (React.createElement(Container$e, { "$nodeWidth": nodeWidth, className: 'nowheel nodrag' },
12883
12891
  entityType === ENTITY_TYPES.SOURCE && (React.createElement(SelectorWrapper, null,
12884
12892
  React.createElement(Checkbox, { partiallyChecked: hasSelected && sources?.length !== totalSelectedSources, value: hasSelected && sources?.length === totalSelectedSources, onChange: onSelect, disabled: !sources?.length }))),
12885
- React.createElement(IconTitleBadge, { icon: Icon, title: title, badge: isSourceAwaitingInstrumentation ? `${instrumentingPercent}%` : tagValue, loading: isFetching && !isSourceAwaitingInstrumentation }),
12893
+ React.createElement(IconTitleBadge, { icon: Icon, title: title, badge: isSourceAwaitingInstrumentation ? `${instrumentingPercent}%` : badge, badgeTooltip: badgeTooltip, loading: isFetching && !isSourceAwaitingInstrumentation }),
12886
12894
  React.createElement(Actions$1, { entityType: entityType }),
12887
12895
  isSourceAwaitingInstrumentation && React.createElement(Progress, { percent: instrumentingPercent })));
12888
12896
  });
@@ -13079,7 +13087,7 @@ const buildRuleNodes = ({ loading, entities, positions, unfilteredCount }) => {
13079
13087
  nodeWidth: nodeWidth$4,
13080
13088
  title: 'Instrumentation Rules',
13081
13089
  icon: getEntityIcon(ENTITY_TYPES.INSTRUMENTATION_RULE),
13082
- tagValue: unfilteredCount,
13090
+ badge: unfilteredCount,
13083
13091
  isFetching: loading,
13084
13092
  },
13085
13093
  });
@@ -13159,7 +13167,7 @@ const buildActionNodes = ({ loading, entities, positions, unfilteredCount }) =>
13159
13167
  nodeWidth: nodeWidth$3,
13160
13168
  title: 'Actions',
13161
13169
  icon: getEntityIcon(ENTITY_TYPES.ACTION),
13162
- tagValue: unfilteredCount,
13170
+ badge: unfilteredCount,
13163
13171
  isFetching: loading,
13164
13172
  },
13165
13173
  });
@@ -13246,6 +13254,7 @@ const mapToNodeData$1 = (entity) => {
13246
13254
  const buildSourceNodes = ({ loading, entities, positions, unfilteredCount, containerHeight, onScroll }) => {
13247
13255
  const nodes = [];
13248
13256
  const position = positions[ENTITY_TYPES.SOURCE];
13257
+ const hasFiltersApplied = entities.length !== unfilteredCount;
13249
13258
  nodes.push({
13250
13259
  id: `${ENTITY_TYPES.SOURCE}-${NODE_TYPES.HEADER}`,
13251
13260
  type: NODE_TYPES.HEADER,
@@ -13257,7 +13266,8 @@ const buildSourceNodes = ({ loading, entities, positions, unfilteredCount, conta
13257
13266
  nodeWidth: nodeWidth$2,
13258
13267
  title: 'Sources',
13259
13268
  icon: getEntityIcon(ENTITY_TYPES.SOURCE),
13260
- tagValue: entities.length !== unfilteredCount ? `${entities.length}/${unfilteredCount}` : unfilteredCount,
13269
+ badge: hasFiltersApplied ? `${entities.length}/${unfilteredCount}` : unfilteredCount,
13270
+ badgeTooltip: hasFiltersApplied ? 'Represents filtered amount, out of total amount' : undefined,
13261
13271
  isFetching: loading,
13262
13272
  sources: entities,
13263
13273
  },
@@ -13394,7 +13404,7 @@ const buildDestinationNodes = ({ loading, entities, positions, unfilteredCount }
13394
13404
  nodeWidth,
13395
13405
  title: 'Destinations',
13396
13406
  icon: getEntityIcon(ENTITY_TYPES.DESTINATION),
13397
- tagValue: unfilteredCount,
13407
+ badge: unfilteredCount,
13398
13408
  isFetching: loading,
13399
13409
  },
13400
13410
  });
@@ -15949,4 +15959,4 @@ const ToggleDarkMode = () => {
15949
15959
  React.createElement(Background, { "$darkMode": darkMode })));
15950
15960
  };
15951
15961
 
15952
- export { ActionDrawer, ActionForm, ActionModal, ActionTable, AwaitPipeline, ComputePlatformSelect, ComputePlatforms, ComputePlatformsActionsMenu, ConnectionStatusDropdown, DataFlow, DataFlowActionsMenu, DestinationDrawer, DestinationForm, DestinationModal, DestinationSelectionForm, DestinationTable, ErrorDropdown, InstrumentationRuleDrawer, InstrumentationRuleForm, InstrumentationRuleModal, InstrumentationRuleTable, KindDropdown, LanguageDropdown, MonitorDropdown, MultiSourceControl, NAV_ICON_IDS, NamespaceDropdown, NotificationManager, OverviewDrawer, PlatformTypesDropdown, SideNav, SlackInvite, SourceDrawer, SourceForm, SourceModal, SourceSelectionForm, SourceTable, SystemOverview, ToastList, ToggleDarkMode };
15962
+ export { ActionDrawer, ActionForm, ActionModal, ActionTable, AwaitPipeline, ComputePlatformSelect, ComputePlatforms, ComputePlatformsActionsMenu, ConnectionStatusDropdown, ConnectionTypeDropdown, DataFlow, DataFlowActionsMenu, DestinationDrawer, DestinationForm, DestinationModal, DestinationSelectionForm, DestinationTable, ErrorDropdown, InstrumentationRuleDrawer, InstrumentationRuleForm, InstrumentationRuleModal, InstrumentationRuleTable, KindDropdown, LanguageDropdown, MonitorDropdown, MultiSourceControl, NAV_ICON_IDS, NamespaceDropdown, NotificationManager, OverviewDrawer, SideNav, SlackInvite, SourceDrawer, SourceForm, SourceModal, SourceSelectionForm, SourceTable, SystemOverview, ToastList, ToggleDarkMode };
@@ -6,6 +6,7 @@ export declare const MOCK_SOURCE_JAEGER: {
6
6
  kind: K8S_RESOURCE_KIND;
7
7
  selected: boolean;
8
8
  otelServiceName: string;
9
+ numberOfInstances: number;
9
10
  containers: {
10
11
  containerName: string;
11
12
  language: PROGRAMMING_LANGUAGES;
package/lib/functions.js CHANGED
@@ -1,8 +1,8 @@
1
- export { c as capitalizeFirstLetter, f as flattenObjectKeys, g as getMonitorIcon, a as getProgrammingLanguageIcon, b as getStatusIcon, m as mapConditions, p as parseJsonStringToPrettyString, r as removeEmptyValuesFromObject, s as safeJsonStringify, d as splitCamelString } from './index-4tCBQ2pl.js';
2
- export { c as compareCondition, f as filterActions, a as filterDestinations, b as filterSources, d as formatBytes, g as getConditionsBooleans, h as getContainersIcons, e as getContainersInstrumentedCount, i as getEntityIcon, j as getEntityLabel, k as getMetricForEntity, l as getPlatformIcon, m as getPlatformLabel, n as getValueForRange, o as isOverTime, s as sleep } from './index-DUW6bkzG.js';
1
+ export { c as capitalizeFirstLetter, f as flattenObjectKeys, g as getMonitorIcon, a as getProgrammingLanguageIcon, b as getStatusIcon, m as mapConditions, p as parseJsonStringToPrettyString, r as removeEmptyValuesFromObject, s as safeJsonStringify, d as splitCamelString } from './index-BulCzWQI.js';
2
+ export { c as compareCondition, f as filterActions, a as filterDestinations, b as filterSources, d as formatBytes, g as getConditionsBooleans, h as getContainersIcons, e as getContainersInstrumentedCount, i as getEntityIcon, j as getEntityLabel, k as getMetricForEntity, l as getPlatformIcon, m as getPlatformLabel, n as getValueForRange, o as isOverTime, s as sleep } from './index-CKD2OX24.js';
3
3
  import { INSTRUMENTATION_RULE_TYPE, ENTITY_TYPES } from './types.js';
4
- export { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-BhCi-TxF.js';
5
- export { k as getEntityId, l as isTimeElapsed } from './index-DRT_7tQl.js';
4
+ export { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-BumPE6cF.js';
5
+ export { k as getEntityId, l as isTimeElapsed } from './index-DIcomki-.js';
6
6
  export { g as getIdFromSseTarget } from './index-BFct3S32.js';
7
7
  export { i as isEmpty, s as safeJsonParse } from './index-BZS1ijMm.js';
8
8
  import 'react';
@@ -1,6 +1,6 @@
1
1
  declare const useCopy: () => {
2
2
  isCopied: boolean;
3
3
  copiedIndex: number;
4
- clickCopy: (str: string, idx?: number) => void;
4
+ clickCopy: (str: string, idx?: number) => Promise<void>;
5
5
  };
6
6
  export { useCopy };
package/lib/hooks.js CHANGED
@@ -1,12 +1,12 @@
1
- export { u as useActionFormData, a as useClickNode, b as useClickNotification, c as useDestinationFormData, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-ClorQ_WP.js';
2
- export { u as useContainerSize, a as useCopy, b as useGenericForm, c as useInstrumentationRuleFormData, d as useKeyDown, e as useOnClickOutside, f as useTimeAgo, g as useTransition } from './useTransition-5w3VnEhL.js';
1
+ export { u as useActionFormData, a as useClickNode, b as useClickNotification, c as useDestinationFormData, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-BY6B70Kf.js';
2
+ export { u as useContainerSize, a as useCopy, b as useGenericForm, c as useInstrumentationRuleFormData, d as useKeyDown, e as useOnClickOutside, f as useTimeAgo, g as useTransition } from './useTransition-Dfxjcy-C.js';
3
3
  import './types.js';
4
4
  import 'react';
5
- import './index-DRT_7tQl.js';
5
+ import './index-DIcomki-.js';
6
6
  import 'styled-components';
7
7
  import './index-BZS1ijMm.js';
8
- import './index-Byh3BO6S.js';
9
- import './index-BhCi-TxF.js';
8
+ import './index-CZe2VX28.js';
9
+ import './index-BumPE6cF.js';
10
10
  import './index-BGlk5VhF.js';
11
11
  import './theme.js';
12
12
  import './index-Cu2uHOuh.js';
package/lib/icons.js CHANGED
@@ -5,7 +5,7 @@ import React from 'react';
5
5
  import Theme from './theme.js';
6
6
  export { A as ActionsIcon, D as DestinationsIcon, R as RulesIcon, S as SourcesIcon, V as VmLogo } from './index-BjJpYtF1.js';
7
7
  export { C as CheckCircledIcon, E as ErrorTriangleIcon, I as InfoIcon, L as LogsIcon, M as MetricsIcon, T as TracesIcon, W as WarningTriangleIcon } from './index-DLKEpJJm.js';
8
- import './index-DRT_7tQl.js';
8
+ import './index-DIcomki-.js';
9
9
  import './types.js';
10
10
  import 'styled-components';
11
11
 
@@ -1,6 +1,6 @@
1
1
  import { PROGRAMMING_LANGUAGES, SIGNAL_TYPE, NOTIFICATION_TYPE } from './types.js';
2
2
  import 'react';
3
- import './index-DRT_7tQl.js';
3
+ import './index-DIcomki-.js';
4
4
  import 'styled-components';
5
5
  import { T as TracesIcon, M as MetricsIcon, L as LogsIcon, I as InfoIcon, W as WarningTriangleIcon, E as ErrorTriangleIcon, C as CheckCircledIcon } from './index-DLKEpJJm.js';
6
6
  import { O as OdigosLogo } from './index-BGlk5VhF.js';
@@ -1,7 +1,7 @@
1
1
  import { ACTION_TYPE, INSTRUMENTATION_RULE_TYPE } from './types.js';
2
2
  import { S as SamplerIcon, P as PiiMaskingIcon, R as RenameAttributeIcon, D as DeleteAttributeIcon, A as AddClusterInfoIcon, K as K8sLogo, O as OdigosLogo, C as CodeAttributesIcon, a as PayloadCollectionIcon } from './index-BGlk5VhF.js';
3
3
  import 'react';
4
- import './index-DRT_7tQl.js';
4
+ import './index-DIcomki-.js';
5
5
  import 'styled-components';
6
6
 
7
7
  const getActionIcon = (type) => {
@@ -1,7 +1,7 @@
1
1
  import { NOTIFICATION_TYPE, OTHER_STATUS, ENTITY_TYPES, PLATFORM_TYPE } from './types.js';
2
- import { a as getProgrammingLanguageIcon } from './index-4tCBQ2pl.js';
2
+ import { a as getProgrammingLanguageIcon } from './index-BulCzWQI.js';
3
3
  import 'react';
4
- import './index-DRT_7tQl.js';
4
+ import './index-DIcomki-.js';
5
5
  import 'styled-components';
6
6
  import { R as RulesIcon, A as ActionsIcon, D as DestinationsIcon, S as SourcesIcon, V as VmLogo } from './index-BjJpYtF1.js';
7
7
  import { K as K8sLogo } from './index-BGlk5VhF.js';
@@ -1,13 +1,13 @@
1
1
  import React, { useState, useRef, forwardRef, useEffect, createElement, useCallback, useMemo, Fragment, useId } from 'react';
2
2
  import { NOTIFICATION_TYPE, OTHER_STATUS, PROGRAMMING_LANGUAGES, ENTITY_TYPES } from './types.js';
3
- import './index-DRT_7tQl.js';
3
+ import './index-DIcomki-.js';
4
4
  import styled, { css } from 'styled-components';
5
5
  import Theme from './theme.js';
6
- import { b as getStatusIcon, r as removeEmptyValuesFromObject, s as safeJsonStringify, f as flattenObjectKeys, m as mapConditions, c as capitalizeFirstLetter, g as getMonitorIcon, p as parseJsonStringToPrettyString, a as getProgrammingLanguageIcon, d as splitCamelString } from './index-4tCBQ2pl.js';
6
+ import { b as getStatusIcon, r as removeEmptyValuesFromObject, s as safeJsonStringify, f as flattenObjectKeys, m as mapConditions, c as capitalizeFirstLetter, g as getMonitorIcon, p as parseJsonStringToPrettyString, a as getProgrammingLanguageIcon, d as splitCamelString } from './index-BulCzWQI.js';
7
7
  import { s as safeJsonParse, i as isEmpty } from './index-BZS1ijMm.js';
8
8
  import { M as MinusIcon, f as CheckIcon, L as ListIcon, C as CodeIcon, E as ExtendArrowIcon, c as SortArrowsIcon, a as CopyIcon, b as NotebookIcon, X as XIcon, d as EyeClosedIcon, e as EyeOpenIcon, N as NoDataIcon, g as CrossIcon, S as SearchIcon, T as TrashIcon, P as PlusIcon, A as ArrowIcon } from './index-BJxaoI0G.js';
9
- import { M as MONITORS_OPTIONS } from './index-Byh3BO6S.js';
10
- import { u as useContainerSize, a as useCopy, g as useTransition, d as useKeyDown, e as useOnClickOutside } from './useTransition-5w3VnEhL.js';
9
+ import { M as MONITORS_OPTIONS } from './index-CZe2VX28.js';
10
+ import { u as useContainerSize, a as useCopy, g as useTransition, d as useKeyDown, e as useOnClickOutside } from './useTransition-Dfxjcy-C.js';
11
11
  import ReactDOM from 'react-dom';
12
12
  import { O as OdigosLogo } from './index-BGlk5VhF.js';
13
13
  import require$$0 from 'babel-runtime/helpers/extends';
@@ -4553,6 +4553,7 @@ const CopyWrapper = styled(FlexRow) `
4553
4553
  pre {
4554
4554
  color: ${({ theme }) => theme.text.default};
4555
4555
  font-size: 12px;
4556
+ overflow-x: auto;
4556
4557
  }
4557
4558
  `;
4558
4559
  const DataCardFields = ({ data }) => {
@@ -5200,9 +5201,10 @@ const DropdownItem = styled.div `
5200
5201
  const DropdownListItem = ({ option, value, isMulti, onSelect, onDeselect }) => {
5201
5202
  const theme = Theme.useTheme();
5202
5203
  const isSelected = Array.isArray(value) ? !!value?.find((s) => s.id === option.id) : value?.id === option.id;
5204
+ const handleChange = (toAdd) => (toAdd ? onSelect?.(option) : onDeselect?.(option));
5203
5205
  if (isMulti) {
5204
- return (React.createElement(DropdownItem, { className: isSelected ? 'selected' : '' },
5205
- React.createElement(Checkbox, { title: option.value || '', titleColor: theme.text.secondary, value: isSelected, onChange: (toAdd) => (toAdd ? onSelect?.(option) : onDeselect?.(option)), style: { width: '100%' } })));
5206
+ return (React.createElement(DropdownItem, { className: isSelected ? 'selected' : '', onClick: () => handleChange(!isSelected) },
5207
+ React.createElement(Checkbox, { title: option.value || '', titleColor: theme.text.secondary, value: isSelected, onChange: handleChange, style: { width: '100%' } })));
5206
5208
  }
5207
5209
  return (React.createElement(DropdownItem, { className: isSelected ? 'selected' : '', onClick: () => (isSelected ? onDeselect?.(option) : onSelect?.(option)) },
5208
5210
  React.createElement(Text, { size: 14 }, option.value),
@@ -5242,11 +5244,12 @@ const Header = ({ left = [], center = [], right = [] }) => {
5242
5244
  const Title$4 = styled(Text) `
5243
5245
  color: ${({ theme }) => theme.text.grey};
5244
5246
  `;
5245
- const IconTitleBadge = ({ icon: Icon, title, badge, loading }) => {
5247
+ const IconTitleBadge = ({ icon: Icon, title, badge, badgeTooltip, loading }) => {
5246
5248
  return (React.createElement(FlexRow, { "$gap": 6 },
5247
5249
  Icon && React.createElement(Icon, null),
5248
5250
  React.createElement(Title$4, { size: 14 }, title),
5249
- React.createElement(Badge, { label: badge }),
5251
+ typeof badge !== 'undefined' && (React.createElement(Tooltip, { text: badgeTooltip },
5252
+ React.createElement(Badge, { label: badge }))),
5250
5253
  loading && React.createElement(FadeLoader, null)));
5251
5254
  };
5252
5255
 
@@ -5264,8 +5267,8 @@ const Container$d = styled.div `
5264
5267
  justify-content: center;
5265
5268
  `;
5266
5269
  const IconWrap = styled.div `
5267
- width: 28px;
5268
- height: 28px;
5270
+ width: 32px;
5271
+ height: 32px;
5269
5272
 
5270
5273
  border-radius: 100%;
5271
5274
  background-color: ${({ theme, $selected }) => ($selected ? theme.colors.majestic_blue + Theme.opacity.hex['070'] : theme.colors.secondary + Theme.opacity.hex['012'])};
@@ -5280,12 +5283,12 @@ const IconWrap = styled.div `
5280
5283
  const IconsNav = ({ orientation = 'vertical', flip, mainIcons, subIcons }) => {
5281
5284
  return (React.createElement(Container$d, { "$orientation": orientation, "$flip": flip },
5282
5285
  mainIcons.map(({ icon: Icon, selected, onClick, tooltip }, idx) => (React.createElement(Tooltip, { key: `main-nav-icon-${idx}`, text: tooltip },
5283
- React.createElement(IconWrap, { "$selected": selected },
5284
- React.createElement(Icon, { onClick: onClick }))))),
5286
+ React.createElement(IconWrap, { "$selected": selected, onClick: onClick },
5287
+ React.createElement(Icon, { size: 20 }))))),
5285
5288
  !!mainIcons.length && !!subIcons.length && React.createElement(Divider, { orientation: orientation === 'vertical' ? 'horizontal' : 'vertical', margin: '0', length: '20px' }),
5286
5289
  subIcons.map(({ icon: Icon, selected, onClick, tooltip }, idx) => (React.createElement(Tooltip, { key: `sub-nav-icon-${idx}`, text: tooltip },
5287
- React.createElement(IconWrap, { "$selected": selected },
5288
- React.createElement(Icon, { onClick: onClick })))))));
5290
+ React.createElement(IconWrap, { "$selected": selected, onClick: onClick },
5291
+ React.createElement(Icon, { size: 20 })))))));
5289
5292
  };
5290
5293
 
5291
5294
  const Container$c = styled.div `
@@ -29571,4 +29574,4 @@ const WarningModal = ({ isOpen, noOverlay, title = '', description = '', note, a
29571
29574
  React.createElement(FooterButton, { "data-id": 'deny', variant: denyButton.variant || 'secondary', onClick: onDeny }, denyButton.text)))));
29572
29575
  };
29573
29576
 
29574
- export { FlexColumn as $, AutocompleteInput as A, Badge as B, CancelWarning 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, Segment as O, SkeletonLoader as P, Status as Q, Stepper as R, SectionTitle as S, ToggleCodeComponent as T, Text as U, TextArea as V, Toggle as W, Tooltip as X, TraceLoader as Y, WarningModal as Z, FlexRow as _, Button$4 as a, CenterThis as a0, Overlay as a1, ModalBody as a2, getDefaultExportFromCjs as a3, Checkbox as b, Code as c, ConditionDetails as d, DataCardFields as e, DATA_CARD_FIELD_TYPES as f, DataTab as g, DeleteWarning 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 };
29577
+ export { FlexColumn as $, AutocompleteInput as A, Button$4 as B, CancelWarning 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, Segment as O, SkeletonLoader as P, Status as Q, Stepper as R, SectionTitle as S, ToggleCodeComponent as T, Text as U, TextArea as V, Toggle as W, Tooltip as X, TraceLoader as Y, WarningModal as Z, FlexRow as _, Badge as a, CenterThis as a0, Overlay as a1, ModalBody as a2, getDefaultExportFromCjs as a3, Checkbox as b, Code as c, ConditionDetails as d, DataCardFields as e, DATA_CARD_FIELD_TYPES as f, DataTab as g, DeleteWarning 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,7 +1,7 @@
1
1
  import { SIGNAL_TYPE, ACTION_TYPE, INSTRUMENTATION_RULE_TYPE } from './types.js';
2
- import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-BhCi-TxF.js';
2
+ import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-BumPE6cF.js';
3
3
  import 'react';
4
- import './index-DRT_7tQl.js';
4
+ import './index-DIcomki-.js';
5
5
  import 'styled-components';
6
6
 
7
7
  const ACTION_OPTIONS = [
@@ -361,6 +361,18 @@ const useEntityStore = create((set) => ({
361
361
  return { [KEY]: prev };
362
362
  });
363
363
  },
364
+ resetEntityStore: () => {
365
+ set({
366
+ sourcesLoading: false,
367
+ sources: [],
368
+ destinationsLoading: false,
369
+ destinations: [],
370
+ actionsLoading: false,
371
+ actions: [],
372
+ instrumentationRulesLoading: false,
373
+ instrumentationRules: [],
374
+ });
375
+ },
364
376
  }));
365
377
 
366
378
  const getEmptyState = () => ({
@@ -16,6 +16,7 @@ interface IEntityStateSetters {
16
16
  setEntities: (entityType: ENTITY_TYPES, entities: EntityItems) => void;
17
17
  addEntities: (entityType: ENTITY_TYPES, entities: EntityItems) => void;
18
18
  removeEntities: (entityType: ENTITY_TYPES, entityIds: EntityId[]) => void;
19
+ resetEntityStore: () => void;
19
20
  }
20
21
  export declare const useEntityStore: import("zustand").UseBoundStore<import("zustand").StoreApi<IEntityState & IEntityStateSetters>>;
21
22
  export {};
package/lib/store.js CHANGED
@@ -1,4 +1,4 @@
1
- export { u as useDarkMode, a as useDrawerStore, b as useEntityStore, c as useFilterStore, d as useInstrumentStore, e as useModalStore, f as useNotificationStore, g as usePendingStore, h as useSelectedStore, i as useSetupStore } from './index-DRT_7tQl.js';
1
+ export { u as useDarkMode, a as useDrawerStore, b as useEntityStore, c as useFilterStore, d as useInstrumentStore, e as useModalStore, f as useNotificationStore, g as usePendingStore, h as useSelectedStore, i as useSetupStore } from './index-DIcomki-.js';
2
2
  import './types.js';
3
3
  import 'react';
4
4
  import 'styled-components';
package/lib/theme.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { u as useDarkMode, j as animations } from './index-DRT_7tQl.js';
2
+ import { u as useDarkMode, j as animations } from './index-DIcomki-.js';
3
3
  import { ThemeProvider, useTheme } from 'styled-components';
4
4
  import './types.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { NOTIFICATION_TYPE, PLATFORM_TYPE } from '../common';
2
- export interface Platform {
2
+ export interface Connection {
3
3
  id: string;
4
4
  name?: string;
5
5
  type: PLATFORM_TYPE;
@@ -1,6 +1,6 @@
1
1
  export * from './actions';
2
2
  export * from './common';
3
- export * from './compute-platform';
3
+ export * from './connection';
4
4
  export * from './data-flow';
5
5
  export * from './describe';
6
6
  export * from './destinations';
@@ -1,11 +1,11 @@
1
1
  import { ACTION_TYPE, NOTIFICATION_TYPE, ADD_NODE_TYPES, ENTITY_TYPES, FIELD_TYPES } from './types.js';
2
2
  import { useState, useEffect, useCallback } from 'react';
3
- import { f as useNotificationStore, e as useModalStore, a as useDrawerStore, i as useSetupStore } from './index-DRT_7tQl.js';
3
+ import { f as useNotificationStore, e as useModalStore, a as useDrawerStore, i as useSetupStore } from './index-DIcomki-.js';
4
4
  import 'styled-components';
5
5
  import { i as isEmpty, s as safeJsonParse } from './index-BZS1ijMm.js';
6
- import './index-Byh3BO6S.js';
6
+ import './index-CZe2VX28.js';
7
7
  import { F as FORM_ALERTS } from './index-Cu2uHOuh.js';
8
- import { b as useGenericForm } from './useTransition-5w3VnEhL.js';
8
+ import { b as useGenericForm } from './useTransition-Dfxjcy-C.js';
9
9
  import { g as getIdFromSseTarget } from './index-BFct3S32.js';
10
10
 
11
11
  const INITIAL$2 = {
@@ -417,10 +417,11 @@ const useSourceSelectionFormData = (params) => {
417
417
  ...prev,
418
418
  [name]: !!prev[name].length
419
419
  ? prev[name]
420
- : sources.map(({ name, kind, selected }) => ({
420
+ : sources.map(({ name, kind, selected, numberOfInstances }) => ({
421
421
  name,
422
422
  kind,
423
423
  selected,
424
+ numberOfInstances,
424
425
  })),
425
426
  }));
426
427
  }
@@ -1,6 +1,6 @@
1
1
  import React, { useState, useRef, useEffect, useCallback } from 'react';
2
- import './index-Byh3BO6S.js';
3
- import { f as useNotificationStore } from './index-DRT_7tQl.js';
2
+ import './index-CZe2VX28.js';
3
+ import { f as useNotificationStore } from './index-DIcomki-.js';
4
4
  import { CODE_ATTRIBUTES_KEY_TYPES, PAYLOAD_COLLECTION_KEY_TYPES } from './types.js';
5
5
  import styled from 'styled-components';
6
6
 
@@ -87,12 +87,33 @@ const useContainerSize = () => {
87
87
  const useCopy = () => {
88
88
  const [isCopied, setIsCopied] = useState(false);
89
89
  const [copiedIndex, setCopiedIndex] = useState(-1);
90
- const clickCopy = (str, idx) => {
90
+ const clickCopy = async (str, idx) => {
91
91
  if (!isCopied) {
92
92
  setIsCopied(true);
93
93
  if (idx !== undefined)
94
94
  setCopiedIndex(idx);
95
- navigator.clipboard.writeText(str);
95
+ if (navigator?.clipboard && navigator.clipboard.writeText) {
96
+ try {
97
+ await navigator.clipboard.writeText(str);
98
+ }
99
+ catch (err) {
100
+ console.error('Clipboard write failed:', err);
101
+ }
102
+ }
103
+ else {
104
+ // Fallback: Create a temporary textarea
105
+ const textArea = document.createElement('textarea');
106
+ textArea.value = str;
107
+ document.body.appendChild(textArea);
108
+ textArea.select();
109
+ try {
110
+ document.execCommand('copy');
111
+ }
112
+ catch (err) {
113
+ console.error('execCommand copy failed:', err);
114
+ }
115
+ document.body.removeChild(textArea);
116
+ }
96
117
  setTimeout(() => {
97
118
  setIsCopied(false);
98
119
  setCopiedIndex(-1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odigos/ui-kit",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "author": "Odigos",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,6 +8,7 @@
8
8
  },
9
9
  "scripts": {
10
10
  "dev": "storybook dev -p 6006",
11
+ "prebuild": "rm -rf lib",
11
12
  "build": "rollup -c --bundleConfigAsCjs"
12
13
  },
13
14
  "release": {
@@ -71,6 +72,7 @@
71
72
  "prism-react-renderer": "^2.4.1",
72
73
  "react": "^19.0.0",
73
74
  "react-dom": "^19.0.0",
75
+ "react-error-boundary": "^5.0.0",
74
76
  "react-lottie": "^1.2.10",
75
77
  "styled-components": "^6.1.15",
76
78
  "zustand": "^5.0.3"
@@ -81,6 +83,7 @@
81
83
  "prism-react-renderer": "^2.4.1",
82
84
  "react": "^19.0.0",
83
85
  "react-dom": "^19.0.0",
86
+ "react-error-boundary": "^5.0.0",
84
87
  "react-lottie": "^1.2.10",
85
88
  "styled-components": "^6.1.15",
86
89
  "zustand": "^5.0.3"
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { StoryFn } from '@storybook/react';
3
- import { type PlatformTypesDropdownProps } from '.';
4
- declare const _default: {
5
- title: string;
6
- component: React.FC<PlatformTypesDropdownProps>;
7
- };
8
- export default _default;
9
- export declare const Default: StoryFn<PlatformTypesDropdownProps>;