@odigos/ui-kit 0.0.10 → 0.0.12
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 +15 -0
- package/lib/components/badge/index.d.ts +2 -2
- package/lib/components/data-card/data-card-fields/index.d.ts +14 -14
- package/lib/components/data-card/index.d.ts +2 -2
- package/lib/components/data-tab/index.d.ts +3 -3
- package/lib/components/delete-warning/index.d.ts +2 -2
- package/lib/components/describe-row/index.d.ts +2 -2
- package/lib/components/divider/index.d.ts +2 -2
- package/lib/components/icon-group/index.d.ts +2 -2
- package/lib/components/icon-wrapped/index.d.ts +2 -2
- package/lib/components/interactive-table/index.d.ts +9 -8
- package/lib/components/interactive-table/table-row.d.ts +13 -0
- package/lib/components/monitors-checkboxes/index.d.ts +4 -4
- package/lib/components/monitors-icons/index.d.ts +2 -2
- package/lib/components/notification-note/index.d.ts +2 -2
- package/lib/components/status/index.d.ts +2 -2
- package/lib/components/stepper/index.d.ts +1 -1
- package/lib/components/warning-modal/index.d.ts +2 -2
- package/lib/components.js +8 -8
- package/lib/constants/strings/index.d.ts +10 -10
- package/lib/constants.js +4 -4
- package/lib/containers/action-drawer/build-card.d.ts +2 -2
- package/lib/containers/action-drawer/index.d.ts +2 -2
- package/lib/containers/action-form/custom-fields/index.d.ts +2 -2
- package/lib/containers/data-flow/edges/labeled-edge.d.ts +2 -2
- package/lib/containers/data-flow/helpers/get-main-container-language.d.ts +2 -2
- package/lib/containers/data-flow/helpers/get-node-positions.d.ts +2 -2
- package/lib/containers/data-flow/nodes/add-node.d.ts +3 -3
- package/lib/containers/data-flow/nodes/base-node.d.ts +5 -5
- package/lib/containers/data-flow/nodes/edged-node.d.ts +2 -2
- package/lib/containers/data-flow/nodes/frame-node.d.ts +2 -2
- package/lib/containers/data-flow/nodes/header-node.d.ts +2 -2
- package/lib/containers/data-flow/nodes/scroll-node.d.ts +5 -5
- package/lib/containers/data-flow/nodes/skeleton-node.d.ts +2 -2
- package/lib/containers/data-flow-actions-menu/index.d.ts +2 -2
- package/lib/containers/data-flow-actions-menu/search/search-results/builder.d.ts +2 -2
- package/lib/containers/destination-drawer/build-card.d.ts +2 -2
- package/lib/containers/destination-form/test-connection/index.d.ts +2 -2
- package/lib/containers/instrumentation-rule-drawer/build-card.d.ts +2 -2
- package/lib/containers/instrumentation-rule-form/custom-fields/index.d.ts +2 -2
- package/lib/containers/side-nav/index.d.ts +8 -8
- package/lib/containers/source-drawer/build-card.d.ts +1 -1
- package/lib/containers.js +373 -366
- package/lib/data/sources/index.d.ts +3 -3
- package/lib/functions/get-action-icon/index.d.ts +2 -2
- package/lib/functions/get-conditions-booleans/index.d.ts +2 -2
- package/lib/functions/get-entity-icon/index.d.ts +2 -2
- package/lib/functions/get-entity-label/index.d.ts +2 -2
- package/lib/functions/get-id-from-sse-target/index.d.ts +2 -2
- package/lib/functions/get-instrumentation-rule-icon/index.d.ts +2 -2
- package/lib/functions/get-metric-for-entity/index.d.ts +2 -2
- package/lib/functions/get-monitor-icon/index.d.ts +2 -2
- package/lib/functions/get-platform-icon/index.d.ts +2 -2
- package/lib/functions/get-platform-label/index.d.ts +2 -2
- package/lib/functions/get-programming-language-icon/index.d.ts +2 -2
- package/lib/functions/get-sse-target-from-id/index.d.ts +2 -2
- package/lib/functions/get-status-icon/index.d.ts +2 -2
- package/lib/functions/index.d.ts +0 -1
- package/lib/functions.js +9 -20
- package/lib/hooks.js +7 -7
- package/lib/icons.js +2 -2
- package/lib/{index-BFct3S32.js → index-7-KCQK-x.js} +2 -2
- package/lib/{index-ixs381n-.js → index-9ObpINp4.js} +4 -4
- package/lib/{index-Do8ODRlA.js → index-B5wdZoej.js} +106 -111
- package/lib/{index-eF2JXMVR.js → index-BtuW12KL.js} +22 -22
- package/lib/{index-CZe2VX28.js → index-CJKFedQi.js} +31 -31
- package/lib/{index-DB1gmCsH.js → index-CYn62h8x.js} +33 -33
- package/lib/{index-DnmWFsTQ.js → index-C_0J5P9M.js} +10 -10
- package/lib/{index-DIcomki-.js → index-DYEcdkUF.js} +19 -19
- package/lib/{index-BumPE6cF.js → index-Db_ZDrEr.js} +13 -13
- package/lib/store/useDrawerStore.d.ts +2 -2
- package/lib/store/useEntityStore.d.ts +5 -5
- package/lib/store/usePendingStore.d.ts +2 -2
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/actions/index.d.ts +14 -14
- package/lib/types/common/index.d.ts +80 -76
- package/lib/types/connection/index.d.ts +3 -3
- package/lib/types/data-flow/index.d.ts +15 -15
- package/lib/types/destinations/index.d.ts +2 -2
- package/lib/types/instrumentation-rules/index.d.ts +28 -28
- package/lib/types/signals/index.d.ts +5 -5
- package/lib/types/sources/index.d.ts +7 -7
- package/lib/types.js +164 -159
- package/lib/{useSourceSelectionFormData-CxdOP9FT.js → useSourceSelectionFormData-BnlRp8m3.js} +40 -40
- package/lib/{useTransition-Dfxjcy-C.js → useTransition-CFmm4scp.js} +23 -23
- package/package.json +1 -1
- package/lib/components/interactive-table/row.d.ts +0 -13
- package/lib/functions/derive-type-from-rule/index.d.ts +0 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K8sResourceKind, ProgrammingLanguages, type Source } from '@/types';
|
|
2
2
|
export declare const MOCK_SOURCES: Source[];
|
|
3
3
|
export declare const MOCK_SOURCE_JAEGER: {
|
|
4
4
|
namespace: string;
|
|
5
5
|
name: string;
|
|
6
|
-
kind:
|
|
6
|
+
kind: K8sResourceKind;
|
|
7
7
|
selected: boolean;
|
|
8
8
|
otelServiceName: string;
|
|
9
9
|
numberOfInstances: number;
|
|
10
10
|
containers: {
|
|
11
11
|
containerName: string;
|
|
12
|
-
language:
|
|
12
|
+
language: ProgrammingLanguages;
|
|
13
13
|
runtimeVersion: string;
|
|
14
14
|
instrumented: boolean;
|
|
15
15
|
instrumentationMessage: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getActionIcon: (type:
|
|
1
|
+
import { ActionType, type SVG } from '@/types';
|
|
2
|
+
export declare const getActionIcon: (type: ActionType | "sampler" | "attributes") => SVG;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StatusType, type Condition } from '@/types';
|
|
2
2
|
export declare const getConditionsBooleans: (conditions: Condition[]) => {
|
|
3
3
|
hasErrors: boolean;
|
|
4
4
|
hasWarnings: boolean;
|
|
5
5
|
hasDisableds: boolean;
|
|
6
6
|
hasLoadings: boolean;
|
|
7
|
-
priorotizedStatus:
|
|
7
|
+
priorotizedStatus: StatusType | undefined;
|
|
8
8
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getEntityIcon: (type:
|
|
1
|
+
import { EntityTypes, type SVG } from '@/types';
|
|
2
|
+
export declare const getEntityIcon: (type: EntityTypes) => SVG;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getEntityLabel: (entity: Record<string, any>, entityType:
|
|
1
|
+
import { EntityTypes } from '@/types';
|
|
2
|
+
export declare const getEntityLabel: (entity: Record<string, any>, entityType: EntityTypes, options?: {
|
|
3
3
|
extended?: boolean;
|
|
4
4
|
prioritizeDisplayName?: boolean;
|
|
5
5
|
}) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getIdFromSseTarget: (target: string, type:
|
|
1
|
+
import { EntityTypes, type WorkloadId } from '@/types';
|
|
2
|
+
export declare const getIdFromSseTarget: (target: string, type: EntityTypes) => string | WorkloadId;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getInstrumentationRuleIcon: (type:
|
|
1
|
+
import { InstrumentationRuleType, type SVG } from '@/types';
|
|
2
|
+
export declare const getInstrumentationRuleIcon: (type: InstrumentationRuleType) => SVG;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getMetricForEntity: (metrics: Metrics, entityType:
|
|
1
|
+
import { EntityTypes, type Metric, type Metrics, type WorkloadId } from '@/types';
|
|
2
|
+
export declare const getMetricForEntity: (metrics: Metrics, entityType: EntityTypes.Source | EntityTypes.Destination, entityId: string | WorkloadId) => Metric;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getMonitorIcon: (type:
|
|
1
|
+
import { SignalType, type SVG } from '@/types';
|
|
2
|
+
export declare const getMonitorIcon: (type: SignalType) => SVG;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getPlatformIcon: (type?:
|
|
1
|
+
import { PlatformType, type SVG } from '@/types';
|
|
2
|
+
export declare const getPlatformIcon: (type?: PlatformType) => SVG;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getPlatformLabel: (type?:
|
|
1
|
+
import { PlatformType } from '@/types';
|
|
2
|
+
export declare const getPlatformLabel: (type?: PlatformType) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getProgrammingLanguageIcon: (language:
|
|
1
|
+
import { ProgrammingLanguages, type SVG } from '@/types';
|
|
2
|
+
export declare const getProgrammingLanguageIcon: (language: ProgrammingLanguages) => SVG;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getSseTargetFromId: (id: string | WorkloadId, type:
|
|
1
|
+
import { EntityTypes, type WorkloadId } from '@/types';
|
|
2
|
+
export declare const getSseTargetFromId: (id: string | WorkloadId, type: EntityTypes) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getStatusIcon: (type:
|
|
1
|
+
import { StatusType, type SVG } from '@/types';
|
|
2
|
+
export declare const getStatusIcon: (type: StatusType, theme: Record<"text", Record<StatusType, string>>) => SVG;
|
package/lib/functions/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ export * from './capitalize-first-letter';
|
|
|
2
2
|
export * from './clean-object-empty-strings-values';
|
|
3
3
|
export * from './compare-condition';
|
|
4
4
|
export * from './deep-clone';
|
|
5
|
-
export * from './derive-type-from-rule';
|
|
6
5
|
export * from './filter-actions';
|
|
7
6
|
export * from './filter-destinations';
|
|
8
7
|
export * from './filter-sources';
|
package/lib/functions.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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-
|
|
2
|
-
export { c as compareCondition, f as filterActions, a as filterDestinations, b as filterSources, d as formatBytes, g as getConditionsBooleans, h as getContainersIcons, e as getContainersInstrumentedCount, i as getEntityIcon, j as getEntityLabel, k as getMetricForEntity, l as getPlatformIcon, m as getPlatformLabel, n as getValueForRange, o as isOverTime, s as sleep } from './index-
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
|
|
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-CYn62h8x.js';
|
|
2
|
+
export { c as compareCondition, f as filterActions, a as filterDestinations, b as filterSources, d as formatBytes, g as getConditionsBooleans, h as getContainersIcons, e as getContainersInstrumentedCount, i as getEntityIcon, j as getEntityLabel, k as getMetricForEntity, l as getPlatformIcon, m as getPlatformLabel, n as getValueForRange, o as isOverTime, s as sleep } from './index-BtuW12KL.js';
|
|
3
|
+
export { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-Db_ZDrEr.js';
|
|
4
|
+
export { k as getEntityId, l as isTimeElapsed } from './index-DYEcdkUF.js';
|
|
5
|
+
export { g as getIdFromSseTarget } from './index-7-KCQK-x.js';
|
|
6
|
+
import { EntityTypes } from './types.js';
|
|
7
7
|
export { i as isEmpty, s as safeJsonParse } from './index-BZS1ijMm.js';
|
|
8
8
|
import 'react';
|
|
9
9
|
import 'styled-components';
|
|
10
10
|
import './index-BGlk5VhF.js';
|
|
11
11
|
import './theme.js';
|
|
12
|
-
import './index-
|
|
12
|
+
import './index-9ObpINp4.js';
|
|
13
13
|
import './index-BjJpYtF1.js';
|
|
14
14
|
|
|
15
15
|
const cleanObjectEmptyStringsValues = (obj) => {
|
|
@@ -62,17 +62,6 @@ const deepClone = (item) => {
|
|
|
62
62
|
return JSON.parse(JSON.stringify(item));
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
const deriveTypeFromRule = (rule) => {
|
|
66
|
-
const allKeysAreNull = (obj) => Object.values(obj).every((v) => v === null);
|
|
67
|
-
if (rule.payloadCollection && !allKeysAreNull(rule.payloadCollection)) {
|
|
68
|
-
return INSTRUMENTATION_RULE_TYPE.PAYLOAD_COLLECTION;
|
|
69
|
-
}
|
|
70
|
-
else if (rule.codeAttributes && !allKeysAreNull(rule.codeAttributes)) {
|
|
71
|
-
return INSTRUMENTATION_RULE_TYPE.CODE_ATTRIBUTES;
|
|
72
|
-
}
|
|
73
|
-
return INSTRUMENTATION_RULE_TYPE.UNKNOWN_TYPE;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
65
|
const getDestinationIcon = (destinationType) => {
|
|
77
66
|
// const BASE_URL = 'https://d15jtxgb40qetw.cloudfront.net/'
|
|
78
67
|
const BASE_URL = 'https://odigos-destinations.s3.us-east-2.amazonaws.com/';
|
|
@@ -81,7 +70,7 @@ const getDestinationIcon = (destinationType) => {
|
|
|
81
70
|
|
|
82
71
|
const getSseTargetFromId = (id, type) => {
|
|
83
72
|
switch (type) {
|
|
84
|
-
case
|
|
73
|
+
case EntityTypes.Source: {
|
|
85
74
|
let target = '';
|
|
86
75
|
Object.entries(id).forEach(([key, value]) => {
|
|
87
76
|
target += `${key}=${value}&`;
|
|
@@ -112,4 +101,4 @@ const stringifyNonStringValues = (obj) => {
|
|
|
112
101
|
}, {});
|
|
113
102
|
};
|
|
114
103
|
|
|
115
|
-
export { cleanObjectEmptyStringsValues, deepClone,
|
|
104
|
+
export { cleanObjectEmptyStringsValues, deepClone, getDestinationIcon, getSseTargetFromId, getWorkloadId, stringifyNonStringValues };
|
package/lib/hooks.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { u as useActionFormData, a as useClickNode, b as useClickNotification, c as useDestinationFormData, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-
|
|
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-
|
|
1
|
+
export { u as useActionFormData, a as useClickNode, b as useClickNotification, c as useDestinationFormData, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-BnlRp8m3.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-CFmm4scp.js';
|
|
3
3
|
import './types.js';
|
|
4
4
|
import 'react';
|
|
5
|
-
import './index-
|
|
5
|
+
import './index-DYEcdkUF.js';
|
|
6
6
|
import 'styled-components';
|
|
7
7
|
import './index-BZS1ijMm.js';
|
|
8
|
-
import './index-
|
|
9
|
-
import './index-
|
|
8
|
+
import './index-CJKFedQi.js';
|
|
9
|
+
import './index-Db_ZDrEr.js';
|
|
10
10
|
import './index-BGlk5VhF.js';
|
|
11
11
|
import './theme.js';
|
|
12
|
-
import './index-
|
|
13
|
-
import './index-
|
|
12
|
+
import './index-C_0J5P9M.js';
|
|
13
|
+
import './index-7-KCQK-x.js';
|
package/lib/icons.js
CHANGED
|
@@ -4,8 +4,8 @@ export { A as ArrowIcon, f as CheckIcon, C as CodeIcon, a as CopyIcon, g as Cros
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import Theme from './theme.js';
|
|
6
6
|
export { A as ActionsIcon, D as DestinationsIcon, R as RulesIcon, S as SourcesIcon, V as VmLogo } from './index-BjJpYtF1.js';
|
|
7
|
-
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, 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-
|
|
8
|
-
import './index-
|
|
7
|
+
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, 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-9ObpINp4.js';
|
|
8
|
+
import './index-DYEcdkUF.js';
|
|
9
9
|
import './types.js';
|
|
10
10
|
import 'styled-components';
|
|
11
11
|
|
|
@@ -265,11 +265,11 @@ const PythonLogo = ({ size = 16, fill, rotate = 0, onClick }) => {
|
|
|
265
265
|
return (React.createElement("svg", { width: size, height: size, viewBox: '0 0 256 256', xmlns: 'http://www.w3.org/2000/svg', fill: 'none', style: { transform: `rotate(${rotate}deg)` }, onClick: onClick },
|
|
266
266
|
React.createElement("defs", null,
|
|
267
267
|
React.createElement("linearGradient", { id: 'python-gradient-1', x1: '12.959%', x2: '79.639%', y1: '12.039%', y2: '78.201%' },
|
|
268
|
-
React.createElement("stop", { offset: '0%',
|
|
269
|
-
React.createElement("stop", { offset: '100%',
|
|
268
|
+
React.createElement("stop", { offset: '0%', stopColor: '#387EB8' }),
|
|
269
|
+
React.createElement("stop", { offset: '100%', stopColor: '#366994' })),
|
|
270
270
|
React.createElement("linearGradient", { id: 'python-gradient-2', x1: '19.128%', x2: '90.742%', y1: '20.579%', y2: '88.429%' },
|
|
271
|
-
React.createElement("stop", { offset: '0%',
|
|
272
|
-
React.createElement("stop", { offset: '100%',
|
|
271
|
+
React.createElement("stop", { offset: '0%', stopColor: '#FFE052' }),
|
|
272
|
+
React.createElement("stop", { offset: '100%', stopColor: '#FFC331' }))),
|
|
273
273
|
React.createElement("path", { fill: fill || 'url(#python-gradient-1)', d: 'M126.916.072c-64.832 0-60.784 28.115-60.784 28.115l.072 29.128h61.868v8.745H41.631S.145 61.355.145 126.77c0 65.417 36.21 63.097 36.21 63.097h21.61v-30.356s-1.165-36.21 35.632-36.21h61.362s34.475.557 34.475-33.319V33.97S194.67.072 126.916.072ZM92.802 19.66a11.12 11.12 0 0 1 11.13 11.13 11.12 11.12 0 0 1-11.13 11.13 11.12 11.12 0 0 1-11.13-11.13 11.12 11.12 0 0 1 11.13-11.13Z' }),
|
|
274
274
|
React.createElement("path", { fill: fill || 'url(#python-gradient-2)', d: 'M128.757 254.126c64.832 0 60.784-28.115 60.784-28.115l-.072-29.127H127.6v-8.745h86.441s41.486 4.705 41.486-60.712c0-65.416-36.21-63.096-36.21-63.096h-21.61v30.355s1.165 36.21-35.632 36.21h-61.362s-34.475-.557-34.475 33.32v56.013s-5.235 33.897 62.518 33.897Zm34.114-19.586a11.12 11.12 0 0 1-11.13-11.13 11.12 11.12 0 0 1 11.13-11.131 11.12 11.12 0 0 1 11.13 11.13 11.12 11.12 0 0 1-11.13 11.13Z' })));
|
|
275
275
|
};
|