@odigos/ui-kit 0.0.34 → 0.0.35

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 (39) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/eslint.config.mjs +17 -0
  3. package/lib/components/data-card/index.d.ts +2 -1
  4. package/lib/components.js +8 -9
  5. package/lib/constants/strings/index.d.ts +6 -0
  6. package/lib/constants.js +1 -2
  7. package/lib/containers/data-flow/helpers/build-action-nodes.d.ts +7 -1
  8. package/lib/containers/data-flow/helpers/build-destination-nodes.d.ts +7 -1
  9. package/lib/containers/data-flow/helpers/build-rule-nodes.d.ts +7 -1
  10. package/lib/containers/destination-modal/choose-destination/destinations-list/index.d.ts +1 -1
  11. package/lib/containers/destination-modal/choose-destination/index.d.ts +2 -2
  12. package/lib/containers.js +189 -83
  13. package/lib/functions.js +6 -7
  14. package/lib/hooks/index.d.ts +1 -0
  15. package/lib/hooks/useSessionStorage.d.ts +5 -0
  16. package/lib/hooks.js +4 -5
  17. package/lib/icons.js +7 -7
  18. package/lib/{index-Cq8NT9Hr.js → index-9R2N835W.js} +1 -1
  19. package/lib/{index--RecCPGA.js → index-BDqd3uNm.js} +1 -1
  20. package/lib/{index-Bd8ZAEvq.js → index-BVj4fOL3.js} +1 -1
  21. package/lib/{index-CnZlllYu.js → index-BlZKWuxe.js} +7 -1
  22. package/lib/{index-ChYtqgBW.js → index-CCX1HLUr.js} +2 -2
  23. package/lib/{index-CIKkezVt.js → index-CEWs8CTN.js} +1 -1
  24. package/lib/{index-DJGe2YeC.js → index-CKOBXat_.js} +332 -226
  25. package/lib/{index-a_WA-82O.js → index-CyG_tD3y.js} +2 -2
  26. package/lib/{index-ovjVbVQq.js → index-DmCjUtBQ.js} +4 -5
  27. package/lib/{index-BWZT-ipR.js → index-DqaI44fJ.js} +1 -1
  28. package/lib/{index-BZq0yNL-.js → index-THrvNIPj.js} +30 -27
  29. package/lib/{index-BBjwRlta.js → index-dLZvpGw3.js} +5 -12
  30. package/lib/mock-data/sources/index.d.ts +2 -0
  31. package/lib/snippets.js +8 -9
  32. package/lib/store.js +1 -1
  33. package/lib/theme.js +1 -1
  34. package/lib/types/common/index.d.ts +6 -0
  35. package/lib/types.js +8 -1
  36. package/lib/{useSourceSelectionFormData-DBNf1uEe.js → useSourceSelectionFormData-DqSNROtZ.js} +34 -16
  37. package/lib/{useTransition-dZ92VxT2.js → useTransition-D9f1CP9n.js} +1 -1
  38. package/package.json +11 -14
  39. package/lib/index-mOgS3e5E.js +0 -101
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { T as Theme } from './index-DJGe2YeC.js';
2
+ import { T as Theme } from './index-CKOBXat_.js';
3
3
 
4
4
  const EditIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
5
5
  const theme = Theme.useTheme();
@@ -1,14 +1,13 @@
1
1
  import React, { useState, useEffect, useRef, forwardRef, createElement, useCallback, useMemo, Fragment } from 'react';
2
- import { T as Theme, n as ImageErrorIcon, M as MONITORS_OPTIONS } from './index-DJGe2YeC.js';
3
- import { StatusType, OtherStatus, SortDirection, ProgrammingLanguages, InputTypes, FieldTypes } from './types.js';
4
- 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, P as PlusIcon, T as TrashIcon, A as ArrowIcon } from './index-CIKkezVt.js';
5
- 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, n as numbersOnly } from './index-ChYtqgBW.js';
2
+ import { T as Theme, o as ImageErrorIcon, M as MONITORS_OPTIONS, B as BUTTON_TEXTS } from './index-CKOBXat_.js';
3
+ import { StatusType, OtherStatus, SortDirection, ProgrammingLanguages, IntrumentationStatus, InputTypes, FieldTypes } from './types.js';
4
+ 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, P as PlusIcon, T as TrashIcon, A as ArrowIcon } from './index-CEWs8CTN.js';
5
+ 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, n as numbersOnly } from './index-CCX1HLUr.js';
6
6
  import styled, { css } from 'styled-components';
7
7
  import { s as safeJsonParse, i as isEmpty } from './index-BV85P9UP.js';
8
- import { B as BUTTON_TEXTS } from './index-mOgS3e5E.js';
9
- import { u as useContainerSize, a as useCopy, g as useTransition, d as useKeyDown, e as useOnClickOutside } from './useTransition-dZ92VxT2.js';
8
+ import { u as useContainerSize, a as useCopy, g as useTransition, d as useKeyDown, e as useOnClickOutside } from './useTransition-D9f1CP9n.js';
10
9
  import ReactDOM from 'react-dom';
