@odigos/ui-kit 0.0.32 → 0.0.34

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 (57) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/lib/components/dropdown/index.d.ts +1 -0
  3. package/lib/components/input/index.d.ts +1 -1
  4. package/lib/components/input-table/index.d.ts +3 -11
  5. package/lib/components/input-table/map-columns-to-fields/index.d.ts +15 -0
  6. package/lib/components/input-table/types.d.ts +15 -0
  7. package/lib/components.js +11 -11
  8. package/lib/constants/strings/index.d.ts +1 -0
  9. package/lib/constants.js +2 -2
  10. package/lib/containers/action-form/custom-fields/add-cluster-info.d.ts +1 -1
  11. package/lib/containers/action-form/custom-fields/delete-attributes.d.ts +1 -1
  12. package/lib/containers/action-form/custom-fields/error-sampler.d.ts +1 -1
  13. package/lib/containers/action-form/custom-fields/k8s-attributes.d.ts +1 -1
  14. package/lib/containers/action-form/custom-fields/latency-sampler.d.ts +1 -1
  15. package/lib/containers/action-form/custom-fields/pii-masking.d.ts +1 -1
  16. package/lib/containers/action-form/custom-fields/probabilistic-sampler.d.ts +1 -1
  17. package/lib/containers/action-form/custom-fields/rename-attributes.d.ts +1 -1
  18. package/lib/containers/action-form/custom-fields/service-name-sampler.d.ts +5 -0
  19. package/lib/containers/action-form/custom-fields/span-attribute-sampler.d.ts +5 -0
  20. package/lib/containers/data-stream-drawer/index.d.ts +1 -1
  21. package/lib/containers/data-stream-form/index.d.ts +1 -0
  22. package/lib/containers/destination-selection-form/destination-list/index.d.ts +2 -0
  23. package/lib/containers/instrumentation-rule-drawer/build-card.d.ts +1 -1
  24. package/lib/containers/setup-summary/index.d.ts +2 -0
  25. package/lib/containers.js +379 -189
  26. package/lib/functions/get-action-icon/index.d.ts +2 -2
  27. package/lib/functions/get-yaml-fields-for-destination/index.d.ts +2 -0
  28. package/lib/functions/index.d.ts +4 -0
  29. package/lib/functions/is-legal-k8s-label/index.d.ts +1 -0
  30. package/lib/functions/map-destination-fields-for-display/index.d.ts +6 -0
  31. package/lib/functions/numbers-only/index.d.ts +1 -0
  32. package/lib/functions.js +8 -8
  33. package/lib/hooks.js +6 -6
  34. package/lib/icons.js +7 -7
  35. package/lib/{index-DR5ryS5d.js → index--RecCPGA.js} +1 -1
  36. package/lib/{index-cG2lNgzz.js → index-BBjwRlta.js} +41 -6
  37. package/lib/{index-B3j_QWzh.js → index-BWZT-ipR.js} +1 -1
  38. package/lib/{index-BxckQJom.js → index-BZq0yNL-.js} +90 -45
  39. package/lib/{index-DuSmjoDs.js → index-Bd8ZAEvq.js} +1 -1
  40. package/lib/{index-DAbcw-wM.js → index-CIKkezVt.js} +1 -1
  41. package/lib/{index-C7YDojNh.js → index-ChYtqgBW.js} +9 -3
  42. package/lib/{index-7-KCQK-x.js → index-CnZlllYu.js} +10 -1
  43. package/lib/{index-PfG5pvFK.js → index-Cq8NT9Hr.js} +1 -1
  44. package/lib/{index-ivnS3eWW.js → index-DJGe2YeC.js} +128 -111
  45. package/lib/{index-rbphz5kH.js → index-a_WA-82O.js} +2 -2
  46. package/lib/{index-B9cvsYnj.js → index-mOgS3e5E.js} +1 -0
  47. package/lib/{index-DeD-SIlN.js → index-ovjVbVQq.js} +5 -5
  48. package/lib/snippets.js +10 -10
  49. package/lib/store.js +1 -1
  50. package/lib/theme.js +1 -1
  51. package/lib/types/actions/index.d.ts +137 -41
  52. package/lib/types/common/index.d.ts +4 -16
  53. package/lib/types.js +78 -20
  54. package/lib/{useSourceSelectionFormData-A5_zhn1C.js → useSourceSelectionFormData-DBNf1uEe.js} +48 -26
  55. package/lib/{useTransition-9tDdAS9s.js → useTransition-dZ92VxT2.js} +1 -1
  56. package/package.json +12 -12
  57. package/lib/{index-BZS1ijMm.js → index-BV85P9UP.js} +14 -14
