@yugabytedb/perf-advisor-ui 1.0.31 → 1.0.32

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/dist/types.d.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  import { MUIDataTableMeta, MUIDataTableColumn, MUIDataTableOptions } from 'mui-datatables';
2
2
  import * as axios from 'axios';
3
- import React$1, { FC, ChangeEvent, ReactElement, HTMLAttributes, ReactNode } from 'react';
3
+ import React$1, { FC, ReactNode, ReactElement, ChangeEvent, HTMLAttributes, VFC } from 'react';
4
+ import { ButtonProps, StandardTextFieldProps, MenuProps, SelectProps, BoxProps, CheckboxProps, InputProps, DialogProps, DialogContentProps, PopperProps, TooltipProps, SwitchProps, FormControlLabelProps } from '@material-ui/core';
5
+ import { LinkProps } from 'react-router-dom';
4
6
  import * as _material_ui_core_styles_withStyles from '@material-ui/core/styles/withStyles';
7
+ import { FieldValues, UseControllerProps } from 'react-hook-form';
5
8
  import { FetchNextPageOptions, InfiniteQueryObserverResult } from 'react-query';
6
9
 
7
10
  interface Universe {
@@ -637,7 +640,15 @@ declare class ApiService {
637
640
  }
638
641
  declare const PerfAdvisorAPI: ApiService;
639
642
 
640
- interface CodeBlockProps {
643
+ type MUIButtonProps = ButtonProps & Partial<LinkProps>;
644
+ interface YBButtonProps extends Omit<MUIButtonProps, 'variant' | 'color' | 'classes'> {
645
+ variant?: 'primary' | 'secondary' | 'ghost' | 'gradient' | 'pill';
646
+ showSpinner?: boolean;
647
+ selected?: boolean;
648
+ }
649
+ declare const YBButton: FC<YBButtonProps>;
650
+
651
+ interface CodeBlockProps$1 {
641
652
  showCopyButton?: boolean;
642
653
  multiBlock?: boolean;
643
654
  codeClassName?: string;
@@ -653,9 +664,26 @@ interface CodeBlockProps {
653
664
  collapseLabel?: string;
654
665
  onCopySuccess?: () => void;
655
666
  }
656
- declare const YBCodeBlock: FC<CodeBlockProps>;
667
+ declare const YBCodeBlock: FC<CodeBlockProps$1>;
668
+
669
+ interface CodeBlockProps {
670
+ showCopyButton?: boolean;
671
+ analyticsEventProps?: Record<string, string>;
672
+ multiBlock?: boolean;
673
+ codeClassName?: string;
674
+ preClassName?: string;
675
+ lang?: string;
676
+ containerClassName?: string;
677
+ text: string | string[] | React$1.ReactElement | React$1.ReactElement[];
678
+ dataTestId?: string;
679
+ enabledExpandCollapse?: boolean;
680
+ showExpandCollapse?: boolean;
681
+ collapseHeight?: number;
682
+ appName: AppName;
683
+ }
684
+ declare const YBCodeBlockCopy: FC<CodeBlockProps>;
657
685
 
658
- declare const useCodeBlockStyles: (props?: any) => _material_ui_core_styles_withStyles.ClassNameMap<"searchBox" | "refreshBtn" | "codeBlock" | "codeBlockSqlView" | "tableHeaderCell" | "rowTableCell" | "tableContainer" | "tableRow" | "queryTableRow" | "queryTableCell" | "queryPreBlock" | "queryCodeElement" | "queryContainerCode" | "defaultActions" | "overrideExpandBtn">;
686
+ declare const useCodeBlockStyles: (props?: any) => _material_ui_core_styles_withStyles.ClassNameMap<"codeClassName" | "preClassName" | "containerClassName" | "searchBox" | "refreshBtn" | "codeBlock" | "codeBlockSqlView" | "tableHeaderCell" | "rowTableCell" | "tableContainer" | "tableRow" | "queryTableRow" | "queryTableCell" | "queryPreBlock" | "queryCodeElement" | "queryContainerCode" | "defaultActions" | "overrideExpandBtn">;
659
687
 
660
688
  interface YBErrorIndicatorProps {
661
689
  type?: string;
@@ -664,6 +692,71 @@ interface YBErrorIndicatorProps {
664
692
  }
665
693
  declare const YBErrorIndicator: ({ type, uuid, customErrorMessage }: YBErrorIndicatorProps) => JSX.Element;
666
694
 
695
+ interface YBLabelProps {
696
+ className?: string;
697
+ dataTestId?: string;
698
+ width?: string;
699
+ }
700
+ declare const YBLabel: FC<YBLabelProps>;
701
+
702
+ type YBInputProps = {
703
+ tooltip?: ReactNode;
704
+ } & Omit<StandardTextFieldProps, 'variant' | 'color' | 'classes' | 'size' | 'select' | 'FormHelperTextProps' | 'SelectProps'>;
705
+ declare const YBInput: FC<YBInputProps>;
706
+
707
+ type YBInputFieldProps$1<T extends FieldValues> = UseControllerProps<T> & YBInputProps;
708
+ declare const YBInputField: <T extends FieldValues>(props: YBInputFieldProps$1<T>) => ReactElement;
709
+
710
+ type YBSelectProps = {
711
+ tooltip?: ReactNode;
712
+ renderValue?: (value: unknown) => ReactNode;
713
+ menuProps?: Partial<MenuProps>;
714
+ selectProps?: Partial<SelectProps>;
715
+ } & Omit<StandardTextFieldProps, 'variant' | 'color' | 'classes' | 'select' | 'size' | 'placeholder' | 'FormHelperTextProps' | 'SelectProps'>;
716
+ declare const YBSelect: FC<YBSelectProps>;
717
+
718
+ interface GenericFailureProps extends BoxProps {
719
+ text?: string;
720
+ }
721
+ declare const GenericFailure: FC<GenericFailureProps>;
722
+
723
+ declare enum AlertVariant {
724
+ Info = "info",
725
+ Warning = "warning",
726
+ Error = "error",
727
+ Success = "success",
728
+ InProgress = "inProgress"
729
+ }
730
+ interface TransitionProps {
731
+ appear?: number;
732
+ enter?: number;
733
+ exit?: number;
734
+ }
735
+ interface AlertProps {
736
+ open: boolean;
737
+ text: string | ReactNode;
738
+ icon?: ReactNode;
739
+ onClose?: () => void;
740
+ autoDismiss?: number;
741
+ width?: number;
742
+ isToast?: boolean;
743
+ variant?: AlertVariant;
744
+ key?: string | number;
745
+ position?: number;
746
+ className?: string;
747
+ dataTestId?: string;
748
+ transitionTimeout?: number | TransitionProps;
749
+ }
750
+ declare const YBAlert: FC<AlertProps>;
751
+
752
+ interface YBCheckboxProps extends CheckboxProps {
753
+ label: React$1.ReactNode;
754
+ labelClassName?: string;
755
+ showCheckedIcon?: boolean;
756
+ inputProps?: InputProps['inputProps'];
757
+ }
758
+ declare const YBCheckbox: FC<YBCheckboxProps>;
759
+
667
760
  interface YBDateTimePickerProps {
668
761
  defaultDateTimeValue?: string;
669
762
  dateTimeLabel: string;
@@ -675,6 +768,38 @@ interface YBDateTimePickerProps {
675
768
  }
676
769
  declare const YBDateTimePicker: ({ defaultDateTimeValue, dateTimeLabel, value, errorMsg, onChange, className, disabled }: YBDateTimePickerProps) => JSX.Element;
677
770
 
771
+ interface OverrideButtonProps {
772
+ primary?: YBButtonProps;
773
+ secondary?: YBButtonProps;
774
+ }
775
+ interface YBModalProps extends DialogProps {
776
+ title?: string;
777
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
778
+ overrideHeight?: string | number;
779
+ overrideWidth?: string | number;
780
+ isSidePanel?: boolean;
781
+ titleSeparator?: boolean;
782
+ titleIcon?: React$1.ReactNode;
783
+ actionsInfo?: React$1.ReactNode;
784
+ onClose?: () => void;
785
+ onSubmit?: () => void;
786
+ enableBackdropDismiss?: boolean;
787
+ submitLabel?: string;
788
+ submitButtonTooltip?: string | ReactElement;
789
+ submitTestId?: string;
790
+ customSubmitButton?: React$1.ReactNode;
791
+ cancelLabel?: React$1.ReactNode;
792
+ cancelButtonTooltip?: string;
793
+ cancelTestId?: string;
794
+ buttonProps?: OverrideButtonProps;
795
+ customTitle?: React$1.ReactNode;
796
+ hideCloseBtn?: boolean;
797
+ dialogContentProps?: DialogContentProps;
798
+ formProps?: React$1.HTMLProps<HTMLFormElement>;
799
+ gradientTag?: string;
800
+ }
801
+ declare const YBModal: FC<YBModalProps>;
802
+
678
803
  interface YBInfinitePaginationProps<T> {
679
804
  dataPrefetchFn: (options?: FetchNextPageOptions | undefined) => Promise<InfiniteQueryObserverResult<T, unknown>>;
680
805
  page: number;
@@ -738,6 +863,25 @@ interface RowItemClasses {
738
863
  }
739
864
  declare const getRowCellComponent: (appName: AppName, currentTablePage: number, displayedRows: any[], classes: any & RowItemClasses, showQuery: boolean, tableColumns: MUIDataTableColumn[], ignoredColumns: string[], startTime: string | null, endTime: string | null, expandedRowIndex: number | null, handleExpandedRowIndex: (index: number | null) => void, onSelectedQuery?: ((queryId: string, params: QueryPageParams) => void) | undefined) => (data: any[], dataIndex: number) => ReactNode;
740
865
 
866
+ type YBTooltipProps = {
867
+ children?: ReactElement;
868
+ dark?: boolean;
869
+ PopperProps?: Partial<PopperProps> & {
870
+ 'data-testid'?: string;
871
+ };
872
+ } & Omit<TooltipProps, 'children'>;
873
+ declare const YBTooltip: VFC<YBTooltipProps>;
874
+
875
+ interface YBToggleProps extends SwitchProps {
876
+ label?: string;
877
+ formControlLabelProps?: Partial<FormControlLabelProps>;
878
+ inputProps?: InputProps['inputProps'];
879
+ }
880
+ declare const YBToggle: FC<YBToggleProps>;
881
+
882
+ type YBInputFieldProps<T extends FieldValues> = UseControllerProps<T> & YBToggleProps;
883
+ declare const YBToggleField: <T extends FieldValues>(props: YBInputFieldProps<T>) => ReactElement;
884
+
741
885
  interface MetricSplitSelectorProps {
742
886
  metricSplitSelectors: any;
743
887
  anomalyData?: Anomaly | null;
@@ -770,6 +914,9 @@ interface ClusterRegionSelectorProps {
770
914
  }
771
915
  declare const ClusterRegionSelector: ({ selectedItem, primaryClusterToRegionMap, asyncClusterToRegionMap, onClusterRegionSelected }: ClusterRegionSelectorProps) => JSX.Element;
772
916
 
917
+ type YBCheckboxFieldProps<T extends FieldValues> = UseControllerProps<T> & YBCheckboxProps;
918
+ declare const YBCheckboxField: <T extends FieldValues>(props: YBCheckboxFieldProps<T>) => ReactElement;
919
+
773
920
  declare const IN_DEVELOPMENT_MODE: boolean;
774
921
  declare const REACT_APP_API_URL: string;
775
922
 
@@ -1119,4 +1266,4 @@ declare function isYAxisGreaterThanThousand(dataArray: any): boolean;
1119
1266
  declare function divideYAxisByThousand(dataArray: any): any;
1120
1267
  declare function timeFormatXAxis(dataArray: any, timezone: string | undefined): any;
1121
1268
 
1122
- export { ACTIVE_SESSION_HISOTRY_EPS_CLIENT_NODE, ACTIVE_SESSION_HISTORY_EPS_GLOBAL, ACTIVE_SESSION_HISTORY_QUERY_EVENTS, ALL, ALL_REGIONS, ALL_ZONES, ANOMALY_CATEGORY_LIST, ANOMALY_FILTER_DURATION_OPTIONS, ANOMALY_TAG, ANOMALY_TYPE_TO_NAME_MAP, ASH, ASH_GROUPBY_VALUES, AggregatedLineSettings, Aggregation, Anomaly, AnomalyCategory, AnomalyDetails, AnomalyDetectionStatus, AnomalyDetectionStatusText, AnomalyGroup, AnomalyInstance, AnomalyResponse, AnomalyType, AnomalyTypeFilter, AppName, AttachUniversePayload, AuthDetails, BACKGROUND_QUERY_REQUEST_GRAPHS, CATALOG_READ_REQUEST_GRAPH, CATEGORY_HEADER_DATA_MAP, COLORS, CORES, CPU_COUNT, CQL_QUERY_REQUEST_GRAPHS, ClusterLoadResponseData, ClusterNodeInfo, ClusterNodeListMetadata, ClusterRegionSelector, Column, ColumnOptions, ConfigureUniverseMetadata, DB_TAG, DEFAULT_RECORDS_PER_PAGE, ELLIPSIS, FormattedAnomalyRca, GLOBAL_RUNTIME_CONFIG, GROUP_BY_OPERATIONS, GraphAxisData, GraphFilters, GraphMetadata, GraphRequestParams, GraphResponse, GraphSettings, GraphType, GroupEventsParam, IN_DEVELOPMENT_MODE, InsightsTabs, MAX_OUTLIER_NUM_NODES, METRICS_OUTLIER_DATABASES_STORAGE_KEY, METRICS_OUTLIER_TABLES_STORAGE_KEY, METRICS_SESSION_STORAGE_KEY, METRIC_DB_RESOURCES_WITH_GRAPHS, METRIC_FONT, METRIC_NAMES, METRIC_RESOURCES_WITH_GRAPHS, METRIC_TABLES_RESOURCES_WITH_GRAPHS, METRIC_TABS, METRIC_TABS_DATABASES, METRIC_TABS_TABLES, MIN_OUTLIER_NUM_NODES, MORE, MetadataFields, MetricConsts, MetricMeasure, MetricOrigin, MetricSplitSelector, MetricsAnalysisEntry, MetricsAnalysisEntryProps, NAME_COLOR_MAPPING, NodeData, NodeDataCloudInfo, NodeDataMetrics, NodeDetails, NodeInfo, NodeState, OutlierSelector, PerfAdvisorAPI, PerfAdvisorEntry, PrimaryDashboardViewTabs, QUERIES, QUERY_DETAILS, QUERY_KEY, QueryPageParams, QueryType, QueryWaitEvents, RCAGuideline, RCA_GANT_CHART, REACT_APP_API_URL, REGION_TAG, RUNTIME_CONFIG_KEYS, Resources, RowItemClasses$1 as RowItemClasses, RuntimeConfigData, RuntimeConfigType, RuntimeConfigs, SQL_QUERY_REQUEST_GRAPHS, SortDirection, SplitMode, SplitType, TABLET_TAG, TABLE_REQUEST_GRAPHS, TABLE_TAG, TIME_FILTER_LABEL, TIME_FILTER_VALUES, TPFeatureFlags, TPUrlParams, TYPE, TableInfo, TablePageParams, TroubleshootingRecommendations, URL_TAB_PATH, USER_TAG, Universe, UniverseConfig, UniverseMetadataFields, UniverseQueryData, UniverseQueryStatsData, UpdateMetadataFormFields, UpdateRuntimeConfigFormFields, UrlParams, VIEW_MORE, WAIT_EVENT_MAPPING, WaitEventClassification, YBCodeBlock, YBDateTimePicker, YBErrorIndicator, YBInfinitePagination, YBPagination, YBPanelItem, YBTable, ZONE_TAG, ZoneNodeSelector, divideYAxisByThousand, filterDurations, getCustomFooterComponent, getRowCellComponent, isDefinedNotNull, isEmptyArray, isEmptyObject, isEmptyString, isNonEmptyArray, isNonEmptyObject, isNonEmptyString, isNullOrEmpty, isValidObject, isYAxisGreaterThanThousand, metricOutlierSelectors, metricSplitSelectors, otherSplitSelectors, removeNullProperties, timeFormatXAxis, useCodeBlockStyles };
1269
+ export { ACTIVE_SESSION_HISOTRY_EPS_CLIENT_NODE, ACTIVE_SESSION_HISTORY_EPS_GLOBAL, ACTIVE_SESSION_HISTORY_QUERY_EVENTS, ALL, ALL_REGIONS, ALL_ZONES, ANOMALY_CATEGORY_LIST, ANOMALY_FILTER_DURATION_OPTIONS, ANOMALY_TAG, ANOMALY_TYPE_TO_NAME_MAP, ASH, ASH_GROUPBY_VALUES, AggregatedLineSettings, Aggregation, AlertVariant, Anomaly, AnomalyCategory, AnomalyDetails, AnomalyDetectionStatus, AnomalyDetectionStatusText, AnomalyGroup, AnomalyInstance, AnomalyResponse, AnomalyType, AnomalyTypeFilter, AppName, AttachUniversePayload, AuthDetails, BACKGROUND_QUERY_REQUEST_GRAPHS, CATALOG_READ_REQUEST_GRAPH, CATEGORY_HEADER_DATA_MAP, COLORS, CORES, CPU_COUNT, CQL_QUERY_REQUEST_GRAPHS, ClusterLoadResponseData, ClusterNodeInfo, ClusterNodeListMetadata, ClusterRegionSelector, Column, ColumnOptions, ConfigureUniverseMetadata, DB_TAG, DEFAULT_RECORDS_PER_PAGE, ELLIPSIS, FormattedAnomalyRca, GLOBAL_RUNTIME_CONFIG, GROUP_BY_OPERATIONS, GenericFailure, GraphAxisData, GraphFilters, GraphMetadata, GraphRequestParams, GraphResponse, GraphSettings, GraphType, GroupEventsParam, IN_DEVELOPMENT_MODE, InsightsTabs, MAX_OUTLIER_NUM_NODES, METRICS_OUTLIER_DATABASES_STORAGE_KEY, METRICS_OUTLIER_TABLES_STORAGE_KEY, METRICS_SESSION_STORAGE_KEY, METRIC_DB_RESOURCES_WITH_GRAPHS, METRIC_FONT, METRIC_NAMES, METRIC_RESOURCES_WITH_GRAPHS, METRIC_TABLES_RESOURCES_WITH_GRAPHS, METRIC_TABS, METRIC_TABS_DATABASES, METRIC_TABS_TABLES, MIN_OUTLIER_NUM_NODES, MORE, MetadataFields, MetricConsts, MetricMeasure, MetricOrigin, MetricSplitSelector, MetricsAnalysisEntry, MetricsAnalysisEntryProps, NAME_COLOR_MAPPING, NodeData, NodeDataCloudInfo, NodeDataMetrics, NodeDetails, NodeInfo, NodeState, OutlierSelector, PerfAdvisorAPI, PerfAdvisorEntry, PrimaryDashboardViewTabs, QUERIES, QUERY_DETAILS, QUERY_KEY, QueryPageParams, QueryType, QueryWaitEvents, RCAGuideline, RCA_GANT_CHART, REACT_APP_API_URL, REGION_TAG, RUNTIME_CONFIG_KEYS, Resources, RowItemClasses$1 as RowItemClasses, RuntimeConfigData, RuntimeConfigType, RuntimeConfigs, SQL_QUERY_REQUEST_GRAPHS, SortDirection, SplitMode, SplitType, TABLET_TAG, TABLE_REQUEST_GRAPHS, TABLE_TAG, TIME_FILTER_LABEL, TIME_FILTER_VALUES, TPFeatureFlags, TPUrlParams, TYPE, TableInfo, TablePageParams, TroubleshootingRecommendations, URL_TAB_PATH, USER_TAG, Universe, UniverseConfig, UniverseMetadataFields, UniverseQueryData, UniverseQueryStatsData, UpdateMetadataFormFields, UpdateRuntimeConfigFormFields, UrlParams, VIEW_MORE, WAIT_EVENT_MAPPING, WaitEventClassification, YBAlert, YBButton, YBCheckbox, YBCheckboxField, YBCodeBlock, YBCodeBlockCopy, YBDateTimePicker, YBErrorIndicator, YBInfinitePagination, YBInput, YBInputField, YBLabel, YBModal, YBPagination, YBPanelItem, YBSelect, YBTable, YBToggle, YBToggleField, YBTooltip, ZONE_TAG, ZoneNodeSelector, divideYAxisByThousand, filterDurations, getCustomFooterComponent, getRowCellComponent, isDefinedNotNull, isEmptyArray, isEmptyObject, isEmptyString, isNonEmptyArray, isNonEmptyObject, isNonEmptyString, isNullOrEmpty, isValidObject, isYAxisGreaterThanThousand, metricOutlierSelectors, metricSplitSelectors, otherSplitSelectors, removeNullProperties, timeFormatXAxis, useCodeBlockStyles };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yugabytedb/perf-advisor-ui",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "main": "dist/cjs/index.js",
5
5
  "types": "dist/types.d.ts",
6
6
  "author": "Rajagopalan Madhavan",
@@ -43,7 +43,6 @@
43
43
  "@types/react-dom": "17.0.3",
44
44
  "@types/react-router": "3.0.24",
45
45
  "@types/react-router-dom": "5.3.3",
46
- "@yugabyte-ui-library/core": "2.0.5",
47
46
  "axios": "0.21.3",
48
47
  "clsx": "1.1.1",
49
48
  "date-fns": "2.30.0",