@odigos/ui-kit 0.0.33 → 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 (46) hide show
  1. package/CHANGELOG.md +7 -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 +9 -9
  8. package/lib/constants.js +1 -1
  9. package/lib/containers/action-form/custom-fields/add-cluster-info.d.ts +1 -1
  10. package/lib/containers/action-form/custom-fields/delete-attributes.d.ts +1 -1
  11. package/lib/containers/action-form/custom-fields/error-sampler.d.ts +1 -1
  12. package/lib/containers/action-form/custom-fields/k8s-attributes.d.ts +1 -1
  13. package/lib/containers/action-form/custom-fields/latency-sampler.d.ts +1 -1
  14. package/lib/containers/action-form/custom-fields/pii-masking.d.ts +1 -1
  15. package/lib/containers/action-form/custom-fields/probabilistic-sampler.d.ts +1 -1
  16. package/lib/containers/action-form/custom-fields/rename-attributes.d.ts +1 -1
  17. package/lib/containers/action-form/custom-fields/service-name-sampler.d.ts +5 -0
  18. package/lib/containers/action-form/custom-fields/span-attribute-sampler.d.ts +5 -0
  19. package/lib/containers/instrumentation-rule-drawer/build-card.d.ts +1 -1
  20. package/lib/containers.js +339 -131
  21. package/lib/functions/get-action-icon/index.d.ts +2 -2
  22. package/lib/functions/index.d.ts +1 -0
  23. package/lib/functions/numbers-only/index.d.ts +1 -0
  24. package/lib/functions.js +5 -5
  25. package/lib/hooks.js +3 -3
  26. package/lib/icons.js +7 -7
  27. package/lib/{index-f8FRaVkE.js → index--RecCPGA.js} +1 -1
  28. package/lib/{index-Iq7U_fzb.js → index-BBjwRlta.js} +4 -4
  29. package/lib/{index-BQQZyvRz.js → index-BWZT-ipR.js} +1 -1
  30. package/lib/{index-BedCNcwV.js → index-BZq0yNL-.js} +88 -43
  31. package/lib/{index-Do3CYz7N.js → index-Bd8ZAEvq.js} +1 -1
  32. package/lib/{index-CNfdJ1X8.js → index-CIKkezVt.js} +1 -1
  33. package/lib/{index-B_Gl6Qa6.js → index-ChYtqgBW.js} +9 -3
  34. package/lib/{index-1N9wymEq.js → index-Cq8NT9Hr.js} +1 -1
  35. package/lib/{index-CVH8Q8Sl.js → index-DJGe2YeC.js} +29 -12
  36. package/lib/{index-CaAOgaiC.js → index-a_WA-82O.js} +2 -2
  37. package/lib/{index-BjVl4-os.js → index-ovjVbVQq.js} +4 -4
  38. package/lib/snippets.js +8 -8
  39. package/lib/store.js +1 -1
  40. package/lib/theme.js +1 -1
  41. package/lib/types/actions/index.d.ts +137 -41
  42. package/lib/types/common/index.d.ts +4 -16
  43. package/lib/types.js +78 -20
  44. package/lib/{useSourceSelectionFormData-DiwzViqL.js → useSourceSelectionFormData-DBNf1uEe.js} +41 -23
  45. package/lib/{useTransition-B0eagOib.js → useTransition-dZ92VxT2.js} +1 -1
  46. package/package.json +12 -12
@@ -1,14 +1,37 @@
1
1
  import { SignalType } from '../signals';
2
2
  import type { Condition, SVG } from '../common';