@@ -1,2 +1,2 @@
1
- import { ActionType, type SVG } from '@/types';
2
- export declare const getActionIcon: (type: ActionType | "sampler" | "attributes") => SVG;
1
+ import { ActionCategory, ActionType, type SVG } from '@/types';
2
+ export declare const getActionIcon: (type: ActionType | ActionCategory) => SVG;
@@ -0,0 +1,2 @@
1
+ import { Destination, DestinationCategories, DestinationYamlProperties } from '@/types';
2
+ export declare const getYamlFieldsForDestination: (categories: DestinationCategories, destination: Destination) => DestinationYamlProperties[];
@@ -28,11 +28,15 @@ export * from './get-sse-target-from-id';
28
28
  export * from './get-status-icon';
29
29
  export * from './get-value-for-range';
30
30
  export * from './get-workload-id';
31
+ export * from './get-yaml-fields-for-destination';
31
32
  export * from './is-emtpy';
33
+ export * from './is-legal-k8s-label';
32
34
  export * from './is-over-time';
33
35
  export * from './is-time-elapsed';
34
36
  export * from './map-conditions';
37
+ export * from './map-destination-fields-for-display';
35
38
  export * from './map-exported-signals';
39
+ export * from './numbers-only';
36
40
  export * from './parse-json-string-to-pretty-string';
37
41
  export * from './remove-empty-values-from-object';
38
42
  export * from './safe-json-parse';
@@ -0,0 +1 @@
1
+ export declare const isLegalK8sLabel: (name: string) => boolean;
@@ -0,0 +1,6 @@
1
+ import { Destination, DestinationYamlProperties } from '@/types';
2
+ export declare const mapDestinationFieldsForDisplay: (destination: Destination, yamlFields: DestinationYamlProperties[]) => {
3
+ key: string;
4
+ name: string;
5
+ value: any;
6
+ }[];
@@ -0,0 +1 @@
1
+ export declare const numbersOnly: (value: string) => string;
package/lib/functions.js CHANGED
@@ -1,14 +1,14 @@
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-C7YDojNh.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-cG2lNgzz.js';
3
- export { k as getActionIcon, l as getEntityId, m as getInstrumentationRuleIcon } from './index-ivnS3eWW.js';
4
- export { g as getIdFromSseTarget } from './index-7-KCQK-x.js';
1
+ export { c as capitalizeFirstLetter, f as flattenObjectKeys, g as getMonitorIcon, a as getProgrammingLanguageIcon, b as getStatusIcon, m as mapConditions, n as numbersOnly, p as parseJsonStringToPrettyString, r as removeEmptyValuesFromObject, s as safeJsonStringify, d as splitCamelString } from './index-ChYtqgBW.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 getYamlFieldsForDestination, u as isOverTime, v as mapDestinationFieldsForDisplay, w as mapExportedSignals, x as sleep } from './index-BBjwRlta.js';
3
+ export { k as getActionIcon, l as getEntityId, m as getInstrumentationRuleIcon } from './index-DJGe2YeC.js';
4
+ export { g as getIdFromSseTarget, i as isLegalK8sLabel } from './index-CnZlllYu.js';
5
5
  import { EntityTypes } from './types.js';
6
- export { i as isEmpty, s as safeJsonParse } from './index-BZS1ijMm.js';
6
+ export { i as isEmpty, s as safeJsonParse } from './index-BV85P9UP.js';
7
7
  import 'react';
8
8
  import 'styled-components';
9
- import './index-DuSmjoDs.js';
10
- import './index-B9cvsYnj.js';
11
- import './index-PfG5pvFK.js';
9
+ import './index-Bd8ZAEvq.js';
10
+ import './index-mOgS3e5E.js';
11
+ import './index-Cq8NT9Hr.js';
12
12
 
