@odigos/ui-kit 0.0.17 → 0.0.19

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 +15 -0
  2. package/lib/components/index.d.ts +1 -0
  3. package/lib/components/scroll-x/index.d.ts +10 -0
  4. package/lib/components.js +13 -44
  5. package/lib/constants.js +5 -9
  6. package/lib/containers/data-flow/nodes/scroll-node.d.ts +3 -14
  7. package/lib/containers.js +42 -94
  8. package/lib/functions.js +9 -15
  9. package/lib/hooks.js +10 -10
  10. package/lib/icons.js +3 -4
  11. package/lib/{index-Hz7AAE0t.js → index-7-KCQK-x.js} +1 -1
  12. package/lib/{index-G4WmxXds.js → index-BFRz3l_w.js} +21 -4
  13. package/lib/index-BazfJyRh.js +687 -0
  14. package/lib/{index-C3nz3TIx.js → index-CD_BQJCD.js} +5 -3
  15. package/lib/{index-BiNX-Cge.js → index-CvuVOtkr.js} +154 -119
  16. package/lib/{index-CIXQeSHu.js → index-DGel4E-Z.js} +8 -1
  17. package/lib/{index-BQW5EUgp.js → index-DSzybApb.js} +6 -4
  18. package/lib/{index-BxQTUOME.js → index-WSle42rz.js} +5 -3
  19. package/lib/store.js +3 -6
  20. package/lib/theme.js +3 -86
  21. package/lib/types.js +215 -6
  22. package/lib/useSourceSelectionFormData-_2PggiXn.js +563 -0
  23. package/lib/{useTimeAgo-weEj7br6.js → useTransition-bXMKBfST.js} +113 -544
  24. package/package.json +1 -2
  25. package/lib/index-B72aw6tI.js +0 -23
  26. package/lib/index-BQs4sULy.js +0 -32
  27. package/lib/index-BVVVevuY.js +0 -100
  28. package/lib/index-BWqrekK4.js +0 -11
  29. package/lib/index-C1PCuZgw.js +0 -18
  30. package/lib/index-CIgHU72d.js +0 -52
  31. package/lib/index-DbfrGXPH.js +0 -8
  32. package/lib/index-RBS1MqCQ.js +0 -37
  33. package/lib/react-CjImwkhV.js +0 -44
  34. package/lib/useDarkMode-DxhIuVNi.js +0 -201
  35. package/lib/useSelectedStore-93bIo1kE.js +0 -97
  36. package/lib/useSetupStore-CoYx1UQw.js +0 -211
  37. package/lib/useTransition-D0wUpPGk.js +0 -128
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.19](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.18...ui-kit-v0.0.19) (2025-03-27)
4
+
5
+
6
+ ### Features
7
+
8
+ * support test-connection in destination drawer ([#62](https://github.com/odigos-io/ui-kit/issues/62)) ([ae1cd19](https://github.com/odigos-io/ui-kit/commit/ae1cd19e20b9d87e5e98c0d16c8374ed89af5ed1))
9
+ * x-scroll in data-tabs/base-nodes ([#61](https://github.com/odigos-io/ui-kit/issues/61)) ([58fe6cf](https://github.com/odigos-io/ui-kit/commit/58fe6cff9bfd5e1f9216bd315416f20452e1ea14))
10
+
11
+ ## [0.0.18](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.17...ui-kit-v0.0.18) (2025-03-26)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * remove sideEffects flag from package.json ([#59](https://github.com/odigos-io/ui-kit/issues/59)) ([d1d7641](https://github.com/odigos-io/ui-kit/commit/d1d76410bda0250d838d25fc612581dd09c91dd7))
17
+
3
18
  ## [0.0.17](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.16...ui-kit-v0.0.17) (2025-03-26)
4
19
 
5
20
 
@@ -35,6 +35,7 @@ export * from './monitors-icons/index';
35
35
  export * from './navigation-buttons/index';
36
36
  export * from './no-data-found/index';
37
37
  export * from './notification-note/index';
38
+ export * from './scroll-x/index';
38
39
  export * from './section-title/index';
39
40
  export * from './segment/index';
40
41
  export * from './skeleton-loader/index';
@@ -0,0 +1,10 @@
1
+ import { type FC } from 'react';
2
+ import { type TextProps } from '../text';
3
+ interface ScrollXProps {
4
+ maxWidth: number;
5
+ text: string;
6
+ textSize?: TextProps['size'];
7
+ textColor?: TextProps['color'];
8
+ }
9
+ declare const ScrollX: FC<ScrollXProps>;
10
+ export { ScrollX, type ScrollXProps };
package/lib/components.js CHANGED
@@ -1,17 +1,18 @@
1
- import { B as Button, F as FlexRow } from './index-BiNX-Cge.js';
2
- export { A as AutocompleteInput, a as Badge, C as CancelWarning, $ 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, o as FadeLoader, p as FieldError, q as FieldLabel, _ as FlexColumn, I as IconButton, r as IconGroup, s as IconTitleBadge, t as IconWrapped, u as IconsNav, v as ImageControlled, w as Input, x as InputList, y as InputTable, z as InteractiveTable, K as KeyValueInputsList, M as Modal, a1 as ModalBody, G as MonitorsCheckboxes, H as MonitorsIcons, N as NavigationButtons, J as NoDataFound, L as NotificationNote, a0 as Overlay, S as SectionTitle, O as Segment, P as SkeletonLoader, Q as Status, R as Stepper, a2 as TableContainer, a3 as TableTitleWrap, a4 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-BiNX-Cge.js';
3
- import React, { Component, createElement, createContext, Fragment } from 'react';
1
+ import { B as Button } from './index-CvuVOtkr.js';
2
+ export { A as AutocompleteInput, a as Badge, C as CancelWarning, a1 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, a0 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, a3 as ModalBody, z as MonitorsCheckboxes, G as MonitorsIcons, N as NavigationButtons, J as NoDataFound, L as NotificationNote, a2 as Overlay, S as ScrollX, O as SectionTitle, P as Segment, Q as SkeletonLoader, R as Status, U as Stepper, a4 as TableContainer, a5 as TableTitleWrap, a6 as TableWrap, V as Text, W as TextArea, X as Toggle, T as ToggleCodeComponent, Y as Tooltip, Z as TraceLoader, _ as WarningModal } from './index-CvuVOtkr.js';
3
+ import React, { Component, createElement, createContext } from 'react';
4
4
  import Theme from './theme.js';
5
- import styled from 'styled-components';
6
- import './index-BVVVevuY.js';
7
- import './index-BxQTUOME.js';
5
+ import './types.js';
6
+ import './index-BazfJyRh.js';
7
+ import 'styled-components';
8
+ import './index-WSle42rz.js';
9
+ import './index-DGel4E-Z.js';
8
10
  import './index-BsH_egEe.js';
9
- import './index-BWqrekK4.js';
10
- import './index-DbfrGXPH.js';
11
- import './index-BJxaoI0G.js';
12
11
  import './index-BZS1ijMm.js';
13
- import './index-C1PCuZgw.js';
14
- import './useTransition-D0wUpPGk.js';
12
+ import './index-BJxaoI0G.js';
13
+ import './index-BFRz3l_w.js';
14
+ import './index-CD_BQJCD.js';
15
+ import './useTransition-bXMKBfST.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,8 +21,6 @@ import 'babel-runtime/helpers/createClass';
20
21
  import 'babel-runtime/helpers/possibleConstructorReturn';
21
22
  import 'babel-runtime/helpers/inherits';
22
23
  import 'object-assign';
23
- import './useDarkMode-DxhIuVNi.js';
24
- import './react-CjImwkhV.js';
25
24
 
26
25
  const ErrorBoundaryContext = createContext(null);
27
26
 
@@ -171,34 +170,4 @@ const ErrorBoundary = ({ children }) => {
171
170
  React.createElement(ErrorFallback, { ...props }))) }, children));
172
171
  };