3
+ export declare enum ActionCategory {
4
+ Attributes = "attributes",
5
+ Samplers = "samplers"
6
+ }
3
7
  export declare enum ActionType {
4
8
  K8sAttributes = "K8sAttributesResolver",
5
9
  AddClusterInfo = "AddClusterInfo",
6
10
  DeleteAttributes = "DeleteAttribute",
7
11
  RenameAttributes = "RenameAttribute",
12
+ PiiMasking = "PiiMasking",
8
13
  ErrorSampler = "ErrorSampler",
9
14
  ProbabilisticSampler = "ProbabilisticSampler",
10
15
  LatencySampler = "LatencySampler",
11
- PiiMasking = "PiiMasking"
16
+ ServiceNameSampler = "ServiceNameSampler",
17
+ SpanAttributeSampler = "SpanAttributeSampler"
18
+ }
19
+ export declare enum ActionKeyTypes {
20
+ CollectContainerAttributes = "collectContainerAttributes",
21
+ CollectReplicaSetAttributes = "collectReplicaSetAttributes",
22
+ CollectWorkloadId = "collectWorkloadId",
23
+ CollectClusterId = "collectClusterId",
24
+ LabelsAttributes = "labelsAttributes",
25
+ AnnotationsAttributes = "annotationsAttributes",
26
+ ClusterAttributes = "clusterAttributes",
27
+ AttributeNamesToDelete = "attributeNamesToDelete",
28
+ Renames = "renames",
29
+ PiiCategories = "piiCategories",
30
+ FallbackSamplingRatio = "fallbackSamplingRatio",
31
+ SamplingPercentage = "samplingPercentage",
32
+ EndpointsFilters = "endpointsFilters",
33
+ ServicesNameFilters = "servicesNameFilters",
34
+ AttributeFilters = "attributeFilters"
12
35
  }
