@databrainhq/plugin 0.15.26 → 0.15.28
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/components/Accordion/index.d.ts +33 -0
- package/dist/components/AceEditorSql/AceEditorSql.d.ts +11 -0
- package/dist/components/Alert/index.d.ts +12 -0
- package/dist/components/AutoCompleteDropdown/index.d.ts +20 -0
- package/dist/components/Badge/index.d.ts +10 -0
- package/dist/components/Button/index.d.ts +14 -0
- package/dist/components/ButtonGroup/index.d.ts +14 -0
- package/dist/components/Chart/SingleValueChart.d.ts +37 -0
- package/dist/components/Chart/index.d.ts +34 -0
- package/dist/components/ChartModal/ChartConfig.d.ts +10 -0
- package/dist/components/ChartModal/ChartModalOptions.d.ts +14 -0
- package/dist/components/ChartModal/index.d.ts +3 -0
- package/dist/components/ChartPopup/components/UnderlyingData/index.d.ts +15 -0
- package/dist/components/ChartPopup/index.d.ts +28 -0
- package/dist/components/ChartReportPanel/index.d.ts +10 -0
- package/dist/components/ChartSettingsPopup/ChartSettingsPopup.d.ts +13 -0
- package/dist/components/ChartSettingsPopup/components/ChartConfigure/ComboChartFormatter.d.ts +8 -0
- package/dist/components/ChartSettingsPopup/components/ChartConfigure/PositionContainer.d.ts +8 -0
- package/dist/components/ChartSettingsPopup/components/ChartConfigure/index.d.ts +26 -0
- package/dist/components/ChartSettingsPopup/components/ChartSettings/index.d.ts +14 -0
- package/dist/components/ChartSettingsPopup/index.d.ts +3 -0
- package/dist/components/ChartTypePanel/index.d.ts +15 -0
- package/dist/components/Checkbox/index.d.ts +10 -0
- package/dist/components/ColorField/ColorField.d.ts +13 -0
- package/dist/components/DataType/index.d.ts +9 -0
- package/dist/components/DateRangePicker/index.d.ts +36 -0
- package/dist/components/DraggableItem/index.d.ts +7 -0
- package/dist/components/DrillBreadCrumb/index.d.ts +16 -0
- package/dist/components/Error/index.d.ts +6 -0
- package/dist/components/ErrorFallback/index.d.ts +2 -0
- package/dist/components/ExternalMetricForm/index.d.ts +11 -0
- package/dist/components/FilterDropDown/index.d.ts +30 -0
- package/dist/components/FilterField/index.d.ts +39 -0
- package/dist/components/Flex/index.d.ts +13 -0
- package/dist/components/FloatingDropDown/index.d.ts +38 -0
- package/dist/components/FullScreenChart/index.d.ts +8 -0
- package/dist/components/GaugeLegend/index.d.ts +11 -0
- package/dist/components/GenerateMetric/index.d.ts +3 -0
- package/dist/components/GlobalFilters/AddFilter.d.ts +15 -0
- package/dist/components/GlobalFilters/AppliedFilter.d.ts +9 -0
- package/dist/components/GlobalFilters/Filters.d.ts +28 -0
- package/dist/components/GlobalFilters/HorizontalFilters.d.ts +35 -0
- package/dist/components/GlobalFilters/NumberFilterField.d.ts +23 -0
- package/dist/components/GlobalFilters/SearchField.d.ts +10 -0
- package/dist/components/GlobalFilters/index.d.ts +79 -0
- package/dist/components/HorizontalStackTable/DebouncedInput.d.ts +6 -0
- package/dist/components/HorizontalStackTable/index.d.ts +18 -0
- package/dist/components/Icons/Logos/index.d.ts +26 -0
- package/dist/components/Icons/index.d.ts +9 -0
- package/dist/components/InfoTooltip/index.d.ts +15 -0
- package/dist/components/InputField/index.d.ts +17 -0
- package/dist/components/List/index.d.ts +38 -0
- package/dist/components/Loader/index.d.ts +6 -0
- package/dist/components/Menu/index.d.ts +32 -0
- package/dist/components/MetricChart/ChartImageDownloadButton.d.ts +11 -0
- package/dist/components/MetricChart/CsvDownloadButton.d.ts +12 -0
- package/dist/components/MetricChart/PivotCsvDownloadButton.d.ts +12 -0
- package/dist/components/MetricChart/RawCsvDownloadButton.d.ts +37 -0
- package/dist/components/MetricChart/index.d.ts +5 -0
- package/dist/components/MetricCreation/MetricCreation.d.ts +3 -0
- package/dist/components/MetricCreation/components/ConstructMetric/ConstructMetric.d.ts +3 -0
- package/dist/components/MetricCreation/components/ConstructMetric/components/MetricForm/index.d.ts +3 -0
- package/dist/components/MetricCreation/components/ConstructMetric/index.d.ts +2 -0
- package/dist/components/MetricCreation/components/Dataset/index.d.ts +3 -0
- package/dist/components/MetricCreation/components/Header/index.d.ts +3 -0
- package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +3 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +33 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/components/InputTables/index.d.ts +2 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/components/index.d.ts +1 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/index.d.ts +11 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/index.d.ts +3 -0
- package/dist/components/MetricCreation/components/MetricOutput/index.d.ts +2 -0
- package/dist/components/MetricCreation/components/Panels/ChartActionPanel.d.ts +13 -0
- package/dist/components/MetricCreation/components/Panels/ChartAppearancePanel.d.ts +22 -0
- package/dist/components/MetricCreation/components/Panels/FiltersPanel.d.ts +20 -0
- package/dist/components/MetricCreation/components/Panels/SortPanel.d.ts +15 -0
- package/dist/components/MetricCreation/index.d.ts +5 -0
- package/dist/components/MetricFilterDropDown/components/OldMetricFilterComponents.d.ts +17 -0
- package/dist/components/MetricFilterDropDown/components/SearchField.d.ts +7 -0
- package/dist/components/MetricFilterDropDown/components/StringAutoCustomFilterField.d.ts +18 -0
- package/dist/components/MetricFilterDropDown/components/StringManualFilterField.d.ts +11 -0
- package/dist/components/MetricFilterDropDown/components/TimeFilterField.d.ts +12 -0
- package/dist/components/MetricFilterDropDown/components/VariableTimeFilterField.d.ts +12 -0
- package/dist/components/MetricFilterDropDown/index.d.ts +24 -0
- package/dist/components/MetricList/MetricList.d.ts +65 -0
- package/dist/components/MetricList/components/ArchiveMetricModal/index.d.ts +7 -0
- package/dist/components/MetricList/components/DownloadRawCsvModal/index.d.ts +13 -0
- package/dist/components/MetricList/components/FullScreenView/AddMetricFilter.d.ts +8 -0
- package/dist/components/MetricList/components/FullScreenView/ChartPropertiesPanel.d.ts +12 -0
- package/dist/components/MetricList/components/FullScreenView/DownloadButton.d.ts +18 -0
- package/dist/components/MetricList/components/FullScreenView/index.d.ts +45 -0
- package/dist/components/MetricList/components/LayoutAlert/index.d.ts +7 -0
- package/dist/components/MetricList/components/ManageMetricMenu/ManageMetricCard.d.ts +15 -0
- package/dist/components/MetricList/components/ManageMetricMenu/index.d.ts +17 -0
- package/dist/components/MetricList/components/MetricCards/CreateElementPanel.d.ts +14 -0
- package/dist/components/MetricList/components/MetricCards/ElementCard.d.ts +16 -0
- package/dist/components/MetricList/components/MetricCards/MetricCard.d.ts +98 -0
- package/dist/components/MetricList/components/MetricCards/NoDataLoading.d.ts +11 -0
- package/dist/components/MetricList/components/TableViewModal/index.d.ts +9 -0
- package/dist/components/MetricList/components/index.d.ts +7 -0
- package/dist/components/MetricList/index.d.ts +2 -0
- package/dist/components/MetricTable/index.d.ts +7 -0
- package/dist/components/Modal/Modal.d.ts +14 -0
- package/dist/components/Modal/ModalFooter.d.ts +5 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/MultiSelectDropdown/index.d.ts +39 -0
- package/dist/components/Panel/index.d.ts +17 -0
- package/dist/components/PivotTable/PivotTableV2.d.ts +23 -0
- package/dist/components/PivotTable/index.d.ts +8 -0
- package/dist/components/PivotTable/transformData.d.ts +7 -0
- package/dist/components/PopoverMenu/index.d.ts +36 -0
- package/dist/components/Portal/index.d.ts +2 -0
- package/dist/components/RadioButton/index.d.ts +16 -0
- package/dist/components/ScheduleEmail/ScheduleEmailForm/index.d.ts +6 -0
- package/dist/components/ScheduleEmail/index.d.ts +3 -0
- package/dist/components/SearchDropdown/index.d.ts +14 -0
- package/dist/components/SearchMetricData/ChatMode/ChatAppearancePanel.d.ts +19 -0
- package/dist/components/SearchMetricData/ChatMode/ChatMode.d.ts +44 -0
- package/dist/components/SearchMetricData/ChatMode/ChatModeHeader.d.ts +8 -0
- package/dist/components/SearchMetricData/ChatMode/ChatReportPanel.d.ts +9 -0
- package/dist/components/SearchMetricData/ChatMode/ChatSqlPanel.d.ts +7 -0
- package/dist/components/SearchMetricData/ChatMode/NoChatData.d.ts +3 -0
- package/dist/components/SearchMetricData/ChatMode/NoDataFound.d.ts +7 -0
- package/dist/components/SearchMetricData/ChatMode/Results.d.ts +23 -0
- package/dist/components/SearchMetricData/LoaderWithStates/index.d.ts +7 -0
- package/dist/components/SearchMetricData/SearchMetricData.d.ts +5 -0
- package/dist/components/SearchMetricData/index.d.ts +1 -0
- package/dist/components/SearchTab/index.d.ts +13 -0
- package/dist/components/Select/index.d.ts +47 -0
- package/dist/components/SelfHostControl/index.d.ts +4 -0
- package/dist/components/SkeletonLoader/index.d.ts +9 -0
- package/dist/components/SpinningLoader/index.d.ts +2 -0
- package/dist/components/Switch/SwitchInput.d.ts +9 -0
- package/dist/components/Switch/index.d.ts +11 -0
- package/dist/components/Tab/index.d.ts +14 -0
- package/dist/components/Table/DebouncedInput.d.ts +6 -0
- package/dist/components/Table/Filter.d.ts +7 -0
- package/dist/components/Table/index.d.ts +36 -0
- package/dist/components/Tabs/index.d.ts +41 -0
- package/dist/components/TagInputField/index.d.ts +33 -0
- package/dist/components/Text/index.d.ts +13 -0
- package/dist/components/TextAreaField/index.d.ts +24 -0
- package/dist/components/ThemeBlock/index.d.ts +8 -0
- package/dist/components/TimeGrainField/index.d.ts +16 -0
- package/dist/components/TimeSeriesSettings/index.d.ts +8 -0
- package/dist/components/index.d.ts +63 -0
- package/dist/consts/api.d.ts +64 -0
- package/dist/consts/app.d.ts +154 -0
- package/dist/consts/index.d.ts +2 -0
- package/dist/consts/metricOptions.d.ts +205 -0
- package/dist/consts/validations.d.ts +24 -0
- package/dist/containers/CreateMetric/CreateEmbeddedMetric.d.ts +14 -0
- package/dist/containers/CreateMetric/index.d.ts +3 -0
- package/dist/containers/Dashboard/Dashboard.d.ts +72 -0
- package/dist/containers/Dashboard/DashboardProvider.d.ts +7 -0
- package/dist/containers/Dashboard/EmbededDashboard.d.ts +45 -0
- package/dist/containers/Dashboard/index.d.ts +2 -0
- package/dist/containers/DbnStyles.d.ts +10 -0
- package/dist/containers/Metric/EmbeddedMetric.d.ts +47 -0
- package/dist/containers/Metric/index.d.ts +85 -0
- package/dist/containers/PluginProvider.d.ts +7 -0
- package/dist/containers/index.d.ts +3 -0
- package/dist/helpers/adaptiveFormatter.d.ts +6 -0
- package/dist/helpers/areArraysEqual.d.ts +1 -0
- package/dist/helpers/autoCompleteHelpers.d.ts +95 -0
- package/dist/helpers/cardActions.d.ts +5 -0
- package/dist/helpers/chartOptions.d.ts +93 -0
- package/dist/helpers/checkIsElementInViewport.d.ts +1 -0
- package/dist/helpers/conditionalFormatting.d.ts +3 -0
- package/dist/helpers/copyToClipboard.d.ts +4 -0
- package/dist/helpers/createMetric.d.ts +25 -0
- package/dist/helpers/darkColorIdentifier.d.ts +2 -0
- package/dist/helpers/dateFormatter.d.ts +1 -0
- package/dist/helpers/generateColorPalette.d.ts +1 -0
- package/dist/helpers/generateTimeRangeWhereClause.d.ts +13 -0
- package/dist/helpers/getColumnType.d.ts +2 -0
- package/dist/helpers/getComboRangeLabel.d.ts +5 -0
- package/dist/helpers/getFilterAppliedQuery.d.ts +71 -0
- package/dist/helpers/getModifiedQuery.d.ts +78 -0
- package/dist/helpers/getNextScheduledTime.d.ts +13 -0
- package/dist/helpers/getTimeFilterValue.d.ts +12 -0
- package/dist/helpers/getValidRlsConditionOptions.d.ts +16 -0
- package/dist/helpers/groupArray.d.ts +1 -0
- package/dist/helpers/groupBy.d.ts +25 -0
- package/dist/helpers/index.d.ts +16 -0
- package/dist/helpers/numberFormatter.d.ts +1 -0
- package/dist/helpers/setOnDateChange.d.ts +11 -0
- package/dist/helpers/sqlMetadata.d.ts +7 -0
- package/dist/helpers/timeseries.d.ts +35 -0
- package/dist/helpers/timeseriesOption.d.ts +72 -0
- package/dist/helpers/tooltipFormatter.d.ts +27 -0
- package/dist/helpers/treeMap.d.ts +6 -0
- package/dist/hooks/index.d.ts +12 -0
- package/dist/hooks/useArchiveMetric.d.ts +10 -0
- package/dist/hooks/useAutoCompleteOptions.d.ts +4 -0
- package/dist/hooks/useClientDashboardLayout.d.ts +21 -0
- package/dist/hooks/useDashboardContext.d.ts +37 -0
- package/dist/hooks/useDatasetMetric.d.ts +50 -0
- package/dist/hooks/useDebounce.d.ts +2 -0
- package/dist/hooks/useDownloadRawCsv.d.ts +21 -0
- package/dist/hooks/useDrag.d.ts +10 -0
- package/dist/hooks/useDragAndDropState.d.ts +10 -0
- package/dist/hooks/useDrop.d.ts +13 -0
- package/dist/hooks/useEmbeddedMetric.d.ts +24 -0
- package/dist/hooks/useExternalMetric.d.ts +55 -0
- package/dist/hooks/useGenerateDatasetMetrics.d.ts +13 -0
- package/dist/hooks/useGenerateMetric.d.ts +64 -0
- package/dist/hooks/useMetricCard.d.ts +121 -0
- package/dist/hooks/useMetricConfig.d.ts +63 -0
- package/dist/hooks/useNewEmbeddedDashboard.d.ts +35 -0
- package/dist/hooks/useOutsideAlerter.d.ts +14 -0
- package/dist/hooks/usePublishArchivedMetrics.d.ts +5 -0
- package/dist/hooks/usePythonResults.d.ts +17 -0
- package/dist/hooks/useScheduleEmail.d.ts +29 -0
- package/dist/hooks/useSearch.d.ts +55 -0
- package/dist/hooks/useUnderlyingData.d.ts +32 -0
- package/dist/index.d.ts +8 -0
- package/dist/queries/externalDashboard.mutation.d.ts +61 -0
- package/dist/queries/externalDashboard.query.d.ts +20 -0
- package/dist/queries/index.d.ts +1 -0
- package/dist/queries/metric.mutation.d.ts +57 -0
- package/dist/queries/metric.query.d.ts +12 -0
- package/dist/types/app.d.ts +894 -0
- package/dist/types/dragAndDropProps.d.ts +70 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/metricCreate.d.ts +741 -0
- package/dist/types/queryTypes.d.ts +341 -0
- package/dist/utils/arrayToCsvString.d.ts +6 -0
- package/dist/utils/colors.d.ts +2 -0
- package/dist/utils/fetcher.d.ts +13 -0
- package/dist/utils/getChartAttributes.d.ts +98 -0
- package/dist/utils/getChartImage.d.ts +3 -0
- package/dist/utils/getChartOptions.d.ts +42 -0
- package/dist/utils/getFormattedDataType.d.ts +1 -0
- package/dist/utils/getNoAxisChartOptions.d.ts +25 -0
- package/dist/utils/getValidJson.d.ts +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/pivotDataTransform.d.ts +7 -0
- package/dist/utils/popoverPosition.d.ts +2 -0
- package/dist/utils/theme.d.ts +42 -0
- package/dist/webcomponents.d.ts +16 -0
- package/dist/webcomponents.es.js +202 -162
- package/dist/webcomponents.umd.js +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChartSettingsType, ConfigType, DatasetSettings, DrillDownSettings, FloatingDropDownOption } from '@/types';
|
|
3
|
+
export type CompanyIntegration = {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
} | undefined;
|
|
7
|
+
declare const useMetricConfig: ({ ...config }: ConfigType) => {
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
chartSettings: ChartSettingsType;
|
|
10
|
+
setShowSaveMetricModal: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
11
|
+
setSelectTable: import("react").Dispatch<import("react").SetStateAction<FloatingDropDownOption>>;
|
|
12
|
+
selectTable: FloatingDropDownOption;
|
|
13
|
+
data: any[] | undefined;
|
|
14
|
+
error: string;
|
|
15
|
+
previewTableData: any[] | undefined;
|
|
16
|
+
query: string;
|
|
17
|
+
isShowSqlModal: boolean;
|
|
18
|
+
setShowSqlModal: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
19
|
+
isEnablePivotTable: boolean;
|
|
20
|
+
isEnableGauge: boolean;
|
|
21
|
+
groupByList: string[];
|
|
22
|
+
hasNumberKeys: boolean;
|
|
23
|
+
setShowChartCustomProperties: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
24
|
+
isShowFullScreen: boolean;
|
|
25
|
+
setShowFullScreen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
26
|
+
isShowChartType: boolean;
|
|
27
|
+
setShowChartType: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
28
|
+
isShowSaveMetricModal: boolean;
|
|
29
|
+
updateExternalMetric: (data: import("react-hook-form").FieldValues, isElement?: boolean | undefined) => void;
|
|
30
|
+
createExternalMetric: (data: import("react-hook-form").FieldValues) => void;
|
|
31
|
+
dashboardOptions: {
|
|
32
|
+
value: any;
|
|
33
|
+
label: any;
|
|
34
|
+
}[];
|
|
35
|
+
saveError: string;
|
|
36
|
+
setChartSettings: import("react").Dispatch<import("react").SetStateAction<ChartSettingsType>>;
|
|
37
|
+
isShowChartCustomProperties: boolean;
|
|
38
|
+
setBarRadius: import("react").Dispatch<import("react").SetStateAction<{
|
|
39
|
+
topRadius: number;
|
|
40
|
+
bottomRadius: number;
|
|
41
|
+
}>>;
|
|
42
|
+
setError: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
43
|
+
setLoading: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
44
|
+
setData: import("react").Dispatch<import("react").SetStateAction<any[] | undefined>>;
|
|
45
|
+
setQuery: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
46
|
+
setGroupByList: import("react").Dispatch<import("react").SetStateAction<string[]>>;
|
|
47
|
+
clientSubsetData: any;
|
|
48
|
+
isShowSortPanel: boolean;
|
|
49
|
+
setShowSortPanel: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
50
|
+
isShowFilters: boolean;
|
|
51
|
+
setShowFilters: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
52
|
+
isCreatingMetric: boolean;
|
|
53
|
+
isEnableSingleDimension: boolean;
|
|
54
|
+
isEnableSingleMetrics: boolean;
|
|
55
|
+
enabledCharts: string[];
|
|
56
|
+
setResetPallete: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
57
|
+
dbName: string;
|
|
58
|
+
setDatatsetSettings: import("react").Dispatch<import("react").SetStateAction<DatasetSettings | undefined>>;
|
|
59
|
+
drillDownSettings: DrillDownSettings;
|
|
60
|
+
setDrillDownSettings: import("react").Dispatch<import("react").SetStateAction<DrillDownSettings>>;
|
|
61
|
+
datasetSettings: DatasetSettings | undefined;
|
|
62
|
+
};
|
|
63
|
+
export default useMetricConfig;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare const useNewEmbeddedDashboard: ({ token, dashboardId, }: {
|
|
2
|
+
token: string;
|
|
3
|
+
dashboardId?: string | undefined;
|
|
4
|
+
}) => {
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
error: string | undefined;
|
|
7
|
+
data: {
|
|
8
|
+
token: string;
|
|
9
|
+
externalDashboard: any;
|
|
10
|
+
externalDashboardMetrics: any;
|
|
11
|
+
isAllowedToChangeLayout: boolean;
|
|
12
|
+
isAllowedToCreateMetrics: boolean;
|
|
13
|
+
isAllowedToDeleteMetrics: boolean;
|
|
14
|
+
isAllowedToUpdateMetrics: boolean;
|
|
15
|
+
isAllowedToEmailReports: boolean;
|
|
16
|
+
isShowUnderlyingData: boolean;
|
|
17
|
+
companyId: string;
|
|
18
|
+
clientId: string;
|
|
19
|
+
workspace: any;
|
|
20
|
+
rlsSettings: any;
|
|
21
|
+
appFilters: any;
|
|
22
|
+
sharingSettingsId: string;
|
|
23
|
+
adminTheme: any;
|
|
24
|
+
companyTenancyType: string;
|
|
25
|
+
clientSubsetData: import("@/types/queryTypes").ClientSubsetData | undefined;
|
|
26
|
+
clientColumnType: import("../types").ClientColumnType;
|
|
27
|
+
refreshTime: number | null | undefined;
|
|
28
|
+
isEnableMetricSummary: boolean;
|
|
29
|
+
isAllClient: boolean;
|
|
30
|
+
metricCreationMode: string;
|
|
31
|
+
isAllowedManageMetrics: boolean;
|
|
32
|
+
dashboardAppFilters: any;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default useNewEmbeddedDashboard;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type UseOutsideAlerterProps = {
|
|
3
|
+
onOutsideClick: () => void;
|
|
4
|
+
wrapRef: React.RefObject<any>;
|
|
5
|
+
portalRef?: any;
|
|
6
|
+
};
|
|
7
|
+
export declare const useOutsideAlerter: ({ onOutsideClick, wrapRef, portalRef, }: UseOutsideAlerterProps) => void;
|
|
8
|
+
type UsePopoverOutsideAlerterProps = {
|
|
9
|
+
wrapRef: React.RefObject<any>;
|
|
10
|
+
portalRef?: any;
|
|
11
|
+
autoCloseParent?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const usePopoverOutsideAlerter: ({ wrapRef, portalRef, autoCloseParent, }: UsePopoverOutsideAlerterProps) => void;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RlsCondition, SqlError, TableColumn } from '@/types';
|
|
2
|
+
export declare const usePythonResults: ({ setError, setLoading, setData, }: {
|
|
3
|
+
setError?: ((error: SqlError) => void) | undefined;
|
|
4
|
+
setLoading?: ((loading: boolean) => void) | undefined;
|
|
5
|
+
setData?: ((data: Record<string, any>[]) => void) | undefined;
|
|
6
|
+
}) => {
|
|
7
|
+
pythonResult: Record<string, any>[];
|
|
8
|
+
pythonError: string;
|
|
9
|
+
isLoadingPython: boolean;
|
|
10
|
+
pythonColumns: TableColumn[];
|
|
11
|
+
executePython: ({ code, clientId, rlsConditions, companyId, }: {
|
|
12
|
+
code: string;
|
|
13
|
+
clientId?: string | undefined;
|
|
14
|
+
rlsConditions?: RlsCondition[] | undefined;
|
|
15
|
+
companyId: string;
|
|
16
|
+
}) => Promise<void>;
|
|
17
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FieldValues } from 'react-hook-form';
|
|
3
|
+
type Params = {
|
|
4
|
+
onCancel: () => void;
|
|
5
|
+
};
|
|
6
|
+
declare const useScheduleEmail: ({ onCancel }: Params) => {
|
|
7
|
+
register: import("react-hook-form").UseFormRegister<FieldValues>;
|
|
8
|
+
handleSubmit: import("react-hook-form").UseFormHandleSubmit<FieldValues>;
|
|
9
|
+
watch: import("react-hook-form").UseFormWatch<FieldValues>;
|
|
10
|
+
control: import("react-hook-form").Control<FieldValues, any>;
|
|
11
|
+
setValue: import("react-hook-form").UseFormSetValue<FieldValues>;
|
|
12
|
+
getValues: import("react-hook-form").UseFormGetValues<FieldValues>;
|
|
13
|
+
reset: import("react-hook-form").UseFormReset<FieldValues>;
|
|
14
|
+
dashboardName: string;
|
|
15
|
+
chartOptions: {
|
|
16
|
+
value: any;
|
|
17
|
+
label: any;
|
|
18
|
+
}[];
|
|
19
|
+
onSave: (e?: import("react").BaseSyntheticEvent<object, any, any> | undefined) => Promise<void>;
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
isSuccess: boolean;
|
|
22
|
+
error: string;
|
|
23
|
+
isLoadingData: boolean;
|
|
24
|
+
scheduleReportConfig: any;
|
|
25
|
+
onDelete: (e?: import("react").BaseSyntheticEvent<object, any, any> | undefined) => Promise<void>;
|
|
26
|
+
isDeleted: boolean;
|
|
27
|
+
errors: import("react-hook-form").FieldErrors<FieldValues>;
|
|
28
|
+
};
|
|
29
|
+
export default useScheduleEmail;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChartReportStateType, PivotDrillState, SearchKeyType, SearchState, SearchStateChatType } from '@/types';
|
|
3
|
+
import { ChartTypePanelProps } from '@/components/SearchMetricData/ChatMode/ChatMode';
|
|
4
|
+
import { ChartAppearancePanelProps } from '@/components/SearchMetricData/ChatMode/ChatAppearancePanel';
|
|
5
|
+
export type UseSearchType = {
|
|
6
|
+
dashboardId: string | null;
|
|
7
|
+
dashboardIds: string[];
|
|
8
|
+
themeChartColors?: string[];
|
|
9
|
+
workspaceId: string;
|
|
10
|
+
token: string;
|
|
11
|
+
companyId: string;
|
|
12
|
+
setSearchGenerateMetricModal: (value: React.SetStateAction<boolean>) => void;
|
|
13
|
+
clientId: string;
|
|
14
|
+
};
|
|
15
|
+
declare const useSearch: ({ dashboardId, dashboardIds, themeChartColors, token, workspaceId, companyId, clientId, }: UseSearchType) => {
|
|
16
|
+
searchState: SearchState;
|
|
17
|
+
setSearchState: import("react").Dispatch<import("react").SetStateAction<SearchState>>;
|
|
18
|
+
onAskQuestion: () => void;
|
|
19
|
+
autoCompleteDropdownOptions: import("@/types").SearchColumn[];
|
|
20
|
+
searchKeys: SearchKeyType[];
|
|
21
|
+
setSearchKeys: import("react").Dispatch<import("react").SetStateAction<SearchKeyType[]>>;
|
|
22
|
+
setSearchKeyword: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
23
|
+
searchKeyword: string;
|
|
24
|
+
showChatResults: number[];
|
|
25
|
+
setShowChatResults: import("react").Dispatch<import("react").SetStateAction<number[]>>;
|
|
26
|
+
chartPanel: {
|
|
27
|
+
isOpenTypePanel: boolean;
|
|
28
|
+
isOpenAppearance: boolean;
|
|
29
|
+
chartIndex: number;
|
|
30
|
+
};
|
|
31
|
+
setChartPanel: import("react").Dispatch<import("react").SetStateAction<{
|
|
32
|
+
isOpenTypePanel: boolean;
|
|
33
|
+
isOpenAppearance: boolean;
|
|
34
|
+
chartIndex: number;
|
|
35
|
+
}>>;
|
|
36
|
+
chartTypePanelProps: ChartTypePanelProps;
|
|
37
|
+
chartAppearancePanelProps: Pick<ChartAppearancePanelProps, "chartSettings" | "setChartSettings" | "isOpen" | "setResetPallete" | "setBarRadius" | "onClose" | "zIndex">;
|
|
38
|
+
selectedChat: SearchStateChatType | undefined;
|
|
39
|
+
saveChat: (data: import("react-hook-form").FieldValues) => void;
|
|
40
|
+
isSavingChat: boolean;
|
|
41
|
+
saveChatError: string;
|
|
42
|
+
updateChat: (data: import("react-hook-form").FieldValues, isElement?: boolean | undefined) => void;
|
|
43
|
+
fromatQuery: (query: string) => string;
|
|
44
|
+
setChatReport: import("react").Dispatch<import("react").SetStateAction<ChartReportStateType>>;
|
|
45
|
+
chatReport: ChartReportStateType;
|
|
46
|
+
isSearchDataLoading: boolean;
|
|
47
|
+
pivotDrillState: PivotDrillState;
|
|
48
|
+
setPivotDrillState: import("react").Dispatch<import("react").SetStateAction<PivotDrillState>>;
|
|
49
|
+
isModalShow: boolean;
|
|
50
|
+
setModalShow: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
51
|
+
isLoading: boolean;
|
|
52
|
+
setLoading: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
53
|
+
onGenerateDataReport: (chat: SearchStateChatType) => void;
|
|
54
|
+
};
|
|
55
|
+
export default useSearch;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FilterFieldType } from '@/components';
|
|
2
|
+
import { DataMartRelationShip } from '@/helpers';
|
|
3
|
+
import { ClientColumnType, RlsCondition } from '@/types';
|
|
4
|
+
export declare const useUnderlyingData: ({ clientName, dbName, tenancyType, values, query, companyId, workspaceId, metricId, globalFilters, isAllClient, rlsConditions, dataMartRelationships, customSql, isEnableCustomSQL, }: {
|
|
5
|
+
clientName?: string | undefined;
|
|
6
|
+
dbName: string;
|
|
7
|
+
tenancyType?: string | undefined;
|
|
8
|
+
values?: Record<string, string> | undefined;
|
|
9
|
+
query: string;
|
|
10
|
+
companyId: string;
|
|
11
|
+
workspaceId: string;
|
|
12
|
+
metricId: string;
|
|
13
|
+
rlsConditions: RlsCondition[];
|
|
14
|
+
globalFilters: {
|
|
15
|
+
tableName: string;
|
|
16
|
+
filters: FilterFieldType[];
|
|
17
|
+
};
|
|
18
|
+
isAllClient: boolean;
|
|
19
|
+
dataMartRelationships: DataMartRelationShip[];
|
|
20
|
+
customSql?: string | undefined;
|
|
21
|
+
isEnableCustomSQL?: boolean | undefined;
|
|
22
|
+
}) => {
|
|
23
|
+
getUnderlyingData: ({ columnName, value, setData, setLoading, isSingleValueChart, clientColumnType, }: {
|
|
24
|
+
columnName: string | undefined;
|
|
25
|
+
value: any | undefined;
|
|
26
|
+
isSingleValueChart: boolean;
|
|
27
|
+
setData: React.Dispatch<React.SetStateAction<any[]>>;
|
|
28
|
+
setLoading: React.Dispatch<React.SetStateAction<boolean>>;
|
|
29
|
+
clientColumnType: ClientColumnType;
|
|
30
|
+
}) => void;
|
|
31
|
+
};
|
|
32
|
+
export default useUnderlyingData;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './containers';
|
|
2
|
+
export * as utils from './utils';
|
|
3
|
+
export * as consts from './consts';
|
|
4
|
+
export * as helpers from './helpers';
|
|
5
|
+
export * as hooks from './hooks';
|
|
6
|
+
export * as types from './types';
|
|
7
|
+
export * as Ui from './components';
|
|
8
|
+
export * as queries from './queries';
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { UseChatApiResponseType, UseCreateMetricMutationInputType, UseDatatsetMetricMutationInputType, UseDeleteDashboardScheduleReportMutationInputType, UseGenerateMetricDataMutationInputType, UseGenerateMetricMutationInputType, UsePreviewTableMutationInputType, UseSaveDashboardLayoutMutationInputType, UseSaveDashboardScheduleReportMutationInputType, UseUpdateAdminMetricMutationInputType, UseUpdateMetricMutationInputType } from '@/types/queryTypes';
|
|
2
|
+
export declare const useSaveDashboardLayoutMutation: () => import("react-query").UseMutationResult<{
|
|
3
|
+
data: unknown;
|
|
4
|
+
}, unknown, UseSaveDashboardLayoutMutationInputType, unknown>;
|
|
5
|
+
export declare const useSaveDashboardScheduleReportMutation: () => import("react-query").UseMutationResult<{
|
|
6
|
+
data: unknown;
|
|
7
|
+
}, unknown, {
|
|
8
|
+
data: UseSaveDashboardScheduleReportMutationInputType;
|
|
9
|
+
token: string;
|
|
10
|
+
}, unknown>;
|
|
11
|
+
export declare const useDeleteDashboardScheduleReportMutation: () => import("react-query").UseMutationResult<{
|
|
12
|
+
data: unknown;
|
|
13
|
+
}, unknown, UseDeleteDashboardScheduleReportMutationInputType, unknown>;
|
|
14
|
+
export declare const useCreateMetricMutation: () => import("react-query").UseMutationResult<{
|
|
15
|
+
data: unknown;
|
|
16
|
+
}, unknown, {
|
|
17
|
+
data: UseCreateMetricMutationInputType;
|
|
18
|
+
token: string;
|
|
19
|
+
}, unknown>;
|
|
20
|
+
export declare const useUpdateMetricMutation: () => import("react-query").UseMutationResult<{
|
|
21
|
+
data: unknown;
|
|
22
|
+
}, unknown, {
|
|
23
|
+
data: UseUpdateMetricMutationInputType;
|
|
24
|
+
token: string;
|
|
25
|
+
}, unknown>;
|
|
26
|
+
export declare const useUpdateAdminMetricMutation: () => import("react-query").UseMutationResult<{
|
|
27
|
+
data: unknown;
|
|
28
|
+
}, unknown, {
|
|
29
|
+
data: UseUpdateAdminMetricMutationInputType;
|
|
30
|
+
token: string;
|
|
31
|
+
}, unknown>;
|
|
32
|
+
export declare const useGenerateMetricMutation: () => import("react-query").UseMutationResult<{
|
|
33
|
+
data: unknown;
|
|
34
|
+
}, unknown, {
|
|
35
|
+
data: UseGenerateMetricMutationInputType;
|
|
36
|
+
token: string;
|
|
37
|
+
}, unknown>;
|
|
38
|
+
export declare const useDatasetMetricMutation: () => import("react-query").UseMutationResult<{
|
|
39
|
+
data: unknown;
|
|
40
|
+
}, unknown, {
|
|
41
|
+
data: UseDatatsetMetricMutationInputType;
|
|
42
|
+
token: string;
|
|
43
|
+
}, unknown>;
|
|
44
|
+
export declare const usePreviewTableMutation: () => import("react-query").UseMutationResult<{
|
|
45
|
+
data: unknown;
|
|
46
|
+
}, unknown, {
|
|
47
|
+
data: UsePreviewTableMutationInputType;
|
|
48
|
+
token: string;
|
|
49
|
+
}, unknown>;
|
|
50
|
+
export declare const useGenerateMetricDataMutation: () => import("react-query").UseMutationResult<{
|
|
51
|
+
data: unknown;
|
|
52
|
+
}, unknown, {
|
|
53
|
+
data: UseGenerateMetricDataMutationInputType;
|
|
54
|
+
token: string;
|
|
55
|
+
}, unknown>;
|
|
56
|
+
export declare const useChatApiResponse: () => import("react-query").UseMutationResult<{
|
|
57
|
+
data: unknown;
|
|
58
|
+
}, unknown, {
|
|
59
|
+
data: UseChatApiResponseType;
|
|
60
|
+
token: string;
|
|
61
|
+
}, unknown>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { UseDashboardDataQueryInputType } from '@/types/queryTypes';
|
|
2
|
+
export declare const useDashboardDataQuery: ({ token, dashboardId, }: UseDashboardDataQueryInputType) => import("react-query").UseQueryResult<{
|
|
3
|
+
data: unknown;
|
|
4
|
+
}, unknown>;
|
|
5
|
+
export declare const useDashboardLayoutQuery: (dashboardId: string, clientId: string) => import("react-query").UseQueryResult<{
|
|
6
|
+
data: unknown;
|
|
7
|
+
}, unknown>;
|
|
8
|
+
export declare const useDashboardScheduledReportQuery: (token: string) => import("react-query").UseQueryResult<{
|
|
9
|
+
data: unknown;
|
|
10
|
+
}, unknown>;
|
|
11
|
+
export declare const useEmbeddedMetricQuery: (token: string, id: string) => import("react-query").UseQueryResult<{
|
|
12
|
+
data: unknown;
|
|
13
|
+
}, unknown>;
|
|
14
|
+
export declare const useGetTheme: ({ token, name, companyId, }: {
|
|
15
|
+
token: string;
|
|
16
|
+
name: string;
|
|
17
|
+
companyId: string;
|
|
18
|
+
}) => import("react-query").UseQueryResult<{
|
|
19
|
+
data: unknown;
|
|
20
|
+
}, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './metric.mutation';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { UseMetricColumnMutationInputType, UseMetricUnderlyingDataMutationInputType, UseMetricShareCsvMutationInputType, UseMarkArchivedMutationInputType, UseExecutePythonMutationInputType, UseNewDatatsetMetricMutationInputType, UseGenerateMetricSummaryMutationInputType, UsePublishArchivedMetricsMutationInputType, DbChatMetricCreationType, SummarizeMetricMutationType } from '@/types/queryTypes';
|
|
2
|
+
export declare const useMetricColumnMutation: () => import("react-query").UseMutationResult<{
|
|
3
|
+
data: unknown;
|
|
4
|
+
}, unknown, UseMetricColumnMutationInputType, unknown>;
|
|
5
|
+
export declare const useMetricUnderlyingDataMutation: () => import("react-query").UseMutationResult<{
|
|
6
|
+
data: unknown;
|
|
7
|
+
}, unknown, UseMetricUnderlyingDataMutationInputType, unknown>;
|
|
8
|
+
export declare const useMetricShareCsvMutation: () => import("react-query").UseMutationResult<{
|
|
9
|
+
data: unknown;
|
|
10
|
+
}, unknown, UseMetricShareCsvMutationInputType, unknown>;
|
|
11
|
+
export declare const useMarkArchivedMutation: () => import("react-query").UseMutationResult<{
|
|
12
|
+
data: unknown;
|
|
13
|
+
}, unknown, {
|
|
14
|
+
data: UseMarkArchivedMutationInputType;
|
|
15
|
+
token: string;
|
|
16
|
+
}, unknown>;
|
|
17
|
+
export declare const usePublishArchivedMetricsMutation: () => import("react-query").UseMutationResult<{
|
|
18
|
+
data: unknown;
|
|
19
|
+
}, unknown, {
|
|
20
|
+
data: UsePublishArchivedMetricsMutationInputType;
|
|
21
|
+
token: string;
|
|
22
|
+
}, unknown>;
|
|
23
|
+
export declare const useExecutePythonMutation: () => import("react-query").UseMutationResult<{
|
|
24
|
+
data: unknown;
|
|
25
|
+
}, unknown, UseExecutePythonMutationInputType, unknown>;
|
|
26
|
+
export declare const useGenerateMetricDataMutation: () => import("react-query").UseMutationResult<{
|
|
27
|
+
data: unknown;
|
|
28
|
+
}, unknown, {
|
|
29
|
+
data: UseNewDatatsetMetricMutationInputType;
|
|
30
|
+
token: string;
|
|
31
|
+
clientId: string;
|
|
32
|
+
isFrontendApp: boolean;
|
|
33
|
+
}, unknown>;
|
|
34
|
+
export declare const useGenerateMetricSummaryMutation: () => import("react-query").UseMutationResult<{
|
|
35
|
+
data: unknown;
|
|
36
|
+
}, unknown, {
|
|
37
|
+
data: UseGenerateMetricSummaryMutationInputType;
|
|
38
|
+
token: string;
|
|
39
|
+
clientId: string;
|
|
40
|
+
isFrontendApp: boolean;
|
|
41
|
+
}, unknown>;
|
|
42
|
+
export declare const useDbChatMetricCreationMutation: () => import("react-query").UseMutationResult<{
|
|
43
|
+
data: unknown;
|
|
44
|
+
}, unknown, {
|
|
45
|
+
data: DbChatMetricCreationType;
|
|
46
|
+
token: string;
|
|
47
|
+
clientId: string;
|
|
48
|
+
isFrontendApp: boolean;
|
|
49
|
+
}, unknown>;
|
|
50
|
+
export declare const useSummarizeMetricMutation: () => import("react-query").UseMutationResult<{
|
|
51
|
+
data: unknown;
|
|
52
|
+
}, unknown, {
|
|
53
|
+
data: SummarizeMetricMutationType;
|
|
54
|
+
token: string;
|
|
55
|
+
clientId: string;
|
|
56
|
+
isFrontendApp: boolean;
|
|
57
|
+
}, unknown>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UseMetricQueryQueryInputType } from '@/types/queryTypes';
|
|
2
|
+
export declare const useMetricDataQuery: ({ clientId, data, token, isFrontendApp, }: {
|
|
3
|
+
data: UseMetricQueryQueryInputType;
|
|
4
|
+
clientId: string;
|
|
5
|
+
token?: string | undefined;
|
|
6
|
+
isFrontendApp: boolean;
|
|
7
|
+
}) => import("react-query").UseQueryResult<{
|
|
8
|
+
data: unknown;
|
|
9
|
+
}, unknown>;
|
|
10
|
+
export declare const useMetricRawDownloadSettingsQuery: (workspaceId: string) => import("react-query").UseQueryResult<{
|
|
11
|
+
data: unknown;
|
|
12
|
+
}, unknown>;
|