@odigos/ui-kit 0.0.231 → 0.0.232
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 +21 -0
- package/lib/chunks/index-Bbukn13F.js +77 -0
- package/lib/chunks/{index-tFZXUKvO.js → index-Cw4LkdaE.js} +1 -1
- package/lib/chunks/index-D7sjsMOG.js +145 -0
- package/lib/chunks/{ui-components-CvK0mvVN.js → ui-components-of0mjGMv.js} +438 -426
- package/lib/components/_v2/cards/section-card/index.d.ts +11 -0
- package/lib/components/_v2/drop-down/index.d.ts +1 -1
- package/lib/components/_v2/search/index.d.ts +2 -0
- package/lib/components/_v2/segment/index.d.ts +1 -0
- package/lib/components/_v2/typography/index.d.ts +20 -1
- package/lib/components/_v2/warning-modal/index.d.ts +5 -5
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants/strings/index.d.ts +6 -0
- package/lib/constants.js +1 -1
- package/lib/containers/_v2/_forms/data-stream-form/index.d.ts +6 -0
- package/lib/containers/_v2/_forms/data-stream-form/merge-warning.d.ts +11 -0
- package/lib/containers/_v2/_forms/index.d.ts +1 -0
- package/lib/containers/_v2/_modals/add-data-stream-modal/index.d.ts +8 -0
- package/lib/containers/_v2/_modals/edit-data-stream-modal/index.d.ts +8 -0
- package/lib/containers/_v2/_modals/index.d.ts +2 -0
- package/lib/containers/_v2/index.d.ts +2 -0
- package/lib/containers/_v2/overview/columns/column/empty-add.d.ts +7 -0
- package/lib/containers/_v2/overview/columns/column/head.d.ts +14 -0
- package/lib/containers/_v2/overview/columns/column/index.d.ts +12 -0
- package/lib/containers/_v2/overview/columns/column/list-item.d.ts +17 -0
- package/lib/containers/_v2/overview/columns/column/namespace-divider.d.ts +7 -0
- package/lib/containers/_v2/overview/columns/column/source-visual-state.d.ts +9 -0
- package/lib/containers/_v2/overview/columns/index.d.ts +11 -0
- package/lib/containers/_v2/overview/data-stream-select/index.d.ts +12 -0
- package/lib/containers/_v2/overview/drawers/index.d.ts +31 -0
- package/lib/containers/_v2/overview/filters/index.d.ts +2 -0
- package/lib/containers/_v2/overview/index.d.ts +14 -0
- package/lib/containers/_v2/overview/multi-source-control/index.d.ts +7 -0
- package/lib/containers/_v2/overview/search/builder.d.ts +25 -0
- package/lib/containers/_v2/overview/search/index.d.ts +7 -0
- package/lib/containers/source-drawer/index.d.ts +2 -2
- package/lib/containers/v2.js +334 -33
- package/lib/containers.js +122 -198
- package/lib/contexts/data-stream-form-context.d.ts +60 -0
- package/lib/contexts/index.d.ts +1 -0
- package/lib/contexts.js +1 -1
- package/lib/functions.js +1 -1
- package/lib/hooks/useOnClickOutside.d.ts +1 -0
- package/lib/hooks.js +1 -1
- package/lib/icons/common/index.d.ts +1 -0
- package/lib/icons/common/star-icon/index.d.ts +2 -0
- package/lib/icons.js +1 -1
- package/lib/mock-data/index.d.ts +1 -0
- package/lib/mock-data/sources/index.d.ts +1 -0
- package/lib/snippets/_v2/cancel-modal/index.d.ts +4 -1
- package/lib/snippets/_v2/delete-modal/index.d.ts +3 -1
- package/lib/snippets/_v2/rich-title/index.d.ts +1 -0
- package/lib/snippets/v2.js +1 -1
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme/palettes/index.d.ts +10 -0
- package/lib/theme.js +1 -1
- package/lib/types/actions/index.d.ts +2 -0
- package/lib/types/config/index.d.ts +2 -0
- package/lib/types/destinations/index.d.ts +1 -0
- package/lib/types/instrumentation-rules/index.d.ts +2 -0
- package/lib/types/sources/index.d.ts +44 -0
- package/lib/types.js +1 -1
- package/lib/visuals/index.d.ts +1 -0
- package/lib/visuals/visual-purple-rings/index.d.ts +7 -0
- package/lib/visuals.js +1 -1
- package/package.json +11 -11
- package/lib/chunks/index-DAOWyONO.js +0 -145
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type FC, type ReactNode } from 'react';
|
|
2
|
+
import type { DataStream } from '@/types';
|
|
3
|
+
import { type GenericFormResult } from '@/hooks/useGenericForm';
|
|
4
|
+
/** Captures a submit attempt that's waiting on user confirmation (merge prompt). */
|
|
5
|
+
interface PendingMerge {
|
|
6
|
+
preparedFormData: DataStream;
|
|
7
|
+
/** Name of the existing stream we'd be merging into. Used in the prompt copy. */
|
|
8
|
+
existingName: string;
|
|
9
|
+
/**
|
|
10
|
+
* Name of the stream currently being edited, when applicable. `undefined` for the
|
|
11
|
+
* create flow (no source stream yet). Drives the merge-warning copy: edit reads
|
|
12
|
+
* "merge {editingName} into {existingName}", add reads just "merge into {existingName}".
|
|
13
|
+
*/
|
|
14
|
+
editingName?: string;
|
|
15
|
+
}
|
|
16
|
+
interface DataStreamFormContextValue {
|
|
17
|
+
genericForm: GenericFormResult<DataStream>;
|
|
18
|
+
/** Hydrate the form for an edit flow. Sets the form value, `excludeName`, and `editingName`. */
|
|
19
|
+
loadDataStream: (name: string) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Name of the stream currently being edited. Set by `loadDataStream`; `undefined`
|
|
22
|
+
* during the create flow. Used by the merge-warning copy and any other consumer
|
|
23
|
+
* that needs to differentiate edit vs add without inspecting `excludeName`
|
|
24
|
+
* (which is a separate concept — see below).
|
|
25
|
+
*/
|
|
26
|
+
editingName?: string;
|
|
27
|
+
validateFormData: () => {
|
|
28
|
+
errorMessage?: string;
|
|
29
|
+
preparedFormData: DataStream;
|
|
30
|
+
};
|
|
31
|
+
errorMessage?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Validate + merge-detect wrapper. If the typed name matches another existing
|
|
34
|
+
* stream, defers `onConfirmedSubmit` and exposes `pendingMerge` so a confirmation
|
|
35
|
+
* prompt can render. Otherwise (or after `confirmMerge`) `onConfirmedSubmit` runs
|
|
36
|
+
* with the prepared data. Centralising this here means add and edit modals don't
|
|
37
|
+
* each have to reimplement the merge gate.
|
|
38
|
+
*/
|
|
39
|
+
requestSubmit: (onConfirmedSubmit: (data: DataStream) => void | Promise<void>) => Promise<void>;
|
|
40
|
+
pendingMerge: PendingMerge | null;
|
|
41
|
+
confirmMerge: () => Promise<void>;
|
|
42
|
+
cancelMerge: () => void;
|
|
43
|
+
/**
|
|
44
|
+
* Name to exclude from the duplicate-name check rendered in `<DataStreamForm />`.
|
|
45
|
+
* In edit flows it's the stream being renamed (set via `loadDataStream`); in
|
|
46
|
+
* create flows it's typically the currently-selected stream (set via the
|
|
47
|
+
* provider's `defaultExcludeName` prop) so the user doesn't get a self-collision
|
|
48
|
+
* warning.
|
|
49
|
+
*/
|
|
50
|
+
excludeName: string;
|
|
51
|
+
setExcludeName: (name: string) => void;
|
|
52
|
+
}
|
|
53
|
+
export interface DataStreamFormContextProviderProps {
|
|
54
|
+
children: ReactNode;
|
|
55
|
+
/** Initial value for `excludeName` — only meaningful in create flows. Edit flows should call `loadDataStream` instead. */
|
|
56
|
+
defaultExcludeName?: string;
|
|
57
|
+
}
|
|
58
|
+
export declare const DataStreamFormContextProvider: FC<DataStreamFormContextProviderProps>;
|
|
59
|
+
export declare const useDataStreamFormContext: () => DataStreamFormContextValue;
|
|
60
|
+
export {};
|
package/lib/contexts/index.d.ts
CHANGED
package/lib/contexts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{bX as ActionFormContextProvider,cp as DataStreamFormContextProvider,bW as DestinationFormContextProvider,g8 as OdigosProvider,bY as RuleFormContextProvider,aN as SamplingRuleFormType,bA as SamplingRulesFormProvider,bV as SourceInstrumentFormContextProvider,g9 as StorybookProvider,bT as checkVersionSupport,aq as useActionFormContext,aK as useDataStreamFormContext,au as useDestinationFormContext,a4 as useOdigos,aH as useRuleFormContext,aM as useSamplingRulesFormContext,bf as useSourceInstrumentFormContext,ga as useStorybook}from"./chunks/ui-components-of0mjGMv.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
|
package/lib/functions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{dS as capitalizeFirstLetter,fy as cleanObjectEmptyStringsValues,at as compareCondition,$ as deepClone,ch as entityIdKey,cn as filterActions,cm as filterDestinations,bq as filterDestinationsByStream,cl as filterSources,a6 as filterSourcesByStream,fz as flattenObjectKeys,ci as formatBytes,ea as formatDuration,g as generateId,bn as getActionIcon,cg as getConditionsBooleans,ad as getContainersIcons,e7 as getContainersInstrumentedCount,fA as getDeepValue,b4 as getDestinationIcon,fB as getDetectedLanguageIcons,c6 as getEntityIcon,bj as getEntityId,cd as getEntityIdKey,c5 as getEntityLabel,fC as getIdFromSseTarget,bv as getInstrumentationRuleIcon,fD as getMainContainerLanguage,dW as getMetricForEntity,fE as getMonitorIcon,fF as getPlatformIcon,fG as getPlatformLabel,aJ as getProgrammingLanguageIcon,ec as getRecursiveValues,cj as getSourceLanguageIcons,fH as getSseTargetFromId,fI as getStatusColor,ct as getStatusFromPodStatus,cb as getStatusIcon,K as getStatusTypeFromOdigosHealth,fJ as getValueForRange,e0 as getVirtualServiceIcon,a8 as getWorkloadId,br as getYamlFieldsForDestination,U as hasUnhealthyInstances,ak as isEmpty,fK as isLegalK8sLabel,bP as isOverTime,a1 as isStringABoolean,fL as isTimeElapsed,fM as isValidVersion,dv as mapConditions,bp as mapDestinationFieldsForDisplay,ax as mapExportedSignals,ay as mapSupportedSignals,fN as numbersOnly,a2 as parseBooleanFromString,fO as parseJsonStringToPrettyString,az as prepareDestinationFormData,fP as removeEmptyValuesFromObject,b5 as safeJsonParse,fQ as safeJsonStringify,fR as setDeepValue,dF as sleep,H as splitCamelString,fS as stringifyNonStringValues,dq as trimVersion}from"./chunks/ui-components-of0mjGMv.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
|
package/lib/hooks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{g6 as IGNORE_OUTSIDE_CLICK_ATTR,dm as useActionFormData,g7 as useBodyScroll,c4 as useClickNode,d_ as useClickNotification,ck as useContainerSize,u as useCopy,dN as useDataStreamFormData,dR as useDestinationFormData,bo as useGenericForm,dY as useInstrumentationRuleFormData,d as useKeyDown,c1 as useOnClickOutside,dI as usePopup,d7 as useScrollTo,c3 as useSessionStorage,a7 as useSourceFormData,e5 as useSourceSelectionFormData,bO as useTimeAgo}from"./chunks/ui-components-of0mjGMv.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
|
|
@@ -42,6 +42,7 @@ export * from './search-icon';
|
|
|
42
42
|
export * from './server-disconnected-icon';
|
|
43
43
|
export * from './settings-icon';
|
|
44
44
|
export * from './sort-arrows-icon';
|
|
45
|
+
export * from './star-icon';
|
|
45
46
|
export * from './terminal-icon';
|
|
46
47
|
export * from './trash-icon';
|
|
47
48
|
export * from './user-circle-icon';
|