13
13
  const cleanObjectEmptyStringsValues = (obj) => {
14
14
  const cleanArray = (arr) => arr.filter((item) => {
package/lib/hooks.js CHANGED
@@ -1,9 +1,9 @@
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-A5_zhn1C.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-9tDdAS9s.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-DBNf1uEe.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-dZ92VxT2.js';
3
3
  import './types.js';
4
- import './index-ivnS3eWW.js';
4
+ import './index-DJGe2YeC.js';
5
5
  import 'react';
6
6
  import 'styled-components';
7
- import './index-B9cvsYnj.js';
8
- import './index-BZS1ijMm.js';
9
- import './index-7-KCQK-x.js';
7
+ import './index-mOgS3e5E.js';
8
+ import './index-BV85P9UP.js';
9
+ import './index-CnZlllYu.js';
package/lib/icons.js CHANGED
@@ -1,11 +1,11 @@
1
- import { T as Theme } from './index-ivnS3eWW.js';
2
- export { o as AddClusterInfoIcon, C as CodeAttributesIcon, D as DeleteAttributeIcon, H as HeadersCollectionIcon, n as ImageErrorIcon, K as K8sLogo, p as PayloadCollectionIcon, P as PiiMaskingIcon, R as RenameAttributeIcon, S as SamplerIcon } from './index-ivnS3eWW.js';
3
- export { C as CPlusPlusLogo, d as CSharpLogo, i as CheckCircledIcon, D as DotnetLogo, E as ElixirLogo, h as ErrorTriangleIcon, G as GoLogo, I as InfoIcon, J as JavaLogo, K as KafkaLogo, L as LogsIcon, g as MetricsIcon, M as MysqlLogo, N as NginxLogo, f as NodejsLogo, O as OdigosLogo, c as PhpLogo, P as PostgresLogo, e as PythonLogo, R as RedisLogo, b as RubyLogo, a as RustLogo, S as SwiftLogo, T as TracesIcon, W as WarningTriangleIcon } from './index-DuSmjoDs.js';
4
- export { C as CrossCircledIcon, D as DataStreamsIcon, F as FilterIcon, K as KeyIcon, N as NotificationIcon, O as OdigosLogoText, a as OverviewIcon, S as SlackLogo, T as TerminalIcon } from './index-DR5ryS5d.js';
5
- export { A as ArrowIcon, f as CheckIcon, C as CodeIcon, a as CopyIcon, g as CrossIcon, E as ExtendArrowIcon, d as EyeClosedIcon, e as EyeOpenIcon, L as ListIcon, M as MinusIcon, N as NoDataIcon, b as NotebookIcon, P as PlusIcon, S as SearchIcon, c as SortArrowsIcon, T as TrashIcon, X as XIcon } from './index-DAbcw-wM.js';
1
+ import { T as Theme } from './index-DJGe2YeC.js';
2
+ export { o as AddClusterInfoIcon, C as CodeAttributesIcon, D as DeleteAttributeIcon, H as HeadersCollectionIcon, n as ImageErrorIcon, K as K8sLogo, p as PayloadCollectionIcon, P as PiiMaskingIcon, R as RenameAttributeIcon, S as SamplerIcon } from './index-DJGe2YeC.js';
3
+ export { C as CPlusPlusLogo, d as CSharpLogo, i as CheckCircledIcon, D as DotnetLogo, E as ElixirLogo, h as ErrorTriangleIcon, G as GoLogo, I as InfoIcon, J as JavaLogo, K as KafkaLogo, L as LogsIcon, g as MetricsIcon, M as MysqlLogo, N as NginxLogo, f as NodejsLogo, O as OdigosLogo, c as PhpLogo, P as PostgresLogo, e as PythonLogo, R as RedisLogo, b as RubyLogo, a as RustLogo, S as SwiftLogo, T as TracesIcon, W as WarningTriangleIcon } from './index-Bd8ZAEvq.js';
4
+ export { C as CrossCircledIcon, D as DataStreamsIcon, F as FilterIcon, K as KeyIcon, N as NotificationIcon, O as OdigosLogoText, a as OverviewIcon, S as SlackLogo, T as TerminalIcon } from './index--RecCPGA.js';
5
+ export { A as ArrowIcon, f as CheckIcon, C as CodeIcon, a as CopyIcon, g as CrossIcon, E as ExtendArrowIcon, d as EyeClosedIcon, e as EyeOpenIcon, L as ListIcon, M as MinusIcon, N as NoDataIcon, b as NotebookIcon, P as PlusIcon, S as SearchIcon, c as SortArrowsIcon, T as TrashIcon, X as XIcon } from './index-CIKkezVt.js';
6
6
  import React from 'react';
7
- export { E as EditIcon } from './index-B3j_QWzh.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-PfG5pvFK.js';
7
+ export { E as EditIcon } from './index-BWZT-ipR.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-Cq8NT9Hr.js';
9
9
  import './types.js';
10
10
  import 'styled-components';
11
11
 
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { T as Theme } from './index-ivnS3eWW.js';
2
+ import { T as Theme } from './index-DJGe2YeC.js';
3
3
 
4
4
  const OdigosLogoText = ({ size = 16, fill: f, rotate = 0, onClick }) => {
5
5
  const theme = Theme.useTheme();
@@ -1,11 +1,12 @@
1
1
  import { StatusType, OtherStatus, DestinationTypes, EntityTypes, PlatformType } from './types.js';
2
- import { K as K8sLogo } from './index-ivnS3eWW.js';
3
- import { D as DEFAULT_DATA_STREAM_NAME } from './index-B9cvsYnj.js';
4
- import { a as getProgrammingLanguageIcon } from './index-C7YDojNh.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';
5
5
  import 'react';
6
6
  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-PfG5pvFK.js';
8
- import { K as KafkaLogo, O as OdigosLogo } from './index-DuSmjoDs.js';
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';
9
+ import { s as safeJsonParse } from './index-BV85P9UP.js';
9
10
 
10
11
  const compareCondition = (renderCondition, fields) => {
11
12
  if (!renderCondition || !renderCondition.length)
@@ -287,12 +288,46 @@ const getWorkloadId = ({ namespace, name, kind }) => {
287
288
  return { namespace, name, kind };
288
289
  };
289
290
 
291
+ const getYamlFieldsForDestination = (categories, destination) => {
292
+ const fields = [];
293
+ const parsedCategories = JSON.parse(JSON.stringify(categories));
294
+ for (const category of parsedCategories) {
295
+ const autoFilledFields = safeJsonParse(destination.fields, {});
296
+ const idx = category.items.findIndex((item) => item.type === destination.destinationType.type);
297
+ if (idx !== -1) {
298
+ fields.push(...category.items[idx].fields.map((field) => ({
299
+ ...field,
300
+ initialValue: autoFilledFields[field.name],
301
+ })));
302
+ }
303
+ }
304
+ return fields;
305
+ };
306
+
290
307
  const isOverTime = (originDate, difference = 0) => {
291
308
  const now = new Date().getTime();
292
309
  const compareWith = new Date(originDate).getTime();
293
310
  return compareWith - now <= difference;
294
311
  };
295
312
 
313
+ const mapDestinationFieldsForDisplay = (destination, yamlFields) => {
314
+ const parsedFields = safeJsonParse(destination.fields, {});
315
+ if (!yamlFields.length) {
316
+ return Object.entries(parsedFields).map(([key, value]) => ({
317
+ key,
318
+ name: key,
319
+ value,
320
+ }));
321
+ }
322
+ return yamlFields
323
+ .map((field) => ({
324
+ key: field.name,
325
+ name: field.displayName || field.name,
326
+ value: parsedFields[field.name] ?? null,
327
+ }))
328
+ .filter((item) => item.value !== null);
329
+ };
330
+
296
331
  const mapExportedSignals = (exportedSignals) => {
297
332
  if (!exportedSignals)
298
333
  return [];
@@ -301,4 +336,4 @@ const mapExportedSignals = (exportedSignals) => {
301
336
 
302
337
  const sleep = async (ms = 1000) => new Promise((resolve) => setTimeout(resolve, ms));
303
338
 
304
- 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, isOverTime as t, mapExportedSignals as u, sleep as v };
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 };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { T as Theme } from './index-ivnS3eWW.js';
2
+ import { T as Theme } from './index-DJGe2YeC.js';
3
3
 
4
4
  const EditIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
5
5
  const theme = Theme.useTheme();
@@ -1,14 +1,14 @@
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-ivnS3eWW.js';
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';
3
6
  import styled, { css } from 'styled-components';
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-DAbcw-wM.js';
5
- import { StatusType, OtherStatus, SortDirection, ProgrammingLanguages } from './types.js';
6
- import { s as safeJsonParse, i as isEmpty } from './index-BZS1ijMm.js';
7
- import { B as BUTTON_TEXTS } from './index-B9cvsYnj.js';
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-C7YDojNh.js';
9
- import { u as useContainerSize, a as useCopy, g as useTransition, d as useKeyDown, e as useOnClickOutside } from './useTransition-9tDdAS9s.js';
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';
10
10
  import ReactDOM from 'react-dom';
11
- import { I as InfoIcon } from './index-DuSmjoDs.js';
11
+ import { I as InfoIcon } from './index-Bd8ZAEvq.js';
12
12
 
13
13
  const TextWrapper$2 = styled.div `
14
14
  color: ${({ $color, theme }) => $color || theme.text.secondary};
@@ -5001,15 +5001,15 @@ const Button$1 = styled.button `
5001
5001
  cursor: not-allowed;
5002
5002
  }
5003
5003
  `;
5004
- const Input = ({ icon: Icon, buttonLabel, onButtonClick, hasError, errorMessage, title, tooltip, required, onChange, type = 'text', name, ...props }) => {
5004
+ const Input = ({ icon: Icon, buttonLabel, onButtonClick, hasError, errorMessage, title, tooltip, required, value, onChange, type = InputTypes.Text, name, ...props }) => {
5005
5005
  const theme = Theme.useTheme();
5006
- const isSecret = type === 'password';
5006
+ const isSecret = type === InputTypes.Password;
5007
5007
  const [revealSecret, setRevealSecret] = useState(false);
5008
5008
  const handleInputChange = (e) => {
5009
5009
  e.stopPropagation();
5010
- const v = e.target.value;
5011
- const actualValue = type === 'number' ? v.replace(/[^\d]/g, '') : v;
5012
- e.target.value = actualValue;
5010
+ if (type === InputTypes.Number) {
5011
+ e.target.value = numbersOnly(e.target.value);
5012
+ }
5013
5013
  onChange?.(e);
5014
5014
  };
5015
5015
  const handleKeyDown = (e) => {
@@ -5021,7 +5021,7 @@ const Input = ({ icon: Icon, buttonLabel, onButtonClick, hasError, errorMessage,
5021
5021
  React.createElement(InputWrapper$1, { "$disabled": props.disabled, "$hasError": hasError || !!errorMessage, "$isActive": !!props.autoFocus },
5022
5022
  isSecret ? (React.createElement(IconWrapperClickable, { onClick: () => setRevealSecret((prev) => !prev) }, revealSecret ? React.createElement(EyeClosedIcon, { size: 14, fill: theme.text.grey }) : React.createElement(EyeOpenIcon, { size: 14, fill: theme.text.grey }))) : Icon ? (React.createElement(IconWrapper$2, null,
5023
5023
  React.createElement(Icon, { size: 14, fill: theme.text.grey }))) : null,
5024
- React.createElement(StyledInput, { "data-id": name, type: revealSecret ? 'text' : type, "$hasIcon": !!Icon || isSecret, name: name, onChange: handleInputChange, onKeyDown: handleKeyDown, ...props }),
5024
+ React.createElement(StyledInput, { "data-id": name, type: revealSecret ? InputTypes.Text : type === InputTypes.Number ? InputTypes.Text : type, "$hasIcon": !!Icon || isSecret, name: name, value: value, onChange: handleInputChange, onKeyDown: handleKeyDown, ...props }),
5025
5025
  buttonLabel && onButtonClick && (React.createElement(Button$1, { onClick: onButtonClick, disabled: props.disabled }, buttonLabel))),
5026
5026
  !!errorMessage && React.createElement(FieldError, null, errorMessage)));
5027
5027
  };
@@ -5098,7 +5098,7 @@ const IconWrapper$1 = styled.div `
5098
5098
  align-items: center;
5099
5099
  gap: 4px;
5100
5100
  `;
5101
- const Dropdown = ({ options, value, onSelect, onDeselect, title, tooltip, placeholder, disabled = false, isMulti = false, showSearch = false, required = false, errorMessage }) => {
5101
+ const Dropdown = ({ options, value, onSelect, onDeselect, title, tooltip, placeholder, disabled = false, isMulti = false, showSearch = false, required = false, errorMessage, hasError = false, }) => {
5102
5102
  const [isOpen, setIsOpen] = useState(false);
5103
5103
  const [openUpwards, setOpenUpwards] = useState(false);
5104
5104
  const containerRef = useRef(null);
@@ -5118,7 +5118,7 @@ const Dropdown = ({ options, value, onSelect, onDeselect, title, tooltip, placeh
5118
5118
  return (React.createElement(RootContainer, { "$disabled": disabled },
5119
5119
  React.createElement(FieldLabel, { title: title, required: required, tooltip: tooltip }),
5120
5120
  React.createElement(RelativeContainer, { ref: containerRef },
5121
- React.createElement(DropdownHeader, { "$isOpen": isOpen, "$isMulti": isMulti, "$hasSelections": Array.isArray(value) ? !!value.length : false, "$hasError": !!errorMessage, "$disabled": disabled, onClick: () => !disabled && toggleOpen() },
5121
+ React.createElement(DropdownHeader, { "$isOpen": isOpen, "$isMulti": isMulti, "$hasSelections": Array.isArray(value) ? !!value.length : false, "$hasError": !!errorMessage || hasError, "$disabled": disabled, onClick: () => !disabled && toggleOpen() },
5122
5122
  React.createElement(DropdownPlaceholder, { value: value, placeholder: placeholder, onDeselect: onDeselect }),
5123
5123
  React.createElement(IconWrapper$1, null,
5124
5124
  isMulti && React.createElement(Badge, { label: arrLen, filled: !!arrLen }),
@@ -5391,22 +5391,44 @@ const InputList = ({ initialValues = [], value, onChange, title, tooltip, requir
5391
5391
  React.createElement(AddButton, { onClick: handleAddInput, disabled: isAddButtonDisabled })));
5392
5392
  };
5393
5393
 
5394
+ const ColumnsToFields = ({ col, colIdx, row, rowIdx, rowsLength, maxWidth, handleChange, errorMessage, limitFieldsPerRow }) => {
5395
+ const { keyName, title, tooltip, placeholder, required, type, componentType, options, renderCondition } = col;
5396
+ const value = row[keyName];
5397
+ if (renderCondition && !renderCondition(row))
5398
+ return null;
5399
+ const render = () => {
5400
+ switch (componentType) {
5401
+ case FieldTypes.Dropdown:
5402
+ const selectedOption = options?.find((opt) => opt.id === value);
5403
+ return (React.createElement(Dropdown, { title: limitFieldsPerRow ? title : undefined, tooltip: limitFieldsPerRow ? tooltip : undefined, placeholder: placeholder, required: required, options: options || [], value: selectedOption, onSelect: (opt) => handleChange(keyName, opt.id, rowIdx), onDeselect: (opt) => handleChange(keyName, '', rowIdx), hasError: !!errorMessage && (!required || (required && isEmpty(value))) }));
5404
+ default:
5405
+ const hasMoreThanOneRow = rowsLength > 1;
5406
+ const isLastRow = rowIdx === rowsLength - 1;
5407
+ const isFirstColumn = colIdx === 0;
5408
+ const shouldAutoFocus = hasMoreThanOneRow && isLastRow && isFirstColumn && isEmpty(value);
5409
+ return (React.createElement(Input, { title: limitFieldsPerRow ? title : undefined, tooltip: limitFieldsPerRow ? tooltip : undefined, placeholder: placeholder, type: type, required: required, autoFocus: shouldAutoFocus, value: value, onChange: ({ target: { value: val } }) => handleChange(keyName, val, rowIdx), style: { maxWidth, paddingLeft: 10 }, hasError: !!errorMessage && (!required || (required && isEmpty(value))) }));
5410
+ }
5411
+ };
5412
+ return (React.createElement("td", { key: `input-table-${rowIdx}-${keyName}`, style: { maxWidth, padding: '4px 6px 4px 0' } }, render()));
5413
+ };
5414
+
5394
5415
  const Container$b = styled.div `
5395
5416
  display: flex;
5396
5417
  flex-direction: column;
5397
5418
  width: 100%;
5398
5419
  `;
5399
5420
  const DeleteButton$1 = styled.button `
5421
+ margin-top: ${({ $marginTop }) => $marginTop};
5400
5422
  background: none;
5401
5423
  border: none;
5402
- cursor: pointer;
5403
5424
  cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};
5404
5425
  opacity: ${({ disabled }) => (disabled ? 0.5 : 1)};
5405
5426
  `;
5406
- const InputTable = ({ columns, initialValues = [], value, onChange, errorMessage }) => {
5427
+ const InputTable = ({ columns, initialValues = [], value, onChange, errorMessage, limitFieldsPerRow }) => {
5407
5428
  // INITIAL_ROW as state, because it's dynamic to the "columns" prop
5408
5429
  const [initialRow, setInitialRow] = useState({});
5409
5430
  const [rows, setRows] = useState(value || initialValues);
5431
+ const columnMap = useMemo(() => new Map(columns.map((col) => [col.keyName, col])), [columns]);
5410
5432
  useEffect(() => {
5411
5433
  if (!rows.length) {
5412
5434
  const init = {};
@@ -5415,9 +5437,28 @@ const InputTable = ({ columns, initialValues = [], value, onChange, errorMessage
5415
5437
  setRows([{ ...init }]);
5416
5438
  }
5417
5439
  }, []);
5440
+ const isRowValid = (row) => {
5441
+ for (const [key, val] of Object.entries(row)) {
5442
+ const col = columnMap.get(key);
5443
+ if (col?.renderCondition && !col.renderCondition(row)) {
5444
+ // If the column has a render condition and it shouldn't render, skip/pass this column as valid
5445
+ continue;
5446
+ // Else, keep checking it below
5447
+ }
5448
+ if (col?.required && isEmpty(val)) {
5449
+ // If the column is required, and is empty, this row is invalid
5450
+ return false;
5451
+ }
5452
+ }
5453
+ return true;
5454
+ };
5418
5455
  // Filter out rows where either key or value is empty
5419
- const validRows = rows.filter((row) => !Object.values(row).filter((val) => isEmpty(val)).length);
5456
+ const validRows = rows.filter(isRowValid);
5420
5457
  const recordedRows = useRef(JSON.stringify(validRows));
5458
+ const isAddButtonDisabled = validRows.length !== rows.length;
5459
+ // adjust cell-width based on the amount of inputs on-screen,
5460
+ // the "0.4" is to consider the delete button
5461
+ const maxWidth = `${Math.floor(640 / ((limitFieldsPerRow || columns.length) + 0.4))}px`;
5421
5462
  useEffect(() => {
5422
5463
  const stringified = JSON.stringify(validRows);
5423
5464
  // Only trigger onChange if valid key-value pairs have changed
@@ -5435,7 +5476,12 @@ const InputTable = ({ columns, initialValues = [], value, onChange, errorMessage
5435
5476
  });
5436
5477
  };
5437
5478
  const handleDeleteRow = (idx) => {
5438
- setRows((prev) => prev.filter((_, i) => i !== idx));
5479
+ if (rows.length > 1) {
5480
+ setRows((prev) => prev.filter((_, i) => i !== idx));
5481
+ }
5482
+ else {
5483
+ columns.forEach(({ keyName, type }) => handleChange(keyName, type === InputTypes.Number ? '0' : '', idx));
5484
+ }
5439
5485
  };
5440
5486
  const handleChange = (key, val, idx) => {
5441
5487
  setRows((prev) => {
@@ -5444,36 +5490,35 @@ const InputTable = ({ columns, initialValues = [], value, onChange, errorMessage
5444
5490
  return payload;
5445
5491
  });
5446
5492
  };
5447
- // Check if any key or value field is empty
5448
- const isMinRows = rows.length <= 1;
5449
- const isAddButtonDisabled = rows.some((row) => !!Object.values(row).filter((val) => isEmpty(val)).length);
5450
- const isDelButtonDisabled = isMinRows && isAddButtonDisabled;
5451
- // adjust cell-width based on the amount of inputs on-screen,
5452
- // the "0.4" is to consider the delete button
5453
- const maxWidth = `${Math.floor(640 / (columns.length + 0.4))}px`;
5493
+ const matrixColumns = useMemo(() => {
5494
+ if (limitFieldsPerRow) {
5495
+ const matrix = [];
5496
+ for (let i = 0; true; i += limitFieldsPerRow) {
5497
+ const arr = columns.slice(i, i + limitFieldsPerRow);
5498
+ if (!arr.length)
5499
+ break;
5500
+ matrix.push(arr);
5501
+ }
5502
+ return matrix;
5503
+ }
5504
+ return [columns];
5505
+ }, [limitFieldsPerRow, columns]);
5454
5506
  return (React.createElement(Container$b, null,
5455
5507
  React.createElement("table", { style: { borderCollapse: 'collapse' } },
5456
- React.createElement("thead", null,
5508
+ !limitFieldsPerRow && (React.createElement("thead", null,
5457
5509
  React.createElement("tr", null,
5458
5510
  columns.map(({ title, tooltip, required }) => (React.createElement("th", { key: `input-table-head-${title}`, style: { maxWidth } },
5459
5511
  React.createElement(FieldLabel, { title: title, required: required, tooltip: tooltip })))),
5460
- React.createElement("th", null))),
5461
- React.createElement("tbody", null, rows.map((row, idx) => (React.createElement("tr", { key: `input-table-row-${idx}` },
5462
- columns.map(({ type, keyName, placeholder, required }, innerIdx) => {
5463
- const value = row[keyName];
5464
- return (React.createElement("td", { key: `input-table-${idx}-${keyName}`, style: { maxWidth, padding: '4px 6px 4px 0' } },
5465
- React.createElement(Input, { autoFocus: isEmpty(value) && !isMinRows && idx === rows.length - 1 && innerIdx === 0, type: type, placeholder: placeholder, value: value, onChange: ({ target: { value: val } }) => handleChange(keyName, type === 'number' ? Number(val) : val, idx), style: { maxWidth, paddingLeft: 10 }, hasError: !!errorMessage && (!required || (required && isEmpty(value))) })));
5466
- }),
5467
- React.createElement("td", null,
5468
- React.createElement(DeleteButton$1, { disabled: isDelButtonDisabled, onClick: () => {
5469
- if (isMinRows) {
5470
- columns.forEach(({ keyName }) => handleChange(keyName, '', idx));
5471
- }
5472
- else {
5473
- handleDeleteRow(idx);
5474
- }
5475
- } },
5476
- React.createElement(TrashIcon, null)))))))),
5512
+ React.createElement("th", null)))),
5513
+ React.createElement("tbody", null, rows.map((row, rowIdx) => (React.createElement(Fragment, { key: `input-table-row-${rowIdx}` },
5514
+ limitFieldsPerRow && rowIdx > 0 ? (React.createElement("tr", null,
5515
+ React.createElement("td", { colSpan: matrixColumns.length },
5516
+ React.createElement(Divider, null)))) : null,
5517
+ matrixColumns.map((cols, colIdx) => (React.createElement("tr", { key: `input-table-matrix-${rowIdx}-${colIdx}` },
5518
+ cols.map((obj, colIdx) => (React.createElement(ColumnsToFields, { key: `input-table-row-${rowIdx}-col-${colIdx}`, col: obj, colIdx: colIdx, row: row, rowIdx: rowIdx, rowsLength: rows.length, maxWidth: maxWidth, limitFieldsPerRow: limitFieldsPerRow, errorMessage: errorMessage, handleChange: handleChange }))),
5519
+ colIdx === 0 && (React.createElement("td", null,
5520
+ React.createElement(DeleteButton$1, { "$marginTop": limitFieldsPerRow ? '24px' : '0', onClick: () => handleDeleteRow(rowIdx) },
5521
+ React.createElement(TrashIcon, null)))))))))))),
5477
5522
  !!errorMessage && React.createElement(FieldError, null, errorMessage),
5478
5523
  React.createElement(AddButton, { onClick: handleAddRow, disabled: isAddButtonDisabled })));
5479
5524
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { T as Theme } from './index-ivnS3eWW.js';
2
+ import { T as Theme } from './index-DJGe2YeC.js';
3
3
 
4
4
  const OdigosLogo = ({ size = 16, fill: f, rotate = 0, onClick }) => {
5
5
  const theme = Theme.useTheme();
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { T as Theme } from './index-ivnS3eWW.js';
2
+ import { T as Theme } from './index-DJGe2YeC.js';
3
3
 
4
4
  const ArrowIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
5
5
  const theme = Theme.useTheme();
@@ -1,8 +1,8 @@
1
1
  import { ProgrammingLanguages, SignalType, StatusType } from './types.js';
2
2
  import 'react';
3
- import { n as ImageErrorIcon } from './index-ivnS3eWW.js';
3
+ import { n as ImageErrorIcon } from './index-DJGe2YeC.js';
4
4
  import 'styled-components';
5
- import { K as KafkaLogo, R as RedisLogo, P as PostgresLogo, N as NginxLogo, M as MysqlLogo, E as ElixirLogo, S as SwiftLogo, a as RustLogo, b as RubyLogo, c as PhpLogo, C as CPlusPlusLogo, d as CSharpLogo, D as DotnetLogo, e as PythonLogo, f as NodejsLogo, G as GoLogo, J as JavaLogo, T as TracesIcon, g as MetricsIcon, L as LogsIcon, O as OdigosLogo, I as InfoIcon, W as WarningTriangleIcon, h as ErrorTriangleIcon, i as CheckCircledIcon } from './index-DuSmjoDs.js';
5
+ import { K as KafkaLogo, R as RedisLogo, P as PostgresLogo, N as NginxLogo, M as MysqlLogo, E as ElixirLogo, S as SwiftLogo, a as RustLogo, b as RubyLogo, c as PhpLogo, C as CPlusPlusLogo, d as CSharpLogo, D as DotnetLogo, e as PythonLogo, f as NodejsLogo, G as GoLogo, J as JavaLogo, T as TracesIcon, g as MetricsIcon, L as LogsIcon, O as OdigosLogo, I as InfoIcon, W as WarningTriangleIcon, h as ErrorTriangleIcon, i as CheckCircledIcon } from './index-Bd8ZAEvq.js';
6
6
 
7
7
  const capitalizeFirstLetter = (string) => {
8
8
  return string.charAt(0).toUpperCase() + string.slice(1);
@@ -136,6 +136,12 @@ const mapConditions = (conditions) => {
136
136
  })) || []);
137
137
  };
138
138
 
139
+ const numbersOnly = (value) => {
140
+ // Use a regular expression to replace all non-digit characters with an empty string
141
+ const cleaned = value.replace(/[^\d]/g, '');
142
+ return cleaned;
143
+ };
144
+
139
145
  const parseJsonStringToPrettyString = (value) => {
140
146
  let str = '';
141
147
  try {
@@ -198,4 +204,4 @@ const safeJsonStringify = (obj, indent = 2) => {
198
204
  return JSON.stringify(obj || {}, null, indent);
199
205
  };
200
206
 
201
- export { getProgrammingLanguageIcon as a, getStatusIcon as b, capitalizeFirstLetter as c, splitCamelString as d, flattenObjectKeys as f, getMonitorIcon as g, mapConditions as m, parseJsonStringToPrettyString as p, removeEmptyValuesFromObject as r, safeJsonStringify as s };
207
+ export { getProgrammingLanguageIcon as a, getStatusIcon as b, capitalizeFirstLetter as c, splitCamelString as d, flattenObjectKeys as f, getMonitorIcon as g, mapConditions as m, numbersOnly as n, parseJsonStringToPrettyString as p, removeEmptyValuesFromObject as r, safeJsonStringify as s };
@@ -19,4 +19,13 @@ const getIdFromSseTarget = (target, type) => {
19
19
  }
20
20
  };
21
21
 
22
- export { getIdFromSseTarget as g };
22
+ const isLegalK8sLabel = (name) => {
23
+ if (!name)
24
+ return false;
25
+ if (name.length > 63)
26
+ return false;
27
+ const regex = /^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/;
28
+ return regex.test(name);
29
+ };
30
+
31
+ export { getIdFromSseTarget as g, isLegalK8sLabel as i };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { T as Theme } from './index-ivnS3eWW.js';
2
+ import { T as Theme } from './index-DJGe2YeC.js';
3
3
 
4
4
  const VmLogo = ({ size = 16, fill: f, rotate = 0, onClick }) => {
5
5
  const theme = Theme.useTheme();