173
172
 
174
- const Container = styled(FlexRow) `
175
- position: relative;
176
- width: calc(100% - 24px);
177
- padding: 12px;
178
- background-color: ${({ theme }) => theme.colors.dark_grey};
179
- border-bottom: 1px solid ${({ theme }) => theme.colors.border + Theme.opacity.hex['050']};
180
- `;
181
- const AlignLeft = styled(FlexRow) `
182
- margin-right: auto;
183
- margin-left: 32px;
184
- gap: 12px;
185
- `;
186
- const AlignRight = styled(FlexRow) `
187
- margin-left: auto;
188
- margin-right: 32px;
189
- gap: 12px;
190
- `;
191
- const PositionCenter = styled(FlexRow) `
192
- position: absolute;
193
- left: 50%;
194
- transform: translateX(-50%);
195
- gap: 12px;
196
- `;
197
- const Header = ({ left = [], center = [], right = [] }) => {
198
- return (React.createElement(Container, null,
199
- React.createElement(AlignLeft, null, left.map((child, index) => child && React.createElement(Fragment, { key: index }, child))),
200
- React.createElement(PositionCenter, null, center.map((child, index) => child && React.createElement(Fragment, { key: index }, child))),
201
- React.createElement(AlignRight, null, right.map((child, index) => child && React.createElement(Fragment, { key: index }, child)))));
202
- };
203
-
204
- export { Button, ErrorBoundary, FlexRow, Header };
173
+ export { Button, ErrorBoundary };
package/lib/constants.js CHANGED
@@ -1,16 +1,12 @@
1
- export { A as ACTION_OPTIONS, I as INSTRUMENTATION_RULE_OPTIONS } from './index-G4WmxXds.js';
2
- export { M as MONITORS_OPTIONS } from './index-C1PCuZgw.js';
1
+ export { A as ACTION_OPTIONS, I as INSTRUMENTATION_RULE_OPTIONS, M as MONITORS_OPTIONS } from './index-BFRz3l_w.js';
3
2
  export { D as DISPLAY_TITLES, F as FORM_ALERTS } from './index-C_0J5P9M.js';