11
- import { I as InfoIcon } from './index-Bd8ZAEvq.js';
10
+ import { I as InfoIcon } from './index-BVj4fOL3.js';
12
11
 
13
12
  const TextWrapper$2 = styled.div `
14
13
  color: ${({ $color, theme }) => $color || theme.text.secondary};
@@ -3992,6 +3991,9 @@ const Row = styled.div `
3992
3991
  const TextNoWrap = styled(Text) `
3993
3992
  white-space: nowrap;
3994
3993
  `;
3994
+ const IconWrap$1 = styled(FlexColumn) `
3995
+ width: 16px;
3996
+ `;
3995
3997
  const ConditionDetails = ({ conditions: c, headerLabelError = 'Something Failed', headerLabelWarning = "Something isn't right", headerLabelSuccess = 'Everything Successful', }) => {
3996
3998
  const theme = Theme.useTheme();
3997
3999
  const [extend, setExtend] = useState(false);
@@ -4022,9 +4024,9 @@ const ConditionDetails = ({ conditions: c, headerLabelError = 'Something Failed'
4022
4024
  React.createElement(Text, { color: headerSubTextColor, size: 12, family: 'secondary' }, headerSubText),
4023
4025
  React.createElement(ExtendArrow, { extend: extend, align: 'right' })),
4024
4026
  extend && (React.createElement(Body, null, conditions.map(({ status, type, reason, message, lastTransitionTime }, idx) => {
4025
- const Icon = status === 'loading' ? () => React.createElement(FadeLoader, { scale: 0.8 }) : status === 'disabled' ? getStatusIcon(StatusType.Info, theme) : getStatusIcon(status, theme);
4026
- const color = status === 'disabled' ? theme.text.info : status === StatusType.Error ? theme.text.error : status === StatusType.Warning ? theme.text.warning : theme.text.info;
4027
- const boldColor = status === 'disabled'
4027
+ const Icon = status === OtherStatus.Loading ? () => React.createElement(FadeLoader, { scale: 0.8 }) : status === OtherStatus.Disabled ? getStatusIcon(StatusType.Info, theme) : getStatusIcon(status, theme);
4028
+ const color = status === OtherStatus.Disabled ? theme.text.info : status === StatusType.Error ? theme.text.error : status === StatusType.Warning ? theme.text.warning : theme.text.info;
4029
+ const boldColor = status === OtherStatus.Disabled
4028
4030
  ? theme.text.info_secondary
4029
4031
  : status === StatusType.Error
4030
4032
  ? theme.text.error_secondary
@@ -4032,7 +4034,8 @@ const ConditionDetails = ({ conditions: c, headerLabelError = 'Something Failed'
4032
4034
  ? theme.text.warning_secondary
4033
4035
  : theme.text.info_secondary;
4034
4036
  return (React.createElement(Row, { key: `condition-${idx}` },
4035
- React.createElement(Icon, null),
4037
+ React.createElement(IconWrap$1, null,
4038
+ React.createElement(Icon, null)),
4036
4039
  React.createElement(FlexRow, { "$gap": 12, style: { width: '100%', justifyContent: 'space-between' } },
4037
4040
  React.createElement(Text, { color: color, size: 12 },
4038
4041
  React.createElement(TextNoWrap, { color: boldColor, size: 12, weight: 700 }, type),
@@ -4640,7 +4643,7 @@ const RenderValue = ({ type, value }) => {
4640
4643
  actualDevice: { title: '', subTitle: '', tooltip: '' },
4641
4644
  processes: [{ health: StatusType.Info, message: '', identifyingAttributes: [] }],
4642
4645
  });
4643
- return (React.createElement(DataTab, { title: containerName, subTitle: `${processes.length} Instrumented Processes`, renderActions: () => {
4646
+ return (React.createElement(DataTab, { title: containerName, subTitle: processes.length ? `${processes.length} Instrumented Processes` : undefined, renderActions: () => {
4644
4647
  return React.createElement(Status, { status: StatusType.Info, title: 'Instrumentation Device', subtitle: !actualDevice.subTitle || actualDevice.subTitle === '[]' ? 'none' : actualDevice.subTitle, withBorder: true });
4645
4648
  }, extendableProps: {
4646
4649
  isExtended: !!processes.length,
@@ -4655,29 +4658,29 @@ const RenderValue = ({ type, value }) => {
4655
4658
  } }));
4656
4659
  }
4657
4660
  case DataCardFieldTypes.SourceContainer: {
4658
- const { containerName, language, runtimeVersion, instrumented, instrumentationMessage, otelDistroName } = safeJsonParse(value, {
4661
+ const { containerName, language, runtimeVersion, instrumented, instrumentationMessage, otelDistroName, isDisabled } = safeJsonParse(value, {
4659
4662
  containerName: '',
4660
4663
  language: ProgrammingLanguages.Unknown,
4661
4664
  runtimeVersion: '',
4662
4665
  instrumented: false,
4663
4666
  instrumentationMessage: '',
4664
4667
  otelDistroName: '',
4668
+ isDisabled: false,
4665
4669
  });
4666
4670
  const awaitingInstrumentation = !instrumented && !instrumentationMessage;
4667
- return (React.createElement(DataTab, { title: containerName, subTitle: `${language === ProgrammingLanguages.JavaScript ? 'Node.js' : capitalizeFirstLetter(language)}` + (!!runtimeVersion ? ` • Runtime Version: ${runtimeVersion}` : ''), iconProps: {
4668
- icon: getProgrammingLanguageIcon(language),
4669
- }, extendableProps: {
4671
+ const statusType = isDisabled ? StatusType.Info : instrumented ? StatusType.Success : awaitingInstrumentation ? StatusType.Warning : StatusType.Error;
4672
+ const statusTitle = isDisabled
4673
+ ? IntrumentationStatus.NOT_INSTRUMENTED
4674
+ : instrumented
4675
+ ? IntrumentationStatus.INSTRUMNETED
4676
+ : awaitingInstrumentation
4677
+ ? `${IntrumentationStatus.INSTRUMENTING}...`
4678
+ : IntrumentationStatus.UNINSTRUMENTED;
4679
+ return (React.createElement(DataTab, { title: containerName, subTitle: `${language === ProgrammingLanguages.JavaScript ? 'Node.js' : capitalizeFirstLetter(language)}` + (runtimeVersion ? ` • Runtime Version: ${runtimeVersion}` : ''), iconProps: { icon: getProgrammingLanguageIcon(language) }, extendableProps: {
4670
4680
  isExtended: !!instrumentationMessage,
4671
- renderExtended: () => {
4672
- if (!!instrumentationMessage) {
4673
- return (React.createElement(AlignCenter, null,
4674
- React.createElement(Status, { status: StatusType.Info, title: splitCamelString(instrumentationMessage) })));
4675
- }
4676
- return null;
4677
- },
4678
- }, renderActions: () => {
4679
- return (React.createElement(Status, { status: instrumented ? StatusType.Success : awaitingInstrumentation ? StatusType.Warning : StatusType.Error, title: instrumented ? 'Instrumented' : awaitingInstrumentation ? 'Instrumenting...' : 'Uninstrumented', subtitle: otelDistroName, withIcon: true, withBorder: true }));
4680
- } }));
4681
+ renderExtended: () => (React.createElement(AlignCenter, null,
4682
+ React.createElement(Status, { status: StatusType.Info, title: splitCamelString(instrumentationMessage) }))),
4683
+ }, renderActions: () => React.createElement(Status, { status: statusType, title: statusTitle, subtitle: otelDistroName, withIcon: true, withBorder: true }) }));
4681
4684
  }
4682
4685
  default: {
4683
4686
  return React.createElement(PreWrap, null, parseJsonStringToPrettyString(typeof value === 'string' ? value || '-' : ''));
@@ -4726,7 +4729,7 @@ const DataCard = ({ title = 'Details', titleBadge, description, action: Action,
4726
4729
  !!title || !!description || !!Action ? (React.createElement(Header$1, { "$clickable": withExtend || false, onClick: () => withExtend && setExtend((prev) => !prev), onMouseEnter: () => withExtend && setHovered(true), onMouseLeave: () => withExtend && setHovered(false) },
4727
4730
  (!!title || !!Action) && (React.createElement(Title$8, null,
4728
4731
  title,
4729
- titleBadge !== undefined && React.createElement(Badge, { label: titleBadge }),
4732
+ titleBadge === OtherStatus.Loading ? React.createElement(FadeLoader, null) : titleBadge !== undefined && React.createElement(Badge, { label: titleBadge }),
4730
4733
  React.createElement(ActionWrapper, null,
4731
4734
  typeof Action === 'function' ? React.createElement(Action, null) : Action,
4732
4735
  withExtend && React.createElement(ExtendArrow, { extend: false })))),
@@ -1,11 +1,10 @@
1
1
  import { StatusType, OtherStatus, DestinationTypes, EntityTypes, PlatformType } from './types.js';
2
- import { K as K8sLogo } from './index-DJGe2YeC.js';
3
- import { D as DEFAULT_DATA_STREAM_NAME } from './index-mOgS3e5E.js';
4
- import { a as getProgrammingLanguageIcon } from './index-ChYtqgBW.js';
2
+ import { D as DEFAULT_DATA_STREAM_NAME, K as K8sLogo } from './index-CKOBXat_.js';
3
+ import { a as getProgrammingLanguageIcon } from './index-CCX1HLUr.js';
5
4
  import 'react';
6
5
  import 'styled-components';
7
- import { e as AwsXrayLogo, a2 as VictoriaMetricsLogo, a1 as UptraceLogo, a0 as TraceloopLogo, $ as TingyunLogo, _ as TempoLogo, Z as TelemetryHubLogo, Y as SumoLogicLogo, X as SplunkLogo, W as SignozLogo, U as SeqLogo, d as AwsS3Logo, T as QuickwitLogo, G as GigapipeLogo, S as QrynLogo, R as PrometheusLogo, F as OpenTelemetryLogo, Q as OracleLogo, P as OpsVerseLogo, z as OpenObserveLogo, y as OneUptimeLogo, O as ObserveLogo, N as NewRelicLogo, M as MiddlewareLogo, x as LumigoLogo, w as LokiLogo, v as LogzioLogo, u as LightstepLogo, L as Last9Logo, K as KloudmateLogo, J as JaegerLogo, I as InstanaLogo, t as HyperDxLogo, H as HoneycombLogo, s as GroundcoverLogo, r as GreptimeLogo, q as GrafanaLogo, p as GoogleCloudPlatformLogo, o as ElasticSearchLogo, E as ElasticApmLogo, n as DynatraceLogo, m as DatadogLogo, D as Dash0Logo, l as CoralogixLogo, c as AwsCloudwatchLogo, k as ClickhouseLogo, j as ChronosphereLogo, i as ChecklyLogo, C as CauselyLogo, h as BonreeLogo, B as BetterStackLogo, g as BlobStorageLogo, f as AxiomLogo, b as AppDynamicsLogo, a as AlibabaCloudLogo, A as AlaudaLogo, a6 as RulesIcon, a3 as ActionsIcon, a4 as DestinationsIcon, a7 as SourcesIcon, a5 as NamespacesIcon, V as VmLogo } from './index-Cq8NT9Hr.js';
8
- import { K as KafkaLogo, O as OdigosLogo } from './index-Bd8ZAEvq.js';
6
+ import { e as AwsXrayLogo, a2 as VictoriaMetricsLogo, a1 as UptraceLogo, a0 as TraceloopLogo, $ as TingyunLogo, _ as TempoLogo, Z as TelemetryHubLogo, Y as SumoLogicLogo, X as SplunkLogo, W as SignozLogo, U as SeqLogo, d as AwsS3Logo, T as QuickwitLogo, G as GigapipeLogo, S as QrynLogo, R as PrometheusLogo, F as OpenTelemetryLogo, Q as OracleLogo, P as OpsVerseLogo, z as OpenObserveLogo, y as OneUptimeLogo, O as ObserveLogo, N as NewRelicLogo, M as MiddlewareLogo, x as LumigoLogo, w as LokiLogo, v as LogzioLogo, u as LightstepLogo, L as Last9Logo, K as KloudmateLogo, J as JaegerLogo, I as InstanaLogo, t as HyperDxLogo, H as HoneycombLogo, s as GroundcoverLogo, r as GreptimeLogo, q as GrafanaLogo, p as GoogleCloudPlatformLogo, o as ElasticSearchLogo, E as ElasticApmLogo, n as DynatraceLogo, m as DatadogLogo, D as Dash0Logo, l as CoralogixLogo, c as AwsCloudwatchLogo, k as ClickhouseLogo, j as ChronosphereLogo, i as ChecklyLogo, C as CauselyLogo, h as BonreeLogo, B as BetterStackLogo, g as BlobStorageLogo, f as AxiomLogo, b as AppDynamicsLogo, a as AlibabaCloudLogo, A as AlaudaLogo, a6 as RulesIcon, a3 as ActionsIcon, a4 as DestinationsIcon, a7 as SourcesIcon, a5 as NamespacesIcon, V as VmLogo } from './index-9R2N835W.js';
7
+ import { K as KafkaLogo, O as OdigosLogo } from './index-BVj4fOL3.js';
9
8
  import { s as safeJsonParse } from './index-BV85P9UP.js';
10
9
 
11
10
  const compareCondition = (renderCondition, fields) => {
@@ -328,12 +327,6 @@ const mapDestinationFieldsForDisplay = (destination, yamlFields) => {
328
327
  .filter((item) => item.value !== null);
329
328
  };
330
329
 
331
- const mapExportedSignals = (exportedSignals) => {
332
- if (!exportedSignals)
333
- return [];
334
- return Object.keys(exportedSignals).filter((signal) => exportedSignals[signal]);
335
- };
336
-
337
330
  const sleep = async (ms = 1000) => new Promise((resolve) => setTimeout(resolve, ms));
338
331
 
339
- export { filterDestinations as a, filterDestinationsByStream as b, compareCondition as c, deepClone as d, filterSources as e, filterActions as f, filterSourcesByStream as g, formatBytes as h, getConditionsBooleans as i, getContainersInstrumentedCount as j, getContainersIcons as k, getDestinationIcon as l, getEntityIcon as m, getEntityLabel as n, getMetricForEntity as o, getPlatformIcon as p, getPlatformLabel as q, getValueForRange as r, getWorkloadId as s, getYamlFieldsForDestination as t, isOverTime as u, mapDestinationFieldsForDisplay as v, mapExportedSignals as w, sleep as x };
332
+ export { filterDestinations as a, filterDestinationsByStream as b, compareCondition as c, deepClone as d, filterSources as e, filterActions as f, filterSourcesByStream as g, formatBytes as h, getConditionsBooleans as i, getContainersInstrumentedCount as j, getContainersIcons as k, getDestinationIcon as l, getEntityIcon as m, getEntityLabel as n, getMetricForEntity as o, getPlatformIcon as p, getPlatformLabel as q, getValueForRange as r, getWorkloadId as s, getYamlFieldsForDestination as t, isOverTime as u, mapDestinationFieldsForDisplay as v, sleep as w };
@@ -1,4 +1,6 @@
1
1
  import { K8sResourceKind, ProgrammingLanguages, type Source } from '@/types';
2
+ export declare const MOCK_SOURCES_SIMPLE_DEMO: Source[];
3
+ export declare const MOCK_SOURCES_GOOGLE: Source[];
2
4
  export declare const MOCK_SOURCES: Source[];
3
5
  export declare const MOCK_SOURCE_JAEGER: {
4
6
  namespace: string;
package/lib/snippets.js CHANGED
@@ -1,14 +1,13 @@
1
- export { A as AddButton } from './index-BZq0yNL-.js';
2
- export { E as EditButton, N as NoteBackToSummary } from './index-ovjVbVQq.js';
1
+ export { A as AddButton } from './index-THrvNIPj.js';
2
+ export { E as EditButton, N as NoteBackToSummary } from './index-DmCjUtBQ.js';
3
3
  import 'react';
4
- import './index-DJGe2YeC.js';
4
+ import './index-CKOBXat_.js';
5
5
  import './types.js';
6
6
  import 'styled-components';
7
- import './index-CIKkezVt.js';
8
- import './index-ChYtqgBW.js';
9
- import './index-Bd8ZAEvq.js';
7
+ import './index-CEWs8CTN.js';
8
+ import './index-CCX1HLUr.js';
9
+ import './index-BVj4fOL3.js';
10
10
  import './index-BV85P9UP.js';
11
- import './index-mOgS3e5E.js';
12
- import './useTransition-dZ92VxT2.js';
11
+ import './useTransition-D9f1CP9n.js';
13
12
  import 'react-dom';
14
- import './index-BWZT-ipR.js';
13
+ import './index-DqaI44fJ.js';
package/lib/store.js CHANGED
@@ -1,4 +1,4 @@
1
- export { u as useDarkMode, a as useDataStreamStore, b as useDrawerStore, c as useEntityStore, d as useFilterStore, e as useInstrumentStore, f as useModalStore, g as useNotificationStore, h as usePendingStore, i as useSelectedStore, j as useSetupStore } from './index-DJGe2YeC.js';
1
+ export { u as useDarkMode, a as useDataStreamStore, b as useDrawerStore, c as useEntityStore, d as useFilterStore, e as useInstrumentStore, f as useModalStore, g as useNotificationStore, h as usePendingStore, i as useSelectedStore, j as useSetupStore } from './index-CKOBXat_.js';
2
2
  import 'react';
3
3
  import './types.js';
4
4
  import 'styled-components';
package/lib/theme.js CHANGED
@@ -1,4 +1,4 @@
1
- export { T as default } from './index-DJGe2YeC.js';
1
+ export { T as default } from './index-CKOBXat_.js';
2
2
  import 'styled-components';
3
3
  import 'react';
4
4
  import './types.js';
@@ -85,6 +85,12 @@ export declare enum StatusType {
85
85
  Info = "info",
86
86
  Default = "default"
87
87
  }
88
+ export declare enum IntrumentationStatus {
89
+ INSTRUMNETED = "Instrumented",
90
+ INSTRUMENTING = "Instrumenting",
91
+ UNINSTRUMENTED = "Uninstrumented",
92
+ NOT_INSTRUMENTED = "Not Instrumented"
93
+ }
88
94
  export declare enum OtherStatus {
89
95
  Loading = "loading",
90
96
  Disabled = "disabled"
package/lib/types.js CHANGED
@@ -156,6 +156,13 @@ var StatusType;
156
156
  StatusType["Info"] = "info";
157
157
  StatusType["Default"] = "default";
158
158
  })(StatusType || (StatusType = {}));
159
+ var IntrumentationStatus;
160
+ (function (IntrumentationStatus) {
161
+ IntrumentationStatus["INSTRUMNETED"] = "Instrumented";
162
+ IntrumentationStatus["INSTRUMENTING"] = "Instrumenting";
163
+ IntrumentationStatus["UNINSTRUMENTED"] = "Uninstrumented";
164
+ IntrumentationStatus["NOT_INSTRUMENTED"] = "Not Instrumented";
165
+ })(IntrumentationStatus || (IntrumentationStatus = {}));
159
166
  var OtherStatus;
160
167
  (function (OtherStatus) {
161
168
  OtherStatus["Loading"] = "loading";
@@ -299,4 +306,4 @@ var K8sResourceKind;
299
306
  K8sResourceKind["StatefulSet"] = "StatefulSet";
300
307
  })(K8sResourceKind || (K8sResourceKind = {}));
301
308
 
302
- export { ActionCategory, ActionKeyTypes, ActionType, AddNodeTypes, BooleanOperation, CodeAttributesKeyTypes, Crud, DestinationTypes, EdgeTypes, EntityTypes, FieldTypes, HeadersCollectionKeyTypes, InputTypes, InstrumentationRuleType, JsonOperation, K8sResourceKind, NodeTypes, NumberOperation, OtherStatus, PayloadCollectionKeyTypes, PlatformType, ProgrammingLanguages, SignalType, SortDirection, StatusType, StringOperation, Tier };
309
+ export { ActionCategory, ActionKeyTypes, ActionType, AddNodeTypes, BooleanOperation, CodeAttributesKeyTypes, Crud, DestinationTypes, EdgeTypes, EntityTypes, FieldTypes, HeadersCollectionKeyTypes, InputTypes, InstrumentationRuleType, IntrumentationStatus, JsonOperation, K8sResourceKind, NodeTypes, NumberOperation, OtherStatus, PayloadCollectionKeyTypes, PlatformType, ProgrammingLanguages, SignalType, SortDirection, StatusType, StringOperation, Tier };
@@ -1,11 +1,10 @@
1
1
  import { ActionKeyTypes, ActionType, StatusType, AddNodeTypes, EntityTypes, FieldTypes } from './types.js';
2
- import { g as useNotificationStore, f as useModalStore, b as useDrawerStore, c as useEntityStore, a as useDataStreamStore, j as useSetupStore } from './index-DJGe2YeC.js';
3
- import { F as FORM_ALERTS } from './index-mOgS3e5E.js';
2
+ import { g as useNotificationStore, F as FORM_ALERTS, f as useModalStore, b as useDrawerStore, c as useEntityStore, a as useDataStreamStore, j as useSetupStore } from './index-CKOBXat_.js';
4
3
  import { useState, useEffect, useMemo } from 'react';
5
4
  import 'styled-components';
6
5
  import { i as isEmpty, s as safeJsonParse } from './index-BV85P9UP.js';
7
- import { b as useGenericForm } from './useTransition-dZ92VxT2.js';
8
- import { g as getIdFromSseTarget, i as isLegalK8sLabel } from './index-CnZlllYu.js';
6
+ import { b as useGenericForm } from './useTransition-D9f1CP9n.js';
7
+ import { g as getIdFromSseTarget, i as isLegalK8sLabel, m as mapExportedSignals } from './index-BlZKWuxe.js';
9
8
 
10
9
  const INITIAL$2 = {
11
10
  // @ts-ignore (TS complains about empty string because we expect an "ActionsType", but it's fine)
@@ -348,19 +347,24 @@ const useDestinationFormData = (params) => {
348
347
  }
349
348
  }, [yamlFields, preLoadedFields]);
350
349
  useEffect(() => {
351
- handleFormChange('fields', dynamicFields.map((field) => ({
352
- key: field.name,
353
- value: field.value,
354
- })));
350
+ if (dynamicFields) {
351
+ const mapped = dynamicFields.map((field) => ({
352
+ key: field.name,
353
+ value: field.value,
354
+ }));
355
+ handleFormChange('fields', mapped);
356
+ }
355
357
  }, [dynamicFields]);
356
358
  useEffect(() => {
357
- const { logs, metrics, traces } = supportedSignals || {};
358
- handleFormChange('exportedSignals', {
359
- logs: logs?.supported || false,
360
- metrics: metrics?.supported || false,
361
- traces: traces?.supported || false,
362
- });
363
- }, [supportedSignals]);
359
+ if (supportedSignals && mapExportedSignals(formData.exportedSignals).length === 0) {
360
+ const { logs, metrics, traces } = supportedSignals;
361
+ handleFormChange('exportedSignals', {
362
+ logs: logs.supported,
363
+ metrics: metrics.supported,
364
+ traces: traces.supported,
365
+ });
366
+ }
367
+ }, [supportedSignals, formData]);
364
368
  const validateForm = (params) => {
365
369
  const errors = {};
366
370
  let ok = true;
@@ -406,6 +410,20 @@ const useDestinationFormData = (params) => {
406
410
  };
407
411
  };
408
412
 
413
+ const useSessionStorage = () => {
414
+ const getItemSS = (key, defaultValue) => {
415
+ const item = sessionStorage.getItem(key);
416
+ return item ? safeJsonParse(item, defaultValue) : defaultValue;
417
+ };
418
+ const setItemSS = (key, value) => {
419
+ sessionStorage.setItem(key, JSON.stringify(value));
420
+ };
421
+ const removeItemSS = (key) => {
422
+ sessionStorage.removeItem(key);
423
+ };
424
+ return { getItemSS, setItemSS, removeItemSS };
425
+ };
426
+
409
427
  const INITIAL = {
410
428
  otelServiceName: '',
411
429
  currentStreamName: '',
@@ -604,4 +622,4 @@ const useSourceSelectionFormData = (params) => {
604
622
  };
605
623
  };
606
624
 
607
- export { useClickNode as a, useClickNotification as b, useDataStreamFormData as c, useDestinationFormData as d, useSourceFormData as e, useSourceSelectionFormData as f, useActionFormData as u };
625
+ export { useClickNode as a, useClickNotification as b, useDataStreamFormData as c, useDestinationFormData as d, useSessionStorage as e, useSourceFormData as f, useSourceSelectionFormData as g, useActionFormData as u };
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useRef, useEffect, useCallback } from 'react';
2
- import { g as useNotificationStore } from './index-DJGe2YeC.js';
2
+ import { g as useNotificationStore } from './index-CKOBXat_.js';
3
3
  import { CodeAttributesKeyTypes, PayloadCollectionKeyTypes } from './types.js';
4
4
  import styled from 'styled-components';
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odigos/ui-kit",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "author": "Odigos",
5
5
  "repository": {
6
6
  "type": "git",
@@ -73,15 +73,15 @@
73
73
  }
74
74
  },
75
75
  "peerDependencies": {
76
- "@xyflow/react": "^12.5.5",
76
+ "@xyflow/react": "^12.6.4",
77
77
  "javascript-time-ago": "^2.5.11",
78
78
  "lottie-react": "^2.4.1",
79
79
  "prism-react-renderer": "^2.4.1",
80
80
  "react": "^19.1.0",
81
81
  "react-dom": "^19.1.0",
82
- "react-error-boundary": "^5.0.0",
82
+ "react-error-boundary": "^6.0.0",
83
83
  "styled-components": "6.1.15",
84
- "zustand": "^5.0.3"
84
+ "zustand": "^5.0.5"
85
85
  },
86
86
  "dependencies": {
87
87
  "@xyflow/react": "^12.6.4",
@@ -95,10 +95,11 @@
95
95
  "zustand": "^5.0.5"
96
96
  },
97
97
  "devDependencies": {
98
- "@babel/core": "^7.27.1",
98
+ "@babel/core": "^7.27.3",
99
99
  "@babel/preset-env": "^7.27.2",
100
100
  "@babel/preset-react": "^7.27.1",
101
101
  "@babel/preset-typescript": "^7.27.1",
102
+ "@eslint/eslintrc": "^3.3.1",
102
103
  "@rollup/plugin-commonjs": "^28.0.3",
103
104
  "@rollup/plugin-json": "^6.1.0",
104
105
  "@rollup/plugin-node-resolve": "^16.0.1",
@@ -106,19 +107,15 @@
106
107
  "@storybook/addon-webpack5-compiler-babel": "^3.0.6",
107
108
  "@storybook/react": "^8.6.14",
108
109
  "@storybook/react-webpack5": "^8.6.14",
109
- "@types/node": "^22.15.21",
110
- "@types/react": "^19.1.5",
110
+ "@types/node": "^22.15.24",
111
+ "@types/react": "^19.1.6",
111
112
  "@types/react-dom": "^19.1.5",
112
- "@types/react-lottie": "^1.2.10",
113
- "@typescript-eslint/eslint-plugin": "^8.32.1",
114
- "@typescript-eslint/parser": "^8.32.1",
115
113
  "babel-loader": "^10.0.0",
116
114
  "babel-plugin-styled-components": "^2.1.4",
117
115
  "eslint": "^9.27.0",
118
- "eslint-plugin-react": "^7.37.5",
119
- "eslint-plugin-storybook": "^0.12.0",
120
- "html-webpack-plugin": "^5.6.3",
121
- "postcss": "^8.5.3",
116
+ "eslint-config-next": "^15.3.2",
117
+ "next": "^15.3.2",
118
+ "postcss": "^8.5.4",
122
119
  "rollup": "^4.41.1",
123
120
  "rollup-plugin-postcss": "^4.0.2",
124
121
  "rollup-plugin-typescript2": "^0.36.0",
@@ -1,101 +0,0 @@
1
- const DEFAULT_DATA_STREAM_NAME = 'default';
2
- const FORM_ALERTS = {
3
- REQUIRED_FIELDS: 'Required fields are missing',
4
- FIELD_IS_REQUIRED: 'This field is required',
5
- FORBIDDEN: 'Forbidden',
6
- ENTERPRISE_ONLY: (str = 'This') => `${str} is an Enterprise feature. Please upgrade your plan.`,
7
- DEFINED_FOR_ALL_STREAMS: (str) => `${str} are defined for all Data Streams.`,
8
- CANNOT_EDIT_RULE: 'Cannot edit a system-managed instrumentation rule',
9
- CANNOT_DELETE_RULE: 'Cannot delete a system-managed instrumentation rule',
10
- LATENCY_HTTP_ROUTE: 'HTTP route must start with a forward slash "/"',
11
- READONLY_WARNING: "You're not allowed to create/update/delete in readonly mode",
12
- ILLEGAL_K8S_LABEL: 'Must be 63 characters or less, must consist of alphanumeric characters, "-", "_", or ".", and must start & end with an alphanumeric character (e.g., my-name, 123.abc).',
13
- };
14
- const DISPLAY_TITLES = {
15
- NAMESPACE: 'Namespace',
16
- NAME: 'Name',
17
- KIND: 'Kind',
18
- CONNECTION: 'Connection',
19
- CONNECTIONS: 'Connections',
20
- DATA_STREAM: 'Data Stream',
21
- DATA_STREAMS: 'Data Streams',
22
- STREAM_NAME: 'Data Stream Name',
23
- NAME_YOUR_STREAM: 'Name your Data Stream',
24
- NAME_YOUR_STREAM_PLACEHOLDER: 'e.g. Highest priority',
25
- STREAM_DESCRIPTION: 'Provide a clear and descriptive name for your pipeline to ensure its purpose is easily understood by you and your team.',
26
- STREAM_CONFIRM: 'Confirm your new Data Stream',
27
- ACTION: 'Action',
28
- ACTIONS: 'Actions',
29
- ADD_ACTION: 'Add Action',
30
- ACTION_DETAILS: 'Action Details',
31
- INSTRUMENTATION_RULE: 'Instrumentation Rule',
32
- INSTRUMENTATION_RULES: 'Instrumentation Rules',
33
- ADD_INSTRUMENTATION_RULE: 'Add Instrumentation Rule',
34
- INSTRUMENTATION_RULE_DETAILS: 'Instrumentation Rule Details',
35
- DESTINATION: 'Destination',
36
- DESTINATIONS: 'Destinations',
37
- ADD_DESTINATION: 'Add Destination',
38
- ADD_DESTINATIONS: 'Add Destinations',
39
- ADD_DESTINATION_DESCRIPTION: 'Add a destination to send your telemetry data to. You can add multiple destinations.',
40
- DESTINATION_DETAILS: 'Destination Details',
41
- SELECTED_DESTINATIONS: 'Selected Destinations',
42
- SOURCE: 'Source',
43
- SOURCES: 'Sources',
44
- ADD_SOURCE: 'Add Source',
45
- SOURCE_DETAILS: 'Source Details',
46
- SELECT_SOURCES: 'Select Sources',
47
- SELECTED_SOURCES: 'Selected Sources',
48
- SELECT_SOURCES_DESCRIPTION: 'Select apps to monitor in each namespace. Odigos will instrument them and send telemetry data to your destinations.',
49
- NO_SOURCES: 'No sources',
50
- NO_SOURCES_GO_BACK: 'No sources selected. Please go back to select sources.',
51
- PLEASE_ADD_SOURCE: 'Please add a source',
52
- NO_SOURCES_NAMESPACE: 'No sources available in this namespace',
53
- TRY_SEARCH_OR_OTHER_NAMESPACE: 'Try searching again or select another namespace.',
54
- PLEASE_MAKE_SURE_UNIGNORED_NAMESPACES: 'Please make sure your cluster has unignored namespaces',
55
- INSTALLATION: 'Installation',
56
- SUMMARY: 'Summary',
57
- TYPE: 'Type',
58
- NOTES: 'Notes',
59
- STATUS: 'Status',
60
- READONLY: 'Readonly',
61
- LANGUAGE: 'Language',
62
- MONITORS: 'Monitors',
63
- SIGNALS_FOR_PROCESSING: 'Signals for Processing',
64
- MANAGED_BY_PROFILE: 'Managed by Profile',
65
- API_TOKEN: 'API Token',
66
- API_TOKENS: 'API Tokens',
67
- DESCRIBE_ODIGOS: 'Describe Odigos',
68
- DESCRIBE_SOURCE: 'Describe Source',
69
- DETECTED_CONTAINERS: 'Detected Containers',
70
- DETECTED_CONTAINERS_DESCRIPTION: 'The system automatically instruments the containers it detects with a supported programming language.',
71
- CONTAINER_NAME: 'Container Name',
72
- FILTERED_COUNT_TOOLTIP: 'Represents filtered amount, out of total amount',
73
- SEARCH_NAMESPACES: 'Search Namespaces',
74
- SHOW_SELECTED_ONLY: 'Show selected only',
75
- TO_COLLECT_OTEL_DATA: 'To collect OpenTelemetry data',
76
- TO_MONITOR_OTEL_DATA: 'To monitor OpenTelemetry data',
77
- TO_MODIFY_OTEL_DATA: 'To modify OpenTelemetry data',
78
- QUICK_BACK_TO_SUMMARY: 'When you finish editing you can quickly go back to the summary.',
79
- GO_TO_SUMMARY: 'Go to summary',
80
- };
81
- const BUTTON_TEXTS = {
82
- ADD: 'Add',
83
- ADD_NEW: 'Add New',
84
- NEW: 'New',
85
- SELECT: 'Select',
86
- CREATE: 'Create',
87
- UPDATE: 'Update',
88
- EDIT: 'Edit',
89
- DELETE: 'Delete',
90
- CANCEL: 'Cancel',
91
- DONE: 'Done',
92
- SAVE: 'Save',
93
- BACK: 'Back',
94
- NEXT: 'Next',
95
- TEST: 'Test',
96
- TEST_CONNECTION: 'Test Connection',
97
- INSTRUMENT: 'Instrument',
98
- UNINSTRUMENT: 'Uninstrument',
99
- };
100
-
101
- export { BUTTON_TEXTS as B, DEFAULT_DATA_STREAM_NAME as D, FORM_ALERTS as F, DISPLAY_TITLES as a };