@databrainhq/plugin 0.7.15 → 0.7.16

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.
Files changed (107) hide show
  1. package/dist/components/Button/index.d.ts +8 -0
  2. package/dist/components/ChartModal/ChartConfig.d.ts +18 -0
  3. package/dist/components/ChartModal/ChartModalOptions.d.ts +6 -0
  4. package/dist/components/ChartModal/SelectField.d.ts +2 -0
  5. package/dist/components/ChartModal/index.d.ts +3 -0
  6. package/dist/components/Charts/AreaChart.d.ts +3 -0
  7. package/dist/components/Charts/BarChart.d.ts +24 -0
  8. package/dist/components/Charts/BoxPlot.d.ts +3 -0
  9. package/dist/components/Charts/BubbleChart.d.ts +3 -0
  10. package/dist/components/Charts/ComboChart.d.ts +3 -0
  11. package/dist/components/Charts/DoughnutChart.d.ts +3 -0
  12. package/dist/components/Charts/FunnelChart.d.ts +3 -0
  13. package/dist/components/Charts/GaugeChart.d.ts +3 -0
  14. package/dist/components/Charts/Histogram.d.ts +3 -0
  15. package/dist/components/Charts/LineChart.d.ts +25 -0
  16. package/dist/components/Charts/PieChart.d.ts +3 -0
  17. package/dist/components/Charts/RowChart.d.ts +3 -0
  18. package/dist/components/Charts/SankeyChart.d.ts +3 -0
  19. package/dist/components/Charts/ScatterChart.d.ts +3 -0
  20. package/dist/components/Charts/SingleValueChart/index.d.ts +3 -0
  21. package/dist/components/Charts/StackedBarChart.d.ts +3 -0
  22. package/dist/components/Charts/SteppedAreaChart.d.ts +3 -0
  23. package/dist/components/Charts/Table/TableChart.d.ts +3 -0
  24. package/dist/components/Charts/WaterfallChart.d.ts +3 -0
  25. package/dist/components/DataType/index.d.ts +2 -0
  26. package/dist/components/Error/index.d.ts +6 -0
  27. package/dist/components/ErrorFallback/index.d.ts +2 -0
  28. package/dist/components/ExternalMetricForm/index.d.ts +15 -0
  29. package/dist/components/FilterDropDown/index.d.ts +11 -0
  30. package/dist/components/FilterField/index.d.ts +21 -0
  31. package/dist/components/FloatingDropDown/index.d.ts +23 -0
  32. package/dist/components/FullScreenChart/index.d.ts +9 -0
  33. package/dist/components/GlobalFilters/index.d.ts +11 -0
  34. package/dist/components/InfoTooltip/index.d.ts +8 -0
  35. package/dist/components/InputField/index.d.ts +15 -0
  36. package/dist/components/MetricChart/CsvDownloadButton.d.ts +10 -0
  37. package/dist/components/MetricChart/MetricChart.d.ts +36 -0
  38. package/dist/components/MetricChart/index.d.ts +2 -0
  39. package/dist/components/MetricCreation/MetricCreation.d.ts +3 -0
  40. package/dist/components/MetricCreation/components/ConstructMetric/ConstructMetric.d.ts +3 -0
  41. package/dist/components/MetricCreation/components/ConstructMetric/components/MetricForm/index.d.ts +3 -0
  42. package/dist/components/MetricCreation/components/ConstructMetric/index.d.ts +2 -0
  43. package/dist/components/MetricCreation/components/Dataset/index.d.ts +3 -0
  44. package/dist/components/MetricCreation/components/Header/index.d.ts +3 -0
  45. package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +3 -0
  46. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartConfigure/index.d.ts +20 -0
  47. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartSettings/index.d.ts +32 -0
  48. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +50 -0
  49. package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/components/InputTables/index.d.ts +2 -0
  50. package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/index.d.ts +9 -0
  51. package/dist/components/MetricCreation/components/MetricOutput/index.d.ts +3 -0
  52. package/dist/components/MetricCreation/index.d.ts +5 -0
  53. package/dist/components/MetricList/MetricList.d.ts +45 -0
  54. package/dist/components/MetricList/components/MetricCard.d.ts +18 -0
  55. package/dist/components/MetricList/components/SingleValueCard.d.ts +3 -0
  56. package/dist/components/MetricList/index.d.ts +3 -0
  57. package/dist/components/MetricTable/index.d.ts +7 -0
  58. package/dist/components/Modal/Modal.d.ts +9 -0
  59. package/dist/components/Modal/ModalFooter.d.ts +5 -0
  60. package/dist/components/Modal/index.d.ts +2 -0
  61. package/dist/components/PopoverMenu/index.d.ts +11 -0
  62. package/dist/components/SearchTab/index.d.ts +2 -0
  63. package/dist/components/Select/index.d.ts +48 -0
  64. package/dist/components/Tab/index.d.ts +10 -0
  65. package/dist/components/Table/index.d.ts +8 -0
  66. package/dist/components/Text/index.d.ts +11 -0
  67. package/dist/components/TextAreaField/index.d.ts +19 -0
  68. package/dist/components/TimeGrainField/index.d.ts +13 -0
  69. package/dist/components/ToggleButton/index.d.ts +12 -0
  70. package/dist/components/index.d.ts +27 -0
  71. package/dist/consts/app.d.ts +39 -0
  72. package/dist/consts/index.d.ts +2 -0
  73. package/dist/consts/metricOptions.d.ts +17 -0
  74. package/dist/containers/Dashboard/Dashboard.d.ts +6 -0
  75. package/dist/containers/Dashboard/EmbededDashboard.d.ts +12 -0
  76. package/dist/containers/Dashboard/index.d.ts +2 -0
  77. package/dist/containers/index.d.ts +1 -0
  78. package/dist/contexts/globalTheme.d.ts +9 -0
  79. package/dist/helpers/cardActions.d.ts +4 -0
  80. package/dist/helpers/getModifiedQuery.d.ts +6 -0
  81. package/dist/helpers/getTimeFilterValue.d.ts +8 -0
  82. package/dist/helpers/groupArray.d.ts +1 -0
  83. package/dist/helpers/groupBy.d.ts +6 -0
  84. package/dist/helpers/index.d.ts +4 -0
  85. package/dist/hooks/index.d.ts +5 -0
  86. package/dist/hooks/useEmbeddedDashboard.d.ts +53 -0
  87. package/dist/hooks/useExternalMetric.d.ts +39 -0
  88. package/dist/hooks/useGenerateDatasetMetrics.d.ts +13 -0
  89. package/dist/hooks/useGenerateEmbeddedMetric.d.ts +15 -0
  90. package/dist/hooks/useOutsideAlerter.d.ts +7 -0
  91. package/dist/index.d.ts +7 -0
  92. package/dist/index.es.js +92114 -0
  93. package/dist/index.umd.js +340 -0
  94. package/dist/style.css +1 -0
  95. package/dist/types/app.d.ts +132 -0
  96. package/dist/types/index.d.ts +2 -0
  97. package/dist/types/metricCreate.d.ts +132 -0
  98. package/dist/typings.d.ts +17 -0
  99. package/dist/utils/arrayToCsvString.d.ts +6 -0
  100. package/dist/utils/colors.d.ts +1 -0
  101. package/dist/utils/fetcher.d.ts +1 -0
  102. package/dist/utils/generated/graphql.d.ts +1863 -0
  103. package/dist/utils/getChartAttributes.d.ts +27 -0
  104. package/dist/utils/getFormattedDataType.d.ts +1 -0
  105. package/dist/utils/index.d.ts +5 -0
  106. package/dist/utils/theme.d.ts +87 -0
  107. package/package.json +3 -2
