@odigos/ui-kit 0.0.28 → 0.0.30

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 (34) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/lib/components/stepper/index.d.ts +1 -0
  3. package/lib/components.js +5 -5
  4. package/lib/constants/strings/index.d.ts +4 -0
  5. package/lib/constants.js +1 -1
  6. package/lib/containers/data-flow-actions-menu/data-stream-select/index.d.ts +3 -0
  7. package/lib/containers/data-flow-actions-menu/styled.d.ts +2 -0
  8. package/lib/containers/data-stream-drawer/data-stream-drawer.stories.d.ts +9 -0
  9. package/lib/containers/data-stream-drawer/index.d.ts +10 -0
  10. package/lib/containers/data-stream-form/data-stream-form.stories.d.ts +9 -0
  11. package/lib/containers/data-stream-form/index.d.ts +8 -0
  12. package/lib/containers/destination-modal/index.d.ts +1 -0
  13. package/lib/containers/index.d.ts +2 -0
  14. package/lib/containers/overview-drawer/index.d.ts +1 -0
  15. package/lib/containers.js +224 -117
  16. package/lib/functions.js +2 -2
  17. package/lib/hooks/index.d.ts +1 -0
  18. package/lib/hooks/useDataStreamFormData.d.ts +12 -0
  19. package/lib/hooks/useDestinationFormData.d.ts +1 -1
  20. package/lib/hooks.js +3 -3
  21. package/lib/icons.js +1 -1
  22. package/lib/{index-R9xRto5r.js → index-B46Mcu9H.js} +2 -2
  23. package/lib/{index-8BSRffGz.js → index-BGK1nMOD.js} +1 -1
  24. package/lib/{index-BRW_Nl-n.js → index-BbbCCewR.js} +1 -1
  25. package/lib/{index-CTgLYGo-.js → index-DGuOxbBR.js} +5 -1
  26. package/lib/{index-BfatCMWq.js → index-DYNMhZMX.js} +2 -1
  27. package/lib/{index-CX75oR-h.js → index-nltUpkWT.js} +8 -5
  28. package/lib/mock-data/sources/index.d.ts +1 -1
  29. package/lib/snippets.js +4 -4
  30. package/lib/types/destinations/index.d.ts +1 -0
  31. package/lib/types.js +1 -0
  32. package/lib/{useSourceSelectionFormData-CoaXePS_.js → useSourceSelectionFormData-BWz8fTJr.js} +45 -3
  33. package/lib/{useTransition-BSKilkmZ.js → useTransition-B65KBqdK.js} +1 -1
  34. package/package.json +1 -1
