@odigos/ui-kit 0.0.214 → 0.0.216

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 (98) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/lib/chunks/index-3rwrQKyF.js +3 -0
  3. package/lib/chunks/ui-components-DvThY8Em.js +2422 -0
  4. package/lib/components/_v2/autocomplete/index.d.ts +13 -0
  5. package/lib/components/_v2/drawer/index.d.ts +1 -0
  6. package/lib/components/_v2/drop-data/index.d.ts +4 -0
  7. package/lib/components/_v2/index.d.ts +1 -0
  8. package/lib/components/_v2/segment/index.d.ts +8 -1
  9. package/lib/components/v2.js +1 -1
  10. package/lib/components.js +1 -1
  11. package/lib/constants.js +1 -1
  12. package/lib/containers/_v2/_drawers/add-action-drawer/index.d.ts +1 -0
  13. package/lib/containers/_v2/_drawers/add-destination-drawer/index.d.ts +4 -1
  14. package/lib/containers/_v2/_drawers/add-rule-drawer/index.d.ts +1 -0
  15. package/lib/containers/_v2/_drawers/add-source-drawer/index.d.ts +2 -0
  16. package/lib/containers/_v2/_drawers/create-sampling-rule-drawer/constants.d.ts +26 -0
  17. package/lib/containers/_v2/_drawers/create-sampling-rule-drawer/converters.d.ts +5 -0
  18. package/lib/containers/_v2/_drawers/create-sampling-rule-drawer/form-helpers.d.ts +5 -0
  19. package/lib/containers/_v2/_drawers/create-sampling-rule-drawer/index.d.ts +6 -0
  20. package/lib/containers/_v2/_drawers/create-sampling-rule-drawer/sections/duration-errors.d.ts +9 -0
  21. package/lib/containers/_v2/_drawers/create-sampling-rule-drawer/sections/operation.d.ts +9 -0
  22. package/lib/containers/_v2/_drawers/create-sampling-rule-drawer/sections/percentage.d.ts +9 -0
  23. package/lib/containers/_v2/_drawers/create-sampling-rule-drawer/sections/rule-info.d.ts +9 -0
  24. package/lib/containers/_v2/_drawers/create-sampling-rule-drawer/sections/sampling-preview.d.ts +9 -0
  25. package/lib/containers/_v2/_drawers/create-sampling-rule-drawer/sections/source-scope.d.ts +10 -0
  26. package/lib/containers/_v2/_drawers/create-sampling-rule-drawer/types.d.ts +54 -0
  27. package/lib/containers/_v2/_drawers/edit-auto-rule-drawer/constants.d.ts +10 -0
  28. package/lib/containers/_v2/_drawers/edit-auto-rule-drawer/index.d.ts +4 -0
  29. package/lib/containers/_v2/_drawers/edit-auto-rule-drawer/types.d.ts +8 -0
  30. package/lib/containers/_v2/_drawers/edit-cost-reduction-auto-rule-drawer/constants.d.ts +10 -0
  31. package/lib/containers/_v2/_drawers/edit-cost-reduction-auto-rule-drawer/index.d.ts +4 -0
  32. package/lib/containers/_v2/_drawers/edit-cost-reduction-auto-rule-drawer/types.d.ts +8 -0
  33. package/lib/containers/_v2/_drawers/edit-highly-relevant-auto-rule-drawer/constants.d.ts +6 -0
  34. package/lib/containers/_v2/_drawers/edit-highly-relevant-auto-rule-drawer/index.d.ts +4 -0
  35. package/lib/containers/_v2/_drawers/edit-highly-relevant-auto-rule-drawer/types.d.ts +6 -0
  36. package/lib/containers/_v2/_drawers/index.d.ts +5 -0
  37. package/lib/containers/_v2/_drawers/view-sampling-rule-drawer/constants.d.ts +19 -0
  38. package/lib/containers/_v2/_drawers/view-sampling-rule-drawer/footer.d.ts +21 -0
  39. package/lib/containers/_v2/_drawers/view-sampling-rule-drawer/index.d.ts +23 -0
  40. package/lib/containers/_v2/_drawers/view-sampling-rule-drawer/reverse-converters.d.ts +3 -0
  41. package/lib/containers/_v2/_drawers/view-sampling-rule-drawer/sections/duration-errors.d.ts +6 -0
  42. package/lib/containers/_v2/_drawers/view-sampling-rule-drawer/sections/operation-details.d.ts +6 -0
  43. package/lib/containers/_v2/_drawers/view-sampling-rule-drawer/sections/percentage.d.ts +6 -0
  44. package/lib/containers/_v2/_drawers/view-sampling-rule-drawer/sections/rule-info.d.ts +6 -0
  45. package/lib/containers/_v2/_drawers/view-sampling-rule-drawer/sections/sampling-preview.d.ts +6 -0
  46. package/lib/containers/_v2/_drawers/view-sampling-rule-drawer/sections/source-scopes.d.ts +6 -0
  47. package/lib/containers/_v2/_drawers/view-sampling-rule-drawer/sections/styled.d.ts +4 -0
  48. package/lib/containers/_v2/_drawers/view-sampling-rule-drawer/types.d.ts +1 -0
  49. package/lib/containers/_v2/_forms/add-destination-form/context.d.ts +3 -3
  50. package/lib/containers/_v2/auto-rule-card/constants.d.ts +1 -0
  51. package/lib/containers/_v2/auto-rule-card/helpers.d.ts +19 -0
  52. package/lib/containers/_v2/auto-rule-card/index.d.ts +5 -0
  53. package/lib/containers/_v2/auto-rule-card/types.d.ts +6 -0
  54. package/lib/containers/_v2/central-connections/index.d.ts +2 -1
  55. package/lib/containers/_v2/index.d.ts +3 -0
  56. package/lib/containers/_v2/onboarding/index.d.ts +2 -1
  57. package/lib/containers/_v2/onboarding/summary/index.d.ts +1 -0
  58. package/lib/containers/_v2/sampling-rules-list/constants.d.ts +23 -0
  59. package/lib/containers/_v2/sampling-rules-list/helpers.d.ts +30 -0
  60. package/lib/containers/_v2/sampling-rules-list/index.d.ts +6 -0
  61. package/lib/containers/_v2/sampling-rules-list/rule-row.d.ts +12 -0
  62. package/lib/containers/_v2/sampling-rules-list/summary-span.d.ts +10 -0
  63. package/lib/containers/_v2/sampling-rules-list/toolbar.d.ts +13 -0
  64. package/lib/containers/_v2/sampling-rules-list/types.d.ts +47 -0
  65. package/lib/containers/v2.js +446 -35
  66. package/lib/containers.js +2 -2
  67. package/lib/contexts.js +1 -1
  68. package/lib/functions.js +1 -1
  69. package/lib/hooks.js +1 -1
  70. package/lib/icons/destinations/aws-api-gateway-logo/index.d.ts +2 -0
  71. package/lib/icons/destinations/aws-bedrock-logo/index.d.ts +2 -0
  72. package/lib/icons/destinations/aws-dynamodb-logo/index.d.ts +2 -0
  73. package/lib/icons/destinations/aws-ec2-logo/index.d.ts +2 -0
  74. package/lib/icons/destinations/aws-eventbridge-logo/index.d.ts +2 -0
  75. package/lib/icons/destinations/aws-kinesis-logo/index.d.ts +2 -0
  76. package/lib/icons/destinations/aws-lambda-logo/index.d.ts +2 -0
  77. package/lib/icons/destinations/aws-secrets-manager-logo/index.d.ts +2 -0
  78. package/lib/icons/destinations/aws-sns-logo/index.d.ts +2 -0
  79. package/lib/icons/destinations/aws-sqs-logo/index.d.ts +2 -0
  80. package/lib/icons/destinations/aws-step-functions-logo/index.d.ts +2 -0
  81. package/lib/icons/destinations/aws-sts-logo/index.d.ts +2 -0
  82. package/lib/icons/destinations/index.d.ts +12 -0
  83. package/lib/icons/overview/index.d.ts +1 -0
  84. package/lib/icons/overview/sampling-icon/index.d.ts +2 -0
  85. package/lib/icons.js +1 -1
  86. package/lib/snippets/_v2/wide-drawer/index.d.ts +2 -0
  87. package/lib/snippets.js +1 -1
  88. package/lib/store.js +1 -1
  89. package/lib/theme.js +1 -1
  90. package/lib/types/common/index.d.ts +2 -1
  91. package/lib/types/destinations/index.d.ts +3 -0
  92. package/lib/types/index.d.ts +1 -0
  93. package/lib/types/sampling.d.ts +103 -0
  94. package/lib/types.js +1 -1
  95. package/lib/visuals.js +1 -1
  96. package/package.json +1 -1
  97. package/lib/chunks/index-CIjqAfew.js +0 -3
  98. package/lib/chunks/ui-components-Cu9XlyM0.js +0 -2391