13
36
  export interface Action {
14
37
  id: string;
@@ -19,35 +42,23 @@ export interface Action {
19
42
  notes?: string;
20
43
  signals: SignalType[];
21
44
  disabled?: boolean;
22
- collectContainerAttributes?: boolean | null;
23
- collectReplicaSetAttributes?: boolean | null;
24
- collectWorkloadId?: boolean | null;
25
- collectClusterId?: boolean | null;
26
- labelsAttributes?: {
27
- labelKey: string;
28
- attributeKey: string;
29
- }[] | null;
30
- annotationsAttributes?: {
31
- annotationKey: string;
32
- attributeKey: string;
33
- }[] | null;
34
- clusterAttributes?: {
35
- attributeName: string;
36
- attributeStringValue: string;
37
- }[] | null;
38
- attributeNamesToDelete?: string[] | null;
39
- renames?: {
45
+ [ActionKeyTypes.CollectContainerAttributes]?: boolean | null;
46
+ [ActionKeyTypes.CollectReplicaSetAttributes]?: boolean | null;
47
+ [ActionKeyTypes.CollectWorkloadId]?: boolean | null;
48
+ [ActionKeyTypes.CollectClusterId]?: boolean | null;
49
+ [ActionKeyTypes.LabelsAttributes]?: LabelsAttributes[] | null;
50
+ [ActionKeyTypes.AnnotationsAttributes]?: AnnotationsAttributes[] | null;
51
+ [ActionKeyTypes.ClusterAttributes]?: ClusterAttributes[] | null;
52
+ [ActionKeyTypes.AttributeNamesToDelete]?: string[] | null;
53
+ [ActionKeyTypes.Renames]?: {
40
54
  [oldKey: string]: string;
41
55
  } | null;
42
- piiCategories?: string[] | null;
43
- fallbackSamplingRatio?: number | null;
44
- samplingPercentage?: number | null;
45
- endpointsFilters?: {
46
- serviceName: string;
47
- httpRoute: string;
48
- minimumLatencyThreshold: number;
49
- fallbackSamplingRatio: number;
50
- }[] | null;
56
+ [ActionKeyTypes.PiiCategories]?: string[] | null;
57
+ [ActionKeyTypes.FallbackSamplingRatio]?: number | null;
58
+ [ActionKeyTypes.SamplingPercentage]?: number | null;
59
+ [ActionKeyTypes.EndpointsFilters]?: EndpointsFilters[] | null;
60
+ [ActionKeyTypes.ServicesNameFilters]?: ServicesNameFilters[] | null;
61
+ [ActionKeyTypes.AttributeFilters]?: AttributeFilters[] | null;
51
62
  };
52
63
  }
53
64
  export interface ActionOption {
@@ -66,17 +77,102 @@ export interface ActionFormData {
66
77
  notes: Action['spec']['notes'];
67
78
  signals: Action['spec']['signals'];
68
79
  disabled: Action['spec']['disabled'];
69
- collectContainerAttributes: Action['spec']['collectContainerAttributes'];
70
- collectReplicaSetAttributes: Action['spec']['collectReplicaSetAttributes'];
71
- collectWorkloadId: Action['spec']['collectWorkloadId'];
72
- collectClusterId: Action['spec']['collectClusterId'];
73
- labelsAttributes: Action['spec']['labelsAttributes'];
74
- annotationsAttributes: Action['spec']['annotationsAttributes'];
75
- clusterAttributes: Action['spec']['clusterAttributes'];
76
- attributeNamesToDelete: Action['spec']['attributeNamesToDelete'];
77
- renames: Action['spec']['renames'];
78
- piiCategories: Action['spec']['piiCategories'];
79
- fallbackSamplingRatio: Action['spec']['fallbackSamplingRatio'];
80
- samplingPercentage: Action['spec']['samplingPercentage'];
81
- endpointsFilters: Action['spec']['endpointsFilters'];
80
+ [ActionKeyTypes.CollectContainerAttributes]: Action['spec'][ActionKeyTypes.CollectContainerAttributes];
81
+ [ActionKeyTypes.CollectReplicaSetAttributes]: Action['spec'][ActionKeyTypes.CollectReplicaSetAttributes];
82
+ [ActionKeyTypes.CollectWorkloadId]: Action['spec'][ActionKeyTypes.CollectWorkloadId];
83
+ [ActionKeyTypes.CollectClusterId]: Action['spec'][ActionKeyTypes.CollectClusterId];
84
+ [ActionKeyTypes.LabelsAttributes]: Action['spec'][ActionKeyTypes.LabelsAttributes];
85
+ [ActionKeyTypes.AnnotationsAttributes]: Action['spec'][ActionKeyTypes.AnnotationsAttributes];
86
+ [ActionKeyTypes.ClusterAttributes]: Action['spec'][ActionKeyTypes.ClusterAttributes];
87
+ [ActionKeyTypes.AttributeNamesToDelete]: Action['spec'][ActionKeyTypes.AttributeNamesToDelete];
88
+ [ActionKeyTypes.Renames]: Action['spec'][ActionKeyTypes.Renames];
89
+ [ActionKeyTypes.PiiCategories]: Action['spec'][ActionKeyTypes.PiiCategories];
90
+ [ActionKeyTypes.FallbackSamplingRatio]: Action['spec'][ActionKeyTypes.FallbackSamplingRatio];
91
+ [ActionKeyTypes.SamplingPercentage]: Action['spec'][ActionKeyTypes.SamplingPercentage];
92
+ [ActionKeyTypes.EndpointsFilters]: Action['spec'][ActionKeyTypes.EndpointsFilters];
93
+ [ActionKeyTypes.ServicesNameFilters]: Action['spec'][ActionKeyTypes.ServicesNameFilters];
94
+ [ActionKeyTypes.AttributeFilters]: Action['spec'][ActionKeyTypes.AttributeFilters];
95
+ }
96
+ export interface LabelsAttributes {
97
+ labelKey: string;
98
+ attributeKey: string;
99
+ }
100
+ export interface AnnotationsAttributes {
101
+ annotationKey: string;
102
+ attributeKey: string;
103
+ }
104
+ export interface ClusterAttributes {
105
+ attributeName: string;
106
+ attributeStringValue: string;
107
+ }
108
+ export interface EndpointsFilters {
109
+ serviceName: string;
110
+ httpRoute: string;
111
+ minimumLatencyThreshold: number;
112
+ fallbackSamplingRatio: number;
113
+ }
114
+ export interface ServicesNameFilters {
115
+ serviceName: string;
116
+ samplingRatio: number;
117
+ fallbackSamplingRatio: number;
118
+ }
119
+ export declare enum StringOperation {
120
+ EXISTS = "exists",
121
+ EQUALS = "equals",
122
+ NOT_EQUALS = "not_equals",
123
+ CONTAINS = "contains",
124
+ NOT_CONTAINS = "not_contains",
125
+ REGEX = "regex"
126
+ }
127
+ export declare enum NumberOperation {
128
+ EXISTS = "exists",
129
+ EQUALS = "equals",
130
+ NOT_EQUALS = "not_equals",
131
+ GREATER_THAN = "greater_than",
132
+ LESS_THAN = "less_than",
133
+ GREATER_THAN_OR_EQUAL = "greater_than_or_equal",
134
+ LESS_THAN_OR_EQUAL = "less_than_or_equal"
135
+ }
136
+ export declare enum BooleanOperation {
137
+ EXISTS = "exists",
138
+ EQUALS = "equals"
139
+ }
140
+ export declare enum JsonOperation {
141
+ EXISTS = "exists",
142
+ EQUALS = "equals",
143
+ NOT_EQUALS = "not_equals",
144
+ IS_VALID_JSON = "is_valid_json",
145
+ IS_INVALID_JSON = "is_invalid_json",
146
+ JSONPATH_EXISTS = "jsonpath_exists",
147
+ KEY_EQUALS = "key_equals",
148
+ KEY_NOT_EQUALS = "key_not_equals"
149
+ }
150
+ export interface StringCondition {
151
+ operation: StringOperation;
152
+ expectedValue?: string;
153
+ }
154
+ export interface NumberCondition {
155
+ operation: NumberOperation;
156
+ expectedValue?: string | number;
157
+ }
158
+ export interface BooleanCondition {
159
+ operation: BooleanOperation;
160
+ expectedValue?: string | boolean;
161
+ }
162
+ export interface JsonCondition {
163
+ operation: JsonOperation;
164
+ expectedValue?: string;
165
+ jsonPath?: string;
166
+ }
167
+ export interface AttributeFiltersCondition {
168
+ stringCondition?: StringCondition;
169
+ numberCondition?: NumberCondition;
170
+ booleanCondition?: BooleanCondition;
171
+ jsonCondition?: JsonCondition;
172
+ }
173
+ export interface AttributeFilters {
174
+ serviceName: string;
175
+ attributeKey: string;
176
+ fallbackSamplingRatio: number;
177
+ condition: AttributeFiltersCondition;
82
178
  }
@@ -73,22 +73,10 @@ export declare enum FieldTypes {
73
73
  Checkbox = "checkbox",
74
74
  Toggle = "toggle"
75
75
  }
76
- export declare enum CrdTypes {
77
- OdigosConfig = "OdigosConfiguration",
78
- CollectorsGroup = "CollectorsGroup",
79
- Source = "Source",
80
- InstrumentationConfig = "InstrumentationConfig",
81
- InstrumentationInstance = "InstrumentationInstance",
82
- Destination = "Destination",
83
- InstrumentationRule = "InstrumentationRule",
84
- Processor = "Processor",
85
- AddClusterInfo = "AddClusterInfo",
86
- DeleteAttributes = "DeleteAttribute",
87
- RenameAttributes = "RenameAttribute",
88
- PiiMasking = "PiiMasking",
89
- ErrorSampler = "ErrorSampler",
90
- LatencySampler = "LatencySampler",
91
- ProbabilisticSampler = "ProbabilisticSampler"
76
+ export declare enum InputTypes {
77
+ Text = "text",
78
+ Password = "password",
79
+ Number = "number"
92
80
  }
93
81
  export declare enum StatusType {
94
82
  Warning = "warning",
package/lib/types.js CHANGED
@@ -1,14 +1,84 @@
1
+ var ActionCategory;
2
+ (function (ActionCategory) {
3
+ ActionCategory["Attributes"] = "attributes";
4
+ ActionCategory["Samplers"] = "samplers";
5
+ })(ActionCategory || (ActionCategory = {}));
1
6
  var ActionType;
2
7
  (function (ActionType) {
3
8
  ActionType["K8sAttributes"] = "K8sAttributesResolver";
4
9
  ActionType["AddClusterInfo"] = "AddClusterInfo";
5
10
  ActionType["DeleteAttributes"] = "DeleteAttribute";
6
11
  ActionType["RenameAttributes"] = "RenameAttribute";
12
+ ActionType["PiiMasking"] = "PiiMasking";
7
13
  ActionType["ErrorSampler"] = "ErrorSampler";
8
14
  ActionType["ProbabilisticSampler"] = "ProbabilisticSampler";
9
15
  ActionType["LatencySampler"] = "LatencySampler";
10
- ActionType["PiiMasking"] = "PiiMasking";
16
+ ActionType["ServiceNameSampler"] = "ServiceNameSampler";
17
+ ActionType["SpanAttributeSampler"] = "SpanAttributeSampler";
11
18
  })(ActionType || (ActionType = {}));
19
+ var ActionKeyTypes;
20
+ (function (ActionKeyTypes) {
21
+ // K8sAttributes
22
+ ActionKeyTypes["CollectContainerAttributes"] = "collectContainerAttributes";
23
+ ActionKeyTypes["CollectReplicaSetAttributes"] = "collectReplicaSetAttributes";
24
+ ActionKeyTypes["CollectWorkloadId"] = "collectWorkloadId";
25
+ ActionKeyTypes["CollectClusterId"] = "collectClusterId";
26
+ ActionKeyTypes["LabelsAttributes"] = "labelsAttributes";
27
+ ActionKeyTypes["AnnotationsAttributes"] = "annotationsAttributes";
28
+ // AddClusterInfo
29
+ ActionKeyTypes["ClusterAttributes"] = "clusterAttributes";
30
+ // DeleteAttributes
31
+ ActionKeyTypes["AttributeNamesToDelete"] = "attributeNamesToDelete";
32
+ // RenameAttributes
33
+ ActionKeyTypes["Renames"] = "renames";
34
+ // PiiMasking
35
+ ActionKeyTypes["PiiCategories"] = "piiCategories";
36
+ // ErrorSampler
37
+ ActionKeyTypes["FallbackSamplingRatio"] = "fallbackSamplingRatio";
38
+ // ProbabilisticSampler
39
+ ActionKeyTypes["SamplingPercentage"] = "samplingPercentage";
40
+ // LatencySampler
41
+ ActionKeyTypes["EndpointsFilters"] = "endpointsFilters";
42
+ // ServiceNameSampler
43
+ ActionKeyTypes["ServicesNameFilters"] = "servicesNameFilters";
44
+ // SpanAttributeSampler
45
+ ActionKeyTypes["AttributeFilters"] = "attributeFilters";
46
+ })(ActionKeyTypes || (ActionKeyTypes = {}));
47
+ var StringOperation;
48
+ (function (StringOperation) {
49
+ StringOperation["EXISTS"] = "exists";
50
+ StringOperation["EQUALS"] = "equals";
51
+ StringOperation["NOT_EQUALS"] = "not_equals";
52
+ StringOperation["CONTAINS"] = "contains";
53
+ StringOperation["NOT_CONTAINS"] = "not_contains";
54
+ StringOperation["REGEX"] = "regex";
55
+ })(StringOperation || (StringOperation = {}));
56
+ var NumberOperation;
57
+ (function (NumberOperation) {
58
+ NumberOperation["EXISTS"] = "exists";
59
+ NumberOperation["EQUALS"] = "equals";
60
+ NumberOperation["NOT_EQUALS"] = "not_equals";
61
+ NumberOperation["GREATER_THAN"] = "greater_than";
62
+ NumberOperation["LESS_THAN"] = "less_than";
63
+ NumberOperation["GREATER_THAN_OR_EQUAL"] = "greater_than_or_equal";
64
+ NumberOperation["LESS_THAN_OR_EQUAL"] = "less_than_or_equal";
65
+ })(NumberOperation || (NumberOperation = {}));
66
+ var BooleanOperation;
67
+ (function (BooleanOperation) {
68
+ BooleanOperation["EXISTS"] = "exists";
69
+ BooleanOperation["EQUALS"] = "equals";
70
+ })(BooleanOperation || (BooleanOperation = {}));
71
+ var JsonOperation;
72
+ (function (JsonOperation) {
73
+ JsonOperation["EXISTS"] = "exists";
74
+ JsonOperation["EQUALS"] = "equals";
75
+ JsonOperation["NOT_EQUALS"] = "not_equals";
76
+ JsonOperation["IS_VALID_JSON"] = "is_valid_json";
77
+ JsonOperation["IS_INVALID_JSON"] = "is_invalid_json";
78
+ JsonOperation["JSONPATH_EXISTS"] = "jsonpath_exists";
79
+ JsonOperation["KEY_EQUALS"] = "key_equals";
80
+ JsonOperation["KEY_NOT_EQUALS"] = "key_not_equals";
81
+ })(JsonOperation || (JsonOperation = {}));
12
82
 
13
83
  var Tier;
14
84
  (function (Tier) {
@@ -72,24 +142,12 @@ var FieldTypes;
72
142
  FieldTypes["Checkbox"] = "checkbox";
73
143
  FieldTypes["Toggle"] = "toggle";
74
144
  })(FieldTypes || (FieldTypes = {}));
75
- var CrdTypes;
76
- (function (CrdTypes) {
77
- CrdTypes["OdigosConfig"] = "OdigosConfiguration";
78
- CrdTypes["CollectorsGroup"] = "CollectorsGroup";
79
- CrdTypes["Source"] = "Source";
80
- CrdTypes["InstrumentationConfig"] = "InstrumentationConfig";
81
- CrdTypes["InstrumentationInstance"] = "InstrumentationInstance";
82
- CrdTypes["Destination"] = "Destination";
83
- CrdTypes["InstrumentationRule"] = "InstrumentationRule";
84
- CrdTypes["Processor"] = "Processor";
85
- CrdTypes["AddClusterInfo"] = "AddClusterInfo";
86
- CrdTypes["DeleteAttributes"] = "DeleteAttribute";
87
- CrdTypes["RenameAttributes"] = "RenameAttribute";
88
- CrdTypes["PiiMasking"] = "PiiMasking";
89
- CrdTypes["ErrorSampler"] = "ErrorSampler";
90
- CrdTypes["LatencySampler"] = "LatencySampler";
91
- CrdTypes["ProbabilisticSampler"] = "ProbabilisticSampler";
92
- })(CrdTypes || (CrdTypes = {}));
145
+ var InputTypes;
146
+ (function (InputTypes) {
147
+ InputTypes["Text"] = "text";
148
+ InputTypes["Password"] = "password";
149
+ InputTypes["Number"] = "number";
150
+ })(InputTypes || (InputTypes = {}));
93
151
  var StatusType;
94
152
  (function (StatusType) {
95
153
  StatusType["Warning"] = "warning";
@@ -241,4 +299,4 @@ var K8sResourceKind;
241
299
  K8sResourceKind["StatefulSet"] = "StatefulSet";
242
300
  })(K8sResourceKind || (K8sResourceKind = {}));
243
301
 
244
- export { ActionType, AddNodeTypes, CodeAttributesKeyTypes, CrdTypes, Crud, DestinationTypes, EdgeTypes, EntityTypes, FieldTypes, HeadersCollectionKeyTypes, InstrumentationRuleType, K8sResourceKind, NodeTypes, OtherStatus, PayloadCollectionKeyTypes, PlatformType, ProgrammingLanguages, SignalType, SortDirection, StatusType, Tier };
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 };
@@ -1,10 +1,10 @@
1
- import { 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-CVH8Q8Sl.js';
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
3
  import { F as FORM_ALERTS } from './index-mOgS3e5E.js';
4
4
  import { useState, useEffect, useMemo } from 'react';
5
5
  import 'styled-components';
6
6
  import { i as isEmpty, s as safeJsonParse } from './index-BV85P9UP.js';
7
- import { b as useGenericForm } from './useTransition-B0eagOib.js';
7
+ import { b as useGenericForm } from './useTransition-dZ92VxT2.js';
8
8
  import { g as getIdFromSseTarget, i as isLegalK8sLabel } from './index-CnZlllYu.js';
9
9
 
10
10
  const INITIAL$2 = {
@@ -21,6 +21,8 @@ const INITIAL$2 = {
21
21
  fallbackSamplingRatio: null,
22
22
  samplingPercentage: null,
23
23
  endpointsFilters: null,
24
+ servicesNameFilters: null,
25
+ attributeFilters: null,
24
26
  };
25
27
  const useActionFormData = () => {
26
28
  const { addNotification } = useNotificationStore();
@@ -35,31 +37,31 @@ const useActionFormData = () => {
35
37
  if (isEmpty(v))
36
38
  errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
37
39
  break;
38
- case 'clusterAttributes':
40
+ case ActionKeyTypes.ClusterAttributes:
39
41
  if (formData.type === ActionType.AddClusterInfo && isEmpty(v))
40
42
  errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
41
43
  break;
42
- case 'renames':
44
+ case ActionKeyTypes.Renames:
43
45
  if (formData.type === ActionType.RenameAttributes && isEmpty(v))
44
46
  errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
45
47
  break;
46
- case 'attributeNamesToDelete':
48
+ case ActionKeyTypes.AttributeNamesToDelete:
47
49
  if (formData.type === ActionType.DeleteAttributes && isEmpty(v))
48
50
  errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
49
51
  break;
50
- case 'piiCategories':
52
+ case ActionKeyTypes.PiiCategories:
51
53
  if (formData.type === ActionType.PiiMasking && isEmpty(v))
52
54
  errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
53
55
  break;
54
- case 'fallbackSamplingRatio':
56
+ case ActionKeyTypes.FallbackSamplingRatio:
55
57
  if (formData.type === ActionType.ErrorSampler && isEmpty(v))
56
58
  errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
57
59
  break;
58
- case 'samplingPercentage':
60
+ case ActionKeyTypes.SamplingPercentage:
59
61
  if (formData.type === ActionType.ProbabilisticSampler && isEmpty(v))
60
62
  errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
61
63
  break;
62
- case 'endpointsFilters':
64
+ case ActionKeyTypes.EndpointsFilters:
63
65
  if (formData.type === ActionType.LatencySampler) {
64
66
  if (isEmpty(v))
65
67
  errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
@@ -69,6 +71,20 @@ const useActionFormData = () => {
69
71
  });
70
72
  }
71
73
  break;
74
+ case ActionKeyTypes.ServicesNameFilters:
75
+ if (formData.type === ActionType.ServiceNameSampler) {
76
+ if (isEmpty(v))
77
+ errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
78
+ v?.forEach((objV) => {
79
+ if (isEmpty(objV))
80
+ errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
81
+ });
82
+ }
83
+ break;
84
+ case ActionKeyTypes.AttributeFilters:
85
+ if (formData.type === ActionType.SpanAttributeSampler && isEmpty(v))
86
+ errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
87
+ break;
72
88
  }
73
89
  });
74
90
  ok = !Object.values(errors).length;
@@ -99,19 +115,21 @@ const useActionFormData = () => {
99
115
  case 'notes':
100
116
  case 'signals':
101
117
  case 'disabled':
102
- case 'collectContainerAttributes':
103
- case 'collectReplicaSetAttributes':
104
- case 'collectWorkloadId':
105
- case 'collectClusterId':
106
- case 'labelsAttributes':
107
- case 'annotationsAttributes':
108
- case 'clusterAttributes':
109
- case 'attributeNamesToDelete':
110
- case 'renames':
111
- case 'piiCategories':
112
- case 'fallbackSamplingRatio':
113
- case 'samplingPercentage':
114
- case 'endpointsFilters': {
118
+ case ActionKeyTypes.CollectContainerAttributes:
119
+ case ActionKeyTypes.CollectReplicaSetAttributes:
120
+ case ActionKeyTypes.CollectWorkloadId:
121
+ case ActionKeyTypes.CollectClusterId:
122
+ case ActionKeyTypes.LabelsAttributes:
123
+ case ActionKeyTypes.AnnotationsAttributes:
124
+ case ActionKeyTypes.ClusterAttributes:
125
+ case ActionKeyTypes.AttributeNamesToDelete:
126
+ case ActionKeyTypes.Renames:
127
+ case ActionKeyTypes.PiiCategories:
128
+ case ActionKeyTypes.FallbackSamplingRatio:
129
+ case ActionKeyTypes.SamplingPercentage:
130
+ case ActionKeyTypes.EndpointsFilters:
131
+ case ActionKeyTypes.ServicesNameFilters:
132
+ case ActionKeyTypes.AttributeFilters: {
115
133
  // @ts-ignore
116
134
  updatedData[k] = v;
117
135
  break;
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useRef, useEffect, useCallback } from 'react';
2
- import { g as useNotificationStore } from './index-CVH8Q8Sl.js';
2
+ import { g as useNotificationStore } from './index-DJGe2YeC.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.33",
3
+ "version": "0.0.34",
4
4
  "author": "Odigos",
5
5
  "repository": {
6
6
  "type": "git",
@@ -84,15 +84,15 @@
84
84
  "zustand": "^5.0.3"
85
85
  },
86
86
  "dependencies": {
87
- "@xyflow/react": "^12.6.3",
87
+ "@xyflow/react": "^12.6.4",
88
88
  "javascript-time-ago": "^2.5.11",
89
89
  "lottie-react": "^2.4.1",
90
90
  "prism-react-renderer": "^2.4.1",
91
91
  "react": "^19.1.0",
92
92
  "react-dom": "^19.1.0",
93
- "react-error-boundary": "^5.0.0",
93
+ "react-error-boundary": "^6.0.0",
94
94
  "styled-components": "6.1.15",
95
- "zustand": "^5.0.4"
95
+ "zustand": "^5.0.5"
96
96
  },
97
97
  "devDependencies": {
98
98
  "@babel/core": "^7.27.1",
@@ -102,27 +102,27 @@
102
102
  "@rollup/plugin-commonjs": "^28.0.3",
103
103
  "@rollup/plugin-json": "^6.1.0",
104
104
  "@rollup/plugin-node-resolve": "^16.0.1",
105
- "@storybook/addon-essentials": "^8.6.12",
105
+ "@storybook/addon-essentials": "^8.6.14",
106
106
  "@storybook/addon-webpack5-compiler-babel": "^3.0.6",
107
- "@storybook/react": "^8.6.12",
108
- "@storybook/react-webpack5": "^8.6.12",
109
- "@types/node": "^22.15.18",
110
- "@types/react": "^19.1.4",
107
+ "@storybook/react": "^8.6.14",
108
+ "@storybook/react-webpack5": "^8.6.14",
109
+ "@types/node": "^22.15.21",
110
+ "@types/react": "^19.1.5",
111
111
  "@types/react-dom": "^19.1.5",
112
112
  "@types/react-lottie": "^1.2.10",
113
113
  "@typescript-eslint/eslint-plugin": "^8.32.1",
114
114
  "@typescript-eslint/parser": "^8.32.1",
115
115
  "babel-loader": "^10.0.0",
116
116
  "babel-plugin-styled-components": "^2.1.4",
117
- "eslint": "^9.26.0",
117
+ "eslint": "^9.27.0",
118
118
  "eslint-plugin-react": "^7.37.5",
119
119
  "eslint-plugin-storybook": "^0.12.0",
120
120
  "html-webpack-plugin": "^5.6.3",
121
121
  "postcss": "^8.5.3",
122
- "rollup": "^4.40.2",
122
+ "rollup": "^4.41.1",
123
123
  "rollup-plugin-postcss": "^4.0.2",
124
124
  "rollup-plugin-typescript2": "^0.36.0",
125
- "storybook": "^8.6.12",
125
+ "storybook": "^8.6.14",
126
126
  "typescript": "^5.8.3"
127
127
  }
128
128
  }