package/lib/functions.js CHANGED
@@ -1,5 +1,5 @@
1
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-CJs4RDHU.js';
2
- export { c as compareCondition, d as deepClone, f as filterActions, a as filterDestinations, b as filterDestinationsByStream, e as filterSources, g as filterSourcesByStream, h as formatBytes, i as getConditionsBooleans, k as getContainersIcons, j as getContainersInstrumentedCount, l as getDestinationIcon, m as getEntityIcon, n as getEntityLabel, o as getMetricForEntity, p as getPlatformIcon, q as getPlatformLabel, r as getValueForRange, s as getWorkloadId, t as isOverTime, u as mapExportedSignals, v as sleep } from './index-BfatCMWq.js';
2
+ export { c as compareCondition, d as deepClone, f as filterActions, a as filterDestinations, b as filterDestinationsByStream, e as filterSources, g as filterSourcesByStream, h as formatBytes, i as getConditionsBooleans, k as getContainersIcons, j as getContainersInstrumentedCount, l as getDestinationIcon, m as getEntityIcon, n as getEntityLabel, o as getMetricForEntity, p as getPlatformIcon, q as getPlatformLabel, r as getValueForRange, s as getWorkloadId, t as isOverTime, u as mapExportedSignals, v as sleep } from './index-DYNMhZMX.js';
3
3
  export { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-CFnxjzaW.js';
4
4
  export { k as getEntityId } from './index-DMXaEyAB.js';
5
5
  export { g as getIdFromSseTarget } from './index-7-KCQK-x.js';
@@ -10,7 +10,7 @@ import 'styled-components';
10
10
  import './index-DGel4E-Z.js';
11
11
  import './theme.js';
12
12
  import './index-IKusBlIE.js';
13
- import './index-BRW_Nl-n.js';
13
+ import './index-BbbCCewR.js';
14
14
 
15
15
  const cleanObjectEmptyStringsValues = (obj) => {
16
16
  const cleanArray = (arr) => arr.filter((item) => {
@@ -3,6 +3,7 @@ export * from './useClickNode';
3
3
  export * from './useClickNotification';
4
4
  export * from './useContainerSize';
5
5
  export * from './useCopy';
6
+ export * from './useDataStreamFormData';
6
7
  export * from './useDestinationFormData';
7
8
  export * from './useGenericForm';
8
9
  export * from './useInstrumentationRuleFormData';
@@ -0,0 +1,12 @@
1
+ import { DataStream } from '@/types';
2
+ export declare const useDataStreamFormData: (initialFormData: DataStream) => {
3
+ formData: DataStream;
4
+ formErrors: Partial<Record<"name", string>>;
5
+ handleFormChange: (key?: string | undefined, val?: any, obj?: DataStream | undefined) => void;
6
+ resetFormData: () => void;
7
+ validateForm: (params?: {
8
+ withAlert?: boolean;
9
+ alertTitle?: string;
10
+ }) => boolean;
11
+ loadFormWithDrawerItem: ({ name }: DataStream) => void;
12
+ };
@@ -12,7 +12,7 @@ export declare const useDestinationFormData: (params?: Params) => {
12
12
  withAlert?: boolean;
13
13
  alertTitle?: string;
14
14
  }) => boolean;
15
- loadFormWithDrawerItem: ({ destinationType: { type }, name, exportedSignals, fields }: Destination) => void;
15
+ loadFormWithDrawerItem: ({ destinationType: { type }, name, exportedSignals, fields }: Destination) => DestinationFormData;
16
16
  yamlFields: DestinationYamlProperties[];
17
17
  setYamlFields: import("react").Dispatch<import("react").SetStateAction<DestinationYamlProperties[]>>;
18
18
  dynamicFields: DestinationDynamicField[];
package/lib/hooks.js CHANGED
@@ -1,11 +1,11 @@
1
- export { u as useActionFormData, a as useClickNode, b as useClickNotification, c as useDestinationFormData, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-CoaXePS_.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-BSKilkmZ.js';
1
+ export { u as useActionFormData, a as useClickNode, b as useClickNotification, c as useDataStreamFormData, d as useDestinationFormData, e as useSourceFormData, f as useSourceSelectionFormData } from './useSourceSelectionFormData-BWz8fTJr.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-B65KBqdK.js';
3
3
  import './types.js';
4
4
  import 'react';
5
5
  import './index-DMXaEyAB.js';
6
6
  import 'styled-components';
7
7
  import './index-BZS1ijMm.js';
8
- import './index-CTgLYGo-.js';
8
+ import './index-DGuOxbBR.js';
9
9
  import './index-CFnxjzaW.js';
10
10
  import './index-DGel4E-Z.js';
11
11
  import './theme.js';
package/lib/icons.js CHANGED
@@ -5,7 +5,7 @@ export { A as ArrowIcon, f as CheckIcon, C as CodeIcon, a as CopyIcon, g as Cros
5
5
  import React from 'react';
6
6
  import Theme from './theme.js';
7
7
  export { E as EditIcon } from './index-CWbxXTof.js';
8
- export { a3 as ActionsIcon, A as AlaudaLogo, a as AlibabaCloudLogo, b as AppDynamicsLogo, c as AwsCloudwatchLogo, d as AwsS3Logo, e as AwsXrayLogo, f as AxiomLogo, B as BetterStackLogo, g as BlobStorageLogo, h as BonreeLogo, C as CauselyLogo, i as ChecklyLogo, j as ChronosphereLogo, k as ClickhouseLogo, l as CoralogixLogo, D as Dash0Logo, m as DatadogLogo, a4 as DestinationsIcon, n as DynatraceLogo, E as ElasticApmLogo, o as ElasticSearchLogo, G as GigapipeLogo, p as GoogleCloudPlatformLogo, q as GrafanaLogo, r as GreptimeLogo, s as GroundcoverLogo, H as HoneycombLogo, t as HyperDxLogo, I as InstanaLogo, J as JaegerLogo, K as KloudmateLogo, L as Last9Logo, u as LightstepLogo, v as LogzioLogo, w as LokiLogo, x as LumigoLogo, M as MiddlewareLogo, a5 as NamespacesIcon, N as NewRelicLogo, O as ObserveLogo, y as OneUptimeLogo, z as OpenObserveLogo, F as OpenTelemetryLogo, P as OpsVerseLogo, Q as OracleLogo, R as PrometheusLogo, S as QrynLogo, T as QuickwitLogo, a6 as RulesIcon, U as SeqLogo, W as SignozLogo, a7 as SourcesIcon, X as SplunkLogo, Y as SumoLogicLogo, Z as TelemetryHubLogo, _ as TempoLogo, $ as TingyunLogo, a0 as TraceloopLogo, a1 as UptraceLogo, a2 as VictoriaMetricsLogo, V as VmLogo } from './index-BRW_Nl-n.js';
8
+ export { a3 as ActionsIcon, A as AlaudaLogo, a as AlibabaCloudLogo, b as AppDynamicsLogo, c as AwsCloudwatchLogo, d as AwsS3Logo, e as AwsXrayLogo, f as AxiomLogo, B as BetterStackLogo, g as BlobStorageLogo, h as BonreeLogo, C as CauselyLogo, i as ChecklyLogo, j as ChronosphereLogo, k as ClickhouseLogo, l as CoralogixLogo, D as Dash0Logo, m as DatadogLogo, a4 as DestinationsIcon, n as DynatraceLogo, E as ElasticApmLogo, o as ElasticSearchLogo, G as GigapipeLogo, p as GoogleCloudPlatformLogo, q as GrafanaLogo, r as GreptimeLogo, s as GroundcoverLogo, H as HoneycombLogo, t as HyperDxLogo, I as InstanaLogo, J as JaegerLogo, K as KloudmateLogo, L as Last9Logo, u as LightstepLogo, v as LogzioLogo, w as LokiLogo, x as LumigoLogo, M as MiddlewareLogo, a5 as NamespacesIcon, N as NewRelicLogo, O as ObserveLogo, y as OneUptimeLogo, z as OpenObserveLogo, F as OpenTelemetryLogo, P as OpsVerseLogo, Q as OracleLogo, R as PrometheusLogo, S as QrynLogo, T as QuickwitLogo, a6 as RulesIcon, U as SeqLogo, W as SignozLogo, a7 as SourcesIcon, X as SplunkLogo, Y as SumoLogicLogo, Z as TelemetryHubLogo, _ as TempoLogo, $ as TingyunLogo, a0 as TraceloopLogo, a1 as UptraceLogo, a2 as VictoriaMetricsLogo, V as VmLogo } from './index-BbbCCewR.js';
9
9
  import './index-DMXaEyAB.js';
10
10
  import './types.js';
11
11
  import 'styled-components';
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import Theme from './theme.js';
3
3
  import { E as EditIcon } from './index-CWbxXTof.js';
4
- import { B as BUTTON_TEXTS, D as DISPLAY_TITLES } from './index-CTgLYGo-.js';
5
- import { B as Button, V as Text, J as NotificationNote } from './index-CX75oR-h.js';
4
+ import { B as BUTTON_TEXTS, a as DISPLAY_TITLES } from './index-DGuOxbBR.js';
5
+ import { B as Button, V as Text, J as NotificationNote } from './index-nltUpkWT.js';
6
6
  import { StatusType } from './types.js';
7
7
  import './index-DMXaEyAB.js';
8
8
  import 'styled-components';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { _ as WarningModal } from './index-CX75oR-h.js';
2
+ import { _ as WarningModal } from './index-nltUpkWT.js';
3
3
  import { StatusType, EntityTypes } from './types.js';
4
4
  import './index-DMXaEyAB.js';
5
5
  import 'styled-components';
@@ -632,7 +632,7 @@ const NamespacesIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
632
632
  const theme = Theme.useTheme();
633
633
  const fill = f || theme.text.secondary;
634
634
  return (React.createElement("svg", { width: size, height: size, viewBox: '0 0 24 24', xmlns: 'http://www.w3.org/2000/svg', fill: 'none', style: { transform: `rotate(${rotate}deg)` }, onClick: onClick },
635
- React.createElement("path", { stroke: fill, strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M7 12H17M7 12C6.536 12 6.303 12 6.108 12.022C5.32013 12.1108 4.58575 12.4645 4.02511 13.0251C3.46447 13.5857 3.1108 14.3201 3.022 15.108C3 15.303 3 15.536 3 16C3 16.464 3 16.697 3.022 16.892C3.1108 17.6799 3.46447 18.4143 4.02511 18.9749C4.58575 19.5355 5.32013 19.8892 6.108 19.978C6.303 20 6.536 20 7 20H17C17.464 20 17.697 20 17.892 19.978C18.6799 19.8892 19.4143 19.5355 19.9749 18.9749C20.5355 18.4143 20.8892 17.6799 20.978 16.892C21 16.697 21 16.464 21 16C21 15.536 21 15.303 20.978 15.108C20.8892 14.3201 20.5355 13.5857 19.9749 13.0251C19.4143 12.4645 18.6799 12.1108 17.892 12.022C17.697 12 17.464 12 17 12M7 12C6.536 12 6.303 12 6.108 11.978C5.32013 11.8892 4.58575 11.5355 4.02511 10.9749C3.46447 10.4143 3.1108 9.67987 3.022 8.892C3 8.697 3 8.464 3 8C3 7.536 3 7.303 3.022 7.108C3.1108 6.32013 3.46447 5.58575 4.02511 5.02511C4.58575 4.46447 5.32013 4.1108 6.108 4.022C6.303 4 6.536 4 7 4H17C17.464 4 17.697 4 17.892 4.022C18.6799 4.1108 19.4143 4.46447 19.9749 5.02511C20.5355 5.58575 20.8892 6.32013 20.978 7.108C21 7.303 21 7.536 21 8C21 8.464 21 8.697 20.978 8.892C20.8892 9.67987 20.5355 10.4143 19.9749 10.9749C19.4143 11.5355 18.6799 11.8892 17.892 11.978C17.697 12 17.464 12 17 12M13 8H13.01M17 8H17.01M13 16H13.01M17 16H17.01' })));
635
+ React.createElement("path", { stroke: fill, strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M12 12V21.5M12 12L3.33967 7.38776M12 12L16.3302 9.69388M12 21.5C12.2173 21.5 12.4345 21.4782 12.6482 21.4347C13.1312 21.3363 13.5855 21.0848 14.4942 20.5819L18.5058 18.3616C19.4145 17.8587 19.8688 17.6073 20.1992 17.2555C20.4916 16.9442 20.7124 16.5775 20.8474 16.1792C21 15.729 21 15.2261 21 14.2203V9.77967C21 8.77388 21 8.27099 20.8474 7.82079C20.7968 7.67159 20.7342 7.52683 20.6603 7.38776M12 21.5C11.7827 21.5 11.5655 21.4782 11.3518 21.4347C10.8688 21.3363 10.4145 21.0848 9.50585 20.5819L5.49415 18.3616C4.58552 17.8587 4.13121 17.6073 3.8008 17.2555C3.50845 16.9442 3.2876 16.5775 3.15259 16.1792C3 15.729 3 15.2261 3 14.2203V9.77967C3 8.77388 3 8.27099 3.15259 7.82079C3.20316 7.67159 3.26577 7.52683 3.33967 7.38776M20.6603 7.38776C20.5369 7.15554 20.3821 6.93919 20.1992 6.74452C19.8688 6.39274 19.4145 6.14129 18.5058 5.6384L14.4942 3.41807C13.5855 2.91518 13.1312 2.66373 12.6482 2.56531C12.2208 2.47823 11.7792 2.47823 11.3518 2.56531C10.8688 2.66373 10.4145 2.91518 9.50585 3.41807L7.5 4.52823M20.6603 7.38776L16.3302 9.69388M3.33967 7.38776C3.46307 7.15554 3.61795 6.93919 3.8008 6.74452C4.13121 6.39274 4.58552 6.14129 5.49415 5.6384L7.5 4.52823M7.5 4.52823L16.3302 9.69388' })));
636
636
  };
637
637
 
638
638
  const RulesIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
@@ -125,11 +125,13 @@ const MONITORS_OPTIONS = [
125
125
  },
126
126
  ];
127
127
 
128
+ const DEFAULT_DATA_STREAM_NAME = 'default';
128
129
  const FORM_ALERTS = {
129
130
  REQUIRED_FIELDS: 'Required fields are missing',
130
131
  FIELD_IS_REQUIRED: 'This field is required',
131
132
  FORBIDDEN: 'Forbidden',
132
133
  ENTERPRISE_ONLY: (str = 'This') => `${str} is an Enterprise feature. Please upgrade your plan.`,
134
+ DEFINED_FOR_ALL_STREAMS: (str) => `${str} are defined for all Data Streams.`,
133
135
  CANNOT_EDIT_RULE: 'Cannot edit a system-managed instrumentation rule',
134
136
  CANNOT_DELETE_RULE: 'Cannot delete a system-managed instrumentation rule',
135
137
  LATENCY_HTTP_ROUTE: 'HTTP route must start with a forward slash "/"',
@@ -218,6 +220,8 @@ const BUTTON_TEXTS = {
218
220
  NEXT: 'Next',
219
221
  TEST: 'Test',
220
222
  TEST_CONNECTION: 'Test Connection',
223
+ INSTRUMENT: 'Instrument',
224
+ UNINSTRUMENT: 'Uninstrument',
221
225
  };
222
226
 
223
- export { ACTION_OPTIONS as A, BUTTON_TEXTS as B, DISPLAY_TITLES as D, FORM_ALERTS as F, INSTRUMENTATION_RULE_OPTIONS as I, MONITORS_OPTIONS as M };
227
+ export { ACTION_OPTIONS as A, BUTTON_TEXTS as B, DEFAULT_DATA_STREAM_NAME as D, FORM_ALERTS as F, INSTRUMENTATION_RULE_OPTIONS as I, MONITORS_OPTIONS as M, DISPLAY_TITLES as a };
@@ -3,7 +3,7 @@ import { a as getProgrammingLanguageIcon } from './index-CJs4RDHU.js';
3
3
  import 'react';
4
4
  import './index-DMXaEyAB.js';
5
5
  import 'styled-components';
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-BRW_Nl-n.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-BbbCCewR.js';
7
7
  import { K as KafkaLogo, O as OdigosLogo } from './index-IKusBlIE.js';
8
8
  import { K as K8sLogo } from './index-DGel4E-Z.js';
9
9
 
@@ -139,6 +139,7 @@ const getDestinationIcon = (type, forceFromUrl) => {
139
139
  [DestinationTypes.Coralogix]: CoralogixLogo,
140
140
  [DestinationTypes.Dash0]: Dash0Logo,
141
141
  [DestinationTypes.Datadog]: DatadogLogo,
142
+ [DestinationTypes.Dynamic]: OpenTelemetryLogo,
142
143
  [DestinationTypes.Dynatrace]: DynatraceLogo,
143
144
  [DestinationTypes.ElasticApm]: ElasticApmLogo,
144
145
  [DestinationTypes.ElasticSearch]: ElasticSearchLogo,
@@ -4,10 +4,10 @@ import styled, { css } from 'styled-components';
4
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-BJxaoI0G.js';
5
5
  import { StatusType, OtherStatus, SortDirection, ProgrammingLanguages } from './types.js';
6
6
  import { s as safeJsonParse, i as isEmpty } from './index-BZS1ijMm.js';
7
- import { M as MONITORS_OPTIONS, B as BUTTON_TEXTS } from './index-CTgLYGo-.js';
7
+ import { M as MONITORS_OPTIONS, B as BUTTON_TEXTS } from './index-DGuOxbBR.js';
8
8
  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-CJs4RDHU.js';
9
9
  import './index-DMXaEyAB.js';
10
- import { u as useContainerSize, a as useCopy, g as useTransition, d as useKeyDown, e as useOnClickOutside } from './useTransition-BSKilkmZ.js';
10
+ import { u as useContainerSize, a as useCopy, g as useTransition, d as useKeyDown, e as useOnClickOutside } from './useTransition-B65KBqdK.js';
11
11
  import { I as ImageErrorIcon } from './index-DGel4E-Z.js';
12
12
  import ReactDOM from 'react-dom';
13
13
  import { I as InfoIcon } from './index-IKusBlIE.js';
@@ -6047,13 +6047,16 @@ const Stepper = ({ data, currentStep = 0 }) => {
6047
6047
  useEffect(() => {
6048
6048
  setStepsList(data.map((step, i) => {
6049
6049
  if (i < currentStep - 1) {
6050
- return { ...step, state: StepState.Finished, subtitle: 'Success' };
6050
+ // Finished
6051
+ return { ...step, state: StepState.Finished, subtitle: step.subtitle || StatusType.Success };
6051
6052
  }
6052
6053
  else if (i === currentStep - 1) {
6053
- return { ...step, state: StepState.Active };
6054
+ // Current
6055
+ return { ...step, state: StepState.Active, subtitle: '' };
6054
6056
  }
6055
6057
  else {
6056
- return { ...step, state: StepState.Disabled };
6058
+ // Future
6059
+ return { ...step, state: StepState.Disabled, subtitle: '' };
6057
6060
  }
6058
6061
  }));
6059
6062
  }, [currentStep, data]);
@@ -4,7 +4,7 @@ export declare const MOCK_SOURCE_JAEGER: {
4
4
  namespace: string;
5
5
  name: string;
6
6
  kind: K8sResourceKind;
7
- dataStreamNames: never[];
7
+ dataStreamNames: string[];
8
8
  selected: boolean;
9
9
  otelServiceName: string;
10
10
  numberOfInstances: number;
package/lib/snippets.js CHANGED
@@ -1,5 +1,5 @@
1
- export { A as AddButton } from './index-CX75oR-h.js';
2
- export { E as EditButton, N as NoteBackToSummary } from './index-R9xRto5r.js';
1
+ export { A as AddButton } from './index-nltUpkWT.js';
2
+ export { E as EditButton, N as NoteBackToSummary } from './index-B46Mcu9H.js';
3
3
  import 'react';
4
4
  import './theme.js';
5
5
  import './index-DMXaEyAB.js';
@@ -7,11 +7,11 @@ import './types.js';
7
7
  import 'styled-components';
8
8
  import './index-BJxaoI0G.js';
9
9
  import './index-BZS1ijMm.js';
10
- import './index-CTgLYGo-.js';
10
+ import './index-DGuOxbBR.js';
11
11
  import './index-CFnxjzaW.js';
12
12
  import './index-DGel4E-Z.js';
13
13
  import './index-CJs4RDHU.js';
14
14
  import './index-IKusBlIE.js';
15
- import './useTransition-BSKilkmZ.js';
15
+ import './useTransition-B65KBqdK.js';
16
16
  import 'react-dom';
17
17
  import './index-CWbxXTof.js';
@@ -17,6 +17,7 @@ export declare enum DestinationTypes {
17
17
  Coralogix = "coralogix",
18
18
  Dash0 = "dash0",
19
19
  Datadog = "datadog",
20
+ Dynamic = "dynamic",
20
21
  Dynatrace = "dynatrace",
21
22
  ElasticApm = "elasticapm",
22
23
  ElasticSearch = "elasticsearch",
package/lib/types.js CHANGED
@@ -148,6 +148,7 @@ var DestinationTypes;
148
148
  DestinationTypes["Coralogix"] = "coralogix";
149
149
  DestinationTypes["Dash0"] = "dash0";
150
150
  DestinationTypes["Datadog"] = "datadog";
151
+ DestinationTypes["Dynamic"] = "dynamic";
151
152
  DestinationTypes["Dynatrace"] = "dynatrace";
152
153
  DestinationTypes["ElasticApm"] = "elasticapm";
153
154
  DestinationTypes["ElasticSearch"] = "elasticsearch";
@@ -3,8 +3,8 @@ import { useState, useEffect, useMemo } from 'react';
3
3
  import { g as useNotificationStore, f as useModalStore, b as useDrawerStore, c as useEntityStore, a as useDataStreamStore, j as useSetupStore } from './index-DMXaEyAB.js';
4
4
  import 'styled-components';
5
5
  import { i as isEmpty, s as safeJsonParse } from './index-BZS1ijMm.js';
6
- import { F as FORM_ALERTS } from './index-CTgLYGo-.js';
7
- import { b as useGenericForm } from './useTransition-BSKilkmZ.js';
6
+ import { F as FORM_ALERTS } from './index-DGuOxbBR.js';
7
+ import { b as useGenericForm } from './useTransition-B65KBqdK.js';
8
8
  import { g as getIdFromSseTarget } from './index-7-KCQK-x.js';
9
9
 
10
10
  const INITIAL$2 = {
@@ -203,6 +203,47 @@ const useClickNotification = () => {
203
203
  return { onClickNotification };
204
204
  };
205
205
 
206
+ const useDataStreamFormData = (initialFormData) => {
207
+ const { addNotification } = useNotificationStore();
208
+ const { formData, handleFormChange, formErrors, handleErrorChange, resetFormData } = useGenericForm(initialFormData);
209
+ const validateForm = (params) => {
210
+ const errors = {};
211
+ let isValid = true;
212
+ if (!formData['name']) {
213
+ isValid = false;
214
+ errors['name'] = FORM_ALERTS.FIELD_IS_REQUIRED;
215
+ }
216
+ else {
217
+ errors['name'] = undefined;
218
+ }
219
+ if (!isValid && params?.withAlert) {
220
+ addNotification({
221
+ type: StatusType.Warning,
222
+ title: params.alertTitle,
223
+ message: FORM_ALERTS.REQUIRED_FIELDS,
224
+ hideFromHistory: true,
225
+ });
226
+ }
227
+ handleErrorChange(undefined, undefined, errors);
228
+ return isValid;
229
+ };
230
+ const loadFormWithDrawerItem = ({ name }) => {
231
+ const updatedData = {
232
+ ...initialFormData,
233
+ name,
234
+ };
235
+ handleFormChange(undefined, undefined, updatedData);
236
+ };
237
+ return {
238
+ formData,
239
+ formErrors,
240
+ handleFormChange,
241
+ resetFormData,
242
+ validateForm,
243
+ loadFormWithDrawerItem,
244
+ };
245
+ };
246
+
206
247
  const INITIAL$1 = {
207
248
  // @ts-ignore form should be initialized with empty values
208
249
  type: '',
@@ -327,6 +368,7 @@ const useDestinationFormData = (params) => {
327
368
  fields: Object.entries(safeJsonParse(fields, {})).map(([key, value]) => ({ key, value })),
328
369
  };
329
370
  handleFormChange(undefined, undefined, updatedData);
371
+ return updatedData;
330
372
  };
331
373
  return {
332
374
  formData,
@@ -540,4 +582,4 @@ const useSourceSelectionFormData = (params) => {
540
582
  };
541
583
  };
542
584
 
543
- export { useClickNode as a, useClickNotification as b, useDestinationFormData as c, useSourceFormData as d, useSourceSelectionFormData as e, useActionFormData as u };
585
+ export { useClickNode as a, useClickNotification as b, useDataStreamFormData as c, useDestinationFormData as d, useSourceFormData as e, useSourceSelectionFormData as f, useActionFormData as u };
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useRef, useEffect, useCallback } from 'react';
2
- import './index-CTgLYGo-.js';
2
+ import './index-DGuOxbBR.js';
3
3
  import { g as useNotificationStore } from './index-DMXaEyAB.js';
4
4
  import { CodeAttributesKeyTypes, PayloadCollectionKeyTypes } from './types.js';
5
5
  import styled from 'styled-components';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odigos/ui-kit",
3
- "version": "0.0.28",
3
+ "version": "0.0.30",
4
4
  "author": "Odigos",
5
5
  "repository": {
6
6
  "type": "git",