@odigos/ui-kit 0.0.33 → 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/eslint.config.mjs +17 -0
  3. package/lib/components/data-card/index.d.ts +2 -1
  4. package/lib/components/dropdown/index.d.ts +1 -0
  5. package/lib/components/input/index.d.ts +1 -1
  6. package/lib/components/input-table/index.d.ts +3 -11
  7. package/lib/components/input-table/map-columns-to-fields/index.d.ts +15 -0
  8. package/lib/components/input-table/types.d.ts +15 -0
  9. package/lib/components.js +9 -10
  10. package/lib/constants/strings/index.d.ts +6 -0
  11. package/lib/constants.js +1 -2
  12. package/lib/containers/action-form/custom-fields/add-cluster-info.d.ts +1 -1
  13. package/lib/containers/action-form/custom-fields/delete-attributes.d.ts +1 -1
  14. package/lib/containers/action-form/custom-fields/error-sampler.d.ts +1 -1
  15. package/lib/containers/action-form/custom-fields/k8s-attributes.d.ts +1 -1
  16. package/lib/containers/action-form/custom-fields/latency-sampler.d.ts +1 -1
  17. package/lib/containers/action-form/custom-fields/pii-masking.d.ts +1 -1
  18. package/lib/containers/action-form/custom-fields/probabilistic-sampler.d.ts +1 -1
  19. package/lib/containers/action-form/custom-fields/rename-attributes.d.ts +1 -1
  20. package/lib/containers/action-form/custom-fields/service-name-sampler.d.ts +5 -0
  21. package/lib/containers/action-form/custom-fields/span-attribute-sampler.d.ts +5 -0
  22. package/lib/containers/data-flow/helpers/build-action-nodes.d.ts +7 -1
  23. package/lib/containers/data-flow/helpers/build-destination-nodes.d.ts +7 -1
  24. package/lib/containers/data-flow/helpers/build-rule-nodes.d.ts +7 -1
  25. package/lib/containers/destination-modal/choose-destination/destinations-list/index.d.ts +1 -1
  26. package/lib/containers/destination-modal/choose-destination/index.d.ts +2 -2
  27. package/lib/containers/instrumentation-rule-drawer/build-card.d.ts +1 -1
  28. package/lib/containers.js +515 -201
  29. package/lib/functions/get-action-icon/index.d.ts +2 -2
  30. package/lib/functions/index.d.ts +1 -0
  31. package/lib/functions/numbers-only/index.d.ts +1 -0
  32. package/lib/functions.js +6 -7
  33. package/lib/hooks/index.d.ts +1 -0
  34. package/lib/hooks/useSessionStorage.d.ts +5 -0
  35. package/lib/hooks.js +4 -5
  36. package/lib/icons.js +7 -7
  37. package/lib/{index-1N9wymEq.js → index-9R2N835W.js} +1 -1
  38. package/lib/{index-f8FRaVkE.js → index-BDqd3uNm.js} +1 -1
  39. package/lib/{index-Do3CYz7N.js → index-BVj4fOL3.js} +1 -1
  40. package/lib/{index-CnZlllYu.js → index-BlZKWuxe.js} +7 -1
  41. package/lib/{index-B_Gl6Qa6.js → index-CCX1HLUr.js} +9 -3
  42. package/lib/{index-CNfdJ1X8.js → index-CEWs8CTN.js} +1 -1
  43. package/lib/{index-CVH8Q8Sl.js → index-CKOBXat_.js} +360 -237
  44. package/lib/{index-CaAOgaiC.js → index-CyG_tD3y.js} +2 -2
  45. package/lib/{index-BjVl4-os.js → index-DmCjUtBQ.js} +4 -5
  46. package/lib/{index-BQQZyvRz.js → index-DqaI44fJ.js} +1 -1
  47. package/lib/{index-BedCNcwV.js → index-THrvNIPj.js} +112 -64
  48. package/lib/{index-Iq7U_fzb.js → index-dLZvpGw3.js} +5 -12
  49. package/lib/mock-data/sources/index.d.ts +2 -0
  50. package/lib/snippets.js +8 -9
  51. package/lib/store.js +1 -1
  52. package/lib/theme.js +1 -1
  53. package/lib/types/actions/index.d.ts +137 -41
  54. package/lib/types/common/index.d.ts +10 -16
  55. package/lib/types.js +85 -20
  56. package/lib/{useSourceSelectionFormData-DiwzViqL.js → useSourceSelectionFormData-DqSNROtZ.js} +73 -37
  57. package/lib/{useTransition-B0eagOib.js → useTransition-D9f1CP9n.js} +1 -1
  58. package/package.json +20 -23
  59. package/lib/index-mOgS3e5E.js +0 -101
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.35](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.34...ui-kit-v0.0.35) (2025-06-04)
4
+
5
+
6
+ ### Features
7
+
8
+ * apply filtered signals to destination form ([#153](https://github.com/odigos-io/ui-kit/issues/153)) ([ca5b940](https://github.com/odigos-io/ui-kit/commit/ca5b940bdf5b8fd0445c54fc26e9c8a0f8858fb2))
9
+ * enhance source drawer ([#152](https://github.com/odigos-io/ui-kit/issues/152)) ([92b0805](https://github.com/odigos-io/ui-kit/commit/92b080585d1f28728fa650bc931837623dea4fcd))
10
+ * make all entity columns scrollable ([#154](https://github.com/odigos-io/ui-kit/issues/154)) ([79d486c](https://github.com/odigos-io/ui-kit/commit/79d486ca16d56dab6e4f3b135f63d0f100828998))
11
+ * save overview filters to session storage ([#146](https://github.com/odigos-io/ui-kit/issues/146)) ([1b6d16d](https://github.com/odigos-io/ui-kit/commit/1b6d16d37a75106ef18dbe3d7b700d34b855ad9f))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * wrap condition icons to prevent shrinking ([#144](https://github.com/odigos-io/ui-kit/issues/144)) ([3a96120](https://github.com/odigos-io/ui-kit/commit/3a96120368152597a1eb54b00a0afe09da70d8c8))
17
+
18
+ ## [0.0.34](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.33...ui-kit-v0.0.34) (2025-05-28)
19
+
20
+
21
+ ### Features
22
+
23
+ * add actions - ServiceNameSampler & SpanAttributeSampler ([#139](https://github.com/odigos-io/ui-kit/issues/139)) ([3dea0d2](https://github.com/odigos-io/ui-kit/commit/3dea0d2bba6cda3a8f870b52ee506e934bca35a6))
24
+
3
25
  ## [0.0.33](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.32...ui-kit-v0.0.33) (2025-05-27)
4
26
 
5
27
 
@@ -0,0 +1,17 @@
1
+ import { dirname } from 'path';
2
+ import { fileURLToPath } from 'url';
3
+ import { FlatCompat } from '@eslint/eslintrc';
4
+
5
+ const __filename = fileURLToPath(import.meta.url);
6
+ const __dirname = dirname(__filename);
7
+
8
+ const compat = new FlatCompat({
9
+ baseDirectory: __dirname,
10
+ });
11
+
12
+ const extensions = compat.extends('next/core-web-vitals', 'next/typescript');
13
+ const config = compat.config({});
14
+
15
+ const eslintConfig = [...extensions, ...config];
16
+
17
+ export default eslintConfig;
@@ -1,8 +1,9 @@
1
1
  import { type ReactNode, type FC, type PropsWithChildren } from 'react';
2
+ import { OtherStatus } from '@/types';
2
3
  import { DataCardFields, type DataCardFieldsProps, DataCardFieldTypes } from './data-card-fields';
3
4
  interface DataCardProps extends PropsWithChildren {
4
5
  title?: string;
5
- titleBadge?: string | number;
6
+ titleBadge?: string | number | OtherStatus.Loading;
6
7
  description?: string;
7
8
  action?: ReactNode | (() => ReactNode);
8
9
  withExtend?: boolean;
@@ -16,6 +16,7 @@ interface DropdownProps {
16
16
  required?: boolean;
17
17
  showSearch?: boolean;
18
18
  errorMessage?: string;
19
+ hasError?: boolean;
19
20
  }
20
21
  declare const Dropdown: FC<DropdownProps>;
21
22
  export { Dropdown, type DropdownProps, type DropdownOption };
@@ -1,5 +1,5 @@
1
1
  import { type FC, type InputHTMLAttributes } from 'react';
2
- import type { SVG } from '@/types';
2
+ import { type SVG } from '@/types';
3
3
  interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
4
4
  title?: string;
5
5
  icon?: SVG;
@@ -1,20 +1,12 @@
1
1
  import { type FC } from 'react';
2
- type Row = {
3
- [key: string]: any;
4
- };
2
+ import type { Column, Row } from './types';
5
3
  interface InputTableProps {
6
- columns: {
7
- title: string;
8
- keyName: string;
9
- type?: 'number';
10
- placeholder?: string;
11
- tooltip?: string;
12
- required?: boolean;
13
- }[];
4
+ columns: Column[];
14
5
  initialValues?: Row[];
15
6
  value?: Row[];
16
7
  onChange?: (values: Row[]) => void;
17
8
  errorMessage?: string;
9
+ limitFieldsPerRow?: number;
18
10
  }
19
11
  declare const InputTable: FC<InputTableProps>;
20
12
  export { InputTable, type InputTableProps };
@@ -0,0 +1,15 @@
1
+ import { CSSProperties, type FC } from 'react';
2
+ import type { Column, Row } from '../types';
3
+ interface ColumnsToFieldsProps {
4
+ col: Column;
5
+ colIdx: number;
6
+ row: Row;
7
+ rowIdx: number;
8
+ rowsLength: number;
9
+ maxWidth: CSSProperties['maxWidth'];
10
+ handleChange: (key: string, val: string | number, idx: number) => void;
11
+ errorMessage?: string;
12
+ limitFieldsPerRow?: number;
13
+ }
14
+ declare const ColumnsToFields: FC<ColumnsToFieldsProps>;
15
+ export { ColumnsToFields, type ColumnsToFieldsProps };
@@ -0,0 +1,15 @@
1
+ import type { DropdownOption } from '../dropdown';
2
+ export interface Row {
3
+ [key: string]: any;
4
+ }
5
+ export interface Column {
6
+ keyName: string;
7
+ title: string;
8
+ tooltip?: string;
9
+ placeholder?: string;
10
+ required?: boolean;
11
+ type?: 'number';
12
+ componentType?: 'dropdown';
13
+ options?: DropdownOption[];
14
+ renderCondition?: (row: Row) => boolean;
15
+ }
package/lib/components.js CHANGED
@@ -1,16 +1,15 @@
1
- import { B as Button } from './index-BedCNcwV.js';
2
- export { a as AutocompleteInput, b as Badge, a1 as CenterThis, C as Checkbox, c as Code, d as ConditionDetails, D as DataCard, f as DataCardFieldTypes, e as DataCardFields, g as DataTab, h as Divider, i as DocsButton, j as Drawer, l as DrawerFooter, k as DrawerHeader, m as Dropdown, E as ExtendArrow, F as FadeLoader, n as FieldError, o as FieldLabel, a0 as FlexColumn, $ as FlexRow, H as Header, I as IconButton, p as IconGroup, q as IconTitleBadge, r as IconWrapped, s as IconsNav, t as ImageControlled, u as Input, v as InputList, w as InputTable, x as InteractiveTable, K as KeyValueInputsList, M as Modal, a4 as ModalBody, y as MonitorsCheckboxes, z as MonitorsIcons, N as NavigationButtons, G as NoDataFound, J as NotificationNote, a3 as Overlay, S as ScrollX, L as SectionTitle, O as Segment, P as SelectionButton, Q as SkeletonLoader, R as Status, U as Stepper, a5 as TableContainer, a6 as TableTitleWrap, a7 as TableWrap, V as Text, W as TextArea, X as Toggle, T as ToggleCodeComponent, Y as Tooltip, Z as TraceLoader, a2 as VerticalScroll, _ as WarningModal } from './index-BedCNcwV.js';
3
- export { C as CancelWarning, D as DeleteWarning } from './index-CaAOgaiC.js';
1
+ import { B as Button } from './index-THrvNIPj.js';
2
+ export { a as AutocompleteInput, b as Badge, a1 as CenterThis, C as Checkbox, c as Code, d as ConditionDetails, D as DataCard, f as DataCardFieldTypes, e as DataCardFields, g as DataTab, h as Divider, i as DocsButton, j as Drawer, l as DrawerFooter, k as DrawerHeader, m as Dropdown, E as ExtendArrow, F as FadeLoader, n as FieldError, o as FieldLabel, a0 as FlexColumn, $ as FlexRow, H as Header, I as IconButton, p as IconGroup, q as IconTitleBadge, r as IconWrapped, s as IconsNav, t as ImageControlled, u as Input, v as InputList, w as InputTable, x as InteractiveTable, K as KeyValueInputsList, M as Modal, a4 as ModalBody, y as MonitorsCheckboxes, z as MonitorsIcons, N as NavigationButtons, G as NoDataFound, J as NotificationNote, a3 as Overlay, S as ScrollX, L as SectionTitle, O as Segment, P as SelectionButton, Q as SkeletonLoader, R as Status, U as Stepper, a5 as TableContainer, a6 as TableTitleWrap, a7 as TableWrap, V as Text, W as TextArea, X as Toggle, T as ToggleCodeComponent, Y as Tooltip, Z as TraceLoader, a2 as VerticalScroll, _ as WarningModal } from './index-THrvNIPj.js';
3
+ export { C as CancelWarning, D as DeleteWarning } from './index-CyG_tD3y.js';
4
4
  import React, { Component, createElement, createContext } from 'react';
5
- import { T as Theme } from './index-CVH8Q8Sl.js';
6
- import 'styled-components';
7
- import './index-CNfdJ1X8.js';
5
+ import { T as Theme } from './index-CKOBXat_.js';
8
6
  import './types.js';
7
+ import './index-CEWs8CTN.js';
8
+ import './index-CCX1HLUr.js';
9
+ import 'styled-components';
10
+ import './index-BVj4fOL3.js';
9
11
  import './index-BV85P9UP.js';
10
- import './index-mOgS3e5E.js';
11
- import './index-B_Gl6Qa6.js';
12
- import './index-Do3CYz7N.js';
13
- import './useTransition-B0eagOib.js';
12
+ import './useTransition-D9f1CP9n.js';
14
13
  import 'react-dom';
15
14
 
16
15
  const ErrorBoundaryContext = createContext(null);
@@ -1,4 +1,10 @@
1
1
  export declare const DEFAULT_DATA_STREAM_NAME = "default";
2
+ export declare const STORAGE_KEYS: {
3
+ SELECTED_DATA_STREAM: string;
4
+ SELECTED_DATA_STREAM_WITH_PROXY: (proxyId: string) => string;
5
+ OVERVIEW_FILTERS: string;
6
+ DARK_MODE: string;
7
+ };
2
8
  export declare const FORM_ALERTS: {
3
9
  REQUIRED_FIELDS: string;
4
10
  FIELD_IS_REQUIRED: string;
package/lib/constants.js CHANGED
@@ -1,6 +1,5 @@
1
- export { A as ACTION_OPTIONS, I as INSTRUMENTATION_RULE_OPTIONS, M as MONITORS_OPTIONS } from './index-CVH8Q8Sl.js';
1
+ export { A as ACTION_OPTIONS, B as BUTTON_TEXTS, D as DEFAULT_DATA_STREAM_NAME, k as DISPLAY_TITLES, F as FORM_ALERTS, I as INSTRUMENTATION_RULE_OPTIONS, M as MONITORS_OPTIONS, S as STORAGE_KEYS } from './index-CKOBXat_.js';
2
2
  export { D as DESTINATION_CATEGORIES } from './index-Dqief9td.js';
3
- export { B as BUTTON_TEXTS, D as DEFAULT_DATA_STREAM_NAME, a as DISPLAY_TITLES, F as FORM_ALERTS } from './index-mOgS3e5E.js';
4
3
  import 'react';
5
4
  import './types.js';
6
5
  import 'styled-components';
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
- import type { ActionFormData, CustomFieldProps } from '@/types';
2
+ import { type ActionFormData, type CustomFieldProps } from '@/types';
3
3
  type AddClusterInfoProps = CustomFieldProps<ActionFormData>;
4
4
  declare const AddClusterInfo: FC<AddClusterInfoProps>;
5
5
  export { AddClusterInfo, type AddClusterInfoProps };
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
- import type { ActionFormData, CustomFieldProps } from '@/types';
2
+ import { type ActionFormData, type CustomFieldProps } from '@/types';
3
3
  type DeleteAttributesProps = CustomFieldProps<ActionFormData>;
4
4
  declare const DeleteAttributes: FC<DeleteAttributesProps>;
5
5
  export { DeleteAttributes, type DeleteAttributesProps };
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
- import type { ActionFormData, CustomFieldProps } from '@/types';
2
+ import { type ActionFormData, type CustomFieldProps } from '@/types';
3
3
  type ErrorSamplerProps = CustomFieldProps<ActionFormData>;
4
4
  declare const ErrorSampler: FC<ErrorSamplerProps>;
5
5
  export { ErrorSampler, type ErrorSamplerProps };
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
- import type { ActionFormData, CustomFieldProps } from '@/types';
2
+ import { type ActionFormData, type CustomFieldProps } from '@/types';
3
3
  type K8sAttributesProps = CustomFieldProps<ActionFormData>;
4
4
  declare const K8sAttributes: FC<K8sAttributesProps>;
5
5
  export { K8sAttributes, type K8sAttributesProps };
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
- import type { ActionFormData, CustomFieldProps } from '@/types';
2
+ import { type ActionFormData, type CustomFieldProps } from '@/types';
3
3
  type LatencySamplerProps = CustomFieldProps<ActionFormData>;
4
4
  declare const LatencySampler: FC<LatencySamplerProps>;
5
5
  export { LatencySampler, type LatencySamplerProps };
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
- import type { ActionFormData, CustomFieldProps } from '@/types';
2
+ import { type ActionFormData, type CustomFieldProps } from '@/types';
3
3
  type PiiMaskingProps = CustomFieldProps<ActionFormData>;
4
4
  declare const PiiMasking: FC<PiiMaskingProps>;
5
5
  export { PiiMasking, type PiiMaskingProps };
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
- import type { ActionFormData, CustomFieldProps } from '@/types';
2
+ import { type ActionFormData, type CustomFieldProps } from '@/types';
3
3
  type ProbabilisticSamplerProps = CustomFieldProps<ActionFormData>;
4
4
  declare const ProbabilisticSampler: FC<ProbabilisticSamplerProps>;
5
5
  export { ProbabilisticSampler, type ProbabilisticSamplerProps };
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
- import type { ActionFormData, CustomFieldProps } from '@/types';
2
+ import { type ActionFormData, type CustomFieldProps } from '@/types';
3
3
  type RenameAttributesProps = CustomFieldProps<ActionFormData>;
4
4
  declare const RenameAttributes: FC<RenameAttributesProps>;
5
5
  export { RenameAttributes, type RenameAttributesProps };
@@ -0,0 +1,5 @@
1
+ import { type FC } from 'react';
2
+ import { type ActionFormData, type CustomFieldProps } from '@/types';
3
+ type ServiceNameSamplerProps = CustomFieldProps<ActionFormData>;
4
+ declare const ServiceNameSampler: FC<ServiceNameSamplerProps>;
5
+ export { ServiceNameSampler, type ServiceNameSamplerProps };
@@ -0,0 +1,5 @@
1
+ import { type FC } from 'react';
2
+ import { type ActionFormData, type CustomFieldProps } from '@/types';
3
+ type SpanAttributeSamplerProps = CustomFieldProps<ActionFormData>;
4
+ declare const SpanAttributeSampler: FC<SpanAttributeSamplerProps>;
5
+ export { SpanAttributeSampler, type SpanAttributeSamplerProps };
@@ -6,6 +6,12 @@ interface Params {
6
6
  entities: Action[];
7
7
  positions: NodePositions;
8
8
  unfilteredCount: number;
9
+ containerHeight: number;
10
+ onScroll: (params: {
11
+ clientHeight: number;
12
+ scrollHeight: number;
13
+ scrollTop: number;
14
+ }) => void;
9
15
  }
10
- export declare const buildActionNodes: ({ loading, entities, positions, unfilteredCount }: Params) => Node[];
16
+ export declare const buildActionNodes: ({ loading, entities, positions, unfilteredCount, containerHeight, onScroll }: Params) => Node[];
11
17
  export {};
@@ -6,6 +6,12 @@ interface Params {
6
6
  entities: Destination[];
7
7
  positions: NodePositions;
8
8
  unfilteredCount: number;
9
+ containerHeight: number;
10
+ onScroll: (params: {
11
+ clientHeight: number;
12
+ scrollHeight: number;
13
+ scrollTop: number;
14
+ }) => void;
9
15
  }
10
- export declare const buildDestinationNodes: ({ loading, entities, positions, unfilteredCount }: Params) => Node[];
16
+ export declare const buildDestinationNodes: ({ loading, entities, positions, unfilteredCount, containerHeight, onScroll }: Params) => Node[];
11
17
  export {};
@@ -6,6 +6,12 @@ interface Params {
6
6
  entities: InstrumentationRule[];
7
7
  positions: NodePositions;
8
8
  unfilteredCount: number;
9
+ containerHeight: number;
10
+ onScroll: (params: {
11
+ clientHeight: number;
12
+ scrollHeight: number;
13
+ scrollTop: number;
14
+ }) => void;
9
15
  }
10
- export declare const buildRuleNodes: ({ loading, entities, positions, unfilteredCount }: Params) => Node[];
16
+ export declare const buildRuleNodes: ({ loading, entities, positions, unfilteredCount, containerHeight, onScroll }: Params) => Node[];
11
17
  export {};
@@ -2,7 +2,7 @@ import { type FC } from 'react';
2
2
  import { type DestinationCategories, type DestinationOption } from '@/types';
3
3
  interface DestinationsListProps {
4
4
  items: DestinationCategories;
5
- onSelectOption: (item: DestinationOption) => void;
5
+ onSelectNew: (item: DestinationOption) => void;
6
6
  onSelectConfigured: (id: string) => void;
7
7
  }
8
8
  declare const DestinationsList: FC<DestinationsListProps>;
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- import { type DestinationCategories, type DestinationOption } from '@/types';
2
+ import { type DestinationCategories, type DestinationOption, SignalType } from '@/types';
3
3
  interface Props {
4
4
  hidden?: boolean;
5
5
  categories: DestinationCategories;
6
6
  potentialDestinations: DestinationOption[];
7
- onSelectOption: (item: DestinationOption) => void;
7
+ onSelectNew: (item: DestinationOption, selectedMonitors: SignalType[]) => void;
8
8
  onSelectConfigured: (id: string) => void;
9
9
  }
10
10
  export declare const ChooseDestinationBody: React.FC<Props>;
@@ -1,3 +1,3 @@
1
- import type { InstrumentationRule } from '@/types';
1
+ import { type InstrumentationRule } from '@/types';
2
2
  declare const buildCard: (rule: InstrumentationRule) => import("../../components/data-card/data-card-fields").DataCardField[];
3
3
  export { buildCard };