@databrainhq/plugin 0.16.66-uat1 → 0.16.67-test
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/package.json +8 -3
- package/types/publicTypes.d.ts +872 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@databrainhq/plugin",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.67-test",
|
|
4
4
|
"description": "Databrain app ui plugin.",
|
|
5
5
|
"author": "Databrain",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -10,12 +10,15 @@
|
|
|
10
10
|
"./dist/webcomponents.umd.js"
|
|
11
11
|
],
|
|
12
12
|
"main": "./dist/webcomponents.umd.js",
|
|
13
|
+
"types": "./types/publicTypes.d.ts",
|
|
13
14
|
"exports": {
|
|
14
15
|
".": {
|
|
16
|
+
"types": "./types/publicTypes.d.ts",
|
|
15
17
|
"import": "./dist/webcomponents.es.js",
|
|
16
18
|
"require": "./dist/webcomponents.umd.js"
|
|
17
19
|
},
|
|
18
20
|
"./web": {
|
|
21
|
+
"types": "./types/publicTypes.d.ts",
|
|
19
22
|
"import": "./dist/webcomponents.es.js",
|
|
20
23
|
"require": "./dist/webcomponents.umd.js"
|
|
21
24
|
}
|
|
@@ -24,7 +27,8 @@
|
|
|
24
27
|
"start:repl": "vite --host 0.0.0.0",
|
|
25
28
|
"start": "vite --port 3005",
|
|
26
29
|
"build:css": "tailwindcss build -i src/index.css -o dist/index.css",
|
|
27
|
-
"build": "
|
|
30
|
+
"build:types": "tsc -p tsconfig.public-types.json",
|
|
31
|
+
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 tsc && npm run build:types && vite build",
|
|
28
32
|
"husky": "husky install",
|
|
29
33
|
"predeploy": "cd example && npm install && npm run build",
|
|
30
34
|
"lint": "eslint --ext .tsx,.ts --ignore-path .gitignore --fix src",
|
|
@@ -110,6 +114,7 @@
|
|
|
110
114
|
"vite-tsconfig-paths": "^4.0.3"
|
|
111
115
|
},
|
|
112
116
|
"files": [
|
|
113
|
-
"dist"
|
|
117
|
+
"dist",
|
|
118
|
+
"types"
|
|
114
119
|
]
|
|
115
120
|
}
|
|
@@ -0,0 +1,872 @@
|
|
|
1
|
+
import type { CSSProperties, HTMLAttributes } from 'react';
|
|
2
|
+
export type AllowedChartsType = 'line' | 'bar' | 'stack' | 'row' | 'combo' | 'pie' | 'doughnut' | 'waterfall' | 'funnelV2' | 'gaugeV2' | 'singleValue' | 'table' | 'pivotV2' | 'rose' | 'horizontalStack' | 'treeMap' | 'progressBarV2';
|
|
3
|
+
export type CalendarType = 'ind' | 'default';
|
|
4
|
+
export type TranslationDictionary = Record<string, Record<string, string>>;
|
|
5
|
+
export interface ThemeType {
|
|
6
|
+
button?: {
|
|
7
|
+
primary?: string;
|
|
8
|
+
secondary?: string;
|
|
9
|
+
primaryText?: string;
|
|
10
|
+
secondaryText?: string;
|
|
11
|
+
};
|
|
12
|
+
checkbox?: {
|
|
13
|
+
checked?: string;
|
|
14
|
+
unChecked?: string;
|
|
15
|
+
};
|
|
16
|
+
switch?: {
|
|
17
|
+
enabled?: string;
|
|
18
|
+
disabled?: string;
|
|
19
|
+
};
|
|
20
|
+
drillBreadCrumbs?: {
|
|
21
|
+
fontFamily?: string;
|
|
22
|
+
fontColor?: string;
|
|
23
|
+
activeColor?: string;
|
|
24
|
+
};
|
|
25
|
+
multiSelectFilterDropdown?: {
|
|
26
|
+
badgeColor?: string;
|
|
27
|
+
badgeTextColor?: string;
|
|
28
|
+
};
|
|
29
|
+
datePickerColor?: string;
|
|
30
|
+
manageMetricsStyle?: Record<string, any>;
|
|
31
|
+
breakpoint?: {
|
|
32
|
+
xl?: number;
|
|
33
|
+
lg?: number;
|
|
34
|
+
md?: number;
|
|
35
|
+
sm?: number;
|
|
36
|
+
xs?: number;
|
|
37
|
+
};
|
|
38
|
+
metricLayoutCols?: {
|
|
39
|
+
xl?: number;
|
|
40
|
+
lg?: number;
|
|
41
|
+
md?: number;
|
|
42
|
+
sm?: number;
|
|
43
|
+
xs?: number;
|
|
44
|
+
xxs?: number;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export type AdminThemeOptionsType = {
|
|
48
|
+
general: {
|
|
49
|
+
name: string;
|
|
50
|
+
fontFamily: string;
|
|
51
|
+
};
|
|
52
|
+
dashboard: {
|
|
53
|
+
backgroundColor?: string;
|
|
54
|
+
ctaColor?: string;
|
|
55
|
+
ctaTextColor?: string;
|
|
56
|
+
selectBoxSize?: 'small' | 'medium' | 'large';
|
|
57
|
+
selectBoxVariant?: 'floating' | 'static';
|
|
58
|
+
selectBoxBorderRadius?: string;
|
|
59
|
+
selectBoxTextColor?: string;
|
|
60
|
+
metricCardColor?: string;
|
|
61
|
+
};
|
|
62
|
+
cardDescription: {
|
|
63
|
+
fontSize?: string;
|
|
64
|
+
fontWeight?: string;
|
|
65
|
+
color?: string;
|
|
66
|
+
elementColor?: string;
|
|
67
|
+
};
|
|
68
|
+
cardTitle: {
|
|
69
|
+
fontSize?: string;
|
|
70
|
+
fontWeight?: string;
|
|
71
|
+
color?: string;
|
|
72
|
+
elementColor?: string;
|
|
73
|
+
};
|
|
74
|
+
chart: {
|
|
75
|
+
palettes?: Array<{
|
|
76
|
+
name: string;
|
|
77
|
+
colors: string[];
|
|
78
|
+
}>;
|
|
79
|
+
paletteOptions?: string[];
|
|
80
|
+
selected?: string;
|
|
81
|
+
};
|
|
82
|
+
cardCustomization: {
|
|
83
|
+
padding?: string;
|
|
84
|
+
borderRadius?: string;
|
|
85
|
+
shadow?: string;
|
|
86
|
+
disableShadowOnHover?: boolean;
|
|
87
|
+
disableStroke?: boolean;
|
|
88
|
+
metricStrokeColor?: boolean;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
export type ChartAppearanceType = {
|
|
92
|
+
chartTooltip?: {
|
|
93
|
+
labelStyle?: TextAppearance;
|
|
94
|
+
valueStyle?: TextAppearance;
|
|
95
|
+
tooltipHeader?: TextAppearance;
|
|
96
|
+
tooltipCard?: {
|
|
97
|
+
bgColor?: string;
|
|
98
|
+
borderColor?: string;
|
|
99
|
+
borderRadius?: number;
|
|
100
|
+
padding?: number;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
chartLabel?: {
|
|
104
|
+
position?: 'hidden' | 'top' | 'left' | 'right' | 'bottom' | 'inside';
|
|
105
|
+
radialChartposition?: 'outside' | 'inside';
|
|
106
|
+
};
|
|
107
|
+
chartMargin?: MarginSettings;
|
|
108
|
+
chartLegend?: {
|
|
109
|
+
show?: boolean;
|
|
110
|
+
fixedPosition?: 'top-left' | 'top-center' | 'top-right' | 'left-center' | 'right-center' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
111
|
+
enableVariablePosition?: boolean;
|
|
112
|
+
top?: number;
|
|
113
|
+
left?: number;
|
|
114
|
+
disableLegendScrolling?: boolean;
|
|
115
|
+
legendAppearance?: 'horizontal' | 'vertical';
|
|
116
|
+
truncateLegend?: number;
|
|
117
|
+
legendShape?: 'circle' | 'rect' | 'roundRect' | 'triangle' | 'diamond' | 'arrow' | 'none';
|
|
118
|
+
fontSize?: number;
|
|
119
|
+
fontWeight?: number;
|
|
120
|
+
fontFamily?: string;
|
|
121
|
+
color?: string;
|
|
122
|
+
};
|
|
123
|
+
verticalAxis?: AxisAppearance;
|
|
124
|
+
horizontalAxis?: AxisAppearance;
|
|
125
|
+
};
|
|
126
|
+
type TextAppearance = {
|
|
127
|
+
size?: number;
|
|
128
|
+
family?: string;
|
|
129
|
+
weight?: number;
|
|
130
|
+
color?: string;
|
|
131
|
+
};
|
|
132
|
+
type AxisAppearance = {
|
|
133
|
+
hideAxisLines?: boolean;
|
|
134
|
+
hideSplitLines?: boolean;
|
|
135
|
+
hideAxisLabels?: boolean;
|
|
136
|
+
hideAxisTicks?: boolean;
|
|
137
|
+
axisName?: string;
|
|
138
|
+
axisNameOffset?: number;
|
|
139
|
+
axisLabelMargin?: number;
|
|
140
|
+
fontSize?: number;
|
|
141
|
+
fontFamily?: string;
|
|
142
|
+
fontWeight?: number;
|
|
143
|
+
color?: string;
|
|
144
|
+
axisColor?: string;
|
|
145
|
+
axisNameFontConfig?: {
|
|
146
|
+
fontFamily?: string;
|
|
147
|
+
fontSize?: number;
|
|
148
|
+
fontWeight?: number;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
type CtaButtonStyles = {
|
|
152
|
+
styles?: string;
|
|
153
|
+
hoverStyles?: string;
|
|
154
|
+
activeStyles?: string;
|
|
155
|
+
disabledStyles?: string;
|
|
156
|
+
};
|
|
157
|
+
export type CtaCustomizationType = {
|
|
158
|
+
primary?: CtaButtonStyles;
|
|
159
|
+
secondary?: CtaButtonStyles;
|
|
160
|
+
tertiary?: CtaButtonStyles;
|
|
161
|
+
};
|
|
162
|
+
export type PopoverPlacements = 'auto' | 'auto-start' | 'auto-end' | 'top' | 'bottom' | 'right' | 'left' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end';
|
|
163
|
+
export type DateTypeOptionType = {
|
|
164
|
+
range: 'Last' | 'This' | 'Custom' | 'Custom Date';
|
|
165
|
+
time?: 'Day' | 'Week' | 'Month' | 'Quarter' | 'Year';
|
|
166
|
+
name: string;
|
|
167
|
+
count?: number;
|
|
168
|
+
fromDate?: Date;
|
|
169
|
+
toDate?: Date;
|
|
170
|
+
minDate?: Date;
|
|
171
|
+
maxDate?: Date;
|
|
172
|
+
};
|
|
173
|
+
export type MetricFilterOptionsType = Record<string, {
|
|
174
|
+
options: string[] | Array<{
|
|
175
|
+
value: string | number;
|
|
176
|
+
label: string;
|
|
177
|
+
}> | number[] | DateTypeOptionType[];
|
|
178
|
+
defaultOption?: string | number;
|
|
179
|
+
}>;
|
|
180
|
+
export type DateEmbedPresetOption = {
|
|
181
|
+
type: string;
|
|
182
|
+
interval: number;
|
|
183
|
+
timeGrain: string;
|
|
184
|
+
label: string;
|
|
185
|
+
startDate: Date;
|
|
186
|
+
endDate: Date;
|
|
187
|
+
calendarType?: CalendarType;
|
|
188
|
+
};
|
|
189
|
+
export type GlobalFilterOptionsType = Record<string, {
|
|
190
|
+
options?: Array<{
|
|
191
|
+
value: string | number;
|
|
192
|
+
label: string;
|
|
193
|
+
}>;
|
|
194
|
+
defaultOption?: string[] | string | {
|
|
195
|
+
startDate: Date | undefined;
|
|
196
|
+
endDate: Date | undefined;
|
|
197
|
+
} | {
|
|
198
|
+
min: number | null;
|
|
199
|
+
max: number | null;
|
|
200
|
+
};
|
|
201
|
+
datePresetOptions?: DateEmbedPresetOption[];
|
|
202
|
+
}>;
|
|
203
|
+
export type MarginSettings = {
|
|
204
|
+
marginTop?: number;
|
|
205
|
+
marginBottom?: number;
|
|
206
|
+
marginLeft?: number;
|
|
207
|
+
marginRight?: number;
|
|
208
|
+
};
|
|
209
|
+
export type LegendSettings = {
|
|
210
|
+
show?: boolean;
|
|
211
|
+
top?: number;
|
|
212
|
+
bottom?: number;
|
|
213
|
+
left?: number;
|
|
214
|
+
right?: number;
|
|
215
|
+
position?: string;
|
|
216
|
+
truncateLegendValue?: number;
|
|
217
|
+
legendShape?: string;
|
|
218
|
+
customise?: boolean;
|
|
219
|
+
fixedPosition?: string;
|
|
220
|
+
disableScroll?: boolean;
|
|
221
|
+
fontSize?: number;
|
|
222
|
+
fontFamily?: string;
|
|
223
|
+
fontWeight?: number;
|
|
224
|
+
color?: string;
|
|
225
|
+
};
|
|
226
|
+
export type FloatingDropDownOption = {
|
|
227
|
+
columnsWithDataType?: any;
|
|
228
|
+
key?: string;
|
|
229
|
+
label: string;
|
|
230
|
+
value: string;
|
|
231
|
+
tooltip?: string;
|
|
232
|
+
badge?: string;
|
|
233
|
+
subValue?: string | FloatingDropDownOption;
|
|
234
|
+
subLabelOptions?: string[] | FloatingDropDownOption[];
|
|
235
|
+
icon?: string;
|
|
236
|
+
logo?: string;
|
|
237
|
+
logo2?: string;
|
|
238
|
+
columnList?: any;
|
|
239
|
+
labelType?: string;
|
|
240
|
+
aggregate?: string;
|
|
241
|
+
alias?: string;
|
|
242
|
+
table?: any;
|
|
243
|
+
isImportEnabled?: boolean;
|
|
244
|
+
column?: any;
|
|
245
|
+
subLabelIcon?: string;
|
|
246
|
+
clientColumnType?: 'STRING' | 'NUMBER';
|
|
247
|
+
tableColumn?: any;
|
|
248
|
+
colTypes?: any;
|
|
249
|
+
customColumnName?: string;
|
|
250
|
+
dbName?: string;
|
|
251
|
+
datasourceId?: string;
|
|
252
|
+
id?: string;
|
|
253
|
+
type?: 'STRING' | 'NUMBER';
|
|
254
|
+
presetDateOption?: Record<any, any>;
|
|
255
|
+
filter?: any;
|
|
256
|
+
presetDateOptions?: FloatingDropDownOption[];
|
|
257
|
+
comparisonLabel?: string;
|
|
258
|
+
count?: number;
|
|
259
|
+
dimension?: any;
|
|
260
|
+
actionButton?: {
|
|
261
|
+
icon: any;
|
|
262
|
+
onClick: Function;
|
|
263
|
+
color?: string;
|
|
264
|
+
};
|
|
265
|
+
isCustomField?: boolean;
|
|
266
|
+
isApplyTimezone?: boolean;
|
|
267
|
+
};
|
|
268
|
+
export type ComboAxisSettingsType = {
|
|
269
|
+
axis: string;
|
|
270
|
+
measures: string[];
|
|
271
|
+
gap?: number;
|
|
272
|
+
isEnableStackBar?: boolean;
|
|
273
|
+
isEnableBarBg?: boolean;
|
|
274
|
+
chartTypes: Array<{
|
|
275
|
+
axis: string;
|
|
276
|
+
type: string;
|
|
277
|
+
}>;
|
|
278
|
+
numberFormatter?: string;
|
|
279
|
+
suffix?: string;
|
|
280
|
+
prefix?: string;
|
|
281
|
+
axisPosition?: string;
|
|
282
|
+
isEnableLabelFormatter?: boolean;
|
|
283
|
+
labelFormatter?: Array<{
|
|
284
|
+
upperLimit: number | string;
|
|
285
|
+
lowerLimit: number | string;
|
|
286
|
+
label: string;
|
|
287
|
+
}>;
|
|
288
|
+
isEnableTextBreak?: boolean;
|
|
289
|
+
textBreak?: number;
|
|
290
|
+
};
|
|
291
|
+
export type CustomSettings = {
|
|
292
|
+
isEnableYearOverYear?: boolean;
|
|
293
|
+
isDisableComparisonWithFilter?: boolean;
|
|
294
|
+
isShowDuration?: boolean;
|
|
295
|
+
isEnableFutureLegend?: boolean;
|
|
296
|
+
futureLegendNames?: Record<string, any>;
|
|
297
|
+
hideXSplitLines?: boolean;
|
|
298
|
+
hideYSplitLines?: boolean;
|
|
299
|
+
hideXAxisLines?: boolean;
|
|
300
|
+
hideYAxisLines?: boolean;
|
|
301
|
+
hideYAxisTicks?: boolean;
|
|
302
|
+
hideXAxisTicks?: boolean;
|
|
303
|
+
isEnableSort?: boolean;
|
|
304
|
+
isEnableSmoothLine?: boolean;
|
|
305
|
+
isEnableSwitchMeasure?: boolean;
|
|
306
|
+
isCombineBarAxis?: boolean;
|
|
307
|
+
combinedAxisPrefix?: string;
|
|
308
|
+
combinedAxisSuffix?: string;
|
|
309
|
+
isEnableCurrentLine?: boolean;
|
|
310
|
+
isEnableFullScale?: boolean;
|
|
311
|
+
isEnableLabelFormatting?: boolean;
|
|
312
|
+
isEnableCustomLimits?: boolean;
|
|
313
|
+
isEnableDynamicLimits?: boolean;
|
|
314
|
+
isEnableLogScale?: boolean;
|
|
315
|
+
isEnableTimezoneFormatting?: boolean;
|
|
316
|
+
isEnableBgColor?: boolean;
|
|
317
|
+
timeFormatter?: string;
|
|
318
|
+
customUppperLimit?: number;
|
|
319
|
+
customLowerLimit?: number;
|
|
320
|
+
isEnableInterchange?: boolean;
|
|
321
|
+
bulletOptions?: string[];
|
|
322
|
+
dashOptions?: string[];
|
|
323
|
+
lineOptions?: string[];
|
|
324
|
+
isEnableDashedLine?: boolean;
|
|
325
|
+
isEnableSingleValueBgColor?: boolean;
|
|
326
|
+
singleValueBgColor?: string;
|
|
327
|
+
comparisonBadgeColor?: {
|
|
328
|
+
up?: string;
|
|
329
|
+
down?: string;
|
|
330
|
+
};
|
|
331
|
+
ganttTooltipKeys?: string[];
|
|
332
|
+
linearGaugeV2?: {
|
|
333
|
+
isEnableValue?: boolean;
|
|
334
|
+
isEnableLabel?: boolean;
|
|
335
|
+
size?: string;
|
|
336
|
+
isEnableLabels?: boolean;
|
|
337
|
+
isEnableRange?: boolean;
|
|
338
|
+
labelSize?: number;
|
|
339
|
+
labelWeight?: number;
|
|
340
|
+
isEnableLegend?: boolean;
|
|
341
|
+
isEnableLegendRange?: boolean;
|
|
342
|
+
legendSize?: number;
|
|
343
|
+
legendWeight?: number;
|
|
344
|
+
legendPosition?: string;
|
|
345
|
+
isShowSplitLines?: boolean;
|
|
346
|
+
upperLimit?: {
|
|
347
|
+
isEnable?: boolean;
|
|
348
|
+
limit?: string | number;
|
|
349
|
+
color?: string;
|
|
350
|
+
message?: string;
|
|
351
|
+
messageSize?: number;
|
|
352
|
+
};
|
|
353
|
+
lowerLimit?: {
|
|
354
|
+
isEnable?: boolean;
|
|
355
|
+
limit?: string | number;
|
|
356
|
+
message?: string;
|
|
357
|
+
messageSize?: number;
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
treeMap?: {
|
|
361
|
+
isEnableRangeColors?: boolean;
|
|
362
|
+
maxColor?: string;
|
|
363
|
+
minColor?: string;
|
|
364
|
+
midColor?: string;
|
|
365
|
+
};
|
|
366
|
+
gaugeV2?: {
|
|
367
|
+
isEnableMarkerRange?: boolean;
|
|
368
|
+
isEnableMarkerValue?: boolean;
|
|
369
|
+
isEnableMarkerLabel?: boolean;
|
|
370
|
+
isEnableLegendRange?: boolean;
|
|
371
|
+
legendSize?: number;
|
|
372
|
+
markerSize?: number;
|
|
373
|
+
legendPosition?: string;
|
|
374
|
+
markerColor?: string;
|
|
375
|
+
};
|
|
376
|
+
repulsion?: number;
|
|
377
|
+
markers?: {
|
|
378
|
+
isEnableMax?: boolean;
|
|
379
|
+
isEnableMin?: boolean;
|
|
380
|
+
isEnableAvg?: boolean;
|
|
381
|
+
maxColor?: string;
|
|
382
|
+
minColor?: string;
|
|
383
|
+
};
|
|
384
|
+
YaxislabelFormatters?: Array<{
|
|
385
|
+
upperLimit: number | string;
|
|
386
|
+
lowerLimit: number | string;
|
|
387
|
+
label: string;
|
|
388
|
+
color?: string;
|
|
389
|
+
}>;
|
|
390
|
+
comboLabelFormatter?: Array<{
|
|
391
|
+
axis: string;
|
|
392
|
+
formatter: Array<{
|
|
393
|
+
upperLimit: number;
|
|
394
|
+
lowerLimit: number;
|
|
395
|
+
label: string;
|
|
396
|
+
}>;
|
|
397
|
+
}>;
|
|
398
|
+
barWidth?: number;
|
|
399
|
+
barRadius?: number[];
|
|
400
|
+
xRotation?: number;
|
|
401
|
+
customRotation?: number;
|
|
402
|
+
hideXAxisLabels?: boolean;
|
|
403
|
+
hideYAxisLabels?: boolean;
|
|
404
|
+
fontSize?: number;
|
|
405
|
+
subHeaderShow?: boolean;
|
|
406
|
+
comparisonValueShow?: boolean;
|
|
407
|
+
displayText?: string;
|
|
408
|
+
singleValueFontColor?: string;
|
|
409
|
+
enableSingleValueTruncate?: boolean;
|
|
410
|
+
truncateValue?: number;
|
|
411
|
+
replaceNullValues?: boolean;
|
|
412
|
+
replaceNullValuesWithEmpty?: boolean;
|
|
413
|
+
comparisonTimeColumn?: string;
|
|
414
|
+
comparisonTimeLabel?: string;
|
|
415
|
+
comparisonTimePeriod?: number;
|
|
416
|
+
customDateRange?: FloatingDropDownOption;
|
|
417
|
+
lifeTime?: FloatingDropDownOption;
|
|
418
|
+
comparisonDifferenceType?: 'PERCENTAGE_DIFFERENCE' | 'DIFFERENCE';
|
|
419
|
+
comparisonTimeGrain?: string;
|
|
420
|
+
comparisonTableName?: string;
|
|
421
|
+
comparisonValueFontSize?: number;
|
|
422
|
+
singleValueSuffix?: string;
|
|
423
|
+
singleValuePrefix?: string;
|
|
424
|
+
singleValConditionalFormatter?: Array<{
|
|
425
|
+
type?: 'string' | 'range';
|
|
426
|
+
text?: string;
|
|
427
|
+
min?: number;
|
|
428
|
+
max?: number;
|
|
429
|
+
color?: string;
|
|
430
|
+
operator?: string;
|
|
431
|
+
}>;
|
|
432
|
+
comparisonSuffix?: string;
|
|
433
|
+
subHeaderFontSize?: number;
|
|
434
|
+
subHeaderFontWeight?: number;
|
|
435
|
+
subHeaderFontColor?: string;
|
|
436
|
+
subHeaderAlignment?: string;
|
|
437
|
+
dateFormatter?: string;
|
|
438
|
+
numberFormatter?: string;
|
|
439
|
+
switchAxisNumberFormatter?: Array<{
|
|
440
|
+
numberFormatter?: string;
|
|
441
|
+
axis?: string;
|
|
442
|
+
labelPrefix?: string;
|
|
443
|
+
labelSuffix?: string;
|
|
444
|
+
}>;
|
|
445
|
+
isEnableLabelTooltip?: boolean;
|
|
446
|
+
axisPointerStyle?: string;
|
|
447
|
+
showLabelValues?: boolean;
|
|
448
|
+
showFullStacked?: boolean;
|
|
449
|
+
showConversionRate?: boolean;
|
|
450
|
+
labelFormat?: string;
|
|
451
|
+
isShowTrendLine?: boolean;
|
|
452
|
+
hideNullValues?: boolean;
|
|
453
|
+
chartZoom?: {
|
|
454
|
+
isZoomEnabled?: boolean;
|
|
455
|
+
isShowRightMost?: boolean;
|
|
456
|
+
zoomAxis?: string;
|
|
457
|
+
zoomOnMouseWheel?: boolean;
|
|
458
|
+
};
|
|
459
|
+
showDynamicBehaviour?: boolean;
|
|
460
|
+
isEnableMeasureMode?: boolean;
|
|
461
|
+
roseType?: string;
|
|
462
|
+
selectedMode?: string;
|
|
463
|
+
selectedOffset?: number;
|
|
464
|
+
comboAxisSymbols?: unknown;
|
|
465
|
+
comboStackAxisSymbols?: {
|
|
466
|
+
suffix: string;
|
|
467
|
+
prefix: string;
|
|
468
|
+
name: string;
|
|
469
|
+
};
|
|
470
|
+
gradients?: Array<{
|
|
471
|
+
startColor: string;
|
|
472
|
+
endColor: string;
|
|
473
|
+
offset1: number;
|
|
474
|
+
offset2: number;
|
|
475
|
+
direction: string;
|
|
476
|
+
}>;
|
|
477
|
+
isShowBarGradient?: boolean;
|
|
478
|
+
barGradient?: GradientSettings;
|
|
479
|
+
enableBackgroundGradient?: boolean;
|
|
480
|
+
backgroundGradient?: GradientSettings;
|
|
481
|
+
labelPrefix?: string;
|
|
482
|
+
labelSuffix?: string;
|
|
483
|
+
enableTitleDesc?: boolean;
|
|
484
|
+
chartTitle?: string;
|
|
485
|
+
chartDesc?: string;
|
|
486
|
+
titlePosition?: string;
|
|
487
|
+
cumulativeBar?: boolean;
|
|
488
|
+
stepPadding?: number;
|
|
489
|
+
showFunnelShadow?: boolean;
|
|
490
|
+
hideSplitLines?: boolean;
|
|
491
|
+
hideAxisLines?: boolean;
|
|
492
|
+
axisLabels?: boolean;
|
|
493
|
+
isStackBar?: boolean;
|
|
494
|
+
showSelectLegend?: boolean;
|
|
495
|
+
showStackLabels?: boolean;
|
|
496
|
+
coloredBars?: boolean;
|
|
497
|
+
comboAxisSettings?: ComboAxisSettingsType[];
|
|
498
|
+
singleValueAlignment?: string;
|
|
499
|
+
singleValueAggregate?: {
|
|
500
|
+
isEnabled?: boolean;
|
|
501
|
+
aggregateType?: string;
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
type GradientSettings = {
|
|
505
|
+
startColor?: string;
|
|
506
|
+
endColor?: string;
|
|
507
|
+
offset1?: number;
|
|
508
|
+
offset2?: number;
|
|
509
|
+
direction?: string;
|
|
510
|
+
};
|
|
511
|
+
export type TableSettings = {
|
|
512
|
+
isEnableAllSort?: boolean;
|
|
513
|
+
headerFontBold?: boolean;
|
|
514
|
+
headerFontSize?: number;
|
|
515
|
+
hideBorder?: boolean;
|
|
516
|
+
isHideHorizontalScroll?: boolean;
|
|
517
|
+
isSepAlign?: boolean;
|
|
518
|
+
colAlignments?: Record<string, string>;
|
|
519
|
+
hStackTrendOptions?: Array<{
|
|
520
|
+
column?: string;
|
|
521
|
+
xAxis?: string;
|
|
522
|
+
yAxis?: string;
|
|
523
|
+
}>;
|
|
524
|
+
isEnableDropdownFilter?: boolean;
|
|
525
|
+
dropdownFilterCols?: string[];
|
|
526
|
+
horizontalCellPadding?: number;
|
|
527
|
+
contentAlignment?: string;
|
|
528
|
+
contentWeight?: number;
|
|
529
|
+
contentFontSize?: number;
|
|
530
|
+
contentColor?: string;
|
|
531
|
+
contentFont?: string;
|
|
532
|
+
headerAlignment?: string;
|
|
533
|
+
hideTableHeader?: boolean;
|
|
534
|
+
lineGap?: string;
|
|
535
|
+
hideVerticalDivider?: boolean;
|
|
536
|
+
hideHorizontalDivider?: boolean;
|
|
537
|
+
isRemovePadding?: boolean;
|
|
538
|
+
badgeColumns?: string[];
|
|
539
|
+
aggregateRow?: {
|
|
540
|
+
isEnable?: boolean;
|
|
541
|
+
label?: string;
|
|
542
|
+
function?: string;
|
|
543
|
+
columns?: string[];
|
|
544
|
+
};
|
|
545
|
+
tableNumberFormatter?: Array<{
|
|
546
|
+
columns?: string[];
|
|
547
|
+
formatter?: string;
|
|
548
|
+
suffix?: string;
|
|
549
|
+
prefix?: string;
|
|
550
|
+
}>;
|
|
551
|
+
isEnableNumberFormatting?: boolean;
|
|
552
|
+
formattedColumns?: string[];
|
|
553
|
+
tableFormatter?: string;
|
|
554
|
+
tableSuffix?: string;
|
|
555
|
+
tablePrefix?: string;
|
|
556
|
+
enableStripedRows?: boolean;
|
|
557
|
+
showRowHover?: boolean;
|
|
558
|
+
showTableIcon?: boolean;
|
|
559
|
+
showColumnFilter?: boolean;
|
|
560
|
+
showDownloadBtn?: boolean;
|
|
561
|
+
showTableTitle?: boolean;
|
|
562
|
+
tableTitleColor?: string;
|
|
563
|
+
tableTitle?: string;
|
|
564
|
+
showTableDesc?: boolean;
|
|
565
|
+
enableTableSearch?: boolean;
|
|
566
|
+
searchPosition?: 'left' | 'right';
|
|
567
|
+
paginationPosition?: 'top' | 'bottom';
|
|
568
|
+
isEnableColumnFilter?: boolean;
|
|
569
|
+
enableFilter?: boolean;
|
|
570
|
+
enableSorting?: boolean;
|
|
571
|
+
disablePagination?: boolean;
|
|
572
|
+
defaultRowSize?: string;
|
|
573
|
+
columnSizing?: Record<string, number>;
|
|
574
|
+
isAutoPagination?: boolean;
|
|
575
|
+
isServerSidePagination?: boolean;
|
|
576
|
+
isSortAlphabetically?: boolean;
|
|
577
|
+
isEnableTimezoneFormatting?: boolean;
|
|
578
|
+
timeFormatter?: string;
|
|
579
|
+
conditionalFormatting?: Array<{
|
|
580
|
+
columnName: string;
|
|
581
|
+
rules: Array<{
|
|
582
|
+
operator: string;
|
|
583
|
+
value: string;
|
|
584
|
+
compareWithFormatted?: boolean;
|
|
585
|
+
styles: {
|
|
586
|
+
backgroundColor?: string;
|
|
587
|
+
color?: string;
|
|
588
|
+
badgeColor?: string;
|
|
589
|
+
isApplyBadgeColor?: boolean;
|
|
590
|
+
isApplyBgColor?: boolean;
|
|
591
|
+
prefix?: string;
|
|
592
|
+
suffix?: string;
|
|
593
|
+
};
|
|
594
|
+
}>;
|
|
595
|
+
}>;
|
|
596
|
+
badgeColors?: Record<string, string>;
|
|
597
|
+
badgeTextColors?: Record<string, string>;
|
|
598
|
+
badgeSeparator?: string;
|
|
599
|
+
listColumns?: string[];
|
|
600
|
+
listSeparator?: string;
|
|
601
|
+
stackColAlias?: string;
|
|
602
|
+
customHeaderColor?: {
|
|
603
|
+
isEnabled?: boolean;
|
|
604
|
+
color?: string;
|
|
605
|
+
textColor?: string;
|
|
606
|
+
};
|
|
607
|
+
replaceNullValues?: boolean;
|
|
608
|
+
replaceNullValuesWithEmpty?: boolean;
|
|
609
|
+
isEnableViewDetails?: boolean;
|
|
610
|
+
customViewText?: string;
|
|
611
|
+
hiddenColumns?: string[];
|
|
612
|
+
textWrap?: {
|
|
613
|
+
isEnable?: boolean;
|
|
614
|
+
columns?: string[];
|
|
615
|
+
headerWrap?: boolean;
|
|
616
|
+
enableLineBreaks?: boolean;
|
|
617
|
+
};
|
|
618
|
+
chartAction?: {
|
|
619
|
+
isEnableCustomRedirection?: boolean;
|
|
620
|
+
isEnableColumnRedirection?: boolean;
|
|
621
|
+
isEnableCustomColumnRedirection?: boolean;
|
|
622
|
+
clickColumns?: Array<{
|
|
623
|
+
colName: string;
|
|
624
|
+
link: string;
|
|
625
|
+
isOpenInNewTab?: boolean;
|
|
626
|
+
}>;
|
|
627
|
+
clickValues?: Array<{
|
|
628
|
+
text: string;
|
|
629
|
+
link: string;
|
|
630
|
+
isOpenInNewTab?: boolean;
|
|
631
|
+
}>;
|
|
632
|
+
};
|
|
633
|
+
isEnableTranspose?: boolean;
|
|
634
|
+
};
|
|
635
|
+
export type LabelSettings = {
|
|
636
|
+
axis?: string;
|
|
637
|
+
show?: boolean;
|
|
638
|
+
position?: string;
|
|
639
|
+
truncateLabel?: boolean;
|
|
640
|
+
truncateLabelValue?: number;
|
|
641
|
+
wrapText?: boolean;
|
|
642
|
+
showLabelLine?: boolean;
|
|
643
|
+
isEnableValueSummation?: boolean;
|
|
644
|
+
showDimension?: boolean;
|
|
645
|
+
XAxisStyle?: LabelAxisStyle;
|
|
646
|
+
YAxisStyle?: LabelAxisStyle;
|
|
647
|
+
isDynamicPosition?: boolean;
|
|
648
|
+
showActualValue?: boolean;
|
|
649
|
+
};
|
|
650
|
+
type LabelAxisStyle = {
|
|
651
|
+
size?: number;
|
|
652
|
+
family?: string;
|
|
653
|
+
weight?: number;
|
|
654
|
+
color?: string;
|
|
655
|
+
axisName?: string;
|
|
656
|
+
axisPadding?: number;
|
|
657
|
+
axisMargin?: number;
|
|
658
|
+
axisNameFontConfig?: {
|
|
659
|
+
fontFamily?: string;
|
|
660
|
+
fontSize?: number;
|
|
661
|
+
fontWeight?: number;
|
|
662
|
+
};
|
|
663
|
+
};
|
|
664
|
+
export type AxisSettings = {
|
|
665
|
+
axis?: string;
|
|
666
|
+
};
|
|
667
|
+
export type PivotSettingsType = {
|
|
668
|
+
rows?: string[];
|
|
669
|
+
columns?: string[];
|
|
670
|
+
};
|
|
671
|
+
export type PivotSettingsType2 = {
|
|
672
|
+
measures?: string[];
|
|
673
|
+
dimensions?: string[];
|
|
674
|
+
headers?: string[];
|
|
675
|
+
isDynamicHeaders?: boolean;
|
|
676
|
+
dims?: string[];
|
|
677
|
+
};
|
|
678
|
+
export type GaugeSettingsType = {
|
|
679
|
+
metric?: string;
|
|
680
|
+
dimensions?: string[];
|
|
681
|
+
};
|
|
682
|
+
export type TooltipSettings = {
|
|
683
|
+
labelStyle?: TextAppearance;
|
|
684
|
+
valueStyle?: TextAppearance;
|
|
685
|
+
tooltipHeader?: TextAppearance;
|
|
686
|
+
tooltipCard?: {
|
|
687
|
+
bgColor?: string;
|
|
688
|
+
borderColor?: string;
|
|
689
|
+
};
|
|
690
|
+
};
|
|
691
|
+
type Wrap<T> = {
|
|
692
|
+
defaultValue?: T;
|
|
693
|
+
canEdit?: boolean;
|
|
694
|
+
};
|
|
695
|
+
type Wrappable<T> = [NonNullable<T>] extends [
|
|
696
|
+
string | number | boolean | null | undefined
|
|
697
|
+
] ? Wrap<T> : [NonNullable<T>] extends [any[]] ? Wrap<T> : [NonNullable<T>] extends [object] ? CustomChartShape<NonNullable<T>> : Wrap<T>;
|
|
698
|
+
type CustomChartShape<T extends object> = {
|
|
699
|
+
[K in keyof T]?: Wrappable<T[K]>;
|
|
700
|
+
};
|
|
701
|
+
export type CustomChartSettingsType = CustomChartShape<{
|
|
702
|
+
margins?: MarginSettings;
|
|
703
|
+
chartColors?: string[];
|
|
704
|
+
legendSettings?: LegendSettings;
|
|
705
|
+
labelSettings?: LabelSettings;
|
|
706
|
+
customSettings?: CustomSettings;
|
|
707
|
+
tooltipSettings?: TooltipSettings;
|
|
708
|
+
tableSettings?: TableSettings;
|
|
709
|
+
pivotTableSettings?: PivotSettingsType;
|
|
710
|
+
pivotTableSettings2?: PivotSettingsType2;
|
|
711
|
+
gaugeSettings?: GaugeSettingsType;
|
|
712
|
+
axisSettings?: AxisSettings;
|
|
713
|
+
}>;
|
|
714
|
+
export interface DashboardProps extends HTMLAttributes<HTMLElement> {
|
|
715
|
+
token: string;
|
|
716
|
+
dashboardId?: string;
|
|
717
|
+
options?: {
|
|
718
|
+
disableMetricCreation?: boolean;
|
|
719
|
+
disableMetricUpdation?: boolean;
|
|
720
|
+
disableMetricDeletion?: boolean;
|
|
721
|
+
disableManageMetrics?: boolean;
|
|
722
|
+
disableLayoutCustomization?: boolean;
|
|
723
|
+
dashboardSpacing?: {
|
|
724
|
+
verticalGap?: number;
|
|
725
|
+
horizontalGap?: number;
|
|
726
|
+
hide?: boolean;
|
|
727
|
+
};
|
|
728
|
+
disableSaveLayout?: boolean;
|
|
729
|
+
disableScheduleEmailReports?: boolean;
|
|
730
|
+
disableUnderlyingData?: boolean;
|
|
731
|
+
showDashboardActions?: boolean;
|
|
732
|
+
hideDashboardName?: boolean;
|
|
733
|
+
allowedChartTypes?: AllowedChartsType[];
|
|
734
|
+
chartColors?: string[];
|
|
735
|
+
chartPaletteOptions?: Array<{
|
|
736
|
+
name: string;
|
|
737
|
+
colors: string[];
|
|
738
|
+
}>;
|
|
739
|
+
hideDatePickerOptions?: string[];
|
|
740
|
+
chartAppearance?: ChartAppearanceType;
|
|
741
|
+
disableMainLoader?: boolean;
|
|
742
|
+
disableMetricLoader?: boolean;
|
|
743
|
+
hideMetricCardShadow?: boolean;
|
|
744
|
+
shouldFitFullScreen?: boolean;
|
|
745
|
+
disableMetricCardBorder?: boolean;
|
|
746
|
+
isShowNoDataFoundScreen?: boolean;
|
|
747
|
+
isModifyUrl?: boolean;
|
|
748
|
+
disableDownloadUnderlyingDataNoFilters?: boolean;
|
|
749
|
+
disableDownloadDataNoFilters?: boolean;
|
|
750
|
+
exportMsgPosition?: 'bottom' | 'bottom-left' | 'bottom-right' | 'center' | 'top' | 'top-left' | 'top-right' | 'hidden';
|
|
751
|
+
dashboardPadding?: string;
|
|
752
|
+
ctaButtonCustomization?: CtaCustomizationType;
|
|
753
|
+
showAllChartSettings?: boolean;
|
|
754
|
+
renameBoard?: string;
|
|
755
|
+
enableDashboardMinimap?: boolean;
|
|
756
|
+
};
|
|
757
|
+
theme?: ThemeType;
|
|
758
|
+
isHideChartSettings?: boolean;
|
|
759
|
+
isHideTablePreview?: boolean;
|
|
760
|
+
isStickyDashboardFilters?: boolean;
|
|
761
|
+
enableDownloadCsv?: boolean;
|
|
762
|
+
disableDownloadPng?: boolean;
|
|
763
|
+
enableDownloadAllMetrics?: boolean;
|
|
764
|
+
enableDownloadAllPdf?: boolean;
|
|
765
|
+
enableEmailCsv?: boolean;
|
|
766
|
+
enableMultiMetricFilters?: boolean;
|
|
767
|
+
disableFullscreen?: boolean;
|
|
768
|
+
enableTitleClickFullscreen?: boolean;
|
|
769
|
+
optionsIcon?: 'kebab-menu-vertical' | 'download';
|
|
770
|
+
settingsIcon?: {
|
|
771
|
+
name?: string;
|
|
772
|
+
iconSvg?: string;
|
|
773
|
+
menuPosition?: PopoverPlacements;
|
|
774
|
+
};
|
|
775
|
+
adminThemeOptions?: AdminThemeOptionsType;
|
|
776
|
+
customMessages?: {
|
|
777
|
+
tokenExpiry?: string;
|
|
778
|
+
tokenAbsent?: string;
|
|
779
|
+
};
|
|
780
|
+
themeName?: string;
|
|
781
|
+
globalFilterOptions?: GlobalFilterOptionsType;
|
|
782
|
+
handleServerEvent?: any;
|
|
783
|
+
noDataImg?: string;
|
|
784
|
+
noDataFoundSvg?: string;
|
|
785
|
+
manageMetricsBtnContent?: any;
|
|
786
|
+
longDescriptionConfig?: {
|
|
787
|
+
width?: string;
|
|
788
|
+
fontColor?: string;
|
|
789
|
+
};
|
|
790
|
+
chartColumns?: Array<{
|
|
791
|
+
dimensions?: string[];
|
|
792
|
+
measures?: string[];
|
|
793
|
+
isEnabled?: boolean;
|
|
794
|
+
metricId?: string;
|
|
795
|
+
}>;
|
|
796
|
+
language?: string;
|
|
797
|
+
translationDictionary?: TranslationDictionary;
|
|
798
|
+
hideDashboardFilters?: string[];
|
|
799
|
+
calendarType?: CalendarType;
|
|
800
|
+
customChartSettings?: CustomChartSettingsType;
|
|
801
|
+
chartClickFunction?: any;
|
|
802
|
+
debug?: boolean | string;
|
|
803
|
+
}
|
|
804
|
+
export interface MetricProps extends HTMLAttributes<HTMLElement> {
|
|
805
|
+
token: string;
|
|
806
|
+
chartColors?: string[];
|
|
807
|
+
metricId: string;
|
|
808
|
+
variant?: 'card' | 'fullscreen';
|
|
809
|
+
isHideChartSettings?: boolean;
|
|
810
|
+
isHideTablePreview?: boolean;
|
|
811
|
+
enableDownloadCsv?: boolean;
|
|
812
|
+
enableEmailCsv?: boolean;
|
|
813
|
+
disableDownloadPng?: boolean;
|
|
814
|
+
onMinimize?: () => void;
|
|
815
|
+
chartRendererType?: 'svg' | 'canvas';
|
|
816
|
+
theme?: ThemeType;
|
|
817
|
+
width?: number;
|
|
818
|
+
height?: number;
|
|
819
|
+
className?: string;
|
|
820
|
+
style?: CSSProperties;
|
|
821
|
+
metricFilterOptions?: MetricFilterOptionsType;
|
|
822
|
+
enableMultiMetricFilters?: boolean;
|
|
823
|
+
metricFilterPosition?: 'outside' | 'inside';
|
|
824
|
+
isDisableCardTitle?: boolean;
|
|
825
|
+
disableFullscreen?: boolean;
|
|
826
|
+
enableTitleClickFullscreen?: boolean;
|
|
827
|
+
optionsIcon?: 'kebab-menu-vertical' | 'download';
|
|
828
|
+
customMessages?: {
|
|
829
|
+
tokenExpiry?: string;
|
|
830
|
+
tokenAbsent?: string;
|
|
831
|
+
};
|
|
832
|
+
themeName?: string;
|
|
833
|
+
appearanceOptions?: {
|
|
834
|
+
appearanceOptionsPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
835
|
+
dynamicBehaviour?: {
|
|
836
|
+
isEnabled?: boolean;
|
|
837
|
+
label?: string;
|
|
838
|
+
};
|
|
839
|
+
cumulativeBar?: {
|
|
840
|
+
isEnabled?: boolean;
|
|
841
|
+
label?: string;
|
|
842
|
+
};
|
|
843
|
+
stackedBars?: {
|
|
844
|
+
isEnabled?: boolean;
|
|
845
|
+
label?: string;
|
|
846
|
+
};
|
|
847
|
+
};
|
|
848
|
+
hideDatePickerOptions?: string[];
|
|
849
|
+
chartAppearance?: ChartAppearanceType;
|
|
850
|
+
hideMetricCardShadow?: boolean;
|
|
851
|
+
disableUnderlyingData?: boolean;
|
|
852
|
+
noDataImg?: string;
|
|
853
|
+
disableMetricCardBorder?: boolean;
|
|
854
|
+
longDescriptionConfig?: {
|
|
855
|
+
width?: string;
|
|
856
|
+
fontColor?: string;
|
|
857
|
+
};
|
|
858
|
+
isMergedCard?: boolean;
|
|
859
|
+
chartColumns?: {
|
|
860
|
+
dimensions?: string[];
|
|
861
|
+
measures?: string[];
|
|
862
|
+
isEnabled?: boolean;
|
|
863
|
+
};
|
|
864
|
+
language?: string;
|
|
865
|
+
translationDictionary?: TranslationDictionary;
|
|
866
|
+
globalFilterOptions?: GlobalFilterOptionsType;
|
|
867
|
+
calendarType?: CalendarType;
|
|
868
|
+
disableDownloadUnderlyingDataNoFilters?: boolean;
|
|
869
|
+
disableDownloadDataNoFilters?: boolean;
|
|
870
|
+
debug?: boolean | string;
|
|
871
|
+
}
|
|
872
|
+
export {};
|