@odigos/ui-kit 0.0.218 → 0.0.219
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 +8 -0
- package/lib/chunks/{index-BPGpDZxy.js → index-YIqbBRyO.js} +1 -1
- package/lib/chunks/{ui-components-CzlBPbLD.js → ui-components-Dj10kYlT.js} +428 -418
- package/lib/components/_v2/autocomplete/index.d.ts +1 -0
- package/lib/components/_v2/button/index.d.ts +1 -0
- package/lib/components/_v2/cards/section-card/index.d.ts +1 -1
- package/lib/components/_v2/drawer/footer/index.d.ts +9 -0
- package/lib/components/_v2/drawer/index.d.ts +2 -0
- package/lib/components/_v2/hover-actions/index.d.ts +2 -0
- package/lib/components/_v2/note/index.d.ts +1 -0
- package/lib/components/_v2/radio/index.d.ts +1 -0
- package/lib/components/_v2/search/index.d.ts +2 -1
- package/lib/components/_v2/segment/index.d.ts +2 -1
- package/lib/components/_v2/table/index.d.ts +3 -1
- package/lib/components/_v2/table/styled.d.ts +2 -0
- package/lib/components/_v2/table/table-rows/index.d.ts +2 -1
- package/lib/components/_v2/table/types.d.ts +2 -0
- package/lib/components/styled.d.ts +3 -0
- package/lib/components/tooltip/index.d.ts +2 -0
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants/index.d.ts +1 -0
- package/lib/constants/sampling/index.d.ts +87 -0
- package/lib/constants.js +1 -1
- package/lib/containers/_v2/_drawers/create-sampling-rule-drawer/index.d.ts +18 -4
- package/lib/containers/_v2/_drawers/edit-auto-rule-drawer/index.d.ts +7 -2
- package/lib/containers/_v2/_drawers/edit-cost-reduction-auto-rule-drawer/index.d.ts +7 -2
- package/lib/containers/_v2/_drawers/edit-highly-relevant-auto-rule-drawer/index.d.ts +6 -2
- package/lib/containers/_v2/_drawers/view-sampling-rule-drawer/index.d.ts +2 -4
- package/lib/containers/_v2/_forms/create-sampling-rule-form/context.d.ts +34 -0
- package/lib/containers/_v2/_forms/create-sampling-rule-form/index.d.ts +3 -0
- package/lib/containers/_v2/{_drawers/create-sampling-rule-drawer → _forms/create-sampling-rule-form}/sections/duration-errors.d.ts +1 -1
- package/lib/containers/_v2/{_drawers/create-sampling-rule-drawer → _forms/create-sampling-rule-form}/sections/operation.d.ts +1 -1
- package/lib/containers/_v2/{_drawers/create-sampling-rule-drawer → _forms/create-sampling-rule-form}/sections/percentage.d.ts +1 -1
- package/lib/containers/_v2/{_drawers/create-sampling-rule-drawer → _forms/create-sampling-rule-form}/sections/rule-info.d.ts +1 -1
- package/lib/containers/_v2/{_drawers/create-sampling-rule-drawer → _forms/create-sampling-rule-form}/sections/sampling-preview.d.ts +1 -1
- package/lib/containers/_v2/_forms/create-sampling-rule-form/styled.d.ts +5 -0
- package/lib/containers/_v2/{_drawers/create-sampling-rule-drawer → _forms/create-sampling-rule-form}/types.d.ts +1 -1
- package/lib/containers/_v2/_forms/edit-auto-rule-form/context.d.ts +21 -0
- package/lib/containers/_v2/_forms/edit-auto-rule-form/index.d.ts +3 -0
- package/lib/containers/_v2/_forms/edit-cost-reduction-auto-rule-form/context.d.ts +21 -0
- package/lib/containers/_v2/_forms/edit-cost-reduction-auto-rule-form/index.d.ts +3 -0
- package/lib/containers/_v2/_forms/edit-highly-relevant-auto-rule-form/context.d.ts +14 -0
- package/lib/containers/_v2/_forms/edit-highly-relevant-auto-rule-form/index.d.ts +3 -0
- package/lib/containers/_v2/_forms/index.d.ts +5 -0
- package/lib/containers/_v2/_forms/view-sampling-rule-form/context.d.ts +37 -0
- package/lib/containers/_v2/{_drawers/view-sampling-rule-drawer → _forms/view-sampling-rule-form}/footer.d.ts +3 -3
- package/lib/containers/_v2/_forms/view-sampling-rule-form/index.d.ts +3 -0
- package/lib/containers/_v2/{_drawers/view-sampling-rule-drawer → _forms/view-sampling-rule-form}/reverse-converters.d.ts +2 -2
- package/lib/containers/_v2/{_drawers/view-sampling-rule-drawer → _forms/view-sampling-rule-form}/sections/operation-details.d.ts +1 -1
- package/lib/containers/_v2/{_drawers/view-sampling-rule-drawer → _forms/view-sampling-rule-form}/sections/percentage.d.ts +1 -1
- package/lib/containers/_v2/{_drawers/view-sampling-rule-drawer → _forms/view-sampling-rule-form}/sections/rule-info.d.ts +1 -1
- package/lib/containers/_v2/{_drawers/view-sampling-rule-drawer → _forms/view-sampling-rule-form}/sections/sampling-preview.d.ts +2 -2
- package/lib/containers/_v2/index.d.ts +1 -2
- package/lib/containers/_v2/sampling-rules/auto-rule-card/index.d.ts +8 -0
- package/lib/containers/_v2/{sampling-rules-list → sampling-rules}/helpers.d.ts +23 -5
- package/lib/containers/_v2/sampling-rules/index.d.ts +3 -0
- package/lib/containers/_v2/sampling-rules/rules-table/index.d.ts +13 -0
- package/lib/containers/_v2/{sampling-rules-list/toolbar.d.ts → sampling-rules/toolbar/index.d.ts} +1 -1
- package/lib/containers/_v2/sampling-rules/types.d.ts +72 -0
- package/lib/containers/source-drawer/profiling/symbol-table.d.ts +6 -0
- package/lib/containers/v2.js +148 -341
- package/lib/containers.js +124 -170
- package/lib/contexts.js +1 -1
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/snippets/_v2/colored-span/index.d.ts +16 -0
- package/lib/snippets/_v2/index.d.ts +1 -0
- package/lib/snippets/_v2/rich-title/index.d.ts +2 -2
- package/lib/snippets/v2.js +15 -17
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +13 -13
- package/lib/containers/_v2/_drawers/create-sampling-rule-drawer/constants.d.ts +0 -26
- package/lib/containers/_v2/_drawers/edit-auto-rule-drawer/constants.d.ts +0 -10
- package/lib/containers/_v2/_drawers/edit-auto-rule-drawer/types.d.ts +0 -8
- package/lib/containers/_v2/_drawers/edit-cost-reduction-auto-rule-drawer/constants.d.ts +0 -10
- package/lib/containers/_v2/_drawers/edit-cost-reduction-auto-rule-drawer/types.d.ts +0 -8
- package/lib/containers/_v2/_drawers/edit-highly-relevant-auto-rule-drawer/constants.d.ts +0 -6
- package/lib/containers/_v2/_drawers/edit-highly-relevant-auto-rule-drawer/types.d.ts +0 -6
- package/lib/containers/_v2/_drawers/view-sampling-rule-drawer/constants.d.ts +0 -19
- package/lib/containers/_v2/_drawers/view-sampling-rule-drawer/sections/styled.d.ts +0 -4
- package/lib/containers/_v2/_drawers/view-sampling-rule-drawer/types.d.ts +0 -1
- package/lib/containers/_v2/auto-rule-card/constants.d.ts +0 -1
- package/lib/containers/_v2/auto-rule-card/helpers.d.ts +0 -19
- package/lib/containers/_v2/auto-rule-card/index.d.ts +0 -5
- package/lib/containers/_v2/auto-rule-card/types.d.ts +0 -6
- package/lib/containers/_v2/sampling-rules-list/constants.d.ts +0 -23
- package/lib/containers/_v2/sampling-rules-list/index.d.ts +0 -6
- package/lib/containers/_v2/sampling-rules-list/rule-row.d.ts +0 -12
- package/lib/containers/_v2/sampling-rules-list/summary-span.d.ts +0 -10
- package/lib/containers/_v2/sampling-rules-list/types.d.ts +0 -47
- package/lib/containers/_v2/{_drawers/create-sampling-rule-drawer → _forms/create-sampling-rule-form}/converters.d.ts +0 -0
- package/lib/containers/_v2/{_drawers/create-sampling-rule-drawer → _forms/create-sampling-rule-form}/form-helpers.d.ts +0 -0
- package/lib/containers/_v2/{_drawers/create-sampling-rule-drawer → _forms/create-sampling-rule-form}/sections/source-scope.d.ts +1 -1
- /package/lib/containers/_v2/{_drawers/view-sampling-rule-drawer → _forms/view-sampling-rule-form}/sections/duration-errors.d.ts +0 -0
- /package/lib/containers/_v2/{_drawers/view-sampling-rule-drawer → _forms/view-sampling-rule-form}/sections/source-scopes.d.ts +0 -0
|
@@ -9,7 +9,7 @@ export declare enum SectionCardSize {
|
|
|
9
9
|
export interface SectionCardProps {
|
|
10
10
|
size?: SectionCardSize;
|
|
11
11
|
fullHeight?: boolean;
|
|
12
|
-
richTitle
|
|
12
|
+
richTitle?: RichTitleProps;
|
|
13
13
|
search?: SearchProps;
|
|
14
14
|
actions?: ActionsProps['actions'];
|
|
15
15
|
children?: ReactNode;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ReactNode, type FC } from 'react';
|
|
2
|
+
import { type NoteProps } from '../../note';
|
|
3
|
+
import { type ButtonProps } from '../../button';
|
|
4
|
+
export interface FooterProps {
|
|
5
|
+
note?: NoteProps;
|
|
6
|
+
actions?: ButtonProps[];
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const Footer: FC<FooterProps>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode, type FC } from 'react';
|
|
2
2
|
import { HeaderProps } from './header';
|
|
3
|
+
import { type FooterProps } from './footer';
|
|
3
4
|
export interface DrawerProps {
|
|
4
5
|
isOpen: boolean;
|
|
5
6
|
hideOverlay?: boolean;
|
|
@@ -7,6 +8,7 @@ export interface DrawerProps {
|
|
|
7
8
|
position?: 'left' | 'right';
|
|
8
9
|
width?: CSSProperties['width'];
|
|
9
10
|
header?: HeaderProps;
|
|
11
|
+
footer?: FooterProps;
|
|
10
12
|
children: ReactNode;
|
|
11
13
|
}
|
|
12
14
|
export declare const Drawer: FC<DrawerProps>;
|
|
@@ -2,6 +2,7 @@ import { type CSSProperties, type FC } from 'react';
|
|
|
2
2
|
import { type ButtonProps } from '../button';
|
|
3
3
|
export interface HoverAction extends Pick<ButtonProps, 'label' | 'leftIcon' | 'rightIcon' | 'loading' | 'disabled'> {
|
|
4
4
|
id: string;
|
|
5
|
+
'data-id'?: string;
|
|
5
6
|
onClick: () => void;
|
|
6
7
|
tooltip?: string;
|
|
7
8
|
}
|
|
@@ -9,5 +10,6 @@ export interface HoverActionsProps {
|
|
|
9
10
|
isOpen: boolean;
|
|
10
11
|
actions: (HoverAction | null)[];
|
|
11
12
|
positionRight?: CSSProperties['right'];
|
|
13
|
+
positionLeft?: CSSProperties['left'];
|
|
12
14
|
}
|
|
13
15
|
export declare const HoverActions: FC<HoverActionsProps>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type FC, CSSProperties } from 'react';
|
|
2
2
|
import { type SegmentProps } from '../segment';
|
|
3
3
|
export interface SearchProps {
|
|
4
|
+
'data-id'?: string;
|
|
4
5
|
value: string;
|
|
5
6
|
onChange: (value: string) => void;
|
|
6
7
|
placeholder?: string;
|
|
7
8
|
width?: CSSProperties['width'];
|
|
8
|
-
segment?: Pick<SegmentProps, 'options' | 'selected' | 'setSelected'>;
|
|
9
|
+
segment?: Pick<SegmentProps, 'data-id' | 'options' | 'selected' | 'setSelected'>;
|
|
9
10
|
/** Replaces default idle background (`silver[800]`). */
|
|
10
11
|
idleBackgroundColor?: CSSProperties['backgroundColor'];
|
|
11
12
|
/** Replaces default hover / focus background (`silver[700]`). */
|
|
@@ -17,6 +17,7 @@ interface Option<T> {
|
|
|
17
17
|
disabled?: boolean;
|
|
18
18
|
}
|
|
19
19
|
export interface SegmentProps<T = any> {
|
|
20
|
+
'data-id'?: string;
|
|
20
21
|
size?: SegmentSize;
|
|
21
22
|
variant?: SegmentVariant;
|
|
22
23
|
options: Option<T>[];
|
|
@@ -24,5 +25,5 @@ export interface SegmentProps<T = any> {
|
|
|
24
25
|
setSelected: (value: T) => void;
|
|
25
26
|
disabled?: boolean;
|
|
26
27
|
}
|
|
27
|
-
export declare const Segment: <T>({ size, variant, options, selected, setSelected, disabled }: SegmentProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const Segment: <T>({ "data-id": dataId, size, variant, options, selected, setSelected, disabled }: SegmentProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
28
29
|
export {};
|
|
@@ -6,11 +6,13 @@ export interface TableProps {
|
|
|
6
6
|
variant: TableVariant;
|
|
7
7
|
maxHeight?: CSSProperties['maxHeight'];
|
|
8
8
|
headerBackgroundColor?: CSSProperties['backgroundColor'];
|
|
9
|
+
hideHeader?: boolean;
|
|
9
10
|
isLoading?: boolean;
|
|
10
11
|
columns: TableColumn[];
|
|
11
12
|
rows: TableRow[];
|
|
12
13
|
getRowActions?: (row: TableRow) => (HoverAction | null)[];
|
|
13
|
-
rowActionsPushRightPosition?: CSSProperties['
|
|
14
|
+
rowActionsPushRightPosition?: CSSProperties['right'];
|
|
15
|
+
rowActionsPushLeftPosition?: CSSProperties['left'];
|
|
14
16
|
withCheckboxes?: boolean;
|
|
15
17
|
}
|
|
16
18
|
export declare const Table: FC<TableProps>;
|
|
@@ -15,6 +15,7 @@ export declare const Row: IStyledComponent<'web', DivProps>;
|
|
|
15
15
|
interface ThProps {
|
|
16
16
|
$variant: TableVariant;
|
|
17
17
|
$backgroundColor?: CSSProperties['backgroundColor'];
|
|
18
|
+
$flex?: TableColumn['flex'];
|
|
18
19
|
$minWidth?: TableColumn['minWidth'];
|
|
19
20
|
$isFirst: boolean;
|
|
20
21
|
$isLast: boolean;
|
|
@@ -29,6 +30,7 @@ interface TdProps {
|
|
|
29
30
|
$isLastRow: boolean;
|
|
30
31
|
$isFirstCell: boolean;
|
|
31
32
|
$isLastCell: boolean;
|
|
33
|
+
$flex?: TableColumn['flex'];
|
|
32
34
|
$minWidth?: TableColumn['minWidth'];
|
|
33
35
|
}
|
|
34
36
|
export declare const Td: IStyledComponent<'web', DivProps<TdProps>>;
|
|
@@ -6,7 +6,8 @@ interface TableRowsProps {
|
|
|
6
6
|
columns: TableColumn[];
|
|
7
7
|
rows: TableRow[];
|
|
8
8
|
getRowActions: (row: TableRow) => (HoverAction | null)[];
|
|
9
|
-
rowActionsPushRightPosition?: CSSProperties['
|
|
9
|
+
rowActionsPushRightPosition?: CSSProperties['right'];
|
|
10
|
+
rowActionsPushLeftPosition?: CSSProperties['left'];
|
|
10
11
|
withCheckboxes?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export declare const TableRows: FC<TableRowsProps>;
|
|
@@ -6,8 +6,10 @@ export declare enum TableVariant {
|
|
|
6
6
|
export interface TableColumn {
|
|
7
7
|
key: string;
|
|
8
8
|
label: string;
|
|
9
|
+
withTooltip?: boolean;
|
|
9
10
|
noSort?: boolean;
|
|
10
11
|
noFilter?: boolean;
|
|
12
|
+
flex?: CSSProperties['flex'];
|
|
11
13
|
minWidth?: CSSProperties['minWidth'];
|
|
12
14
|
textAlign?: CSSProperties['textAlign'];
|
|
13
15
|
}
|
|
@@ -5,6 +5,9 @@ export declare const PageContent: IStyledComponent<'web', DivProps<{
|
|
|
5
5
|
$heightOffset?: number;
|
|
6
6
|
}>>;
|
|
7
7
|
export declare const UpgradeRequiredWrapper: IStyledComponent<'web', DivProps>;
|
|
8
|
+
export declare const Padding: IStyledComponent<'web', DivProps<{
|
|
9
|
+
$padding?: CSSProperties['padding'];
|
|
10
|
+
}>>;
|
|
8
11
|
interface FlexRowProps {
|
|
9
12
|
$gap?: number;
|
|
10
13
|
$alignItems?: CSSProperties['alignItems'];
|
|
@@ -12,6 +12,8 @@ interface TooltipProps extends PropsWithChildren {
|
|
|
12
12
|
* (e.g. hit-tested canvas). The popup only opens when `text` is non-empty.
|
|
13
13
|
*/
|
|
14
14
|
keepAlive?: boolean;
|
|
15
|
+
/** Truncate the tooltip text with an ellipsis when it overflows. */
|
|
16
|
+
ellipsis?: boolean;
|
|
15
17
|
}
|
|
16
18
|
declare const Tooltip: FC<TooltipProps>;
|
|
17
19
|
export { Tooltip, type TooltipProps };
|
package/lib/components/v2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{aD as Autocomplete,$ as Badge,q as Button,B as ButtonSize,fq as ButtonTab,fr as ButtonTabList,a as ButtonVariants,d as Checkbox,fs as CheckboxList,aF as CheckboxSize,bW as CliCommand,bI as DataCard,bp as Drawer,ar as DropData,bH as DropDataAlignX,bG as DropDataAlignY,bh as DropDown,j as FieldMessage,i as FieldTitle,ft as Header,e3 as HoverActions,bc as IconButton,bd as IconButtonSize,I as Input,p as InputList,m as InputTable,bS as Island,be as Loader,fu as Modal,fv as Navbar,N as NoData,P as Note,al as Radio,fw as RadioGroup,fx as RadioSize,dZ as Search,S as SectionCard,fy as SectionCardSize,x as Segment,ad as SegmentSize,cb as SegmentVariant,b_ as StatusCard,bT as Stepper,bQ as Table,bR as TableVariant,fz as Tag,y as TextArea,b$ as TextCard,n as Toggle,o as ToggleLabelAlign,fA as ToggleList,aO as ToggleSize,fB as ToggleVariant,T as Typography,e as TypographySize,bl as TypographyVariants,cc as WarningModal}from"../chunks/ui-components-Dj10kYlT.js";import"../icons.js";import"react/jsx-runtime";import"styled-components";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/components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{cO as AutocompleteInput,d6 as Badge,d8 as Button,cB as CancelWarning,b as CenterThis,cj as Checkbox,C as Code,cF as ConditionDetails,cG as DataCard,ch as DataCardFieldTypes,dK as DataCardFields,fb as DataFinger,da as DataTab,cA as DeleteWarning,e1 as DescribeRow,D as Divider,cu as DocsButton,cz as Drawer,fc as DrawerFooter,fd as DrawerHeader,du as Dropdown,fe as ErrorBoundary,dB as ExtendArrow,bV as FadeLoader,ck as FieldError,ci as FieldLabel,F as FlexColumn,c as FlexRow,ff as Header,cq as IconButton,eb as IconGroup,d0 as IconTitleBadge,cX as IconWrapped,dY as IconsNav,fg as ImageControlled,cl as Input,cp as InputList,cm as InputTable,d3 as InteractiveTable,co as KeyValueInputsList,fh as LoadingText,cL as Modal,cM as ModalBody,cv as MonitorsCheckboxes,cZ as MonitorsIcons,cP as NavigationButtons,d4 as NoDataFound,cN as NotificationNote,fi as Overlay,bv as Padding,bP as PageContent,dp as Popup,ed as PopupForm,ei as ScrollX,dc as ScrollY,ct as SectionTitle,cs as Segment,dr as SelectionButton,dg as SkeletonLoader,cR as Status,dJ as Stepper,fj as TabList,c_ as TableContainer,c$ as TableTitleWrap,d2 as TableWrap,dM as Tag,cx as Text,cw as TextArea,cn as Toggle,eg as ToggleCodeComponent,U as Tooltip,d5 as TraceLoader,c1 as UpgradeRequiredWrapper,dq as VerticalScroll,dP as WarningModal,fk as getLinksFromText,fl as getStrongsFromText,fm as renderText}from"./chunks/ui-components-Dj10kYlT.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";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/constants/index.d.ts
CHANGED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { SamplingRuleCategory } from '@/containers/_v2/sampling-rules/types';
|
|
2
|
+
export declare const BTN_CANCEL = "Cancel";
|
|
3
|
+
export declare const BTN_SAVE = "Save";
|
|
4
|
+
export declare const BTN_EDIT_RULE = "Edit rule";
|
|
5
|
+
export declare const BTN_EDIT_AUTO_RULE = "Edit auto rule";
|
|
6
|
+
export declare const BTN_CREATE_RULE = "Create rule";
|
|
7
|
+
export declare const BTN_DELETE_RULE = "Delete rule";
|
|
8
|
+
export declare const BTN_SAVE_RULE = "Save";
|
|
9
|
+
export declare const LABEL_RULE_NAME = "Rule name";
|
|
10
|
+
export declare const LABEL_RULE_TYPE = "Rule type";
|
|
11
|
+
export declare const LABEL_RULE_ENABLED = "Rule Enabled";
|
|
12
|
+
export declare const LABEL_NOTE = "Note";
|
|
13
|
+
export declare const LABEL_HTTP_ROUTE = "HTTP route";
|
|
14
|
+
export declare const LABEL_METHOD = "Method";
|
|
15
|
+
export declare const LABEL_KEEP_PERCENTAGE = "Keep Percentage";
|
|
16
|
+
export declare const LABEL_DROP_PERCENTAGE = "Drop Percentage";
|
|
17
|
+
export declare const LABEL_KEEP_TRACES_DURATION = "Keep traces with duration larger than";
|
|
18
|
+
export declare const LABEL_KEEP_TRACES_ERRORS = "Keep traces with errors";
|
|
19
|
+
export declare const LABEL_KEEP_AT_LEAST = "Keep at least this percentage of matching traces";
|
|
20
|
+
export declare const LABEL_KEEP_AT_MOST = "Keep at most this percentage of matching traces";
|
|
21
|
+
export declare const LABEL_CUSTOM_PERCENTAGE = "Custom percentage";
|
|
22
|
+
export declare const LABEL_DISABLED_RULE = "Disabled rule";
|
|
23
|
+
export declare const LABEL_SAMPLE = "Sample";
|
|
24
|
+
export declare const LABEL_KEEP_ALL = "Keep all";
|
|
25
|
+
export declare const LABEL_DROP_ALL = "Drop all";
|
|
26
|
+
export declare const LABEL_OPERATION_TYPE = "Operation type";
|
|
27
|
+
export declare const LABEL_HTTP_ROUTE_PREFIX = "HTTP route prefix";
|
|
28
|
+
export declare const LABEL_TEMPLATED_PATH = "Templated path";
|
|
29
|
+
export declare const LABEL_TEMPLATED_PATH_PREFIX = "Templated path prefix";
|
|
30
|
+
export declare const LABEL_KAFKA_TOPIC = "Kafka topic";
|
|
31
|
+
export declare const LABEL_CUSTOM_DURATION = "Custom duration (ms)";
|
|
32
|
+
export declare const LABEL_NO_PREVIEW = "No preview available";
|
|
33
|
+
export declare const LABEL_SERVER_ADDRESS = "Server address";
|
|
34
|
+
export declare const LABEL_DROP_AT_MOST = "Drop at most this percentage of matching traces";
|
|
35
|
+
export declare const UNNAMED_RULE = "Unnamed rule";
|
|
36
|
+
export declare const SECTION_SAMPLING_PREVIEW = "Sampling Preview";
|
|
37
|
+
export declare const SECTION_SOURCE_SCOPE = "Source Scope";
|
|
38
|
+
export declare const SECTION_OPERATION = "Operation";
|
|
39
|
+
export declare const SECTION_DURATION = "Duration";
|
|
40
|
+
export declare const SECTION_ERRORS = "Errors";
|
|
41
|
+
export declare const SECTION_KEEP_PERCENTAGE = "Keep Percentage";
|
|
42
|
+
export declare const SECTION_DROP_PERCENTAGE = "Drop Percentage";
|
|
43
|
+
export declare const DESC_SOURCE_SCOPE = "Define which sources this rule applies to. You can target specific services, namespaces, or apply the rule to the entire cluster.";
|
|
44
|
+
export declare const DESC_OPERATION = "Define which operations this rule applies to. You can target specific endpoints or requests, or apply the rule to all operations in the selected services.";
|
|
45
|
+
export declare const DESC_DURATION = "Define a duration threshold for this rule. Traces with a duration longer than the specified value will be considered important and retained.";
|
|
46
|
+
export declare const DESC_ERRORS = "Retain traces with errors from the selected services and operations.";
|
|
47
|
+
export declare const DESC_KEEP_PERCENTAGE = "Specify the exact percentage of matching traces to keep";
|
|
48
|
+
export declare const DESC_DROP_PERCENTAGE = "Specify the exact percentage of matching traces to drop";
|
|
49
|
+
export declare const PLACEHOLDER_RULE_NAME = "Type rule name";
|
|
50
|
+
export declare const PLACEHOLDER_NOTE = "Add note here...";
|
|
51
|
+
export declare const PLACEHOLDER_ROUTE = "Type here";
|
|
52
|
+
export declare const PLACEHOLDER_SEARCH_SOURCE = "Search source name";
|
|
53
|
+
export declare const PLACEHOLDER_SERVER_ADDRESS = "e.g. collector.my.vendor.com";
|
|
54
|
+
export declare const TOOLTIP_NOTE = "Optional notes (not used by the system). Add any context or details for this sampling rule.";
|
|
55
|
+
export declare const NOTE_ENTIRE_CLUSTER = "Rule will apply to all sources in the cluster";
|
|
56
|
+
export declare const ALL_SOURCES = "All sources";
|
|
57
|
+
export declare const EMPTY_VALUE = "-";
|
|
58
|
+
export declare const FILTER_TYPE_ALL = "All";
|
|
59
|
+
export declare const OPERATION_ALL = "All operations";
|
|
60
|
+
export declare const OPERATION_HTTP_SERVER = "HTTP server endpoint";
|
|
61
|
+
export declare const OPERATION_HTTP_CLIENT = "HTTP client endpoint";
|
|
62
|
+
export declare const OPERATION_KAFKA_CONSUMER = "Kafka consumer";
|
|
63
|
+
export declare const OPERATION_KAFKA_PRODUCER = "Kafka producer";
|
|
64
|
+
export declare const SAMPLING_PAGE_TITLE = "Sampling Rules";
|
|
65
|
+
export declare const SAMPLING_PAGE_DESCRIPTION = "Control how traces are categorized based on \"Importance\" and potential value, for fine grain control of what is kept and what is dropped.";
|
|
66
|
+
export declare const SAMPLING_BTN_REFRESH = "Refresh";
|
|
67
|
+
export declare const SAMPLING_BTN_CREATE_RULE = "Create rule";
|
|
68
|
+
export declare const SAMPLING_BTN_DOCS = "Sampling docs";
|
|
69
|
+
export declare const SAMPLING_DRAWER_WIDTH = "75vw";
|
|
70
|
+
export declare const SAMPLING_DELETE_MODAL_TITLE = "Delete rule?";
|
|
71
|
+
export declare const SAMPLING_DELETE_MODAL_DESCRIPTION = "Are you sure you want to delete this sampling rule?";
|
|
72
|
+
export declare const SAMPLING_DELETE_MODAL_APPROVE = "Delete";
|
|
73
|
+
export declare const SAMPLING_DELETE_MODAL_CANCEL = "Cancel";
|
|
74
|
+
export declare const SAMPLING_AUTO_RULE_TITLE = "Auto rule - Kubernetes Health Probes";
|
|
75
|
+
export declare const SAMPLING_HIGHLY_RELEVANT_AUTO_RULE_TITLE = "Auto rule - Keep All Error Traces";
|
|
76
|
+
export declare const SAMPLING_COST_REDUCTION_AUTO_RULE_TITLE = "Auto rule - Drop Traces Cluster-Wide";
|
|
77
|
+
export declare const SAMPLING_DUPLICATE_RULE_WARNING = "A rule with the same matching conditions already exists.";
|
|
78
|
+
export declare const EDIT_NOISY_AUTO_RULE_DRAWER_TITLE = "Edit 'Noisy Operation' auto rule";
|
|
79
|
+
export declare const EDIT_NOISY_AUTO_RULE_DRAWER_SUBTITLE = "Automatically detect and sample health probe traces across the cluster.";
|
|
80
|
+
export declare const EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE = "Edit 'Highly Relevant' auto rule";
|
|
81
|
+
export declare const EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_SUBTITLE = "Automatically keep all error traces across the entire cluster.";
|
|
82
|
+
export declare const EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE = "Edit 'Cost Reduction' auto rule";
|
|
83
|
+
export declare const EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_SUBTITLE = "Automatically drop a percentage of traces across the entire cluster.";
|
|
84
|
+
export declare const CATEGORY_DESCRIPTIONS: Record<SamplingRuleCategory, string>;
|
|
85
|
+
export declare const CATEGORY_TITLES: Record<SamplingRuleCategory, string>;
|
|
86
|
+
export declare const EDIT_TITLES: Record<SamplingRuleCategory, string>;
|
|
87
|
+
export declare const CATEGORY_LABELS: Record<SamplingRuleCategory, string>;
|
package/lib/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{b9 as ACTION_ATTRIBUTE_OPTIONS,cE as ACTION_OPTIONS,ba as ACTION_SAMPLER_OPTIONS,eZ as ALL_SOURCES,bq as BTN_CANCEL,br as BTN_CREATE_RULE,bL as BTN_DELETE_RULE,c4 as BTN_EDIT_AUTO_RULE,bK as BTN_EDIT_RULE,bw as BTN_SAVE,bJ as BTN_SAVE_RULE,bO as BUTTON_TEXTS,bs as CATEGORY_DESCRIPTIONS,aT as CATEGORY_LABELS,bt as CATEGORY_TITLES,a4 as DEFAULT_CLUSTER_ID,a3 as DEFAULT_CLUSTER_NAME,dA as DEFAULT_DATA_STREAM_NAME,au as DESC_DROP_PERCENTAGE,aH as DESC_DURATION,aL as DESC_ERRORS,at as DESC_KEEP_PERCENTAGE,ah as DESC_OPERATION,aA as DESC_SOURCE_SCOPE,bf as DESTINATION_CATEGORIES,a0 as DISPLAY_LANGUAGES,bb as DISPLAY_TITLES,w as DOCS_BASE_URL,G as DestinationCategoryTypes,bB as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_SUBTITLE,bC as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,bz as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_SUBTITLE,bA as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,bx as EDIT_NOISY_AUTO_RULE_DRAWER_SUBTITLE,by as EDIT_NOISY_AUTO_RULE_DRAWER_TITLE,bM as EDIT_TITLES,aS as EMPTY_VALUE,c3 as FILTER_TYPE_ALL,O as FORM_ALERTS,bj as INSTRUMENTATION_RULE_OPTIONS,aK as LABEL_CUSTOM_DURATION,az as LABEL_CUSTOM_PERCENTAGE,c2 as LABEL_DISABLED_RULE,aW as LABEL_DROP_ALL,b8 as LABEL_DROP_AT_MOST,aw as LABEL_DROP_PERCENTAGE,ao as LABEL_HTTP_ROUTE,aq as LABEL_HTTP_ROUTE_PREFIX,as as LABEL_KAFKA_TOPIC,aX as LABEL_KEEP_ALL,ax as LABEL_KEEP_AT_LEAST,ay as LABEL_KEEP_AT_MOST,av as LABEL_KEEP_PERCENTAGE,aJ as LABEL_KEEP_TRACES_DURATION,aN as LABEL_KEEP_TRACES_ERRORS,aU as LABEL_METHOD,ag as LABEL_NOTE,aQ as LABEL_NO_PREVIEW,aZ as LABEL_OPERATION_TYPE,b3 as LABEL_RULE_ENABLED,ab as LABEL_RULE_NAME,ac as LABEL_RULE_TYPE,aV as LABEL_SAMPLE,ak as LABEL_SERVER_ADDRESS,an as LABEL_TEMPLATED_PATH,ap as LABEL_TEMPLATED_PATH_PREFIX,e_ as LANGUAGE_OPTIONS,dv as MONITORS_OPTIONS,aC as NOTE_ENTIRE_CLUSTER,a$ as OPERATION_ALL,a_ as OPERATION_HTTP_CLIENT,aY as OPERATION_HTTP_SERVER,b0 as OPERATION_KAFKA_CONSUMER,b1 as OPERATION_KAFKA_PRODUCER,e$ as OTEL_DISTRO_NAME_OPTIONS,ae as PLACEHOLDER_NOTE,am as PLACEHOLDER_ROUTE,aa as PLACEHOLDER_RULE_NAME,aE as PLACEHOLDER_SEARCH_SOURCE,aj as PLACEHOLDER_SERVER_ADDRESS,b2 as SAMPLING_AUTO_RULE_TITLE,c8 as SAMPLING_BTN_CREATE_RULE,c6 as SAMPLING_BTN_DOCS,c7 as SAMPLING_BTN_REFRESH,b6 as SAMPLING_COST_REDUCTION_AUTO_RULE_TITLE,ce as SAMPLING_DELETE_MODAL_APPROVE,cd as SAMPLING_DELETE_MODAL_CANCEL,cf as SAMPLING_DELETE_MODAL_DESCRIPTION,cg as SAMPLING_DELETE_MODAL_TITLE,bu as SAMPLING_DRAWER_WIDTH,c5 as SAMPLING_DUPLICATE_RULE_WARNING,b5 as SAMPLING_HIGHLY_RELEVANT_AUTO_RULE_TITLE,c9 as SAMPLING_PAGE_DESCRIPTION,ca as SAMPLING_PAGE_TITLE,b7 as SECTION_DROP_PERCENTAGE,aI as SECTION_DURATION,aM as SECTION_ERRORS,b4 as SECTION_KEEP_PERCENTAGE,ai as SECTION_OPERATION,aP as SECTION_SAMPLING_PREVIEW,aB as SECTION_SOURCE_SCOPE,dw as STORAGE_KEYS,f0 as TOKEN_ABOUT_TO_EXPIRE,af as TOOLTIP_NOTE,aR as UNNAMED_RULE}from"./chunks/ui-components-Dj10kYlT.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";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";
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
2
|
+
import type { SamplingRuleCategory } from '../../sampling-rules/types';
|
|
3
|
+
import type { SamplingRuleFormState, DuplicateValidationResult } from '../../_forms/create-sampling-rule-form/types';
|
|
4
|
+
export interface CreateSamplingRuleDrawerProps {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
category: SamplingRuleCategory;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
onSubmit: (state: SamplingRuleFormState) => void;
|
|
9
|
+
sourceOptions?: {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
13
|
+
namespaceOptions?: {
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
}[];
|
|
17
|
+
validateForm?: (formState: SamplingRuleFormState) => DuplicateValidationResult | null;
|
|
18
|
+
onNavigateToDuplicate?: (ruleId: string) => void;
|
|
19
|
+
}
|
|
6
20
|
export declare const CreateSamplingRuleDrawer: FC<CreateSamplingRuleDrawerProps>;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export interface EditAutoRuleDrawerProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
keepPercentage: number;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onSave: (enabled: boolean, keepPercentage: number) => void;
|
|
8
|
+
}
|
|
4
9
|
export declare const EditAutoRuleDrawer: FC<EditAutoRuleDrawerProps>;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export interface EditCostReductionAutoRuleDrawerProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
dropPercentage: number;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onSave: (enabled: boolean, dropPercentage: number) => void;
|
|
8
|
+
}
|
|
4
9
|
export declare const EditCostReductionAutoRuleDrawer: FC<EditCostReductionAutoRuleDrawerProps>;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export interface EditHighlyRelevantAutoRuleDrawerProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onSave: (enabled: boolean) => void;
|
|
7
|
+
}
|
|
4
8
|
export declare const EditHighlyRelevantAutoRuleDrawer: FC<EditHighlyRelevantAutoRuleDrawerProps>;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
-
import type { ViewRuleData } from '
|
|
3
|
-
import type { SamplingRuleFormState, DuplicateValidationResult } from '
|
|
4
|
-
export type { ViewRuleData } from './types';
|
|
5
|
-
export { viewRuleDataToFormState } from './reverse-converters';
|
|
2
|
+
import type { ViewRuleData } from '../../sampling-rules/types';
|
|
3
|
+
import type { SamplingRuleFormState, DuplicateValidationResult } from '../../_forms/create-sampling-rule-form/types';
|
|
6
4
|
export interface ViewSamplingRuleDrawerProps {
|
|
7
5
|
data: ViewRuleData | null;
|
|
8
6
|
defaultEditMode?: boolean;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { type FC } from 'react';
|
|
2
|
+
import type { SamplingRuleCategory } from '../../sampling-rules/types';
|
|
3
|
+
import type { SamplingRuleFormState, DuplicateValidationResult } from './types';
|
|
4
|
+
interface CreateSamplingRuleFormContextType {
|
|
5
|
+
category: SamplingRuleCategory;
|
|
6
|
+
formData: SamplingRuleFormState;
|
|
7
|
+
handleChange: (updates: Partial<SamplingRuleFormState>) => void;
|
|
8
|
+
resetForm: () => void;
|
|
9
|
+
duplicateWarning: DuplicateValidationResult | null;
|
|
10
|
+
setDuplicateWarning: (warning: DuplicateValidationResult | null) => void;
|
|
11
|
+
sourceOptions: {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
}[];
|
|
15
|
+
namespaceOptions: {
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
}[];
|
|
19
|
+
}
|
|
20
|
+
export interface CreateSamplingRuleFormContextProviderProps {
|
|
21
|
+
category: SamplingRuleCategory;
|
|
22
|
+
sourceOptions?: {
|
|
23
|
+
id: string;
|
|
24
|
+
label: string;
|
|
25
|
+
}[];
|
|
26
|
+
namespaceOptions?: {
|
|
27
|
+
id: string;
|
|
28
|
+
label: string;
|
|
29
|
+
}[];
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
export declare const CreateSamplingRuleFormContextProvider: FC<CreateSamplingRuleFormContextProviderProps>;
|
|
33
|
+
export declare const useCreateSamplingRuleFormContext: () => CreateSamplingRuleFormContextType;
|
|
34
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
-
import type { HighlyRelevantBadgeType } from '../../../sampling-rules-list/types';
|
|
3
2
|
import type { SamplingRuleFormState } from '../types';
|
|
3
|
+
import type { HighlyRelevantBadgeType } from '../../../sampling-rules/types';
|
|
4
4
|
export interface FormDurationErrorsProps {
|
|
5
5
|
ruleType: HighlyRelevantBadgeType;
|
|
6
6
|
formState: SamplingRuleFormState;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
+
import type { SamplingRuleCategory } from '../../../sampling-rules/types';
|
|
2
3
|
import type { SamplingRuleFormState } from '../types';
|
|
3
|
-
import type { SamplingRuleCategory } from '../../../sampling-rules-list/types';
|
|
4
4
|
export interface FormOperationProps {
|
|
5
5
|
category: SamplingRuleCategory;
|
|
6
6
|
formState: SamplingRuleFormState;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
+
import type { SamplingRuleCategory } from '../../../sampling-rules/types';
|
|
2
3
|
import type { SamplingRuleFormState } from '../types';
|
|
3
|
-
import type { SamplingRuleCategory } from '../../../sampling-rules-list/types';
|
|
4
4
|
export interface FormPercentageProps {
|
|
5
5
|
category: SamplingRuleCategory;
|
|
6
6
|
formState: SamplingRuleFormState;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
2
|
import type { SamplingRuleFormState } from '../types';
|
|
3
|
-
import type { SamplingRuleCategory } from '../../../sampling-rules
|
|
3
|
+
import type { SamplingRuleCategory } from '../../../sampling-rules/types';
|
|
4
4
|
export interface FormRuleInfoProps {
|
|
5
5
|
category: SamplingRuleCategory;
|
|
6
6
|
formState: SamplingRuleFormState;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
-
import type { SamplingRuleCategory } from '../../../sampling-rules-list/types';
|
|
3
2
|
import type { SamplingRuleFormState } from '../types';
|
|
3
|
+
import type { SamplingRuleCategory } from '../../../sampling-rules/types';
|
|
4
4
|
export interface FormSamplingPreviewProps {
|
|
5
5
|
category: SamplingRuleCategory;
|
|
6
6
|
formState: SamplingRuleFormState;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const CellsRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
export declare const Cell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const PreviewSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
+
export declare const SummaryBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
|
+
export declare const PresetsRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SamplingRuleCategory, HighlyRelevantBadgeType } from '../../sampling-rules
|
|
1
|
+
import type { SamplingRuleCategory, HighlyRelevantBadgeType } from '../../sampling-rules/types';
|
|
2
2
|
export type ScopeType = 'all' | 'source' | 'namespace' | 'language';
|
|
3
3
|
export type OperationType = 'all' | 'httpServer' | 'httpClient' | 'kafkaConsumer' | 'kafkaProducer';
|
|
4
4
|
export type PercentageMode = 'all' | 'sample';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { type FC } from 'react';
|
|
2
|
+
import type { ColoredSpanPart } from '@/snippets/_v2/colored-span';
|
|
3
|
+
type PercentagePreset = '50' | '25' | '10' | '1' | 'custom';
|
|
4
|
+
interface EditAutoRuleFormContextType {
|
|
5
|
+
localEnabled: boolean;
|
|
6
|
+
setLocalEnabled: (value: boolean) => void;
|
|
7
|
+
percentagePreset: PercentagePreset;
|
|
8
|
+
setPercentagePreset: (value: PercentagePreset) => void;
|
|
9
|
+
customPercentage: string;
|
|
10
|
+
setCustomPercentage: (value: string) => void;
|
|
11
|
+
resolvedPercentage: number;
|
|
12
|
+
summary: ColoredSpanPart[];
|
|
13
|
+
}
|
|
14
|
+
export interface EditAutoRuleFormContextProviderProps {
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
keepPercentage: number;
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare const EditAutoRuleFormContextProvider: FC<EditAutoRuleFormContextProviderProps>;
|
|
20
|
+
export declare const useEditAutoRuleFormContext: () => EditAutoRuleFormContextType;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { type FC } from 'react';
|
|
2
|
+
import type { ColoredSpanPart } from '@/snippets/_v2/colored-span';
|
|
3
|
+
type PercentagePreset = '50' | '25' | '10' | '1' | 'custom';
|
|
4
|
+
interface EditCostReductionAutoRuleFormContextType {
|
|
5
|
+
localEnabled: boolean;
|
|
6
|
+
setLocalEnabled: (value: boolean) => void;
|
|
7
|
+
percentagePreset: PercentagePreset;
|
|
8
|
+
setPercentagePreset: (value: PercentagePreset) => void;
|
|
9
|
+
customPercentage: string;
|
|
10
|
+
setCustomPercentage: (value: string) => void;
|
|
11
|
+
resolvedPercentage: number;
|
|
12
|
+
summary: ColoredSpanPart[];
|
|
13
|
+
}
|
|
14
|
+
export interface EditCostReductionAutoRuleFormContextProviderProps {
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
dropPercentage: number;
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare const EditCostReductionAutoRuleFormContextProvider: FC<EditCostReductionAutoRuleFormContextProviderProps>;
|
|
20
|
+
export declare const useEditCostReductionAutoRuleFormContext: () => EditCostReductionAutoRuleFormContextType;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { type FC } from 'react';
|
|
2
|
+
import type { ColoredSpanPart } from '@/snippets/_v2/colored-span';
|
|
3
|
+
interface EditHighlyRelevantAutoRuleFormContextType {
|
|
4
|
+
localEnabled: boolean;
|
|
5
|
+
setLocalEnabled: (value: boolean) => void;
|
|
6
|
+
summary: ColoredSpanPart[];
|
|
7
|
+
}
|
|
8
|
+
export interface EditHighlyRelevantAutoRuleFormContextProviderProps {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const EditHighlyRelevantAutoRuleFormContextProvider: FC<EditHighlyRelevantAutoRuleFormContextProviderProps>;
|
|
13
|
+
export declare const useEditHighlyRelevantAutoRuleFormContext: () => EditHighlyRelevantAutoRuleFormContextType;
|
|
14
|
+
export {};
|
|
@@ -2,3 +2,8 @@ export * from './add-action-form';
|
|
|
2
2
|
export * from './add-destination-form';
|
|
3
3
|
export * from './add-rule-form';
|
|
4
4
|
export * from './add-source-form';
|
|
5
|
+
export * from './create-sampling-rule-form';
|
|
6
|
+
export * from './view-sampling-rule-form';
|
|
7
|
+
export * from './edit-auto-rule-form';
|
|
8
|
+
export * from './edit-highly-relevant-auto-rule-form';
|
|
9
|
+
export * from './edit-cost-reduction-auto-rule-form';
|