@odigos/ui-kit 0.0.49 → 0.0.50
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.
- package/CHANGELOG.md +12 -0
- package/lib/components/data-card/data-card-fields/index.d.ts +1 -5
- package/lib/components/data-card/data-card.stories.d.ts +4 -4
- package/lib/components/data-finger/data-finger.stories.d.ts +9 -0
- package/lib/components/data-finger/index.d.ts +12 -0
- package/lib/components/icon-button/index.d.ts +2 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/components/popup/index.d.ts +17 -0
- package/lib/components/popup/popup.stories.d.ts +9 -0
- package/lib/components/popup-form/index.d.ts +18 -0
- package/lib/components/popup-form/popup-form.stories.d.ts +10 -0
- package/lib/components/tag/index.d.ts +8 -0
- package/lib/components/tag/tag.stories.d.ts +13 -0
- package/lib/components.js +8 -8
- package/lib/constants.js +1 -1
- package/lib/containers/service-map/helpers/generate-dag-positions.d.ts +5 -0
- package/lib/containers/service-map/helpers/generate-spiral-grid-position.d.ts +2 -0
- package/lib/containers/service-map/index.d.ts +2 -2
- package/lib/containers/system-overview/describe/index.d.ts +1 -1
- package/lib/containers.js +262 -368
- package/lib/functions/has-unhealthy-instances/index.d.ts +2 -0
- package/lib/functions/index.d.ts +1 -0
- package/lib/functions.js +5 -5
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/usePopup.d.ts +17 -0
- package/lib/hooks.js +3 -3
- package/lib/icons/common/avatar-icon/avatar-icon.stories.d.ts +8 -0
- package/lib/icons/common/avatar-icon/index.d.ts +2 -0
- package/lib/icons/common/index.d.ts +2 -0
- package/lib/icons/common/user-group-icon/index.d.ts +2 -0
- package/lib/icons/common/user-group-icon/user-group-icon.stories.d.ts +8 -0
- package/lib/icons/math/index.d.ts +2 -0
- package/lib/icons/math/minus-circled-icon/index.d.ts +2 -0
- package/lib/icons/math/minus-circled-icon/minus-circled-icon.stories.d.ts +8 -0
- package/lib/icons/math/plus-circled-icon/index.d.ts +2 -0
- package/lib/icons/math/plus-circled-icon/plus-circled-icon.stories.d.ts +8 -0
- package/lib/icons.js +35 -7
- package/lib/{index-Bw7RE2T2.js → index-BC03UmY5.js} +8 -1
- package/lib/{index-ZTzxu5fz.js → index-CMsBAVAn.js} +2 -2
- package/lib/{index-w9lkC6fb.js → index-CPMIZB66.js} +12 -4
- package/lib/{index-C1V7D2ey.js → index-CgdNGqvh.js} +2270 -2205
- package/lib/{index-CkTdd3MS.js → index-CyHOJpMl.js} +1 -1
- package/lib/{index-DsEoqSQn.js → index-Dbs7YARA.js} +2 -2
- package/lib/{index-DOU0EdZP.js → index-DnhO-nLH.js} +2 -2
- package/lib/{index-DxR7e2Cq.js → index-H8TwBQHm.js} +1 -1
- package/lib/{index-CeDmxXUE.js → index-LgzkJ05H.js} +2 -2
- package/lib/{index-CeBxw8J4.js → index-r72g3gV5.js} +4 -4
- package/lib/snippets/copy-text/index.d.ts +6 -0
- package/lib/snippets/index.d.ts +5 -2
- package/lib/snippets/pod-container/index.d.ts +5 -0
- package/lib/snippets/source-container/index.d.ts +7 -0
- package/lib/snippets.js +7 -7
- package/lib/store/index.d.ts +1 -0
- package/lib/store/useActiveNodeStore.d.ts +11 -0
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/describe/index.d.ts +2 -2
- package/lib/types/sources/index.d.ts +10 -9
- package/lib/{useSourceSelectionFormData-C5VMfWEf.js → useSourceSelectionFormData-CwggurLH.js} +2 -2
- package/lib/{useTransition-mupXsbop.js → useTransition-DmHfJSEP.js} +38 -6
- package/package.json +1 -1
- package/lib/containers/data-flow-actions-menu/search/recent-searches/index.d.ts +0 -2
- /package/lib/{components/data-card/data-card-fields → snippets/source-container}/override-runtime.d.ts +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StatusType, OtherStatus, SignalType } from './types.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
import './index-
|
|
3
|
+
import './index-BC03UmY5.js';
|
|
4
4
|
import 'styled-components';
|
|
5
|
-
import { T as TracesIcon, M as MetricsIcon, L as LogsIcon, O as OdigosLogo, I as InfoIcon, W as WarningTriangleIcon, E as ErrorTriangleIcon, C as CheckCircledIcon } from './index-
|
|
5
|
+
import { T as TracesIcon, M as MetricsIcon, L as LogsIcon, O as OdigosLogo, I as InfoIcon, W as WarningTriangleIcon, E as ErrorTriangleIcon, C as CheckCircledIcon } from './index-H8TwBQHm.js';
|
|
6
6
|
|
|
7
7
|
const capitalizeFirstLetter = (string) => {
|
|
8
8
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ai as WarningModal } from './index-CgdNGqvh.js';
|
|
3
3
|
import { StatusType, EntityTypes } from './types.js';
|
|
4
|
-
import './index-
|
|
4
|
+
import './index-BC03UmY5.js';
|
|
5
5
|
import 'styled-components';
|
|
6
6
|
|
|
7
7
|
const CancelWarning = ({ isOpen, noOverlay, name, onApprove, onDeny }) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { T as Theme } from './index-
|
|
2
|
+
import { T as Theme } from './index-BC03UmY5.js';
|
|
3
3
|
|
|
4
4
|
const OdigosLogoText = ({ size = 16, fill: f, rotate = 0, onClick }) => {
|
|
5
5
|
const theme = Theme.useTheme();
|
|
@@ -61,7 +61,7 @@ const UserIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
|
|
|
61
61
|
const fill = f || theme.text.secondary;
|
|
62
62
|
return (React.createElement("svg", { width: size, height: size, viewBox: '0 0 24 24', xmlns: 'http://www.w3.org/2000/svg', fill: 'none', style: { transform: `rotate(${rotate}deg)` }, onClick: onClick },
|
|
63
63
|
React.createElement("path", { stroke: fill, strokeWidth: '1', strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M16 7C16 9.20914 14.2091 11 12 11C9.79086 11 8 9.20914 8 7C8 4.79086 9.79086 3 12 3C14.2091 3 16 4.79086 16 7Z' }),
|
|
64
|
-
React.createElement("path", { stroke: fill, strokeWidth: '1', strokeLinecap: 'round', strokeLinejoin: 'round', d: '
|
|
64
|
+
React.createElement("path", { stroke: fill, strokeWidth: '1', strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M7.27466 21H16.7253C18.5339 21 20 19.5339 20 17.7253C20 15.4389 17.7163 13.8564 15.5755 14.6592L13.6502 15.3812C12.5862 15.7802 11.4138 15.7802 10.3498 15.3812L8.42447 14.6592C6.28366 13.8564 4 15.4389 4 17.7253C4 19.5339 5.46612 21 7.27466 21Z' })));
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
const OverviewIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { T as Theme, B as BUTTON_TEXTS,
|
|
3
|
-
import { E as EditIcon } from './index-
|
|
4
|
-
import {
|
|
2
|
+
import { T as Theme, B as BUTTON_TEXTS, m as DISPLAY_TITLES } from './index-BC03UmY5.js';
|
|
3
|
+
import { E as EditIcon } from './index-CyHOJpMl.js';
|
|
4
|
+
import { e as Button, ad as Text, a2 as NotificationNote } from './index-CgdNGqvh.js';
|
|
5
5
|
import { StatusType } from './types.js';
|
|
6
6
|
import 'styled-components';
|
|
7
|
-
import { I as InfoIcon } from './index-
|
|
7
|
+
import { I as InfoIcon } from './index-H8TwBQHm.js';
|
|
8
8
|
|
|
9
9
|
const EditButton = ({ label, onClick, variant = 'tertiary', ...props }) => {
|
|
10
10
|
const theme = Theme.useTheme();
|
package/lib/snippets/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export * from './add-button
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './add-button';
|
|
2
|
+
export * from './copy-text';
|
|
3
|
+
export * from './edit-button';
|
|
3
4
|
export * from './note-back-to-summary/index';
|
|
5
|
+
export * from './pod-container';
|
|
4
6
|
export * from './react-flow';
|
|
7
|
+
export * from './source-container';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { SourceContainer as SourceContainerType, SourceFormData } from '@/types';
|
|
3
|
+
interface SourceContainerProps extends SourceContainerType {
|
|
4
|
+
callbackRuntimeOverride?: (payload: Pick<SourceFormData, 'containerName' | 'language' | 'version'>) => Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
export declare const SourceContainer: FC<SourceContainerProps>;
|
|
7
|
+
export {};
|
package/lib/snippets.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { A as AddButton, a as AddNode, B as BaseNode, E as EdgedNode, F as Flow, b as FrameNode, H as HeaderNode, L as LabeledEdge, M as MapItemNode, N as NoDataNode, S as ScrollNode, c as SkeletonNode, n as nodeConfig } from './index-
|
|
2
|
-
export { E as EditButton, N as NoteBackToSummary } from './index-
|
|
1
|
+
export { A as AddButton, a as AddNode, B as BaseNode, C as CopyText, E as EdgedNode, F as Flow, b as FrameNode, H as HeaderNode, L as LabeledEdge, M as MapItemNode, N as NoDataNode, P as PodContainer, S as ScrollNode, c as SkeletonNode, d as SourceContainer, n as nodeConfig } from './index-CgdNGqvh.js';
|
|
2
|
+
export { E as EditButton, N as NoteBackToSummary } from './index-r72g3gV5.js';
|
|
3
3
|
import 'react';
|
|
4
|
-
import './index-
|
|
4
|
+
import './index-BC03UmY5.js';
|
|
5
5
|
import './types.js';
|
|
6
6
|
import 'styled-components';
|
|
7
|
-
import './index-
|
|
8
|
-
import './index-
|
|
9
|
-
import './index-
|
|
7
|
+
import './index-CyHOJpMl.js';
|
|
8
|
+
import './index-Dbs7YARA.js';
|
|
9
|
+
import './index-H8TwBQHm.js';
|
|
10
10
|
import './index-BnvrwbRB.js';
|
|
11
|
-
import './useTransition-mupXsbop.js';
|
|
12
11
|
import 'react-dom';
|
|
12
|
+
import './useTransition-DmHfJSEP.js';
|
package/lib/store/index.d.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NodeTypes } from '@/types';
|
|
2
|
+
export interface ActiveNodeStoreState {
|
|
3
|
+
activeNodeType: NodeTypes | null;
|
|
4
|
+
activeNodeId: string | null;
|
|
5
|
+
}
|
|
6
|
+
interface ActiveNodeStoreStateSetters {
|
|
7
|
+
setActiveNodeType: (value: ActiveNodeStoreState['activeNodeType']) => void;
|
|
8
|
+
setActiveNodeId: (value: ActiveNodeStoreState['activeNodeId']) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const useActiveNodeStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ActiveNodeStoreState & ActiveNodeStoreStateSetters>>;
|
|
11
|
+
export {};
|
package/lib/store.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { u as
|
|
1
|
+
export { u as useActiveNodeStore, a as useDarkMode, b as useDataStreamStore, c as useDrawerStore, d as useEntityStore, e as useFilterStore, f as useInstrumentStore, g as useModalStore, h as useNotificationStore, i as usePendingStore, j as useSelectedStore, k as useSetupStore } from './index-BC03UmY5.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import './types.js';
|
|
4
4
|
import 'styled-components';
|
package/lib/theme.js
CHANGED
|
@@ -68,12 +68,12 @@ interface OtelAgentsAnalyze {
|
|
|
68
68
|
createTime?: EntityProperty | null;
|
|
69
69
|
containers: ContainerAgentConfigAnalyze[];
|
|
70
70
|
}
|
|
71
|
-
interface InstrumentationInstanceAnalyze {
|
|
71
|
+
export interface InstrumentationInstanceAnalyze {
|
|
72
72
|
healthy: EntityProperty;
|
|
73
73
|
message?: EntityProperty | null;
|
|
74
74
|
identifyingAttributes?: EntityProperty[];
|
|
75
75
|
}
|
|
76
|
-
interface PodContainerAnalyze {
|
|
76
|
+
export interface PodContainerAnalyze {
|
|
77
77
|
containerName: EntityProperty;
|
|
78
78
|
actualDevices: EntityProperty;
|
|
79
79
|
started?: EntityProperty | null;
|
|
@@ -11,20 +11,21 @@ export interface WorkloadId {
|
|
|
11
11
|
name: string;
|
|
12
12
|
kind: K8sResourceKind | '';
|
|
13
13
|
}
|
|
14
|
+
export interface SourceContainer {
|
|
15
|
+
containerName: string;
|
|
16
|
+
language: ProgrammingLanguages;
|
|
17
|
+
runtimeVersion: string;
|
|
18
|
+
overriden?: boolean;
|
|
19
|
+
instrumented: boolean;
|
|
20
|
+
instrumentationMessage: string;
|
|
21
|
+
otelDistroName: string | null;
|
|
22
|
+
}
|
|
14
23
|
export interface Source extends WorkloadId {
|
|
15
24
|
selected: boolean;
|
|
16
25
|
otelServiceName: string;
|
|
17
26
|
numberOfInstances?: number;
|
|
18
27
|
dataStreamNames: string[];
|
|
19
|
-
containers:
|
|
20
|
-
containerName: string;
|
|
21
|
-
language: ProgrammingLanguages;
|
|
22
|
-
runtimeVersion: string;
|
|
23
|
-
overriden?: boolean;
|
|
24
|
-
instrumented: boolean;
|
|
25
|
-
instrumentationMessage: string;
|
|
26
|
-
otelDistroName: string | null;
|
|
27
|
-
}[] | null;
|
|
28
|
+
containers: SourceContainer[] | null;
|
|
28
29
|
conditions: Condition[] | null;
|
|
29
30
|
}
|
|
30
31
|
export interface SourceFormData {
|
package/lib/{useSourceSelectionFormData-C5VMfWEf.js → useSourceSelectionFormData-CwggurLH.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ActionKeyTypes, ActionType, StatusType, EntityTypes, FieldTypes } from './types.js';
|
|
2
|
-
import {
|
|
2
|
+
import { h as useNotificationStore, F as FORM_ALERTS, c as useDrawerStore, d as useEntityStore, b as useDataStreamStore, k as useSetupStore } from './index-BC03UmY5.js';
|
|
3
3
|
import { useState, useEffect, useMemo } from 'react';
|
|
4
4
|
import 'styled-components';
|
|
5
5
|
import { i as isEmpty, s as safeJsonParse } from './index-BnvrwbRB.js';
|
|
6
|
-
import { c as useGenericForm } from './useTransition-
|
|
6
|
+
import { c as useGenericForm } from './useTransition-DmHfJSEP.js';
|
|
7
7
|
import { g as getIdFromSseTarget, i as isLegalK8sLabel, m as mapExportedSignals } from './index-BlZKWuxe.js';
|
|
8
8
|
|
|
9
9
|
const INITIAL$2 = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as useModalStore, c as useDrawerStore, u as useActiveNodeStore } from './index-BC03UmY5.js';
|
|
2
2
|
import { AddNodeTypes, EntityTypes, CustomInstrumentationsKeyTypes, CodeAttributesKeyTypes, PayloadCollectionKeyTypes } from './types.js';
|
|
3
3
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
4
4
|
import styled from 'styled-components';
|
|
@@ -64,15 +64,18 @@ const useGenericForm = (initialFormData) => {
|
|
|
64
64
|
const useClickNode = () => {
|
|
65
65
|
const { setCurrentModal } = useModalStore();
|
|
66
66
|
const { setDrawerType, setDrawerEntityId } = useDrawerStore();
|
|
67
|
+
const { setActiveNodeType, setActiveNodeId } = useActiveNodeStore();
|
|
67
68
|
const onClickNode = (_, object) => {
|
|
68
|
-
const { data: { id, type }, } = object;
|
|
69
|
-
|
|
69
|
+
const { id: nodeId, type: nodeType, data: { id: entityId, type: entityType }, } = object;
|
|
70
|
+
setActiveNodeType(nodeType);
|
|
71
|
+
setActiveNodeId(nodeId);
|
|
72
|
+
switch (entityType) {
|
|
70
73
|
case EntityTypes.Source:
|
|
71
74
|
case EntityTypes.Destination:
|
|
72
75
|
case EntityTypes.Action:
|
|
73
76
|
case EntityTypes.InstrumentationRule:
|
|
74
|
-
setDrawerType(
|
|
75
|
-
setDrawerEntityId(
|
|
77
|
+
setDrawerType(entityType);
|
|
78
|
+
setDrawerEntityId(entityId);
|
|
76
79
|
break;
|
|
77
80
|
case AddNodeTypes.AddSource:
|
|
78
81
|
setCurrentModal(EntityTypes.Source);
|
|
@@ -273,6 +276,35 @@ const useOnClickOutside = (ref, handler) => {
|
|
|
273
276
|
}, [ref, handler]);
|
|
274
277
|
};
|
|
275
278
|
|
|
279
|
+
const usePopup = ({ defaultClientHeight = 0, defaultClientwidth = 0, onClickOutside } = {}) => {
|
|
280
|
+
const popupRef = useRef(null);
|
|
281
|
+
const [popupOpen, setPopupOpen] = useState(false);
|
|
282
|
+
const [popupPosition, setPopupPosition] = useState({ top: 0, left: 0 });
|
|
283
|
+
useOnClickOutside(popupRef, () => {
|
|
284
|
+
if (popupOpen) {
|
|
285
|
+
setPopupOpen(false);
|
|
286
|
+
onClickOutside?.();
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
const handlePosition = (clientX, clientY) => {
|
|
290
|
+
const { innerWidth, innerHeight } = window;
|
|
291
|
+
let top = clientY;
|
|
292
|
+
let left = clientX;
|
|
293
|
+
if (top >= innerHeight / 2)
|
|
294
|
+
top += -(popupRef.current?.clientHeight || defaultClientHeight);
|
|
295
|
+
if (left >= innerWidth / 2)
|
|
296
|
+
left += -(popupRef.current?.clientWidth || defaultClientwidth);
|
|
297
|
+
setPopupPosition({ top, left });
|
|
298
|
+
};
|
|
299
|
+
return {
|
|
300
|
+
popupRef,
|
|
301
|
+
popupOpen,
|
|
302
|
+
setPopupOpen,
|
|
303
|
+
popupPosition,
|
|
304
|
+
handlePosition,
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
|
|
276
308
|
// Fallback locale.
|
|
277
309
|
// (when not a single one of the supplied "preferred" locales is available)
|
|
278
310
|
var defaultLocale$1 = 'en'; // For all locales added
|
|
@@ -3535,4 +3567,4 @@ const useTransition = ({ container, animateIn, animateOut, duration = 300 }) =>
|
|
|
3535
3567
|
return Transition;
|
|
3536
3568
|
};
|
|
3537
3569
|
|
|
3538
|
-
export { useContainerSize as a, useCopy as b, useGenericForm as c, useInstrumentationRuleFormData as d, useKeyDown as e, useOnClickOutside as f,
|
|
3570
|
+
export { useContainerSize as a, useCopy as b, useGenericForm as c, useInstrumentationRuleFormData as d, useKeyDown as e, useOnClickOutside as f, usePopup as g, useTimeAgo as h, useTransition as i, useClickNode as u };
|
package/package.json
CHANGED
|
File without changes
|