@databrainhq/plugin 0.15.33 → 0.15.35
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/README.md +233 -233
- 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 +45 -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 +11 -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 +12 -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 +28 -0
- package/dist/components/Icons/index.d.ts +9 -0
- package/dist/components/InfoTooltip/index.d.ts +27 -0
- package/dist/components/InputField/index.d.ts +18 -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 +40 -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 +16 -0
- package/dist/components/ScheduleEmail/index.d.ts +16 -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 +14 -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 +65 -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/Dashboard/Dashboard.d.ts +73 -0
- package/dist/containers/Dashboard/DashboardProvider.d.ts +7 -0
- package/dist/containers/Dashboard/EmbededDashboard.d.ts +46 -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 +26 -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 +38 -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 +897 -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 +343 -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 +11 -0
- package/dist/webcomponents.es.js +4188 -3962
- package/dist/webcomponents.umd.js +18 -18
- package/package.json +113 -112
package/README.md
CHANGED
|
@@ -1,233 +1,233 @@
|
|
|
1
|
-
# @databrainhq/plugin
|
|
2
|
-
|
|
3
|
-
> Databrain app ui web component plugin.
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/@databrainhq/plugin) [](https://standardjs.com)
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install @databrainhq/plugin
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
React/Solidjs
|
|
16
|
-
|
|
17
|
-
Import in main/index/App
|
|
18
|
-
```tsx
|
|
19
|
-
import '@databrainhq/plugin/web';
|
|
20
|
-
```
|
|
21
|
-
Then use it anywhere in your app
|
|
22
|
-
|
|
23
|
-
Integrating Dashboard
|
|
24
|
-
|
|
25
|
-
```tsx
|
|
26
|
-
const Example = () => {
|
|
27
|
-
return (
|
|
28
|
-
<dbn-dashboard
|
|
29
|
-
token="Your Guest Token"
|
|
30
|
-
dashboardId="Your Dashboard Id"
|
|
31
|
-
options={{
|
|
32
|
-
disableMetricCreation: false,
|
|
33
|
-
disableMetricUpdation: false,
|
|
34
|
-
disableMetricDeletion: false,
|
|
35
|
-
disableLayoutCustomization: false,
|
|
36
|
-
chartColors: [
|
|
37
|
-
'violet',
|
|
38
|
-
'indigo',
|
|
39
|
-
'blue',
|
|
40
|
-
'green',
|
|
41
|
-
'yellow',
|
|
42
|
-
'orange',
|
|
43
|
-
'red',
|
|
44
|
-
'pink',
|
|
45
|
-
'gray',
|
|
46
|
-
],
|
|
47
|
-
}}
|
|
48
|
-
theme={YOUR_THEME}
|
|
49
|
-
/>
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Integrating Metric
|
|
55
|
-
|
|
56
|
-
```tsx
|
|
57
|
-
const Example = () => {
|
|
58
|
-
return (
|
|
59
|
-
<Metric
|
|
60
|
-
token="Your Guest Token"
|
|
61
|
-
metricId="Your Metric Id"
|
|
62
|
-
width="500px"
|
|
63
|
-
height="300px"
|
|
64
|
-
chartRendererType="canvas"
|
|
65
|
-
chartColors={[
|
|
66
|
-
'violet',
|
|
67
|
-
'indigo',
|
|
68
|
-
'blue',
|
|
69
|
-
'green',
|
|
70
|
-
'yellow',
|
|
71
|
-
'orange',
|
|
72
|
-
'red',
|
|
73
|
-
'pink',
|
|
74
|
-
'gray',
|
|
75
|
-
]}
|
|
76
|
-
theme={YOUR_THEME}
|
|
77
|
-
/>
|
|
78
|
-
);
|
|
79
|
-
};
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Vue
|
|
83
|
-
|
|
84
|
-
Import in main/index/App
|
|
85
|
-
```vue
|
|
86
|
-
<script setup lang="ts">
|
|
87
|
-
import '@databrainhq/plugin/web';
|
|
88
|
-
</script>
|
|
89
|
-
```
|
|
90
|
-
Then use it anywhere in your app
|
|
91
|
-
|
|
92
|
-
Integrating Dashboard
|
|
93
|
-
|
|
94
|
-
```vue
|
|
95
|
-
<script setup lang="ts">
|
|
96
|
-
// your component logic
|
|
97
|
-
</script>
|
|
98
|
-
<template>
|
|
99
|
-
<dbn-dashboard
|
|
100
|
-
:token="/*YOUR GUEST TOKEN*/"
|
|
101
|
-
:options="/*YOUR ACCESS PERMISSION OPTIONS*/"
|
|
102
|
-
:theme="/*YOUR THEME*/"
|
|
103
|
-
:dashboardId="/*YOUR DASHBORD ID*/"
|
|
104
|
-
></dbn-dashboard>
|
|
105
|
-
</template>
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Integrating Metric
|
|
109
|
-
|
|
110
|
-
```vue
|
|
111
|
-
<script setup lang="ts">
|
|
112
|
-
// your component logic
|
|
113
|
-
</script>
|
|
114
|
-
<template>
|
|
115
|
-
<dbn-metric
|
|
116
|
-
:token="/*YOUR GUEST TOKEN*/"
|
|
117
|
-
chartRendererType="canvas"
|
|
118
|
-
:theme="/*YOUR THEME*/"
|
|
119
|
-
:dashboardId="/*YOUR DASHBORD ID*/"
|
|
120
|
-
width="500"
|
|
121
|
-
height="400"
|
|
122
|
-
:style="/* YOUR STYLEs */"
|
|
123
|
-
className="YOUR CLASS"
|
|
124
|
-
></dbn-metric>
|
|
125
|
-
</template>
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
Svelte
|
|
129
|
-
|
|
130
|
-
Import in main/index/App
|
|
131
|
-
|
|
132
|
-
```svelte
|
|
133
|
-
<script lang="ts">
|
|
134
|
-
import '@databrainhq/plugin/web';
|
|
135
|
-
</script>
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
Then use it anywhere in your app
|
|
139
|
-
|
|
140
|
-
Integrating Dashboard
|
|
141
|
-
|
|
142
|
-
```svelte
|
|
143
|
-
<script lang="ts">
|
|
144
|
-
// your component logic
|
|
145
|
-
</script>
|
|
146
|
-
<main>
|
|
147
|
-
<dbn-dashboard
|
|
148
|
-
token={/*YOUR GUEST TOKEN*/}
|
|
149
|
-
options={/*YOUR ACCESS PERMISSION OPTIONS*/}
|
|
150
|
-
theme={/*YOUR THEME*/}
|
|
151
|
-
dashboardId={/*YOUR DASHBORD ID*/}
|
|
152
|
-
></dbn-dashboard>
|
|
153
|
-
</main>
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
Integrating Metric
|
|
157
|
-
|
|
158
|
-
```svelte
|
|
159
|
-
<script lang="ts">
|
|
160
|
-
// your component logic
|
|
161
|
-
</script>
|
|
162
|
-
<main>
|
|
163
|
-
<dbn-metric
|
|
164
|
-
token={/*YOUR GUEST TOKEN*/}
|
|
165
|
-
chartRendererType="canvas"
|
|
166
|
-
theme={/*YOUR THEME*/}
|
|
167
|
-
dashboardId="/*YOUR DASHBORD ID*/"
|
|
168
|
-
width="500"
|
|
169
|
-
height="400"
|
|
170
|
-
style={/* YOUR STYLEs */}
|
|
171
|
-
className="YOUR CLASS"
|
|
172
|
-
></dbn-metric>
|
|
173
|
-
</main>
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
Angular
|
|
177
|
-
|
|
178
|
-
Add suport for custom elements/web components in app.module.ts
|
|
179
|
-
|
|
180
|
-
```ts
|
|
181
|
-
// app.module.ts
|
|
182
|
-
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
183
|
-
import { BrowserModule } from '@angular/platform-browser';
|
|
184
|
-
|
|
185
|
-
import { AppComponent } from './app.component';
|
|
186
|
-
|
|
187
|
-
@NgModule({
|
|
188
|
-
declarations: [AppComponent],
|
|
189
|
-
imports: [BrowserModule],
|
|
190
|
-
providers: [],
|
|
191
|
-
bootstrap: [AppComponent],
|
|
192
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
193
|
-
})
|
|
194
|
-
|
|
195
|
-
export class AppModule {}
|
|
196
|
-
```
|
|
197
|
-
Import in app.component.ts
|
|
198
|
-
|
|
199
|
-
```ts
|
|
200
|
-
import '@databrainhq/plugin/web';
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
Then use it anywhere in your app
|
|
204
|
-
|
|
205
|
-
Integrating Dashboard
|
|
206
|
-
|
|
207
|
-
```html
|
|
208
|
-
<dbn-dashboard
|
|
209
|
-
token="YOUR GUEST TOKEN"
|
|
210
|
-
options="YOUR ACCESS PERMISSION OPTIONS"
|
|
211
|
-
theme="YOUR THEME"
|
|
212
|
-
dashboardId="YOUR DASHBORD ID"
|
|
213
|
-
></dbn-dashboard>
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
Integrating Metric
|
|
217
|
-
|
|
218
|
-
```html
|
|
219
|
-
<dbn-metric
|
|
220
|
-
token="YOUR GUEST TOKEN"
|
|
221
|
-
chartRendererType="canvas"
|
|
222
|
-
theme="YOUR THEME"
|
|
223
|
-
dashboardId="YOUR DASHBORD ID"
|
|
224
|
-
width="500"
|
|
225
|
-
height="400"
|
|
226
|
-
style="YOUR STYLE"
|
|
227
|
-
className="YOUR CLASS"
|
|
228
|
-
></dbn-metric>
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
## License
|
|
232
|
-
|
|
233
|
-
MIT © [databrainhq](https://github.com/databrainhq)
|
|
1
|
+
# @databrainhq/plugin
|
|
2
|
+
|
|
3
|
+
> Databrain app ui web component plugin.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@databrainhq/plugin) [](https://standardjs.com)
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @databrainhq/plugin
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
React/Solidjs
|
|
16
|
+
|
|
17
|
+
Import in main/index/App
|
|
18
|
+
```tsx
|
|
19
|
+
import '@databrainhq/plugin/web';
|
|
20
|
+
```
|
|
21
|
+
Then use it anywhere in your app
|
|
22
|
+
|
|
23
|
+
Integrating Dashboard
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
const Example = () => {
|
|
27
|
+
return (
|
|
28
|
+
<dbn-dashboard
|
|
29
|
+
token="Your Guest Token"
|
|
30
|
+
dashboardId="Your Dashboard Id"
|
|
31
|
+
options={{
|
|
32
|
+
disableMetricCreation: false,
|
|
33
|
+
disableMetricUpdation: false,
|
|
34
|
+
disableMetricDeletion: false,
|
|
35
|
+
disableLayoutCustomization: false,
|
|
36
|
+
chartColors: [
|
|
37
|
+
'violet',
|
|
38
|
+
'indigo',
|
|
39
|
+
'blue',
|
|
40
|
+
'green',
|
|
41
|
+
'yellow',
|
|
42
|
+
'orange',
|
|
43
|
+
'red',
|
|
44
|
+
'pink',
|
|
45
|
+
'gray',
|
|
46
|
+
],
|
|
47
|
+
}}
|
|
48
|
+
theme={YOUR_THEME}
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Integrating Metric
|
|
55
|
+
|
|
56
|
+
```tsx
|
|
57
|
+
const Example = () => {
|
|
58
|
+
return (
|
|
59
|
+
<Metric
|
|
60
|
+
token="Your Guest Token"
|
|
61
|
+
metricId="Your Metric Id"
|
|
62
|
+
width="500px"
|
|
63
|
+
height="300px"
|
|
64
|
+
chartRendererType="canvas"
|
|
65
|
+
chartColors={[
|
|
66
|
+
'violet',
|
|
67
|
+
'indigo',
|
|
68
|
+
'blue',
|
|
69
|
+
'green',
|
|
70
|
+
'yellow',
|
|
71
|
+
'orange',
|
|
72
|
+
'red',
|
|
73
|
+
'pink',
|
|
74
|
+
'gray',
|
|
75
|
+
]}
|
|
76
|
+
theme={YOUR_THEME}
|
|
77
|
+
/>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Vue
|
|
83
|
+
|
|
84
|
+
Import in main/index/App
|
|
85
|
+
```vue
|
|
86
|
+
<script setup lang="ts">
|
|
87
|
+
import '@databrainhq/plugin/web';
|
|
88
|
+
</script>
|
|
89
|
+
```
|
|
90
|
+
Then use it anywhere in your app
|
|
91
|
+
|
|
92
|
+
Integrating Dashboard
|
|
93
|
+
|
|
94
|
+
```vue
|
|
95
|
+
<script setup lang="ts">
|
|
96
|
+
// your component logic
|
|
97
|
+
</script>
|
|
98
|
+
<template>
|
|
99
|
+
<dbn-dashboard
|
|
100
|
+
:token="/*YOUR GUEST TOKEN*/"
|
|
101
|
+
:options="/*YOUR ACCESS PERMISSION OPTIONS*/"
|
|
102
|
+
:theme="/*YOUR THEME*/"
|
|
103
|
+
:dashboardId="/*YOUR DASHBORD ID*/"
|
|
104
|
+
></dbn-dashboard>
|
|
105
|
+
</template>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Integrating Metric
|
|
109
|
+
|
|
110
|
+
```vue
|
|
111
|
+
<script setup lang="ts">
|
|
112
|
+
// your component logic
|
|
113
|
+
</script>
|
|
114
|
+
<template>
|
|
115
|
+
<dbn-metric
|
|
116
|
+
:token="/*YOUR GUEST TOKEN*/"
|
|
117
|
+
chartRendererType="canvas"
|
|
118
|
+
:theme="/*YOUR THEME*/"
|
|
119
|
+
:dashboardId="/*YOUR DASHBORD ID*/"
|
|
120
|
+
width="500"
|
|
121
|
+
height="400"
|
|
122
|
+
:style="/* YOUR STYLEs */"
|
|
123
|
+
className="YOUR CLASS"
|
|
124
|
+
></dbn-metric>
|
|
125
|
+
</template>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Svelte
|
|
129
|
+
|
|
130
|
+
Import in main/index/App
|
|
131
|
+
|
|
132
|
+
```svelte
|
|
133
|
+
<script lang="ts">
|
|
134
|
+
import '@databrainhq/plugin/web';
|
|
135
|
+
</script>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Then use it anywhere in your app
|
|
139
|
+
|
|
140
|
+
Integrating Dashboard
|
|
141
|
+
|
|
142
|
+
```svelte
|
|
143
|
+
<script lang="ts">
|
|
144
|
+
// your component logic
|
|
145
|
+
</script>
|
|
146
|
+
<main>
|
|
147
|
+
<dbn-dashboard
|
|
148
|
+
token={/*YOUR GUEST TOKEN*/}
|
|
149
|
+
options={/*YOUR ACCESS PERMISSION OPTIONS*/}
|
|
150
|
+
theme={/*YOUR THEME*/}
|
|
151
|
+
dashboardId={/*YOUR DASHBORD ID*/}
|
|
152
|
+
></dbn-dashboard>
|
|
153
|
+
</main>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Integrating Metric
|
|
157
|
+
|
|
158
|
+
```svelte
|
|
159
|
+
<script lang="ts">
|
|
160
|
+
// your component logic
|
|
161
|
+
</script>
|
|
162
|
+
<main>
|
|
163
|
+
<dbn-metric
|
|
164
|
+
token={/*YOUR GUEST TOKEN*/}
|
|
165
|
+
chartRendererType="canvas"
|
|
166
|
+
theme={/*YOUR THEME*/}
|
|
167
|
+
dashboardId="/*YOUR DASHBORD ID*/"
|
|
168
|
+
width="500"
|
|
169
|
+
height="400"
|
|
170
|
+
style={/* YOUR STYLEs */}
|
|
171
|
+
className="YOUR CLASS"
|
|
172
|
+
></dbn-metric>
|
|
173
|
+
</main>
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Angular
|
|
177
|
+
|
|
178
|
+
Add suport for custom elements/web components in app.module.ts
|
|
179
|
+
|
|
180
|
+
```ts
|
|
181
|
+
// app.module.ts
|
|
182
|
+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
183
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
184
|
+
|
|
185
|
+
import { AppComponent } from './app.component';
|
|
186
|
+
|
|
187
|
+
@NgModule({
|
|
188
|
+
declarations: [AppComponent],
|
|
189
|
+
imports: [BrowserModule],
|
|
190
|
+
providers: [],
|
|
191
|
+
bootstrap: [AppComponent],
|
|
192
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
193
|
+
})
|
|
194
|
+
|
|
195
|
+
export class AppModule {}
|
|
196
|
+
```
|
|
197
|
+
Import in app.component.ts
|
|
198
|
+
|
|
199
|
+
```ts
|
|
200
|
+
import '@databrainhq/plugin/web';
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Then use it anywhere in your app
|
|
204
|
+
|
|
205
|
+
Integrating Dashboard
|
|
206
|
+
|
|
207
|
+
```html
|
|
208
|
+
<dbn-dashboard
|
|
209
|
+
token="YOUR GUEST TOKEN"
|
|
210
|
+
options="YOUR ACCESS PERMISSION OPTIONS"
|
|
211
|
+
theme="YOUR THEME"
|
|
212
|
+
dashboardId="YOUR DASHBORD ID"
|
|
213
|
+
></dbn-dashboard>
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Integrating Metric
|
|
217
|
+
|
|
218
|
+
```html
|
|
219
|
+
<dbn-metric
|
|
220
|
+
token="YOUR GUEST TOKEN"
|
|
221
|
+
chartRendererType="canvas"
|
|
222
|
+
theme="YOUR THEME"
|
|
223
|
+
dashboardId="YOUR DASHBORD ID"
|
|
224
|
+
width="500"
|
|
225
|
+
height="400"
|
|
226
|
+
style="YOUR STYLE"
|
|
227
|
+
className="YOUR CLASS"
|
|
228
|
+
></dbn-metric>
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## License
|
|
232
|
+
|
|
233
|
+
MIT © [databrainhq](https://github.com/databrainhq)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type AccordionProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
width?: string;
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
badge?: React.ReactNode;
|
|
8
|
+
setIsOpen?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
9
|
+
headerButton?: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
export declare const Accordion: React.FC<AccordionProps>;
|
|
12
|
+
type AccordionV2Props = {
|
|
13
|
+
footer?: React.ReactNode;
|
|
14
|
+
isEnableEditBtn?: boolean;
|
|
15
|
+
editBtnOnClick?: () => void;
|
|
16
|
+
isNoPadding?: boolean;
|
|
17
|
+
} & AccordionProps;
|
|
18
|
+
export declare const AccordionV2: React.FC<AccordionV2Props>;
|
|
19
|
+
type AccordionV3Props = {
|
|
20
|
+
header?: React.ReactNode;
|
|
21
|
+
footer?: React.ReactNode;
|
|
22
|
+
content: React.ReactNode;
|
|
23
|
+
headerButton?: React.ReactNode;
|
|
24
|
+
isOpen?: boolean;
|
|
25
|
+
width?: string;
|
|
26
|
+
setIsOpen?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
27
|
+
};
|
|
28
|
+
export declare const AccordionV3: ({ content, footer, header, isOpen, width, setIsOpen, headerButton, }: AccordionV3Props) => React.JSX.Element;
|
|
29
|
+
type AccordionV4Props = {
|
|
30
|
+
headerIcon?: React.ReactNode;
|
|
31
|
+
} & AccordionV3Props;
|
|
32
|
+
export declare const AccordionV4: ({ content, footer, header, headerIcon, isOpen, width, setIsOpen, headerButton, }: AccordionV4Props) => React.JSX.Element;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
onChange?: any;
|
|
4
|
+
value?: string;
|
|
5
|
+
onExecute?: (value?: string) => void;
|
|
6
|
+
editorRef: any;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const AceEditorSql: ({ onChange, value, onExecute, editorRef, isDisabled, placeholder, }: Props) => React.JSX.Element;
|
|
11
|
+
export default AceEditorSql;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Colors } from '@/types';
|
|
3
|
+
export type AlertProps = {
|
|
4
|
+
text: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
variant?: 'primary' | 'warning' | 'error' | 'success' | 'info';
|
|
7
|
+
hideInfoIcon?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
childrenClassName?: string;
|
|
10
|
+
textColor?: Colors;
|
|
11
|
+
};
|
|
12
|
+
export declare const Alert: ({ variant, text, children, hideInfoIcon, className, childrenClassName, textColor, }: AlertProps) => React.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FloatingDropDownOption, OnChangeAliasParams, OnChangeHelperFunctionParams, SelectedColumn } from '@/types';
|
|
3
|
+
export type AutoCompleteDropdownProps = {
|
|
4
|
+
setSelectedOptions: React.Dispatch<React.SetStateAction<SelectedColumn[]>>;
|
|
5
|
+
onSubmitSearch?: () => void;
|
|
6
|
+
selectedOption: SelectedColumn[];
|
|
7
|
+
options: SelectedColumn[];
|
|
8
|
+
label?: string;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
functionOptions?: (col?: SelectedColumn | undefined, colDatatype?: string | undefined) => FloatingDropDownOption[];
|
|
12
|
+
onChangeHelperFunction?: ({ column, helperFunction, functionConfiguration, type, }: OnChangeHelperFunctionParams) => void;
|
|
13
|
+
onChangeAlias: ({ alias, column }: OnChangeAliasParams) => void;
|
|
14
|
+
position?: 'top' | 'bottom';
|
|
15
|
+
setKeyWords?: React.Dispatch<React.SetStateAction<string[]>>;
|
|
16
|
+
isSaveKeyword?: boolean;
|
|
17
|
+
setSaveKeyword?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
18
|
+
setSearchQuestion?: React.Dispatch<React.SetStateAction<string>>;
|
|
19
|
+
};
|
|
20
|
+
export declare const AutoCompleteDropdown: ({ label, selectedOption, setSelectedOptions, options, isDisabled, placeholder, functionOptions, onChangeHelperFunction, onChangeAlias, position, setKeyWords, isSaveKeyword, setSaveKeyword, onSubmitSearch, setSearchQuestion, }: AutoCompleteDropdownProps) => React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
label: string | number;
|
|
4
|
+
varaint?: 'warning' | 'success' | 'success-light' | 'danger' | 'danger-light' | 'primary' | 'secondary' | 'info' | 'gray' | 'xs';
|
|
5
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
indicator?: JSX.Element;
|
|
8
|
+
};
|
|
9
|
+
export declare const Badge: React.FC<Props>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
isDisabled?: boolean;
|
|
4
|
+
variant: 'primary' | 'secondary' | 'tertiary' | 'tab' | 'popover';
|
|
5
|
+
leftIcon?: JSX.Element;
|
|
6
|
+
rightIcon?: JSX.Element;
|
|
7
|
+
fitContainer?: boolean;
|
|
8
|
+
size?: 'small' | 'regular';
|
|
9
|
+
dataTestTitle?: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
}
|
|
12
|
+
/** A basic button. Any props that are not explicitly called out below will be passed through to the native Button component. */
|
|
13
|
+
export declare const Button: ({ isDisabled, type, children, variant, onClick, size, title, leftIcon, rightIcon, fitContainer, className, dataTestTitle, id, ...props }: Props) => React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FloatingDropDownOption } from '@/types';
|
|
3
|
+
type ButtonGroupProps = {
|
|
4
|
+
label?: string;
|
|
5
|
+
options: FloatingDropDownOption[];
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
dataTestTitle?: string;
|
|
8
|
+
selectedOption: FloatingDropDownOption;
|
|
9
|
+
onChange: (option: FloatingDropDownOption) => void;
|
|
10
|
+
isimportant?: boolean;
|
|
11
|
+
id?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const ButtonGroup: ({ label, options, isDisabled, dataTestTitle, onChange, selectedOption, isimportant, id, ...props }: ButtonGroupProps) => React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ClickActionsConfig } from '@/types';
|
|
3
|
+
export type SingleValueChartProps = {
|
|
4
|
+
settings?: {
|
|
5
|
+
fontSize?: number;
|
|
6
|
+
subHeaderFontSize?: number;
|
|
7
|
+
subHeaderShow?: boolean;
|
|
8
|
+
displayText?: string;
|
|
9
|
+
comparisonValueFontSize?: number;
|
|
10
|
+
comparisonTimePeriod?: number;
|
|
11
|
+
comparisonTimeGrain?: string;
|
|
12
|
+
comparisonSuffix?: string;
|
|
13
|
+
fontColor?: string;
|
|
14
|
+
suffix?: string;
|
|
15
|
+
prefix?: string;
|
|
16
|
+
conditionalFormatter?: {
|
|
17
|
+
min: number;
|
|
18
|
+
max: number;
|
|
19
|
+
color: string;
|
|
20
|
+
}[];
|
|
21
|
+
isEnableTruncate?: boolean;
|
|
22
|
+
truncateValue?: number;
|
|
23
|
+
upVariant?: string;
|
|
24
|
+
downVariant?: string;
|
|
25
|
+
metricCardColor?: string;
|
|
26
|
+
};
|
|
27
|
+
value: string | number;
|
|
28
|
+
hideBorder?: boolean;
|
|
29
|
+
chartClickConfig?: ClickActionsConfig['chart'];
|
|
30
|
+
className?: string;
|
|
31
|
+
onChartReady?: () => void;
|
|
32
|
+
comparisonValue?: string;
|
|
33
|
+
trendLineOptions?: any;
|
|
34
|
+
events?: any;
|
|
35
|
+
};
|
|
36
|
+
declare const _default: React.MemoExoticComponent<({ value, settings, chartClickConfig, hideBorder, className, onChartReady, comparisonValue, trendLineOptions, events, }: SingleValueChartProps) => React.JSX.Element>;
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ChartAppearanceType, ChartSettingsType, OnDrillPivotTableParams, PivotDrillState } from '@/types';
|
|
3
|
+
export type ChartProps = {
|
|
4
|
+
chartOptions: ChartSettingsType;
|
|
5
|
+
data: Record<string, any>[];
|
|
6
|
+
events?: Record<string, Function>;
|
|
7
|
+
config?: Record<string, any>;
|
|
8
|
+
className?: string;
|
|
9
|
+
colors?: string[];
|
|
10
|
+
isShowFullScreen?: boolean;
|
|
11
|
+
isShowFullScreenEnabled?: boolean;
|
|
12
|
+
filterValues?: Record<string, any>;
|
|
13
|
+
onMaximize?: () => void;
|
|
14
|
+
onDrillPivotTable?: (value: OnDrillPivotTableParams) => void;
|
|
15
|
+
pivotDrillState: PivotDrillState;
|
|
16
|
+
isPythonMode?: boolean;
|
|
17
|
+
sortOrder?: string;
|
|
18
|
+
seriesName?: string;
|
|
19
|
+
isSortReversed?: boolean;
|
|
20
|
+
chartHeight?: number;
|
|
21
|
+
chartAppearance?: ChartAppearanceType;
|
|
22
|
+
metricCardColor?: string;
|
|
23
|
+
isMetricCard?: boolean;
|
|
24
|
+
};
|
|
25
|
+
export type MemoizedChartProps = {
|
|
26
|
+
chartOptions: ChartSettingsType;
|
|
27
|
+
events?: Record<string, Function>;
|
|
28
|
+
config?: Record<string, any>;
|
|
29
|
+
className?: string;
|
|
30
|
+
chartHeight?: number;
|
|
31
|
+
hasDecreasedHeight?: boolean;
|
|
32
|
+
zoomOptions?: any;
|
|
33
|
+
options: any;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* @name Chart - The metric visualization component.
|
|
37
|
+
* @prop chartOptions - the chart properties saved in the database.
|
|
38
|
+
* @prop data - the array of objects/records returned by the querying.
|
|
39
|
+
* @prop events (optional) - the click, change, etc. events to be added to the chart.
|
|
40
|
+
* @prop config (optional) - any additional chart specific props to be passed to the respective charts e.g. table, single value.
|
|
41
|
+
* @prop className (optional) - the usual className prop to provide styles.
|
|
42
|
+
* @prop colors (optional) - the admin provided chart color palettes.
|
|
43
|
+
* @returns JSX - chart visaulization content.
|
|
44
|
+
*/
|
|
45
|
+
export declare const Chart: React.MemoExoticComponent<({ chartOptions, data, events, colors, config, className, isShowFullScreen, isShowFullScreenEnabled, sortOrder, onMaximize, onDrillPivotTable, pivotDrillState, isPythonMode, seriesName, isSortReversed, chartHeight, chartAppearance, metricCardColor, isMetricCard, }: ChartProps) => React.JSX.Element>;
|