@@ -0,0 +1,27 @@
1
+ declare type Params = {
2
+ data: any[] | undefined;
3
+ yAxisList: string[] | undefined;
4
+ xAxis: string | undefined;
5
+ measure: string | undefined;
6
+ step: string | undefined;
7
+ sankeyValues: string[] | undefined;
8
+ singleValue: string | undefined;
9
+ };
10
+ export declare const getChartAttributes: ({ data, measure, sankeyValues, singleValue, step, xAxis, yAxisList, }: Params) => {
11
+ labels: string[];
12
+ datasets: {
13
+ label: string;
14
+ data: any[];
15
+ borderColor: string;
16
+ }[] | undefined;
17
+ funnelData: ("" | {
18
+ value: any;
19
+ name: any;
20
+ } | undefined)[];
21
+ sankeyData: any[][] | undefined;
22
+ singleValueData: ("" | {
23
+ value: any;
24
+ label: string;
25
+ } | undefined)[];
26
+ };
27
+ export {};
@@ -0,0 +1 @@
1
+ export declare const getFormattedDataType: (datatype: string) => 'text' | 'number' | 'boolean';
@@ -0,0 +1,5 @@
1
+ export * from './theme';
2
+ export * from './getChartAttributes';
3
+ export * from './colors';
4
+ export * from './getFormattedDataType';
5
+ export * from './arrayToCsvString';
@@ -0,0 +1,87 @@
1
+ /**
2
+ * colors - object of customizable colors
3
+ * typography - object of customizable typography
4
+ * border - object of customizable border
5
+ * shadow - object of customizable box shadow
6
+ * breakpoint - object of customizable breakpoint
7
+ * metricLayoutCols - object of customizable metric chart layout columns
8
+ */
9
+ export interface ThemeType {
10
+ colors?: {
11
+ background?: string;
12
+ primary?: string;
13
+ secondary?: string;
14
+ tertiary?: string;
15
+ dark?: string;
16
+ light?: string;
17
+ primaryDark?: string;
18
+ primaryLight?: string;
19
+ secondaryDark?: string;
20
+ secondaryLight?: string;
21
+ tertiaryDark?: string;
22
+ tertiaryLight?: string;
23
+ error?: string;
24
+ errorDark?: string;
25
+ errorLight?: string;
26
+ success?: string;
27
+ successLight?: string;
28
+ successDark?: string;
29
+ warning?: string;
30
+ warningLight?: string;
31
+ warningDark?: string;
32
+ gray50?: string;
33
+ gray100?: string;
34
+ gray200?: string;
35
+ gray300?: string;
36
+ gray400?: string;
37
+ gray500?: string;
38
+ gray600?: string;
39
+ gray700?: string;
40
+ gray800?: string;
41
+ gray900?: string;
42
+ };
43
+ typography?: {
44
+ colorPrimary?: string;
45
+ colorSecondary?: string;
46
+ colorTertiary?: string;
47
+ fontFamily?: string;
48
+ fontSize?: string;
49
+ fontWeightThin?: number;
50
+ fontWeightLight?: number;
51
+ fontWeightRegular?: number;
52
+ fontWeightSemibold?: number;
53
+ fontWeightBold?: number;
54
+ };
55
+ breakpoint?: {
56
+ xl?: number;
57
+ lg?: number;
58
+ md?: number;
59
+ sm?: number;
60
+ xs?: number;
61
+ };
62
+ metricLayoutCols?: {
63
+ xl?: number;
64
+ lg?: number;
65
+ md?: number;
66
+ sm?: number;
67
+ xs?: number;
68
+ xxs?: number;
69
+ };
70
+ border?: {
71
+ radiusNone?: number | string;
72
+ radiusSm?: number | string;
73
+ radiusMd?: number | string;
74
+ radiusDefault?: number | string;
75
+ radiusLg?: number | string;
76
+ radiusXl?: number | string;
77
+ radius2xl?: number | string;
78
+ radius3xl?: number | string;
79
+ radiusFull?: number | string;
80
+ };
81
+ shadow?: {
82
+ primary?: string;
83
+ secondary?: string;
84
+ tertiary?: string;
85
+ };
86
+ }
87
+ export declare const applyTheme: (theme: ThemeType) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databrainhq/plugin",
3
- "version": "0.7.15",
3
+ "version": "0.7.16",
4
4
  "description": "Databrain app dashboard ui plugin.",
5
5
  "author": "",
6
6
  "license": "MIT",
@@ -27,7 +27,8 @@
27
27
  "husky": "husky install",
28
28
  "predeploy": "cd example && npm install && npm run build",
29
29
  "lint": "eslint --ext .tsx,.ts --ignore-path .gitignore --fix src",
30
- "codegen": "graphql-codegen --config codegen.yml -r dotenv/config"
30
+ "codegen": "graphql-codegen --config codegen.yml -r dotenv/config",
31
+ "prepare": "npm run build"
31
32
  },
32
33
  "devDependencies": {
33
34
  "@commitlint/cli": "^17.0.3",