@odigos/ui-kit 0.0.7 → 0.0.9

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 (87) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/lib/components/data-card/index.d.ts +1 -0
  3. package/lib/components/dropdown/dropdown.stories.d.ts +3 -2
  4. package/lib/components/error-boundary/error-boundary.stories.d.ts +9 -0
  5. package/lib/components/error-boundary/index.d.ts +5 -0
  6. package/lib/components/icon-title-badge/index.d.ts +1 -0
  7. package/lib/components/index.d.ts +1 -0
  8. package/lib/components.js +161 -10
  9. package/lib/constants.js +3 -3
  10. package/lib/containers/compute-platform-select/index.d.ts +4 -4
  11. package/lib/containers/compute-platforms/index.d.ts +3 -3
  12. package/lib/containers/compute-platforms-actions-menu/index.d.ts +2 -2
  13. package/lib/containers/data-flow/nodes/header-node.d.ts +2 -1
  14. package/lib/containers/dropdowns/connection-status-dropdown/index.d.ts +2 -2
  15. package/lib/containers/dropdowns/connection-type-dropdown/connection-type-dropdown.stories.d.ts +9 -0
  16. package/lib/containers/dropdowns/{platform-types-dropdown → connection-type-dropdown}/index.d.ts +5 -5
  17. package/lib/containers/dropdowns/index.d.ts +1 -1
  18. package/lib/containers.js +74 -67
  19. package/lib/data/sources/index.d.ts +1 -0
  20. package/lib/functions/get-containers-icons/index.d.ts +2 -2
  21. package/lib/functions/get-platform-icon/index.d.ts +1 -1
  22. package/lib/functions/get-platform-label/index.d.ts +1 -1
  23. package/lib/functions/get-programming-language-icon/index.d.ts +2 -2
  24. package/lib/functions.js +6 -6
  25. package/lib/hooks/useCopy.d.ts +1 -1
  26. package/lib/hooks.js +5 -5
  27. package/lib/icons/common/image-error-icon/image-error-icon.stories.d.ts +8 -0
  28. package/lib/icons/common/image-error-icon/index.d.ts +2 -0
  29. package/lib/icons/common/index.d.ts +1 -0
  30. package/lib/icons/index.d.ts +1 -0
  31. package/lib/icons/overview/connections-icon/connections-icon.stories.d.ts +8 -0
  32. package/lib/icons/overview/connections-icon/index.d.ts +2 -0
  33. package/lib/icons/overview/index.d.ts +1 -0
  34. package/lib/icons/programming-languages/c-plus-plus-logo/c-plus-plus-logo.stories.d.ts +8 -0
  35. package/lib/icons/programming-languages/c-plus-plus-logo/index.d.ts +2 -0
  36. package/lib/icons/programming-languages/c-sharp-logo/c-sharp-logo.stories.d.ts +8 -0
  37. package/lib/icons/programming-languages/c-sharp-logo/index.d.ts +2 -0
  38. package/lib/icons/programming-languages/dotnet-logo/dotnet-logo.stories.d.ts +8 -0
  39. package/lib/icons/programming-languages/dotnet-logo/index.d.ts +2 -0
  40. package/lib/icons/programming-languages/elixir-logo/elixir-logo.stories.d.ts +8 -0
  41. package/lib/icons/programming-languages/elixir-logo/index.d.ts +2 -0
  42. package/lib/icons/programming-languages/go-logo/go-logo.stories.d.ts +8 -0
  43. package/lib/icons/programming-languages/go-logo/index.d.ts +2 -0
  44. package/lib/icons/programming-languages/index.d.ts +17 -0
  45. package/lib/icons/programming-languages/java-logo/index.d.ts +2 -0
  46. package/lib/icons/programming-languages/java-logo/java-logo.stories.d.ts +8 -0
  47. package/lib/icons/programming-languages/kafka-logo/index.d.ts +2 -0
  48. package/lib/icons/programming-languages/kafka-logo/kafka-logo.stories.d.ts +8 -0
  49. package/lib/icons/programming-languages/mysql-logo/index.d.ts +2 -0
  50. package/lib/icons/programming-languages/mysql-logo/mysql-logo.stories.d.ts +8 -0
  51. package/lib/icons/programming-languages/nginx-logo/index.d.ts +2 -0
  52. package/lib/icons/programming-languages/nginx-logo/nginx-logo.stories.d.ts +8 -0
  53. package/lib/icons/programming-languages/nodejs-logo/index.d.ts +2 -0
  54. package/lib/icons/programming-languages/nodejs-logo/nodejs-logo.stories.d.ts +8 -0
  55. package/lib/icons/programming-languages/php-logo/index.d.ts +2 -0
  56. package/lib/icons/programming-languages/php-logo/php-logo.stories.d.ts +8 -0
  57. package/lib/icons/programming-languages/postgres-logo/index.d.ts +2 -0
  58. package/lib/icons/programming-languages/postgres-logo/postgres-logo.stories.d.ts +8 -0
  59. package/lib/icons/programming-languages/python-logo/index.d.ts +2 -0
  60. package/lib/icons/programming-languages/python-logo/python-logo.stories.d.ts +8 -0
  61. package/lib/icons/programming-languages/redis-logo/index.d.ts +2 -0
  62. package/lib/icons/programming-languages/redis-logo/redis-logo.stories.d.ts +8 -0
  63. package/lib/icons/programming-languages/ruby-logo/index.d.ts +2 -0
  64. package/lib/icons/programming-languages/ruby-logo/ruby-logo.stories.d.ts +8 -0
  65. package/lib/icons/programming-languages/rust-logo/index.d.ts +2 -0
  66. package/lib/icons/programming-languages/rust-logo/rust-logo.stories.d.ts +8 -0
  67. package/lib/icons/programming-languages/swift-logo/index.d.ts +2 -0
  68. package/lib/icons/programming-languages/swift-logo/swift-logo.stories.d.ts +8 -0
  69. package/lib/icons.js +11 -4
  70. package/lib/{index-4tCBQ2pl.js → index-Bc8gi9FH.js} +24 -26
  71. package/lib/{index-BhCi-TxF.js → index-BumPE6cF.js} +1 -1
  72. package/lib/{index-Byh3BO6S.js → index-CZe2VX28.js} +2 -2
  73. package/lib/{index-DRT_7tQl.js → index-DIcomki-.js} +12 -0
  74. package/lib/{index-BJxaoI0G.js → index-D_Qn2U89.js} +8 -1
  75. package/lib/{index-DUW6bkzG.js → index-g6Twdelv.js} +7 -3
  76. package/lib/index-ixs381n-.js +466 -0
  77. package/lib/{index-COMxdOJo.js → index-m62aT4IR.js} +28 -28
  78. package/lib/store/useEntityStore.d.ts +1 -0
  79. package/lib/store.js +1 -1
  80. package/lib/theme.js +1 -1
  81. package/lib/types/{compute-platform → connection}/index.d.ts +3 -3
  82. package/lib/types/index.d.ts +1 -1
  83. package/lib/{useSourceSelectionFormData-ClorQ_WP.js → useSourceSelectionFormData-BY6B70Kf.js} +5 -4
  84. package/lib/{useTransition-5w3VnEhL.js → useTransition-Dfxjcy-C.js} +25 -4
  85. package/package.json +4 -1
  86. package/lib/containers/dropdowns/platform-types-dropdown/platform-types-dropdown.stories.d.ts +0 -9
  87. package/lib/index-DLKEpJJm.js +0 -53