@@ -1,5 +1,5 @@
1
1
  import { type FC, type CSSProperties } from 'react';
2
- import { type Connection, type GetEffectiveConfigFunc, type ApplyConfigurationsFunc, type GetAllClusterSnapshots, type PersistSourcesFunc, type GetDestinationCategoriesFunc, type GetPotentialDestinationsFunc, type CreateDestinationFunc, type CreateActionFunc, type CreateInstrumentationRuleFunc, TestConnectionFunc } from '@/types';
2
+ import { type Connection, type GetEffectiveConfigFunc, type ApplyConfigurationsFunc, type GetAllClusterSnapshots, type PersistSourcesFunc, type GetDestinationCategoriesFunc, type GetPotentialDestinationsFunc, type CreateDestinationFunc, type UpdateDestinationFunc, type CreateActionFunc, type CreateInstrumentationRuleFunc, TestConnectionFunc } from '@/types';
3
3
  export interface CentralConnectionsProps {
4
4
  tableRowsMaxHeight: CSSProperties['maxHeight'];
5
5
  connections?: Connection[];
@@ -16,6 +16,7 @@ export interface CentralConnectionsProps {
16
16
  getPotentialDestinations?: GetPotentialDestinationsFunc;
17
17
  testConnection?: TestConnectionFunc;
18
18
  createDestination?: CreateDestinationFunc;
19
+ updateDestination?: UpdateDestinationFunc;
19
20
  createAction?: CreateActionFunc;
20
21
  createInstrumentationRule?: CreateInstrumentationRuleFunc;
21
22
  }
@@ -1,5 +1,8 @@
1
1
  export * from './_drawers';
2
2
  export * from './_forms';
3
+ export * from './auto-rule-card';
3
4
  export * from './central-connections';
4
5
  export * from './onboarding';
5
6
  export * from './pipeline-collectors';
7
+ export * from './sampling-rules-list';
8
+ export { RichTitle, type RichTitleProps } from '@/snippets/_v2/rich-title';
@@ -1,5 +1,5 @@
1
1
  import { type CSSProperties, type FC } from 'react';
2
- import { type FetchNamespacesWithWorkloads, type PersistSourcesFunc, type GetDestinationCategoriesFunc, type GetPotentialDestinationsFunc, type TestConnectionFunc, type CreateDestinationFunc } from '@/types';
2
+ import { type FetchNamespacesWithWorkloads, type PersistSourcesFunc, type GetDestinationCategoriesFunc, type GetPotentialDestinationsFunc, type TestConnectionFunc, type CreateDestinationFunc, type UpdateDestinationFunc } from '@/types';
3
3
  export interface OnboardingProps {
4
4
  pagePaddingXAxis?: CSSProperties['padding'];
5
5
  pagePaddingYAxis?: CSSProperties['padding'];
@@ -9,6 +9,7 @@ export interface OnboardingProps {
9
9
  getPotentialDestinations: GetPotentialDestinationsFunc;
10
10
  testConnection: TestConnectionFunc;
11
11
  createDestination: CreateDestinationFunc;
12
+ updateDestination: UpdateDestinationFunc;
12
13
  onDone: () => void;
13
14
  }
14
15
  export declare const Onboarding: FC<OnboardingProps>;
@@ -8,5 +8,6 @@ export interface SummaryProps {
8
8
  } | undefined>;
9
9
  sourcesPayload: PersistSourceInput | null;
10
10
  destinationsPayload: UnsavedDestination[] | null;
11
+ disableAnimation?: boolean;
11
12
  }
12
13
  export declare const Summary: FC<SummaryProps>;
@@ -0,0 +1,23 @@
1
+ import type { SamplingRuleCategory } from './types';
2
+ export declare const UNNAMED_RULE = "Unnamed rule";
3
+ export declare const LABEL_DISABLED_RULE = "Disabled rule";
4
+ export declare const BTN_EDIT_RULE = "Edit rule";
5
+ export declare const BTN_CANCEL = "Cancel";
6
+ export declare const SECTION_SAMPLING_PREVIEW = "Sampling Preview";
7
+ export declare const SECTION_SOURCE_SCOPE = "Source Scope";
8
+ export declare const SECTION_OPERATION = "Operation";
9
+ export declare const SECTION_DURATION = "Duration";
10
+ export declare const SECTION_ERRORS = "Errors";
11
+ export declare const LABEL_RULE_NAME = "Rule name";
12
+ export declare const LABEL_RULE_TYPE = "Rule type";
13
+ export declare const LABEL_NOTE = "Note";
14
+ export declare const LABEL_HTTP_ROUTE = "HTTP route";
15
+ export declare const LABEL_METHOD = "Method";
16
+ export declare const LABEL_KEEP_PERCENTAGE = "Keep Percentage";
17
+ export declare const LABEL_DROP_PERCENTAGE = "Drop Percentage";
18
+ export declare const LABEL_KEEP_TRACES_DURATION = "Keep traces with duration larger than";
19
+ export declare const LABEL_KEEP_TRACES_ERRORS = "Keep traces with errors";
20
+ export declare const LABEL_KEEP_AT_LEAST = "Keep at least this percentage of matching traces";
21
+ export declare const LABEL_KEEP_AT_MOST = "Keep at most this percentage of matching traces";
22
+ export declare const FILTER_TYPE_ALL = "All";
23
+ export declare const CATEGORY_DESCRIPTIONS: Record<SamplingRuleCategory, string>;
@@ -0,0 +1,30 @@
1
+ import type { NoisyOperationRule, HighlyRelevantOperationRule, CostReductionRule, SourcesScopeInput, HeadSamplingOperationMatcher, TailSamplingOperationMatcher, SamplingRules } from '@/types';
2
+ import type { SamplingRuleItem, SamplingRuleCategory, SummaryPart, HighlyRelevantBadgeType, ViewRuleData } from './types';
3
+ export declare enum SamplingCategory {
4
+ Noisy = "noisy",
5
+ HighlyRelevant = "highly-relevant",
6
+ CostReduction = "cost-reduction"
7
+ }
8
+ export declare const SAMPLING_SEGMENT_OPTIONS: {
9
+ value: SamplingCategory;
10
+ label: string;
11
+ tooltip: string;
12
+ }[];
13
+ export declare const SAMPLING_CATEGORY_NOTES: Record<SamplingCategory, string>;
14
+ export declare const SAMPLING_CATEGORY_LIST_TITLES: Record<SamplingCategory, string>;
15
+ export declare const CATEGORY_TO_RULE_CATEGORY: Record<SamplingCategory, SamplingRuleCategory>;
16
+ export declare function buildNoisySummary(rule: NoisyOperationRule): SummaryPart[];
17
+ export declare function buildHighlyRelevantSummary(rule: HighlyRelevantOperationRule): SummaryPart[];
18
+ export declare function buildCostReductionSummary(rule: CostReductionRule): SummaryPart[];
19
+ export declare function getHighlyRelevantTypeBadge(rule: HighlyRelevantOperationRule): HighlyRelevantBadgeType;
20
+ export declare function buildSamplingRuleItems(groups: SamplingRules[], category: SamplingCategory, excludeRuleIds?: Set<string>): SamplingRuleItem[];
21
+ export declare function buildSummaryForRule(category: SamplingRuleCategory, rule: NoisyOperationRule | HighlyRelevantOperationRule | CostReductionRule): SummaryPart[];
22
+ export declare function refreshViewRuleData(groups: SamplingRules[], current: ViewRuleData): ViewRuleData | null;
23
+ export declare function lookupViewRuleData(groups: SamplingRules[], item: SamplingRuleItem): ViewRuleData | null;
24
+ export interface DuplicateCheckInput {
25
+ sourceScopes?: SourcesScopeInput[] | null;
26
+ operation?: HeadSamplingOperationMatcher | TailSamplingOperationMatcher | null;
27
+ error?: boolean;
28
+ durationAtLeastMs?: number | null;
29
+ }
30
+ export declare function findDuplicateRuleId(groups: SamplingRules[], category: SamplingRuleCategory, input: DuplicateCheckInput, excludeRuleId?: string): string | null;
@@ -0,0 +1,6 @@
1
+ import { type FC } from 'react';
2
+ import type { SamplingRulesListProps } from './types';
3
+ export type { SamplingRuleItem, SamplingRuleCategory, SamplingRulesListProps, SummaryPart, SummaryPartVariant, HighlyRelevantBadgeType, ViewRuleData, TypeFilter } from './types';
4
+ export type { DuplicateCheckInput } from './helpers';
5
+ export { SamplingCategory, SAMPLING_SEGMENT_OPTIONS, SAMPLING_CATEGORY_NOTES, SAMPLING_CATEGORY_LIST_TITLES, CATEGORY_TO_RULE_CATEGORY, buildNoisySummary, buildHighlyRelevantSummary, buildCostReductionSummary, getHighlyRelevantTypeBadge, buildSummaryForRule, buildSamplingRuleItems, refreshViewRuleData, lookupViewRuleData, findDuplicateRuleId, } from './helpers';
6
+ export declare const SamplingRulesList: FC<SamplingRulesListProps>;
@@ -0,0 +1,12 @@
1
+ import { type FC } from 'react';
2
+ import type { SamplingRuleItem } from './types';
3
+ export interface RuleRowProps {
4
+ item: SamplingRuleItem;
5
+ isHovered: boolean;
6
+ onClick: (item: SamplingRuleItem) => void;
7
+ onEdit: (ruleId: string, samplingId: string) => void;
8
+ onDelete: (ruleId: string, samplingId: string) => void;
9
+ onMouseEnter: () => void;
10
+ onMouseLeave: () => void;
11
+ }
12
+ export declare const RuleRow: FC<RuleRowProps>;
@@ -0,0 +1,10 @@
1
+ import React, { type FC } from 'react';
2
+ import type { SummaryPart, SummaryPartVariant } from './types';
3
+ export declare const MONO_VARIANTS: SummaryPartVariant[];
4
+ export declare const SummarySpan: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
5
+ $variant: SummaryPartVariant;
6
+ $isMono: boolean;
7
+ }>> & string;
8
+ export declare const SummaryParts: FC<{
9
+ parts: SummaryPart[];
10
+ }>;
@@ -0,0 +1,13 @@
1
+ import { type FC } from 'react';
2
+ import type { TypeFilter } from './types';
3
+ export interface ListToolbarProps {
4
+ title: string;
5
+ titleTooltip?: string;
6
+ itemCount: number;
7
+ searchValue: string;
8
+ onSearchChange: (value: string) => void;
9
+ typeFilter: TypeFilter;
10
+ onTypeFilterChange: (value: TypeFilter) => void;
11
+ showTypeFilter: boolean;
12
+ }
13
+ export declare const ListToolbar: FC<ListToolbarProps>;
@@ -0,0 +1,47 @@
1
+ import type { NoisyOperationRule, HighlyRelevantOperationRule, CostReductionRule } from '@/types';
2
+ export type SamplingRuleCategory = 'noisy' | 'highlyRelevant' | 'costReduction';
3
+ export type SummaryPartVariant = 'default' | 'action' | 'endpoint' | 'scope' | 'duration';
4
+ export interface SummaryPart {
5
+ text: string;
6
+ variant: SummaryPartVariant;
7
+ }
8
+ export type HighlyRelevantBadgeType = 'Relevance' | 'Duration' | 'Error';
9
+ export interface SamplingRuleItem {
10
+ ruleId: string;
11
+ samplingId: string;
12
+ name: string | null;
13
+ disabled: boolean;
14
+ notes: string | null;
15
+ summary: SummaryPart[];
16
+ category: SamplingRuleCategory;
17
+ typeBadge?: HighlyRelevantBadgeType;
18
+ }
19
+ export type TypeFilter = 'all' | HighlyRelevantBadgeType;
20
+ export interface SamplingRulesListProps {
21
+ title: string;
22
+ titleTooltip?: string;
23
+ items: SamplingRuleItem[];
24
+ isLoading?: boolean;
25
+ showTypeFilter?: boolean;
26
+ onRuleClick: (item: SamplingRuleItem) => void;
27
+ onEditRule: (ruleId: string, samplingId: string) => void;
28
+ onDeleteRule: (ruleId: string, samplingId: string) => void;
29
+ }
30
+ interface BaseViewRule {
31
+ samplingId: string;
32
+ summary: SummaryPart[];
33
+ }
34
+ interface ViewNoisyRule extends BaseViewRule {
35
+ category: Extract<SamplingRuleCategory, 'noisy'>;
36
+ rule: NoisyOperationRule;
37
+ }
38
+ interface ViewHighlyRelevantRule extends BaseViewRule {
39
+ category: Extract<SamplingRuleCategory, 'highlyRelevant'>;
40
+ rule: HighlyRelevantOperationRule;
41
+ }
42
+ interface ViewCostReductionRule extends BaseViewRule {
43
+ category: Extract<SamplingRuleCategory, 'costReduction'>;
44
+ rule: CostReductionRule;
45
+ }
46
+ export type ViewRuleData = ViewNoisyRule | ViewHighlyRelevantRule | ViewCostReductionRule;
47
+ export {};