@odigos/ui-kit 0.0.243 → 0.0.245
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 +20 -0
- package/lib/chunks/{helpers-DlRedD4d.js → helpers-D-CznSVG.js} +1 -1
- package/lib/chunks/{index-Cl1o9W_f.js → index-CA2MiIDy.js} +15 -15
- package/lib/chunks/source-instrument-form-context-C002ZZ9a.js +1 -0
- package/lib/chunks/ui-components-CFTFbtTq.js +1614 -0
- package/lib/components/_v2/input-table/dynamic-field/index.d.ts +1 -0
- package/lib/components/_v2/input-table/types.d.ts +2 -1
- package/lib/components/_v2/note/index.d.ts +6 -0
- package/lib/components/_v2/typography/index.d.ts +8 -0
- package/lib/components/_v2/typography-truncatable/index.d.ts +18 -10
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants/actions/index.d.ts +0 -2
- package/lib/constants/index.d.ts +1 -0
- package/lib/constants/regex.d.ts +40 -0
- package/lib/constants.js +1 -1
- package/lib/containers/_v2/_drawers/index.d.ts +1 -0
- package/lib/containers/_v2/_drawers/regex-tester-drawer/highlighter.d.ts +20 -0
- package/lib/containers/_v2/_drawers/regex-tester-drawer/index.d.ts +13 -0
- package/lib/containers/_v2/_forms/add-action-form/custom-fields/extract-attribute/index.d.ts +5 -0
- package/lib/containers/index.d.ts +0 -1
- package/lib/containers/v2.js +237 -126
- package/lib/containers.js +7 -62
- package/lib/contexts.js +1 -1
- package/lib/functions/get-action-icon/index.d.ts +2 -2
- package/lib/functions.js +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/useOverflow.d.ts +26 -0
- package/lib/hooks.js +1 -1
- package/lib/snippets/v2.js +1 -1
- package/lib/snippets.js +6 -6
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/actions/index.d.ts +16 -21
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/source-instrument-form-context-0FWO95UV.js +0 -1
- package/lib/chunks/ui-components-D8ipj0yK.js +0 -1570
- package/lib/containers/_v2/_forms/add-action-form/custom-fields/error-sampler/index.d.ts +0 -5
- package/lib/containers/_v2/_forms/add-action-form/custom-fields/latency-sampler/index.d.ts +0 -5
- package/lib/containers/_v2/_forms/add-action-form/custom-fields/probabilistic-sampler/index.d.ts +0 -5
- package/lib/containers/_v2/_forms/add-action-form/custom-fields/service-name-sampler/index.d.ts +0 -5
- package/lib/containers/_v2/_forms/add-action-form/custom-fields/span-attribute-sampler/index.d.ts +0 -5
- package/lib/containers/notification-manager/index.d.ts +0 -4
|
@@ -5,7 +5,7 @@ export interface Row {
|
|
|
5
5
|
}
|
|
6
6
|
export interface Column {
|
|
7
7
|
keyName: string;
|
|
8
|
-
label
|
|
8
|
+
label?: string;
|
|
9
9
|
tooltip?: string;
|
|
10
10
|
placeholder?: string;
|
|
11
11
|
inputType?: InputTypes;
|
|
@@ -14,4 +14,5 @@ export interface Column {
|
|
|
14
14
|
componentType?: 'input' | 'dropdown' | 'multi-dropdown';
|
|
15
15
|
options?: DropDataOption[];
|
|
16
16
|
renderCondition?: (row: Row) => boolean;
|
|
17
|
+
helpMessage?: string;
|
|
17
18
|
}
|
|
@@ -5,12 +5,18 @@ interface NoteAction {
|
|
|
5
5
|
label: string;
|
|
6
6
|
onClick: () => void;
|
|
7
7
|
}
|
|
8
|
+
interface NoteOnCloseParams {
|
|
9
|
+
asSeen: boolean;
|
|
10
|
+
}
|
|
8
11
|
export interface NoteProps {
|
|
9
12
|
status: StatusType;
|
|
10
13
|
message: string;
|
|
11
14
|
action?: NoteAction;
|
|
12
15
|
fullWidth?: boolean;
|
|
13
16
|
smallIcon?: boolean;
|
|
17
|
+
onClose?: (params: NoteOnCloseParams) => void;
|
|
18
|
+
duration?: number;
|
|
19
|
+
zIndex?: number;
|
|
14
20
|
}
|
|
15
21
|
export declare const Note: FC<NoteProps>;
|
|
16
22
|
export {};
|
|
@@ -55,5 +55,13 @@ export interface TypographyProps {
|
|
|
55
55
|
underline?: boolean;
|
|
56
56
|
onClick?: () => void;
|
|
57
57
|
disabled?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Clamp the rendered text to at most N visible lines via CSS `line-clamp`.
|
|
60
|
+
* This is the styling side only — wrap in `TruncatableTypography` to also get
|
|
61
|
+
* a tooltip exposing the full text when the content actually overflows.
|
|
62
|
+
* Set to `0` / `undefined` to disable. Has no effect when combined with
|
|
63
|
+
* `nowrap` (which prevents line breaks entirely).
|
|
64
|
+
*/
|
|
65
|
+
maxLines?: number;
|
|
58
66
|
}
|
|
59
67
|
export declare const Typography: React.ForwardRefExoticComponent<TypographyProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
2
|
import { TypographyProps } from '../typography';
|
|
3
3
|
/**
|
|
4
|
-
* Renders a `Typography` and,
|
|
5
|
-
*
|
|
4
|
+
* Renders a `Typography` and, when its content overflows the available space,
|
|
5
|
+
* reveals the full text in a `Tooltip` on hover. Two modes:
|
|
6
|
+
*
|
|
7
|
+
* - Single-line ellipsis: pair with `nowrap` (the default behavior). Overflow
|
|
8
|
+
* is detected horizontally via `scrollWidth > clientWidth`.
|
|
9
|
+
* - Multi-line clamp: pair with `maxLines={N}`. The underlying CSS
|
|
10
|
+
* `-webkit-line-clamp` clips at N visible lines, and overflow is detected
|
|
11
|
+
* vertically via `scrollHeight > clientHeight`.
|
|
6
12
|
*
|
|
7
13
|
* Implementation notes:
|
|
8
|
-
* - We ALWAYS wrap in `Tooltip` with `keepAlive` so the DOM structure is stable
|
|
9
|
-
* renders. Toggling between two different parent component types based
|
|
10
|
-
* would unmount and remount `Typography`, resetting the ref
|
|
11
|
-
* risking a flicker loop when the two wrappers report
|
|
12
|
-
* `Tooltip` only opens the popup when `text` is
|
|
13
|
-
* passing an empty `text` is the
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* - We ALWAYS wrap in `Tooltip` with `keepAlive` so the DOM structure is stable
|
|
15
|
+
* across renders. Toggling between two different parent component types based
|
|
16
|
+
* on truncation would unmount and remount `Typography`, resetting the ref/
|
|
17
|
+
* `ResizeObserver` and risking a flicker loop when the two wrappers report
|
|
18
|
+
* different available widths. `Tooltip` only opens the popup when `text` is
|
|
19
|
+
* non-empty (`isOpen && !!text`), so passing an empty `text` is the
|
|
20
|
+
* no-tooltip state.
|
|
21
|
+
* - Detection runs in `useLayoutEffect` and via `ResizeObserver`, so we react to
|
|
22
|
+
* drawer resize, collapse, and any other layout change without needing
|
|
23
|
+
* explicit invalidation.
|
|
16
24
|
*/
|
|
17
25
|
export interface TruncatableTypographyProps extends TypographyProps {
|
|
18
26
|
/** The full text used for the tooltip; defaults to `String(children)`. */
|
package/lib/components/v2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{eB as Autocomplete,am as Badge,
|
|
1
|
+
export{eB as Autocomplete,am as Badge,a2 as Button,a3 as ButtonSize,gc as ButtonTab,gd as ButtonTabList,a4 as ButtonVariants,V as Checkbox,ge as CheckboxList,de as CheckboxSize,b9 as CliCommand,b3 as Condition,aT as Conditions,gf as DEFAULT_TIME_UNITS,aS as DataCard,f as Drawer,bO as DropData,bQ as DropDataAlignX,bP as DropDataAlignY,aC as DropDown,W as FieldMessage,U as FieldTitle,dv as GaugeChart,gg as GaugeChartVariant,gh as Header,gi as HoverActions,aD as IconButton,aE as IconButtonSize,bf as IconGroup,ab as Input,$ as InputList,X as InputTable,d4 as Island,aF as Loader,bT as Modal,gj as Navbar,ac as NoData,n as Note,a8 as Radio,gk as RadioGroup,aa as RadioSize,bb as Search,ay as SectionCard,gl as SectionCardSize,a5 as Segment,ae as SegmentSize,bq as SegmentVariant,du as StatusCard,d5 as Stepper,bs as Table,bt as TableVariant,aZ as Tag,b8 as TagVariants,ag as TextArea,dw as TextCard,dP as TimeInput,Z as Toggle,_ as ToggleLabelAlign,gm as ToggleList,aJ as ToggleSize,gn as ToggleVariant,ad as TruncatableTypography,b as Typography,a1 as TypographyColor,c as TypographySize,aK as TypographyVariants,ap as WarningModal,go as resolveTypographyColor}from"../chunks/ui-components-CFTFbtTq.js";import"react/jsx-runtime";import"styled-components";import"../icons.js";import"zustand";import"react";import"javascript-time-ago";import"../chunks/vendor-Be0cOokr.js";import"prism-react-renderer";import"react-error-boundary";import"react-dom";import"virtua";
|
package/lib/components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{aB as CenterThis,eE as Code,i as Divider,fW as ErrorBoundary,fX as FadeLoader,R as FlexColumn,F as FlexRow,fY as IconButton,eF as IconGroup,fZ as IconWrapped,f_ as ImageControlled,f$ as LoadingText,g0 as ModalBody,g1 as NotificationNote,g2 as Overlay,aR as Padding,d3 as PageContent,a as Popup,g3 as ScrollX,bc as ScrollY,bp as SkeletonLoader,g4 as TableContainer,g5 as TableTitleWrap,g6 as TableWrap,h as Text,g7 as ToggleCodeComponent,ak as Tooltip,dx as UpgradeRequiredWrapper,g8 as VerticalScroll,g9 as getLinksFromText,ga as getStrongsFromText,gb as renderText}from"./chunks/ui-components-CFTFbtTq.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-Be0cOokr.js";import"prism-react-renderer";import"react-error-boundary";import"react-dom";import"virtua";
|
package/lib/constants/index.d.ts
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ExtractionDataFormat } from '@/types';
|
|
2
|
+
export declare const REGEX_TESTER_DRAWER: {
|
|
3
|
+
TITLE: string;
|
|
4
|
+
REGEX_LABEL: string;
|
|
5
|
+
REGEX_EMPTY_HINT: string;
|
|
6
|
+
TEST_STRING_LABEL: string;
|
|
7
|
+
TEST_STRING_PLACEHOLDER: string;
|
|
8
|
+
TEST_STRING_HELP: string;
|
|
9
|
+
RESULT_LABEL: string;
|
|
10
|
+
RESULT_CAPTURE_HINT: string;
|
|
11
|
+
RESULT_EMPTY_REGEX: string;
|
|
12
|
+
RESULT_EMPTY_INPUT: string;
|
|
13
|
+
RESULT_NO_MATCH: string;
|
|
14
|
+
RESULT_INVALID_REGEX_FALLBACK: string;
|
|
15
|
+
UNESCAPE_LABEL: string;
|
|
16
|
+
UNESCAPE_TOOLTIP: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const EXTRACT_ATTRIBUTE_FORM: {
|
|
19
|
+
SEGMENT_PRESET_LABEL: string;
|
|
20
|
+
SEGMENT_PRESET_TOOLTIP: string;
|
|
21
|
+
SEGMENT_REGEX_LABEL: string;
|
|
22
|
+
SEGMENT_REGEX_TOOLTIP: string;
|
|
23
|
+
PRESET_ROW_TITLE: (idx: number) => string;
|
|
24
|
+
REGEX_ROW_TITLE: (idx: number) => string;
|
|
25
|
+
TEST_REGEX_LABEL: string;
|
|
26
|
+
REGEX_LABEL: string;
|
|
27
|
+
REGEX_PLACEHOLDER: string;
|
|
28
|
+
REGEX_HELP: string;
|
|
29
|
+
TARGET_LABEL: string;
|
|
30
|
+
TARGET_PLACEHOLDER: string;
|
|
31
|
+
TARGET_HELP: string;
|
|
32
|
+
};
|
|
33
|
+
interface ExtractionFormatCopy {
|
|
34
|
+
label: string;
|
|
35
|
+
keyLabel: string;
|
|
36
|
+
placeholder: string;
|
|
37
|
+
helpMessage: string;
|
|
38
|
+
}
|
|
39
|
+
export declare const EXTRACTION_FORMAT_COPY: Record<ExtractionDataFormat, ExtractionFormatCopy>;
|
|
40
|
+
export {};
|
package/lib/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as
|
|
1
|
+
export{A as ACTION_OPTIONS,fA as ALL_SOURCES,bv as BTN_CANCEL,dB as BTN_CREATE_FIRST_RULE,bC as BTN_CREATE_RULE,by as BTN_DELETE_RULE,et as BTN_EDIT_AUTO_RULE,bx as BTN_EDIT_RULE,bK as BTN_SAVE,bw as BTN_SAVE_RULE,aQ as BUTTON_TEXTS,bz as CATEGORY_DESCRIPTIONS,er as CATEGORY_LABELS,bD as CATEGORY_TITLES,fB as CREATE_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,fC as CREATE_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,fD as CREATE_NOISY_AUTO_RULE_DRAWER_TITLE,aO as DEFAULT_CLUSTER_ID,aN as DEFAULT_CLUSTER_NAME,dp as DEFAULT_DATA_STREAM_NAME,dW as DESC_DURATION,dV as DESC_ERRORS,dZ as DESC_OPERATION,fE as DESC_PERCENTAGE_HIGHLY_RELEVANT,au as DESC_PERCENTAGE_NOISY,es as DESC_RULE_TYPE,ez as DESC_SOURCE_SCOPE,aG as DESTINATION_CATEGORIES,an as DISPLAY_LANGUAGES,D as DISPLAY_TITLES,af as DOCS_BASE_URL,y as DestinationCategoryTypes,bG as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_SUBTITLE,bH as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,bE as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_SUBTITLE,bF as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,bI as EDIT_NOISY_AUTO_RULE_DRAWER_SUBTITLE,bJ as EDIT_NOISY_AUTO_RULE_DRAWER_TITLE,bA as EDIT_TITLES,e9 as EMPTY_VALUE,a9 as EXTRACTION_FORMAT_COPY,a6 as EXTRACT_ATTRIBUTE_FORM,dz as FILTER_TYPE_ALL,v as FORM_ALERTS,I as INSTRUMENTATION_RULE_OPTIONS,dX as LABEL_CUSTOM_DURATION,az as LABEL_CUSTOM_PERCENTAGE,ax as LABEL_DISABLED,dy as LABEL_DISABLED_RULE,ej as LABEL_DROP_ALL,ar as LABEL_DROP_AT_MOST,aw as LABEL_ENABLED,e2 as LABEL_HTTP_ROUTE,e4 as LABEL_HTTP_ROUTE_PREFIX,e6 as LABEL_KAFKA_TOPIC,ek as LABEL_KEEP_ALL,eg as LABEL_KEEP_AT_LEAST,eh as LABEL_KEEP_AT_MOST,ef as LABEL_KEEP_PERCENTAGE,dU as LABEL_KEEP_TRACES_DURATION,dS as LABEL_KEEP_TRACES_ERRORS,e5 as LABEL_METHOD,en as LABEL_NOTE,ev as LABEL_NO_PREVIEW,e8 as LABEL_OPERATION_TYPE,fF as LABEL_RULE_DISABLED,fG as LABEL_RULE_ENABLED,el as LABEL_RULE_NAME,em as LABEL_RULE_TYPE,ei as LABEL_SAMPLE,d$ as LABEL_SERVER_ADDRESS,e1 as LABEL_TEMPLATED_PATH,e3 as LABEL_TEMPLATED_PATH_PREFIX,bm as LANGUAGE_OPTIONS,d9 as MONITORS_OPTIONS,ex as NOTE_ENTIRE_CLUSTER,eA as NOTE_SOURCE_SCOPE_LOGIC,fH as OPENTELEMETRY_EBPF_DISTRO_OPTION,eb as OPERATION_ALL,ea as OPERATION_HTTP_CLIENT,e7 as OPERATION_HTTP_SERVER,ec as OPERATION_KAFKA_CONSUMER,ed as OPERATION_KAFKA_PRODUCER,bl as OTEL_DISTRO_NAME_OPTIONS,ee as PERCENTAGE_SECTION_DESCRIPTIONS,ep as PLACEHOLDER_NOTE,e0 as PLACEHOLDER_ROUTE,eo as PLACEHOLDER_RULE_NAME,eC as PLACEHOLDER_SEARCH_SOURCE,d_ as PLACEHOLDER_SERVER_ADDRESS,b5 as PROCESS_ATTRIBUTE_NAMES,a0 as REGEX_TESTER_DRAWER,av as SAMPLING_AUTO_RULE_TITLE,dH as SAMPLING_BTN_CREATE_RULE,dF as SAMPLING_BTN_DOCS,dG as SAMPLING_BTN_REFRESH,at as SAMPLING_COST_REDUCTION_AUTO_RULE_TITLE,dK as SAMPLING_DELETE_MODAL_APPROVE,dL as SAMPLING_DELETE_MODAL_CANCEL,dM as SAMPLING_DELETE_MODAL_DESCRIPTION,dN as SAMPLING_DELETE_MODAL_TITLE,bL as SAMPLING_DRAWER_WIDTH,dE as SAMPLING_DUPLICATE_RULE_WARNING,aq as SAMPLING_HIGHLY_RELEVANT_AUTO_RULE_TITLE,cC as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_1,cD as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_2,cE as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_3,cF as SAMPLING_ONBOARDING_ADVANCED_LEFT_TITLE,cG as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_1,cH as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_2,cI as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_3,cJ as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_4,cK as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_5,cL as SAMPLING_ONBOARDING_ADVANCED_RIGHT_TITLE,cN as SAMPLING_ONBOARDING_ADVANCED_SUBTITLE,cM as SAMPLING_ONBOARDING_ADVANCED_TITLE,d2 as SAMPLING_ONBOARDING_AMBIENT_LABEL,c8 as SAMPLING_ONBOARDING_BTN_GO_TO,bV as SAMPLING_ONBOARDING_BTN_NEXT,cB as SAMPLING_ONBOARDING_BTN_READ_MORE,cj as SAMPLING_ONBOARDING_BTN_SKIP,ck as SAMPLING_ONBOARDING_BTN_START,cO as SAMPLING_ONBOARDING_COMMON_BANNER,d1 as SAMPLING_ONBOARDING_COMMON_RULES_SECTION,cR as SAMPLING_ONBOARDING_DROP_DESCRIPTION,cQ as SAMPLING_ONBOARDING_DROP_SUBTITLE,cP as SAMPLING_ONBOARDING_DROP_TITLE,cU as SAMPLING_ONBOARDING_ERROR_PRESET_NAME,cT as SAMPLING_ONBOARDING_ERROR_PRESET_TOGGLE_LABEL,cX as SAMPLING_ONBOARDING_KEEP_DESCRIPTION,cW as SAMPLING_ONBOARDING_KEEP_SUBTITLE,cV as SAMPLING_ONBOARDING_KEEP_TITLE,cY as SAMPLING_ONBOARDING_KEEP_USE_CASE_1,cZ as SAMPLING_ONBOARDING_KEEP_USE_CASE_2,c_ as SAMPLING_ONBOARDING_KEEP_USE_CASE_3,c$ as SAMPLING_ONBOARDING_KEEP_USE_CASE_4,d0 as SAMPLING_ONBOARDING_KEEP_USE_CASE_5,c0 as SAMPLING_ONBOARDING_NOISY_BANNER,bY as SAMPLING_ONBOARDING_NOISY_DESCRIPTION,b$ as SAMPLING_ONBOARDING_NOISY_PRESET_NAME,bZ as SAMPLING_ONBOARDING_NOISY_PRESET_SECTION,b_ as SAMPLING_ONBOARDING_NOISY_PRESET_TOGGLE_LABEL,bX as SAMPLING_ONBOARDING_NOISY_SUBTITLE,bW as SAMPLING_ONBOARDING_NOISY_TITLE,cS as SAMPLING_ONBOARDING_PRESET_RULES_SECTION,bU as SAMPLING_ONBOARDING_RECOMMENDED_BADGE,cy as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_BADGE,cz as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_DESC,cA as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_NAME,cv as SAMPLING_ONBOARDING_STRATEGY_DROP_BADGE,ct as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_1,cu as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_2,cw as SAMPLING_ONBOARDING_STRATEGY_DROP_DESC,cx as SAMPLING_ONBOARDING_STRATEGY_DROP_NAME,cq as SAMPLING_ONBOARDING_STRATEGY_KEEP_BADGE,co as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_1,cp as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_2,cr as SAMPLING_ONBOARDING_STRATEGY_KEEP_DESC,cs as SAMPLING_ONBOARDING_STRATEGY_KEEP_NAME,cn as SAMPLING_ONBOARDING_STRATEGY_KEEP_WARNING,cm as SAMPLING_ONBOARDING_STRATEGY_SUBTITLE,cl as SAMPLING_ONBOARDING_STRATEGY_TITLE,c5 as SAMPLING_ONBOARDING_SUCCESS_BULLET_1,c6 as SAMPLING_ONBOARDING_SUCCESS_BULLET_2,c7 as SAMPLING_ONBOARDING_SUCCESS_BULLET_3,c4 as SAMPLING_ONBOARDING_SUCCESS_INTRO,c3 as SAMPLING_ONBOARDING_SUCCESS_SUBTITLE,c2 as SAMPLING_ONBOARDING_SUCCESS_TITLE,ci as SAMPLING_ONBOARDING_WELCOME_BANNER,cb as SAMPLING_ONBOARDING_WELCOME_INTRO,cc as SAMPLING_ONBOARDING_WELCOME_STAGE_1_DESC,cd as SAMPLING_ONBOARDING_WELCOME_STAGE_1_TITLE,ce as SAMPLING_ONBOARDING_WELCOME_STAGE_2_DESC,cf as SAMPLING_ONBOARDING_WELCOME_STAGE_2_TITLE,cg as SAMPLING_ONBOARDING_WELCOME_STAGE_3_DESC,ch as SAMPLING_ONBOARDING_WELCOME_STAGE_3_TITLE,ca as SAMPLING_ONBOARDING_WELCOME_SUBTITLE,c9 as SAMPLING_ONBOARDING_WELCOME_TITLE,dI as SAMPLING_PAGE_DESCRIPTION,dJ as SAMPLING_PAGE_TITLE,dT as SECTION_DURATION,dR as SECTION_ERRORS,as as SECTION_KEEP_PERCENTAGE,dY as SECTION_OPERATION,eu as SECTION_SAMPLING_PREVIEW,ew as SECTION_SOURCE_SCOPE,d8 as STORAGE_KEYS,dA as TITLE_NO_RESULTS,dC as TITLE_NO_RULES,fI as TOKEN_ABOUT_TO_EXPIRE,eq as TOOLTIP_NOTE,ey as UNKNOWN_SOURCE_LABEL,bB as UNNAMED_RULE,dD as getNoResultsSubTitle}from"./chunks/ui-components-CFTFbtTq.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-Be0cOokr.js";import"prism-react-renderer";import"react-error-boundary";import"react-dom";import"virtua";
|
|
@@ -7,5 +7,6 @@ export * from './edit-config-drawer';
|
|
|
7
7
|
export * from './edit-destination-drawer';
|
|
8
8
|
export * from './edit-rule-drawer';
|
|
9
9
|
export * from './edit-source-drawer';
|
|
10
|
+
export * from './regex-tester-drawer';
|
|
10
11
|
export * from './sampling-rule-drawer';
|
|
11
12
|
export * from './system-drawer';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type FC, type TextareaHTMLAttributes } from 'react';
|
|
2
|
+
export type RegexTokenKind = 'group' | 'anchor-quantifier' | 'class-bracket' | 'class-content' | 'literal' | 'alternation';
|
|
3
|
+
interface RegexToken {
|
|
4
|
+
text: string;
|
|
5
|
+
kind: RegexTokenKind;
|
|
6
|
+
}
|
|
7
|
+
export declare const tokenizeRegex: (pattern: string) => RegexToken[];
|
|
8
|
+
export declare const HighlightedRegex: FC<{
|
|
9
|
+
pattern: string;
|
|
10
|
+
'data-id'?: string;
|
|
11
|
+
}>;
|
|
12
|
+
export interface HighlightedTextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'onChange'> {
|
|
13
|
+
regex: string;
|
|
14
|
+
value: string;
|
|
15
|
+
onChange: (next: string) => void;
|
|
16
|
+
/** Minimum height in pixels for the editor (and the mirror behind it). */
|
|
17
|
+
minHeight?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare const HighlightedTextArea: FC<HighlightedTextAreaProps>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
export interface RegexTesterDrawerProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
regex: string;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
/**
|
|
7
|
+
* Optional pre-populated test string. Useful for storybook demos and could later
|
|
8
|
+
* back a "test with last seen value" flow. Only applied on the first render; further
|
|
9
|
+
* edits are owned by the drawer's internal state until close.
|
|
10
|
+
*/
|
|
11
|
+
initialTestString?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const RegexTesterDrawer: FC<RegexTesterDrawerProps>;
|