@@ -1,15 +1,14 @@
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-Bc8gi9FH.js';
7
7
  import { s as safeJsonParse, i as isEmpty } from './index-BZS1ijMm.js';
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';
8
+ import { M as MinusIcon, f as CheckIcon, L as ListIcon, C as CodeIcon, E as ExtendArrowIcon, I as ImageErrorIcon, 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-D_Qn2U89.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
- import { O as OdigosLogo } from './index-BGlk5VhF.js';
13
12
  import require$$0 from 'babel-runtime/helpers/extends';
14
13
  import require$$1$1 from 'babel-runtime/core-js/object/get-prototype-of';
15
14
  import require$$2 from 'babel-runtime/helpers/classCallCheck';
@@ -17,7 +16,7 @@ import require$$3 from 'babel-runtime/helpers/createClass';
17
16
  import require$$4 from 'babel-runtime/helpers/possibleConstructorReturn';
18
17
  import require$$5 from 'babel-runtime/helpers/inherits';
19
18
  import require$$1 from 'object-assign';
20
- import { I as InfoIcon } from './index-DLKEpJJm.js';
19
+ import { I as InfoIcon } from './index-ixs381n-.js';
21
20
 
22
21
  const TextWrapper$2 = styled.div `
23
22
  color: ${({ $color, theme }) => $color || theme.text.secondary};
@@ -4082,7 +4081,7 @@ const ImageControlled = ({ src = '', alt = '', size = 16 }) => {
4082
4081
  if (!!src && !hasError) {
4083
4082
  return React.createElement("img", { src: src, alt: alt, width: size, height: size, onError: () => setHasError(true) });
4084
4083
  }
4085
- return React.createElement(OdigosLogo, { size: size });
4084
+ return React.createElement(ImageErrorIcon, { size: size });
4086
4085
  };
4087
4086
 
4088
4087
  const Container$o = styled.div `
@@ -4098,7 +4097,7 @@ const Container$o = styled.div `
4098
4097
  }};
4099
4098
  `;
4100
4099
  const IconWrapped = ({ icon: Icon, src = '', alt = '', status, size = 36 }) => {
4101
- return (React.createElement(Container$o, { "$status": status, "$size": size }, !!src ? React.createElement(ImageControlled, { src: src, size: size - 16 }) : !!Icon ? React.createElement(Icon, { size: size - 16 }) : React.createElement(OdigosLogo, { size: size - 16 })));
4100
+ return (React.createElement(Container$o, { "$status": status, "$size": size }, src ? React.createElement(ImageControlled, { src: src, alt: alt, size: size - 16 }) : !!Icon ? React.createElement(Icon, { size: size - 16 }) : React.createElement(ImageErrorIcon, { size: size - 16 })));
4102
4101
  };
4103
4102
 
4104
4103
  const Container$n = styled.div `
@@ -4553,6 +4552,7 @@ const CopyWrapper = styled(FlexRow) `
4553
4552
  pre {
4554
4553
  color: ${({ theme }) => theme.text.default};
4555
4554
  font-size: 12px;
4555
+ overflow-x: auto;
4556
4556
  }
4557
4557
  `;
4558
4558
  const DataCardFields = ({ data }) => {
@@ -4645,7 +4645,7 @@ const renderValue = (type, value) => {
4645
4645
  otelDistroName: '',
4646
4646
  });
4647
4647
  const awaitingInstrumentation = !instrumented && !instrumentationMessage;
4648
- return (React.createElement(DataTab, { title: containerName, subTitle: `${language === PROGRAMMING_LANGUAGES.JAVASCRIPT ? 'Node.js' : capitalizeFirstLetter(language)}` + (!!runtimeVersion ? ` • Runtime Version: ${runtimeVersion}` : ''), iconSrc: getProgrammingLanguageIcon(language), isExtended: !!instrumentationMessage, renderExtended: () => {
4648
+ return (React.createElement(DataTab, { title: containerName, subTitle: `${language === PROGRAMMING_LANGUAGES.JAVASCRIPT ? 'Node.js' : capitalizeFirstLetter(language)}` + (!!runtimeVersion ? ` • Runtime Version: ${runtimeVersion}` : ''), icon: getProgrammingLanguageIcon(language), isExtended: !!instrumentationMessage, renderExtended: () => {
4649
4649
  if (!!instrumentationMessage) {
4650
4650
  return (React.createElement(AlignCenter, null,
4651
4651
  React.createElement(Status, { status: NOTIFICATION_TYPE.INFO, title: splitCamelString(instrumentationMessage) })));
@@ -4670,18 +4670,15 @@ const CardContainer = styled.div `
4670
4670
  padding: 24px;
4671
4671
  border-radius: 24px;
4672
4672
  border: 1px solid ${({ theme }) => theme.colors.border};
4673
- cursor: ${({ $clickable }) => ($clickable ? 'pointer' : 'default')};
4673
+ background-color: ${({ theme, $hovered }) => ($hovered ? theme.colors.secondary + Theme.opacity.hex['010'] : 'transparent')};
4674
4674
  transition: background-color 0.3s;
4675
- ${({ $clickable, theme }) => $clickable &&
4676
- `&:hover {
4677
- background-color: ${theme.colors.secondary + Theme.opacity.hex['010']};
4678
- }`}
4679
4675
  `;
4680
4676
  const Header$1 = styled.div `
4681
4677
  width: 100%;
4682
4678
  display: flex;
4683
4679
  flex-direction: column;
4684
4680
  gap: 4px;
4681
+ cursor: ${({ $clickable }) => ($clickable ? 'pointer' : 'default')};
4685
4682
  `;
4686
4683
  const Title$8 = styled(Text) `
4687
4684
  width: 100%;
@@ -4700,8 +4697,9 @@ const ActionWrapper = styled(FlexRow) `
4700
4697
  `;
4701
4698
  const DataCard = ({ title = 'Details', titleBadge, description, action: Action, withExtend, data }) => {
4702
4699
  const [extend, setExtend] = useState(false);
4703
- return (React.createElement(CardContainer, { "$clickable": !!withExtend, onClick: () => withExtend && setExtend((prev) => !prev) },
4704
- !!title || !!description || !!Action ? (React.createElement(Header$1, null,
4700
+ const [hovered, setHovered] = useState(false);
4701
+ return (React.createElement(CardContainer, { "$hovered": hovered },
4702
+ !!title || !!description || !!Action ? (React.createElement(Header$1, { "$clickable": withExtend || false, onClick: () => withExtend && setExtend((prev) => !prev), onMouseEnter: () => withExtend && setHovered(true), onMouseLeave: () => withExtend && setHovered(false) },
4705
4703
  (!!title || !!Action) && (React.createElement(Title$8, null,
4706
4704
  title,
4707
4705
  titleBadge !== undefined && React.createElement(Badge, { label: titleBadge }),
@@ -5200,9 +5198,10 @@ const DropdownItem = styled.div `
5200
5198
  const DropdownListItem = ({ option, value, isMulti, onSelect, onDeselect }) => {
5201
5199
  const theme = Theme.useTheme();
5202
5200
  const isSelected = Array.isArray(value) ? !!value?.find((s) => s.id === option.id) : value?.id === option.id;
5201
+ const handleChange = (toAdd) => (toAdd ? onSelect?.(option) : onDeselect?.(option));
5203
5202
  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%' } })));
5203
+ return (React.createElement(DropdownItem, { className: isSelected ? 'selected' : '', onClick: () => handleChange(!isSelected) },
5204
+ React.createElement(Checkbox, { title: option.value || '', titleColor: theme.text.secondary, value: isSelected, onChange: handleChange, style: { width: '100%' } })));
5206
5205
  }
5207
5206
  return (React.createElement(DropdownItem, { className: isSelected ? 'selected' : '', onClick: () => (isSelected ? onDeselect?.(option) : onSelect?.(option)) },
5208
5207
  React.createElement(Text, { size: 14 }, option.value),
@@ -5242,11 +5241,12 @@ const Header = ({ left = [], center = [], right = [] }) => {
5242
5241
  const Title$4 = styled(Text) `
5243
5242
  color: ${({ theme }) => theme.text.grey};
5244
5243
  `;
5245
- const IconTitleBadge = ({ icon: Icon, title, badge, loading }) => {
5244
+ const IconTitleBadge = ({ icon: Icon, title, badge, badgeTooltip, loading }) => {
5246
5245
  return (React.createElement(FlexRow, { "$gap": 6 },
5247
5246
  Icon && React.createElement(Icon, null),
5248
5247
  React.createElement(Title$4, { size: 14 }, title),
5249
- React.createElement(Badge, { label: badge }),
5248
+ typeof badge !== 'undefined' && (React.createElement(Tooltip, { text: badgeTooltip },
5249
+ React.createElement(Badge, { label: badge }))),
5250
5250
  loading && React.createElement(FadeLoader, null)));
5251
5251
  };
5252
5252
 
@@ -5264,8 +5264,8 @@ const Container$d = styled.div `
5264
5264
  justify-content: center;
5265
5265
  `;
5266
5266
  const IconWrap = styled.div `
5267
- width: 28px;
5268
- height: 28px;
5267
+ width: 32px;
5268
+ height: 32px;
5269
5269
 
5270
5270
  border-radius: 100%;
5271
5271
  background-color: ${({ theme, $selected }) => ($selected ? theme.colors.majestic_blue + Theme.opacity.hex['070'] : theme.colors.secondary + Theme.opacity.hex['012'])};
@@ -5280,12 +5280,12 @@ const IconWrap = styled.div `
5280
5280
  const IconsNav = ({ orientation = 'vertical', flip, mainIcons, subIcons }) => {
5281
5281
  return (React.createElement(Container$d, { "$orientation": orientation, "$flip": flip },
5282
5282
  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 }))))),
5283
+ React.createElement(IconWrap, { "$selected": selected, onClick: onClick },
5284
+ React.createElement(Icon, { size: 20 }))))),
5285
5285
  !!mainIcons.length && !!subIcons.length && React.createElement(Divider, { orientation: orientation === 'vertical' ? 'horizontal' : 'vertical', margin: '0', length: '20px' }),
5286
5286
  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 })))))));
5287
+ React.createElement(IconWrap, { "$selected": selected, onClick: onClick },
5288
+ React.createElement(Icon, { size: 20 })))))));
5289
5289
  };
5290
5290
 
5291
5291
  const Container$c = styled.div `
@@ -29571,4 +29571,4 @@ const WarningModal = ({ isOpen, noOverlay, title = '', description = '', note, a
29571
29571
  React.createElement(FooterButton, { "data-id": 'deny', variant: denyButton.variant || 'secondary', onClick: onDeny }, denyButton.text)))));
29572
29572
  };
29573
29573
 
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 };
29574
+ 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 };
@@ -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,7 +1,7 @@
1
1
  import { NOTIFICATION_TYPE, PLATFORM_TYPE } from '../common';
2
- export interface Platform {
2
+ export interface Connection {
3
3
  id: string;
4
+ type?: PLATFORM_TYPE;
4
5
  name?: string;
5
- type: PLATFORM_TYPE;
6
- connectionStatus: NOTIFICATION_TYPE;
6
+ status: NOTIFICATION_TYPE;
7
7
  }
@@ -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.9",
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>;
@@ -1,53 +0,0 @@
1
- import React from 'react';
2
- import Theme from './theme.js';
3
-
4
- const LogsIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
5
- const theme = Theme.useTheme();
6
- const fill = f || theme.text.secondary;
7
- return (React.createElement("svg", { width: size * (16 / 17), height: size, viewBox: '0 0 16 17', xmlns: 'http://www.w3.org/2000/svg', fill: 'none', style: { transform: `rotate(${rotate}deg)` }, onClick: onClick },
8
- React.createElement("path", { stroke: fill, strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M2.66699 8.5H6.66699M2.66699 12.5H6.66699M2.66699 4.5L13.3337 4.5M12.4765 12.0146C13.0334 11.61 13.5322 11.1357 13.96 10.6043C14.0138 10.5375 14.0138 10.4441 13.96 10.3773C13.5322 9.84585 13.0334 9.37156 12.4765 8.96696M10.1908 8.96696C9.63389 9.37156 9.13508 9.84585 8.7073 10.3773C8.65356 10.4441 8.65356 10.5375 8.7073 10.6043C9.13508 11.1357 9.63389 11.61 10.1908 12.0146' })));
9
- };
10
-
11
- const MetricsIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
12
- const theme = Theme.useTheme();
13
- const fill = f || theme.text.secondary;
14
- return (React.createElement("svg", { width: size * (16 / 17), height: size, viewBox: '0 0 16 17', xmlns: 'http://www.w3.org/2000/svg', fill: 'none', style: { transform: `rotate(${rotate}deg)` }, onClick: onClick },
15
- React.createElement("path", { stroke: fill, strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M13.2389 9.1672C13.2389 12.4305 10.5935 15.0758 7.33025 15.0758V14.3373M13.2389 9.1672H14.0883C14.0883 5.43485 11.0626 2.40918 7.33025 2.40918V4.73571M13.2389 9.1672L7.33025 9.1672M7.33025 14.3373C4.47491 14.3373 2.16016 12.0225 2.16016 9.1672H2.89877M7.33025 14.3373L7.33025 9.1672M2.89877 9.1672C2.89877 6.71975 4.88281 4.73571 7.33025 4.73571M2.89877 9.1672H7.33025M7.33025 4.73571L7.33025 9.1672' })));
16
- };
17
-
18
- const TracesIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
19
- const theme = Theme.useTheme();
20
- const fill = f || theme.text.secondary;
21
- return (React.createElement("svg", { width: size * (16 / 17), height: size, viewBox: '0 0 16 17', xmlns: 'http://www.w3.org/2000/svg', fill: 'none', style: { transform: `rotate(${rotate}deg)` }, onClick: onClick },
22
- React.createElement("path", { stroke: fill, strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M10.3337 8.5C10.3337 9.60457 11.2291 10.5 12.3337 10.5C13.4382 10.5 14.3337 9.60457 14.3337 8.5C14.3337 7.39543 13.4382 6.5 12.3337 6.5C11.2291 6.5 10.3337 7.39543 10.3337 8.5ZM10.3337 8.5L8.00032 8.5M8.00032 8.5L8.00032 9.3C8.00032 10.4201 8.00032 10.9802 7.78234 11.408C7.59059 11.7843 7.28463 12.0903 6.90831 12.282C6.60852 12.4348 6.24381 12.4805 5.66698 12.4942M8.00032 8.5L8.00032 7.7C8.00032 6.57989 8.00032 6.01984 7.78234 5.59202C7.59059 5.21569 7.28463 4.90973 6.90831 4.71799C6.60852 4.56524 6.24381 4.51952 5.66698 4.50584M5.66698 12.4942C5.66383 11.3923 4.76961 10.5 3.66699 10.5C2.56242 10.5 1.66699 11.3954 1.66699 12.5C1.66699 13.6046 2.56242 14.5 3.66699 14.5C4.77156 14.5 5.66699 13.6046 5.66699 12.5C5.66699 12.4981 5.66699 12.4961 5.66698 12.4942ZM5.66698 4.50584C5.66383 5.60773 4.76961 6.5 3.66699 6.5C2.56242 6.5 1.66699 5.60457 1.66699 4.5C1.66699 3.39543 2.56242 2.5 3.66699 2.5C4.77156 2.5 5.66699 3.39543 5.66699 4.5C5.66699 4.50195 5.66699 4.5039 5.66698 4.50584Z' })));
23
- };
24
-
25
- const CheckCircledIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
26
- const theme = Theme.useTheme();
27
- const fill = f || theme.text.secondary;
28
- return (React.createElement("svg", { width: size, height: size * (16 / 17), viewBox: '0 0 17 16', xmlns: 'http://www.w3.org/2000/svg', fill: 'none', style: { transform: `rotate(${rotate}deg)` }, onClick: onClick },
29
- React.createElement("path", { stroke: fill, strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M6.41707 8.34197L7.97787 9.90111C8.72855 8.58846 9.76744 7.46337 11.0162 6.61065L11.0837 6.56453M14.8504 8.00039C14.8504 11.3693 12.1193 14.1004 8.75039 14.1004C5.38145 14.1004 2.65039 11.3693 2.65039 8.00039C2.65039 4.63145 5.38145 1.90039 8.75039 1.90039C12.1193 1.90039 14.8504 4.63145 14.8504 8.00039Z' })));
30
- };
31
-
32
- const ErrorTriangleIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
33
- const theme = Theme.useTheme();
34
- const fill = f || theme.text.error;
35
- return (React.createElement("svg", { width: size, height: size, viewBox: '0 0 16 16', xmlns: 'http://www.w3.org/2000/svg', fill: 'none', style: { transform: `rotate(${rotate}deg)` }, onClick: onClick },
36
- React.createElement("path", { stroke: fill, strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M8 8.66673V6.00006M8 10.9167V10.9175M7.07337 2.18915C7.66595 1.93695 8.33405 1.93695 8.92662 2.18915C10.6942 2.94145 14.8697 9.61453 14.7474 11.3981C14.6994 12.0972 14.3529 12.7408 13.7982 13.1614C12.323 14.2795 3.67698 14.2795 2.20185 13.1614C1.64705 12.7408 1.3006 12.0972 1.25263 11.3981C1.13026 9.61453 5.30575 2.94145 7.07337 2.18915Z' })));
37
- };
38
-
39
- const InfoIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
40
- const theme = Theme.useTheme();
41
- const fill = f || theme.text.secondary;
42
- return (React.createElement("svg", { width: size * (16 / 17), height: size, viewBox: '0 0 16 17', xmlns: 'http://www.w3.org/2000/svg', fill: 'none', style: { transform: `rotate(${rotate}deg)` }, onClick: onClick },
43
- React.createElement("path", { stroke: fill, strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M8 8.91498V11.5816M8 6.66498V6.66423M14 8.91504C14 12.2287 11.3137 14.915 8 14.915C4.68629 14.915 2 12.2287 2 8.91504C2 5.60133 4.68629 2.91504 8 2.91504C11.3137 2.91504 14 5.60133 14 8.91504Z' })));
44
- };
45
-
46
- const WarningTriangleIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
47
- const theme = Theme.useTheme();
48
- const fill = f || theme.text.warning;
49
- return (React.createElement("svg", { width: size, height: size, viewBox: '0 0 16 16', xmlns: 'http://www.w3.org/2000/svg', fill: 'none', style: { transform: `rotate(${rotate}deg)` }, onClick: onClick },
50
- React.createElement("path", { stroke: fill, strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M8 8.66673V6.00006M8 10.9167V10.9175M7.07337 2.18915C7.66595 1.93695 8.33405 1.93695 8.92662 2.18915C10.6942 2.94145 14.8697 9.61453 14.7474 11.3981C14.6994 12.0972 14.3529 12.7408 13.7982 13.1614C12.323 14.2795 3.67698 14.2795 2.20185 13.1614C1.64705 12.7408 1.3006 12.0972 1.25263 11.3981C1.13026 9.61453 5.30575 2.94145 7.07337 2.18915Z' })));
51
- };
52
-
53
- export { CheckCircledIcon as C, ErrorTriangleIcon as E, InfoIcon as I, LogsIcon as L, MetricsIcon as M, TracesIcon as T, WarningTriangleIcon as W };