4
- import './index-C3nz3TIx.js';
5
- import './index-CIXQeSHu.js';
3
+ import './types.js';
4
+ import './index-CD_BQJCD.js';
5
+ import './index-DGel4E-Z.js';
6
6
  import 'react';
7
7
  import './theme.js';
8
+ import './index-BazfJyRh.js';
8
9
  import 'styled-components';
9
- import './useDarkMode-DxhIuVNi.js';
10
- import './react-CjImwkhV.js';
11
- import './index-RBS1MqCQ.js';
12
- import './index-BWqrekK4.js';
13
- import './index-DbfrGXPH.js';
14
10
 
15
11
  const TOKEN_ABOUT_TO_EXPIRE = 604800000; // 7 days in milliseconds
16
12
 
@@ -1,21 +1,10 @@
1
1
  import React from 'react';
2
+ import { NodeTypes } from '@/types';
2
3
  import type { Node, NodeProps } from '@xyflow/react';
3
- import { EntityTypes, NodeTypes, StatusType, type Source, type SVG, type WorkloadId } from '@/types';
4
+ import { BaseNodeProps } from './base-node';
4
5
  export interface ScrollNodeProps extends NodeProps<Node<{
5
- nodeWidth: number;
6
6
  nodeHeight: number;
7
- items: NodeProps<Node<{
8
- nodeWidth: number;
9
- framePadding: number;
10
- id: WorkloadId;
11
- type: EntityTypes;
12
- status?: StatusType;
13
- title: string;
14
- subTitle: string;
15
- icon?: SVG;
16
- iconSrc?: string;
17
- raw: Source;
18
- }, NodeTypes.Base>>[];
7
+ items: BaseNodeProps[];
19
8
  onScroll: (params: {
20
9
  clientHeight: number;
21
10
  scrollHeight: number;
package/lib/containers.js CHANGED
@@ -1,31 +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-BFRz3l_w.js';
3
4
  import { D as DISPLAY_TITLES, F as FORM_ALERTS } from './index-C_0J5P9M.js';
4
- import { f as DataCardFieldTypes, q as FieldLabel, b as Checkbox, p as FieldError, w as Input, y as InputTable, K as KeyValueInputsList, x as InputList, U as Text, O as Segment, S as SectionTitle, j as DocsButton, G 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, a1 as ModalBody, A as AutocompleteInput, i as Divider, Q as Status, F as FlexRow, X as Tooltip, t as IconWrapped, H as MonitorsIcons, a2 as TableContainer, a3 as TableTitleWrap, s as IconTitleBadge, a4 as TableWrap, z as InteractiveTable, $ as CenterThis, J as NoDataFound, _ as FlexColumn, Y as TraceLoader, a as Badge, B as Button, E as ExtendArrow, n as Dropdown, a5 as getDefaultExportFromCjs, o as FadeLoader, g as DataTab, P as SkeletonLoader, W as Toggle, L as NotificationNote, R as Stepper, I as IconButton, e as DataCardFields, u as IconsNav, r as IconGroup } from './index-BiNX-Cge.js';
5
- import { A as ActionType, C as CodeAttributesKeyTypes, P as PayloadCollectionKeyTypes, I as InstrumentationRuleType } from './index-RBS1MqCQ.js';
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, V as Text, P as Segment, O as SectionTitle, j as DocsButton, z as MonitorsCheckboxes, W as TextArea, k as Drawer, h as DeleteWarning, C as CancelWarning, d as ConditionDetails, D as DataCard, M as Modal, N as NavigationButtons, a3 as ModalBody, A as AutocompleteInput, i as Divider, R as Status, $ as FlexRow, Y as Tooltip, s as IconWrapped, G as MonitorsIcons, a4 as TableContainer, a5 as TableTitleWrap, r as IconTitleBadge, a6 as TableWrap, y as InteractiveTable, a1 as CenterThis, J as NoDataFound, a0 as FlexColumn, Z as TraceLoader, a as Badge, B as Button, E as ExtendArrow, n as Dropdown, a7 as getDefaultExportFromCjs, F as FadeLoader, g as DataTab, Q as SkeletonLoader, X as Toggle, L as NotificationNote, U as Stepper, I as IconButton, e as DataCardFields, t as IconsNav, q as IconGroup } from './index-CvuVOtkr.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-BazfJyRh.js';
6
8
  import Theme from './theme.js';
7
9
  import { i as isEmpty, s as safeJsonParse } from './index-BZS1ijMm.js';
8
- import { C as CrossCircledIcon, E as EditIcon, O as OdigosLogoText, a as OverviewIcon, F as FilterIcon, N as NotificationIcon, S as SlackLogo, K as KeyIcon, T as TerminalIcon } from './index-KOMAv-TS.js';
9
10
  import { i as CheckCircledIcon, O as OdigosLogo } from './index-BsH_egEe.js';
10
- import { b as usePendingStore, u as useFilterStore, c as useSelectedStore, a as useInstrumentStore } from './useSelectedStore-93bIo1kE.js';
11
- import { c as useNotificationStore, u as useDrawerStore, a as useEntityStore, b as useModalStore, d as useSetupStore } from './useSetupStore-CoYx1UQw.js';
12
- import { b as useKeyDown, c as useOnClickOutside, u as useContainerSize, d as useTransition, a as useCopy } from './useTransition-D0wUpPGk.js';
13
- import { E as EntityTypes, S as StatusType, C as Crud, O as OtherStatus, F as FieldTypes } from './index-BVVVevuY.js';
11
+ import { C as CrossCircledIcon, E as EditIcon, O as OdigosLogoText, a as OverviewIcon, F as FilterIcon, N as NotificationIcon, S as SlackLogo, K as KeyIcon, T as TerminalIcon } from './index-KOMAv-TS.js';
12
+ import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-CD_BQJCD.js';
13
+ import { u as useActionFormData, a as useClickNode, c as useDestinationFormData, b as useClickNotification, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-_2PggiXn.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-bXMKBfST.js';
14
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';
15
- import { u as useActionFormData, a as useClickNode, c as useDestinationFormData, e as useInstrumentationRuleFormData, h as useTimeAgo, b as useClickNotification, f as useSourceFormData, g as useSourceSelectionFormData } from './useTimeAgo-weEj7br6.js';
16
- import { A as ACTION_OPTIONS, I as INSTRUMENTATION_RULE_OPTIONS } from './index-G4WmxXds.js';
17
- import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-C3nz3TIx.js';
18
- import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-BxQTUOME.js';
19
- 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-BQW5EUgp.js';
16
+ import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-WSle42rz.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-DSzybApb.js';
20
18
  import require$$1 from 'use-sync-external-store/shim';
21
19
  import { createPortal } from 'react-dom';
22
- import { N as NodeTypes, A as AddNodeTypes, E as EdgeTypes } from './index-B72aw6tI.js';
23
- import { g as getEntityId } from './index-BQs4sULy.js';
24
- import { M as MONITORS_OPTIONS } from './index-C1PCuZgw.js';
25
- import { S as SignalType } from './index-DbfrGXPH.js';
26
20
  import { R as RulesIcon, W as SourcesIcon, y as ActionsIcon, z as DestinationsIcon } from './index-DB8Djrsy.js';
27
- import { u as useDarkMode } from './useDarkMode-DxhIuVNi.js';
28
- import './index-BWqrekK4.js';
21
+ import './index-DGel4E-Z.js';
29
22
  import 'babel-runtime/helpers/extends';
30
23
  import 'babel-runtime/core-js/object/get-prototype-of';
31
24
  import 'babel-runtime/helpers/classCallCheck';
@@ -33,37 +26,7 @@ import 'babel-runtime/helpers/createClass';
33
26
  import 'babel-runtime/helpers/possibleConstructorReturn';
34
27
  import 'babel-runtime/helpers/inherits';
35
28
  import 'object-assign';
36
- import './react-CjImwkhV.js';
37
- import './index-Hz7AAE0t.js';
38
- import './index-CIXQeSHu.js';
39
- import './index-CIgHU72d.js';
40
-
41
- function styleInject(css, ref) {
42
- if ( ref === void 0 ) ref = {};
43
- var insertAt = ref.insertAt;
44
-
45
- if (typeof document === 'undefined') { return; }
46
-
47
- var head = document.head || document.getElementsByTagName('head')[0];
48
- var style = document.createElement('style');
49
- style.type = 'text/css';
50
-
51
- if (insertAt === 'top') {
52
- if (head.firstChild) {
53
- head.insertBefore(style, head.firstChild);
54
- } else {
55
- head.appendChild(style);
56
- }
57
- } else {
58
- head.appendChild(style);
59
- }
60
-
61
- if (style.styleSheet) {
62
- style.styleSheet.cssText = css;
63
- } else {
64
- style.appendChild(document.createTextNode(css));
65
- }
66
- }
29
+ import './index-7-KCQK-x.js';
67
30
 
68
31
  const buildCard$3 = (action) => {
69
32
  const { type, spec: { actionName, notes, signals, disabled, collectContainerAttributes, collectWorkloadId, collectClusterId, labelsAttributes, annotationsAttributes, clusterAttributes, attributeNamesToDelete, renames, piiCategories, fallbackSamplingRatio, samplingPercentage, endpointsFilters, }, } = action;
@@ -12776,7 +12739,7 @@ const BaseNode = memo(({ id: nodeId, data }) => {
12776
12739
  }, visualProps: {
12777
12740
  status: status,
12778
12741
  faded: faded || (hasActiveBoolean && !isActive),
12779
- monitors: monitors,
12742
+ monitors,
12780
12743
  }, checkboxProps: {
12781
12744
  withCheckbox: isSource,
12782
12745
  isChecked: sourceIndex !== -1,
@@ -12813,19 +12776,30 @@ const FrameNode = memo(({ data }) => {
12813
12776
  React.createElement(Handle, { type: 'target', position: Position.Left, style: { visibility: 'hidden' } })));
12814
12777
  });
12815
12778
 
12779
+ // These are not the actual sizes of a base node,
12780
+ // but these are used to help calculate the actual sizes of various nodes and their positions.
12781
+ // It is important to not delete or edit this file, unless you re-define the maths for all node size and position calculations.
12782
+ const nodeConfig = {
12783
+ nodeWidth: 295,
12784
+ nodeHeight: 80,
12785
+ framePadding: 12,
12786
+ };
12787
+
12788
+ const { framePadding: framePadding$3 } = nodeConfig;
12816
12789
  const Container$e = styled.div `
12817
12790
  position: relative;
12818
12791
  z-index: 1;
12819
- width: ${({ $nodeWidth }) => $nodeWidth}px;
12792
+ width: fit-content;
12820
12793
  height: ${({ $nodeHeight }) => $nodeHeight}px;
12821
12794
  background: transparent;
12822
12795
  border: none;
12823
12796
  overflow-y: auto;
12797
+ overflow-x: hidden;
12824
12798
  `;
12825
12799
  const BaseNodeWrapper = styled.div `
12826
- margin: ${({ $framePadding }) => $framePadding}px 0;
12800
+ margin: ${framePadding$3}px 0;
12827
12801
  `;
12828
- const LoadMoreWrapper = styled.div `
12802
+ const BottomOverlay = styled.div `
12829
12803
  position: fixed;
12830
12804
  bottom: 0;
12831
12805
  left: 50%;
@@ -12842,14 +12816,8 @@ const LoadMoreWrapper = styled.div `
12842
12816
 
12843
12817
  pointer-events: none;
12844
12818
  `;
12845
- // const LoadMoreButton = styled(Button)`
12846
- // background: ${({ theme }) => theme.colors.primary} !important;
12847
- // &:hover {
12848
- // background: ${({ theme }) => theme.colors.dropdown_bg_2} !important;
12849
- // }
12850
- // `;
12851
12819
  const ScrollNode = memo(({ data, ...rest }) => {
12852
- const { nodeWidth, nodeHeight, items, onScroll } = data;
12820
+ const { nodeHeight, items, onScroll } = data;
12853
12821
  const { onClickNode } = useClickNode();
12854
12822
  const containerRef = useRef(null);
12855
12823
  const [isBottomOfList, setIsBottomOfList] = useState(false);
@@ -12858,30 +12826,22 @@ const ScrollNode = memo(({ data, ...rest }) => {
12858
12826
  e.stopPropagation();
12859
12827
  // @ts-ignore - these properties are available on the EventTarget, TS is not aware of it
12860
12828
  const { clientHeight, scrollHeight, scrollTop } = e.target || { clientHeight: 0, scrollHeight: 0, scrollTop: 0 };
12861
- if (!!onScroll)
12829
+ if (onScroll)
12862
12830
  onScroll({ clientHeight, scrollHeight, scrollTop });
12863
- // TODO: Use the following if we have to handle paginated API requests using scroll:
12864
- // const isTop = scrollTop === 0;
12865
- const isBottom = scrollHeight - scrollTop <= clientHeight;
12866
- // if (isTop) {
12867
- // console.log('Reached top of scroll-node');
12868
- // } else if (isBottom) {
12869
- // console.log('Reached bottom of scroll-node');
12870
- // }
12871
- setIsBottomOfList(isBottom);
12831
+ setIsBottomOfList(scrollHeight - scrollTop <= clientHeight);
12872
12832
  };
12873
12833
  const { current } = containerRef;
12874
12834
  current?.addEventListener('scroll', handleScroll);
12875
12835
  return () => current?.removeEventListener('scroll', handleScroll);
12876
12836
  }, [onScroll]);
12877
- return (React.createElement(Container$e, { ref: containerRef, "$nodeWidth": nodeWidth, "$nodeHeight": nodeHeight, className: 'nowheel nodrag' },
12878
- items.map((item) => (React.createElement(BaseNodeWrapper, { key: item.id, "$framePadding": item.data.framePadding, onClick: (e) => {
12837
+ return (React.createElement(Container$e, { ref: containerRef, "$nodeHeight": nodeHeight, className: 'nowheel nodrag' },
12838
+ items.map((item) => (React.createElement(BaseNodeWrapper, { key: item.id, onClick: (e) => {
12879
12839
  e.stopPropagation();
12880
12840
  // @ts-ignore
12881
12841
  onClickNode(e, item);
12882
12842
  } },
12883
12843
  React.createElement(BaseNode, { ...rest, type: NodeTypes.Base, id: item.id, data: item.data })))),
12884
- React.createElement(LoadMoreWrapper, { "$hide": isBottomOfList })));
12844
+ React.createElement(BottomOverlay, { "$hide": isBottomOfList })));
12885
12845
  });
12886
12846
 
12887
12847
  const Container$d = styled.div `
@@ -13069,15 +13029,6 @@ const Flow = ({ nodes, edges, onNodesChange, onEdgesChange }) => {
13069
13029
  } })))));
13070
13030
  };
13071
13031
 
13072
- // These are not the actual sizes of a base node,
13073
- // but these are used to help calculate the actual sizes of various nodes and their positions.
13074
- // It is important to not delete or edit this file, unless you re-define the maths for all node size and position calculations.
13075
- const nodeConfig = {
13076
- nodeWidth: 295,
13077
- nodeHeight: 80,
13078
- framePadding: 12,
13079
- };
13080
-
13081
13032
  const { nodeHeight: nodeHeight$3, framePadding: framePadding$2 } = nodeConfig;
13082
13033
  const createEdge = (edgeId, params) => {
13083
13034
  const { theme, label, isMultiTarget, isError, animated } = params || {};
@@ -13301,8 +13252,7 @@ const mapToNodeData$1 = (entity) => {
13301
13252
  const { priorotizedStatus, hasDisableds } = getConditionsBooleans(entity.conditions || []);
13302
13253
  return {
13303
13254
  nodeWidth: nodeWidth$2,
13304
- nodeHeight: nodeHeight$1,
13305
- framePadding,
13255
+ nodeHeight: nodeHeight$1, // for edged node
13306
13256
  id: {
13307
13257
  namespace: entity.namespace,
13308
13258
  name: entity.name,
@@ -13960,10 +13910,8 @@ const TestConnection = ({ destination, disabled, status, onError, onSuccess, val
13960
13910
  React.createElement(Text, { family: 'secondary', decoration: 'underline', size: 14, color: !!status ? theme.text[status] : undefined }, testLoading ? 'Checking' : status === 'success' ? 'Connection OK' : status === 'error' ? 'Connection Failed' : 'Test Connection')));
13961
13911
  };
13962
13912
 
13963
- const Container$9 = styled.div `
13964
- display: flex;
13965
- flex-direction: column;
13966
- gap: 24px;
13913
+ const Container$9 = styled(FlexColumn) `
13914
+ align-items: unset;
13967
13915
  padding: 0 4px;
13968
13916
  `;
13969
13917
  const NotesWrapper = styled.div `
@@ -14030,20 +13978,20 @@ const DestinationForm = ({ isUpdate, categoryItem, formData, formErrors, validat
14030
13978
  traces: signals.includes(SignalType.Traces),
14031
13979
  });
14032
13980
  };
14033
- return (React.createElement(Container$9, null,
14034
- !isUpdate && (React.createElement(React.Fragment, null,
14035
- React.createElement(SectionTitle, { title: 'Create connection', description: `Connect ${displayName} with Odigos.`, actionButton: testConnectionSupported && (React.createElement(TestConnection, { destination: formData, disabled: !isFormDirty, validateForm: validateForm, status: connectionStatus, testConnection: testConnection, testLoading: testLoading, testResult: testResult, onError: () => {
13981
+ return (React.createElement(Container$9, { "$gap": 24 },
13982
+ React.createElement(Container$9, { "$gap": 12 },
13983
+ React.createElement(SectionTitle, { title: isUpdate ? 'Update destination' : 'Create destination', description: `Connect ${displayName} with Odigos.`, actionButton: testConnectionSupported && (React.createElement(TestConnection, { destination: formData, disabled: !isFormDirty, validateForm: validateForm, status: connectionStatus, testConnection: testConnection, testLoading: testLoading, testResult: testResult, onError: () => {
14036
13984
  setIsFormDirty(false);
14037
13985
  setConnectionStatus(StatusType.Error);
14038
13986
  }, onSuccess: () => {
14039
13987
  setIsFormDirty(false);
14040
13988
  setConnectionStatus(StatusType.Success);
14041
13989
  } })) }),
14042
- (testConnectionSupported || autoFilled) && (React.createElement(NotesWrapper, null,
13990
+ React.createElement(NotesWrapper, null,
14043
13991
  testConnectionSupported && connectionStatus === StatusType.Error && React.createElement(NotificationNote, { type: StatusType.Error, message: 'Connection failed. Please check your input and try again.' }),
14044
13992
  testConnectionSupported && connectionStatus === StatusType.Success && React.createElement(NotificationNote, { type: StatusType.Success, message: 'Connection succeeded.' }),
14045
- autoFilled && React.createElement(NotificationNote, { type: StatusType.Default, message: `Odigos autocompleted ${displayName} connection details.` }))),
14046
- React.createElement(Divider, null))),
13993
+ autoFilled && !connectionStatus && !isUpdate && React.createElement(NotificationNote, { type: StatusType.Default, message: `Odigos autocompleted ${displayName} destination details.` })),
13994
+ React.createElement(Divider, null)),
14047
13995
  React.createElement(MonitorsCheckboxes, { title: isUpdate ? '' : 'This connection will monitor:', required: true, allowedSignals: supportedMonitors, selectedSignals: selectedMonitors, setSelectedSignals: handleSelectedSignals, errorMessage: formErrors['exportedSignals'] }),
14048
13996
  !isUpdate && (React.createElement(Input, { title: 'Destination name', placeholder: 'Enter destination name', value: formData['name'], onChange: (e) => {
14049
13997
  dirtyForm();
package/lib/functions.js CHANGED
@@ -1,22 +1,16 @@
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-BxQTUOME.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 getDestinationIcon, j as getEntityIcon, k as getEntityLabel, l as getMetricForEntity, m as getPlatformIcon, n as getPlatformLabel, o as getValueForRange, p as getWorkloadId, q as isOverTime, s as sleep } from './index-BQW5EUgp.js';
3
- export { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-C3nz3TIx.js';
4
- export { g as getEntityId, i as isTimeElapsed } from './index-BQs4sULy.js';
5
- export { g as getIdFromSseTarget } from './index-Hz7AAE0t.js';
6
- import { E as EntityTypes } from './index-BVVVevuY.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-WSle42rz.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 getDestinationIcon, j as getEntityIcon, k as getEntityLabel, l as getMetricForEntity, m as getPlatformIcon, n as getPlatformLabel, o as getValueForRange, p as getWorkloadId, q as isOverTime, s as sleep } from './index-DSzybApb.js';
3
+ export { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-CD_BQJCD.js';
4
+ export { j as getEntityId, k as isTimeElapsed } from './index-BazfJyRh.js';
5
+ export { g as getIdFromSseTarget } from './index-7-KCQK-x.js';
6
+ import { EntityTypes } from './types.js';
7
7
  export { i as isEmpty, s as safeJsonParse } from './index-BZS1ijMm.js';
8
- import './index-BsH_egEe.js';
9
8
  import 'react';
10
- import './theme.js';
11
9
  import 'styled-components';
12
- import './useDarkMode-DxhIuVNi.js';
13
- import './react-CjImwkhV.js';
14
- import './index-BWqrekK4.js';
15
- import './index-DbfrGXPH.js';
16
- import './index-CIgHU72d.js';
10
+ import './index-DGel4E-Z.js';
11
+ import './theme.js';
12
+ import './index-BsH_egEe.js';
17
13
  import './index-DB8Djrsy.js';
18
- import './index-CIXQeSHu.js';
19
- import './index-RBS1MqCQ.js';
20
14
 
21
15
  const cleanObjectEmptyStringsValues = (obj) => {
22
16
  const cleanArray = (arr) => arr.filter((item) => {
package/lib/hooks.js CHANGED
@@ -1,13 +1,13 @@
1
- export { u as useActionFormData, a as useClickNode, b as useClickNotification, c as useDestinationFormData, d as useGenericForm, e as useInstrumentationRuleFormData, f as useSourceFormData, g as useSourceSelectionFormData, h as useTimeAgo } from './useTimeAgo-weEj7br6.js';
2
- export { u as useContainerSize, a as useCopy, b as useKeyDown, c as useOnClickOutside, d as useTransition } from './useTransition-D0wUpPGk.js';
3
- import './useSetupStore-CoYx1UQw.js';
4
- import './react-CjImwkhV.js';
1
+ export { u as useActionFormData, a as useClickNode, b as useClickNotification, c as useDestinationFormData, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-_2PggiXn.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-bXMKBfST.js';
3
+ import './types.js';
5
4
  import 'react';
6
- import './index-BQs4sULy.js';
7
- import './index-BVVVevuY.js';
5
+ import './index-BazfJyRh.js';
6
+ import 'styled-components';
8
7
  import './index-BZS1ijMm.js';
8
+ import './index-BFRz3l_w.js';
9
+ import './index-CD_BQJCD.js';
10
+ import './index-DGel4E-Z.js';
11
+ import './theme.js';
9
12
  import './index-C_0J5P9M.js';
10
- import './index-RBS1MqCQ.js';
11
- import './index-B72aw6tI.js';
12
- import './index-Hz7AAE0t.js';
13
- import 'styled-components';
13
+ import './index-7-KCQK-x.js';
package/lib/icons.js CHANGED
@@ -1,14 +1,13 @@
1
- export { A as AddClusterInfoIcon, C as CodeAttributesIcon, D as DeleteAttributeIcon, K as K8sLogo, a as PayloadCollectionIcon, P as PiiMaskingIcon, R as RenameAttributeIcon, S as SamplerIcon } from './index-CIXQeSHu.js';
1
+ export { A as AddClusterInfoIcon, C as CodeAttributesIcon, D as DeleteAttributeIcon, I as ImageErrorIcon, K as K8sLogo, a as PayloadCollectionIcon, P as PiiMaskingIcon, R as RenameAttributeIcon, S as SamplerIcon } from './index-DGel4E-Z.js';
2
2
  export { C as CPlusPlusLogo, d as CSharpLogo, i as CheckCircledIcon, D as DotnetLogo, E as ElixirLogo, h as ErrorTriangleIcon, G as GoLogo, I as InfoIcon, J as JavaLogo, K as KafkaLogo, L as LogsIcon, g as MetricsIcon, M as MysqlLogo, N as NginxLogo, f as NodejsLogo, O as OdigosLogo, c as PhpLogo, P as PostgresLogo, e as PythonLogo, R as RedisLogo, b as RubyLogo, a as RustLogo, S as SwiftLogo, T as TracesIcon, W as WarningTriangleIcon } from './index-BsH_egEe.js';
3
3
  export { C as CrossCircledIcon, E as EditIcon, F as FilterIcon, K as KeyIcon, N as NotificationIcon, O as OdigosLogoText, a as OverviewIcon, S as SlackLogo, T as TerminalIcon } from './index-KOMAv-TS.js';
4
4
  export { A as ArrowIcon, f as CheckIcon, C as CodeIcon, a as CopyIcon, g as CrossIcon, E as ExtendArrowIcon, d as EyeClosedIcon, e as EyeOpenIcon, L as ListIcon, M as MinusIcon, N as NoDataIcon, b as NotebookIcon, P as PlusIcon, S as SearchIcon, c as SortArrowsIcon, T as TrashIcon, X as XIcon } from './index-BJxaoI0G.js';
5
5
  import React from 'react';
6
6
  import Theme from './theme.js';
7
- export { I as ImageErrorIcon } from './index-BWqrekK4.js';
8
7
  export { y as ActionsIcon, A as AppDynamicsLogo, a as AwsCloudwatchLogo, b as AwsS3Logo, c as AwsXrayLogo, d as AxiomLogo, B as BetterStackLogo, e as BlobStorageLogo, C as CauselyLogo, f as ChronosphereLogo, g as ClickhouseLogo, h as CoralogixLogo, D as Dash0Logo, i as DatadogLogo, z as DestinationsIcon, j as DynatraceLogo, E as ElasticApmLogo, k as ElasticSearchLogo, G as GigapipeLogo, l as GoogleCloudPlatformLogo, m as GrafanaLogo, n as GroundcoverLogo, H as HoneycombLogo, o as HyperDxLogo, I as InstanaLogo, J as JaegerLogo, K as KloudmateLogo, L as Last9Logo, p as LightstepLogo, q as LogzioLogo, r as LokiLogo, s as LumigoLogo, M as MiddlewareLogo, F as NamespacesIcon, N as NewRelicLogo, O as OpenTelemetryLogo, t as OpsVerseLogo, P as PrometheusLogo, Q as QrynLogo, u as QuickwitLogo, R as RulesIcon, S as SignozLogo, W as SourcesIcon, v as SplunkLogo, w as SumoLogicLogo, T as TempoLogo, x as TraceloopLogo, U as UptraceLogo, V as VmLogo } from './index-DB8Djrsy.js';
8
+ import './index-BazfJyRh.js';
9
+ import './types.js';
9
10
  import 'styled-components';
10
- import './useDarkMode-DxhIuVNi.js';
11
- import './react-CjImwkhV.js';
12
11
 
13
12
  const CodeBracketsIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
14
13
  const theme = Theme.useTheme();
@@ -1,4 +1,4 @@
1
- import { E as EntityTypes } from './index-BVVVevuY.js';
1
+ import { EntityTypes } from './types.js';
2
2
 
3
3
  const getIdFromSseTarget = (target, type) => {
4
4
  switch (type) {
@@ -1,6 +1,8 @@
1
- import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-C3nz3TIx.js';
2
- import { S as SignalType } from './index-DbfrGXPH.js';
3
- import { A as ActionType, I as InstrumentationRuleType } from './index-RBS1MqCQ.js';
1
+ import { SignalType, ActionType, InstrumentationRuleType } from './types.js';
2
+ import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-CD_BQJCD.js';
3
+ import 'react';
4
+ import './index-BazfJyRh.js';
5
+ import 'styled-components';
4
6
 
5
7
  const ACTION_OPTIONS = [
6
8
  {
@@ -108,4 +110,19 @@ const INSTRUMENTATION_RULE_OPTIONS = [
108
110
  },
109
111
  ];
110
112
 
111
- export { ACTION_OPTIONS as A, INSTRUMENTATION_RULE_OPTIONS as I };
113
+ const MONITORS_OPTIONS = [
114
+ {
115
+ id: SignalType.Logs,
116
+ value: 'Logs',
117
+ },
118
+ {
119
+ id: SignalType.Metrics,
120
+ value: 'Metrics',
121
+ },
122
+ {
123
+ id: SignalType.Traces,
124
+ value: 'Traces',
125
+ },
126
+ ];
127
+
128
+ export { ACTION_OPTIONS as A, INSTRUMENTATION_RULE_OPTIONS as I, MONITORS_OPTIONS as M };